I am looking for a mutable (balanced) tree/map/hash table in Haskell or a way how to simulate it inside a function. I.e. when I call the same function several times, the structure is preserved. So far I have tried Data.HashTable (which is OK, but somewhat slow) and tried Data.Array.Judy but I was unable to make it work with GHC 6.10.4. A...
Hi
I find that both set and map are implemented as a tree. set is a binary search tree, map is a self-balancing binary search tree, such as red-black tree? I am confused about the difference about the implementation. The difference I can image are as follow
1) element in set has only one value(key), element in map has two values.
2) se...
I have a java.util.Map that maps from a logical name to a set of parameters to use with that name.
Map<String,Parameters> howShouldINameThee = ...;
What is the best name for this map?
Should I go simple and just call this parameters or parametersMap?
Do I include information about the key in the name like paramtersByName so that ...
i want to parse the addresses from google gecoding api and store it as:
address
city
state
zipcode
country
some places has full address from google map and some just half, how can i know which part of the address is city, state or country? or just zipcode?
it would be helpful if some expert pointed out some help here.
...
I implemented a version of the str_replace function available in php using python. Here is my original code that didn't work
def replacer(items,str,repl):
return "".join(map(lambda x:repl if x in items else x,str))
test = "hello world"
print test
test = replacer(test,['e','l','o'],'?')
print test
but this prints out
hello world
...
hi
is there any world map (on web) that can give me x,y coordinates
for any place in the world ?
(i build Windows-mobile GPS program and i need to check it)
thank's in advance
...
Say I have a collection of maps:
(def coll #{{:name "foo"} {:name "bar"}})
I want a function that will add an id (a unique number is fine) to each map element in the collection. i.e.
#{{:id 1 :name "foo"} {:id 2 :name "bar"}}
The following DOES NOT WORK, but it's the line of thinking I currently have.
(defn add-unique-id [coll]
(m...
Kindly address the below mentioned query about the zooming on android maps , quite a long time am searching for answer. left a msg in answer field as i dont wanna repeat the same question
link text
...
I have a series of cities that I need to programmaticly draw arcs between on a global map. The arcs also have to be labeled with a series of values. Output needs to be png or something similar (i.e. I am not looking for a javascript solution.)
Any suggestions on ways of doing this? I can choose language or tool (so long as it is free...
Background
There is a square map with some obstacles on it. Obstacles are represented by polygons. I implemented following path finding algorithm:
1) Choose precision (it'll be denoted by k)
2) Divide map into k x k squares.
3) Make graph from those squares according to the following rules:
- Every node represents one square
- Two nodes ...
Hi,
I am trying to loop over an HashMap with the keySet as below:
for (String key : bundle.keySet()) {
String value = bundle.get(key);
...
}
I use a lot of for-each loops on HashMaps in other parts of my code, but this one as a weird behavior: its size is 7 (what's normal) but keySet, entrySet and values are null (according t...
I'm new to XML. What I have is a load of XML from Adobe Illustrator which I'm trying to map excel data onto. I have sequences in the original data which look like this
<Market_Pie>
<datanumDataColumns="5">
<values>
<row>
<valuekey="name"></value>
<value>503.931</value>
<value>268.301</value>
<value>285.561</value>
<value>152.037</value>...
OK, so here's my scenario.
I have a Google map on the left, and a corresponding contents on the right.
When a user moves around the map or zoom in or zoom out, how can I dynamically change the contnets on the right given the "new" map now?
I guess I need to know the "current" map information and then use that to retrieve the content c...
OK. This might be more of a math question but here goes.
I have a longitude value, let's say X. And I want to know if X falls between any two longitude values.
For example, if my X is 145 and the range is [21, -179]. The range is given by the Google Map API bounds and I can see on the google map that X does fall within that range.
How...
I have a map in C++ and I wish to input my class as the value, and a string as the key.
When I try to, I get an error 'Scene_Branding' : illegal use of this type as an expression
I get an illegal use of this type as an expression, and I can't seem to find out why. Here is some code.
string CurrentScene = "Scene_Branding";
map<string, ...
Hi all,
just wondering if you have any suggestions here. I need a lot of sample maps/graphs to test my shortest path search solution (I was told I should have >100 of them). My code is supposed to work in a simulator, which uses OpenStreetMap maps of urban setting, limiting the total number of junctions to a few thousand. the problem is...
Hi can someone tell me some good tutorials on fold left and map
...
If I have an immutable Map which I might expect (over a very short period of time - like a few seconds) to be adding/removing hundreds of thousands of items from, is the standard HashMap a bad idea? Let's say I want to pass 1Gb of data through the Map in <10 seconds in such a way that the maximum size of the Map at any once instant is on...
I am writing code that inserts rows from a database into a vector. The vectors are then stored in a std::map. This architecture allows me to logically partition the datasets (vectors), based on the map key.
In my code, I will be retrieving a dataset (i.e. vector) from the std::map, adding/removing rows to it or performing some other log...
Hi, I'm newbie in map (or spatial data?) technology.
For starting point, I want to know the terms, what it is, how it work. I also want to kno how tostore map data(lat, long, etc).
Maybe, some simple (for newbie) tutorial and down to earth book could help, as I don't know anything about it.
Another suggestion and tips/trick when working...