Page 1 of 1

hashtable

Posted: Fri May 30, 2014 4:52 pm
by Aris Miliotis

I am self taught programmer so forgive me if use the wrong terms.
Want I want is to create a hashtable, I think that's what is called....

I want to create a database that I can check the column names and add a row with 0 except at the appropriate column, 1...
I don't mind creating all my columns manually and adding them the same script, to check for the column name against my_string, so I need a way to give to my javascript the name of its database column...

even better version, is there a way to create database columns from a javascript?

thanks :)


hashtable

Posted: Fri May 30, 2014 7:14 pm
by Evgene Karachevtsev

Hello Aris,

What database do you mean? Could you please clarify what result you are going to achieve? Provide more details, please.


hashtable

Posted: Fri May 30, 2014 7:36 pm
by Aris Miliotis

I mean a database on appery.io, a collection I created there...
I am trying to have a presorted database so I can find things faster...


hashtable

Posted: Fri May 30, 2014 8:36 pm
by Evgene Karachevtsev

Aris,

About "presorted database" - you can create index for column. You can't add column to custom collection in database from javascript. Could you explain your goals more detailed and we will try helping you.


hashtable

Posted: Sat May 31, 2014 4:24 pm
by Aris Miliotis

OK, now I got a new problem :( and I will explain the previous one too... :)

So I need to create a database with locations of each of my users... I am using appery's geolocation service for that, it is gps based right? not wifi or cell?...? this is the "new" problem, I read somewhere that geolocation is not gps based...

now to the database issue, I need to store all my users on a database and then find for each user the closest other users using a selection algorithm I wrote. this is why I wanted to do the hash table so that I don't have to look through the WHOLE database for the closest users, but just a small sub collection defined by a hashtable...
On this note though, do I need to do this with my own database or is there a way to do it on Google's database?

Thank you,
aris.


hashtable

Posted: Mon Jun 02, 2014 8:24 am
by Evgene Karachevtsev

Hello Aris,

There are two ways to retrieve position:


hashtable

Posted: Mon Jun 02, 2014 4:00 pm
by Aris Miliotis

Don't need this anymore, I figured out how to make a query on geopoints in my database and that will suffice for now... BTW not all the example of geopoint searches you provide work, some give an error....

I asked this somewhere else, but I'll ask here too... once I do my query how do I handle the response? In the test environment I get back this weird array, looks like JSON, and I don't know how to save parts of that array, the _ids and locations on local data and manipulate them....


hashtable

Posted: Tue Jun 03, 2014 2:30 am
by Alena Prykhodko