map

What is the __NULL_IMPORT_DESCRIPTOR good for (MSVC map file)?

I have a map file generated with microsoft visual studio. It contains a relatively big area named __NULL_IMPORT_DESCRIPTOR. What is this good for? It has something to do with linked dlls but I cannot figure out the exact purpose of it. ...

Java Map anti-pattern?

Edit: I've gotten a couple of answers that say what I already said in the question. What I am really interested in is finding corroborating reference material. I am looking at a code sample that more or less follows this pattern: Map<String, List> getListsFromTheDB() { Map<String, List> lists = new HashMap<String, List>(); //eac...

How to use STL unsorted key-value as pair in map

Hello, I need to use STL C++ map to store key value pairs. I need to store more than one data information in stl map. e.g Need to store DataType,Data and its behavior as(in param/outparam) all in string format. But map always use key value pair so if I store it like std::map<map<"int","50",>"behavior">. But always it sorts the...

Create US heat map with mouseover popup features and NO FLASH

HI, Currently am using an interactive flash map on my website, which displays different colors for different states of US based on some data. I also have a mouseover feature to display additional data when user hovers over a state. Are there any tools to achieve the above functionality without using flash (mobile compatible). I'm ready...

Function for line between 2 GPS coordinates

I'm trying to find a function lng = f(lat) that would help me draw a line between 2 given GPS coordinates, (lat1, lng1) and (lat2, lng2). I've tried the traditional Cartesian formula y=mx+b where m=(y2-y1)/(x2-x1), but GPS coordinates don't seem to behave that way. What would be a formula/algorithm that could help me achieve my goal. ...

std::map::erase infinite loop

I have a map of a vector of char's and a vector of strings. Every so often, if I've seen the vector of characters before, I'd like to add a string to my vector of strings. Below is my code to do that. map<vector<char>, vector<string>>::iterator myIter = mMyMap.find(vChars); if(myIter != mMyMap.end()) { vector<string> vStrings = my...

more efficient sparse matrix element accessor

Hi, I wrote a small sparse matrix class with the member: std::map<int,std::map<int,double> > sm; The method below is the function i use to access the elements of a matrix, if not possible through an iterator: double matrix::operator()(int r,int c) const { std::map<int,std::map<int,double> >::const_iterator i = sm.find(r); if(...

Using std.algorithm.map with member functions in D2.

I have: Foo foo = new Foo(); foreach (i; 0..10) { Bar bar = foo.getBar(i); ... } I want to be able to instead say (equivalently): foreach (bar; foo.getAllBars()) { ... } How do I go about implementing getAllBars()? I figured something like this: class Foo { auto getAllBars() { return map!(getBar)(iota(10)); } } ...

How do I get the output of an object which has more than one line in Perl?

@ver = $session->cmd("sh conf"); The variable here is ver, which has the configuration file, that is, it has more than one line. So how to take an output of each line of the ver variable without putting it in a loop? ...

Maps in List in a map activity

map activity allows one map in a activity, i have a scenario and hard time implementing it, i have a list of records and for each record i show google map now this is not becoming possible in lmap activity with list having earch row a seperate map?, how can this be achived any recomendations ...

Should I manipulate a C++ map's value via a pointer or by updating the record?

I'm using a C++ std::map to hold a large collection of entities: using std::map; map {structureEntityID, classEntityRecord} tableEntityRecords; //(replace {}s with arrows) I will be frequently modifying the entities in my table (many times a second). Is it better to modify those records via a pointer or is it better to make a local ...

C++ map in a class, how do I make a member accessor

I'm new to maps. I need a class that constructs seating for a performance (there are many performances). Here's what I have so far: // header stuff/libraries Seats::Seats() { map< const string, bool > seat; seat["A1"] = false; seat["A2"] = false; /* more seats .. */ } Do I need to create an access member if I want to...

Groovy:GPath - reading a xml file in which a node attribute is a map

I have following xml file: <doc_xml> <nodes> <node id='1' spec="{spec_a=0.9, spec_b=0.1}" /> <node id='2' spec="{spec_a=0.1, spec_b=0.3}" /> <node id='3' spec="{}" /> </nodes> </doc_xml> This code was created using Groovy MarkupBuilder. Now I would like to parse this file in a groovy script: def xml = new XmlParser().parseText...

Is this usage of unordered map efficient/right way?

I want to learn about mapping functions in c/c++ in general so this is a basic program on unordered mapping. I use unordered mapping because my input data are not sorted and I read that unordered_map is very efficient. Here I've an array with which I'm creating the hash table and use the lookup function to find if the elements in another...

How best to get map from key list/value list in groovy?

In python, I can do the following: keys = [1, 2, 3] values = ['a', 'b', 'c'] d = dict(zip(keys, values)) assert d == {1: 'a', 2: 'b', 3: 'c'} Is there a nice way to construct a map in groovy, starting from a list of keys and a list of values? ...

Using custom map with MKMapKit

Hi, I am creating an iPhone app for OS4.0, and I am attempting to integrate a custom map with a standard MKMapView. I have been provided a map in .eps format (vector image), and I want to somehow overlay this on an MKMapView in and restrict the scrolling boundaries of the map so users cannot scroll outside the boundaries of the custom ma...

how to get an movable pin on a map view iphone or ipad ?

hello, how to get an movable pin on map view , so that user can move that pin and point out the specific location on the map. please tell me how to do this thanks Kumar. ...

how to get an movable pin on a mkmapview iphone or ipad ?

hello, iam developing an app where user will select his region, to select his region we need to display an colored pin which is movable , then ill fetch the respective lat long. how can i get movable pin on my map overlay using code . thanks Kumar Y R ...

Haskell Range Map library

Is there a Haskell library that allows me to have a Map from ranges to values? (Preferable somewhat efficient.) let myRangeMap = RangeMap [(range 1 3, "foo"),(range 2 7, "bar"),(range 9 12, "baz")] in rangeValues 2 ==> ["foo","bar"] ...

I need a handy jQuery tool (plugin) to work with the map

I need a handy jQuery tool (plugin) to work with the map. The project has narisovanaya map with cities marked on it, the possible routes. Example I want to: To apply the route (in this example it is shown in green) on top of the map (img) Display a small div with information about city Now inclined to think that would work to im...