What is the Linq equivalent to the map! or collect! method in Ruby?
a = [ "a", "b", "c", "d" ]
a.collect! {|x| x + "!" }
a #=> [ "a!", "b!", "c!", "d!" ]
I could do this by iterating over the collection with a foreach, but I was wondering if there was a more elegant Linq solution.
...
We are using 2 following google services, we need to talk to google folks if we need to do some additional stuff to fulfill the conditions:
Reverse Geocoding APIs: For getting city and state from the iphone's geocodes (latitudes and longitudes)
Doing a Local Business Search: based on city and state
Also is it mandatory to embade Goog...
Dear all:
We are programming a logging library that keeps itself in a .hpp file. We would like to include <tr1/unordered_map> (if the compiler supports TR1,) or the standard <map> otherwise. Is there a standard way of checking at compile time if tr1 is available or not?
I was thinking that the same way that the "__cplusplus" define sym...
I'm looking for some good resources (articles, algorithm descriptions, SW libraries...) on image rectification for GIS purposes. Are there any .NET-accessible open source libraries for this?
Thanks in advance
...
What is the performance difference between using an iterator to loop through an STL map, versus a vector? I'd like to use the map key for insertion, deletion, and some accesses, but I also need to do regular accesses to every element in the map.
...
I want to populate a map property on a Struts2 action from a JSP. What is the format of the data names that I should use? Initially I am interested in populating a Map<String, String> but in the future I would be interesting in populating a Map<String, DomainClass> where the DomainClass has properties of its own.
...
How do you use the Android API to zoom in and out maps with the 2 finger gestures like iPhone?
...
This the description of the program brief:
Produce a software that keeps track of courses taught by lecturers at College. For each course, a course code and title needs to be recorded, as well as a list of lecturers taking that course needs to be recorded. The system should allow courses and lecturers to be added and removed from the...
I'm using an OpenLayers-map and I want to use in it different mapservers, that use different coordinate systems. Can OpenLayers integrate it in the same map and automatically converts coordinate-systems?
...
I'm looking for a database that supports the following functionality:
1) Records in the database are like Python dictionaries or Perl hashes. For example, a "purchase" record might look like this:
<purchase 5436> = { product: "BMX Bike", price: 99.50, city: "Springfield" }
2) The records are stored in arrays of variable length. The d...
The following is a data set I have stored in a hash map, and I have to find the shortest path between two values.
9244, 4322, 4886, 5989, 8598, 9979, 1447, 9657
8598, 6752, 7146, 1951, 660, 1447, 7779
568, 1951, 4886, 2570, 9026, 9489, 7779
6752, 3424, 1977, 4746, 9657
77
The key value of the hash map is the first value of each line, ...
I am just learning how to use Terracotta after discovering it about a month ago. It is a very cool technology.
Basically what I am trying to do:
My root (System of Record) is a ConcurrentHashMap.
The main Instrumented Class is a "JavaBean" with 30 or so fields that I want to exist in the HashMap.
There will be about 20000 of these J...
I'm trying to insert some value pairs into a std::map.
In the first case, I receive a pointer to the map, dereference it and use the subscript operator to assign a value. i.e.
(*foo)[index] = bar;
Later, when I try to iterate over the collection, I'm returned key/value pairs which contain null for the value attribute in all cases ex...
I want to create a HashMap in java for users with preferences. This would be easy to do in a database, but unfortunately I can't use a database. What I need is a way to find a user by name in the HashMap, and to find all the users with a certain interest (e.g. golf). If I delete a user, then all their interests should be deleted.
Anyon...
I was trying to erase a range of elements from map based on particular condition. How do I do it using STL algorithms?
Initially I thought of using remove_if but it is not possible as remove_if does not work for associative container.
Is there any "remove_if" equivalent algorithm which works for map ?
As a simple option, I thought of ...
I want to create a container which can associate a CLSID structure to something else (for example, a string); for example, std::map.
(the CLSID means standard Windows CLSID structure)
However when I want to use its find() and insert (object[clsid] = string), the STL just failed and gives errors.
Does anyone know how to solve this?
Fo...
I have UMN configured as a cascading mapserver. I want it to reproject the map while cascading through UMN. How can I do that? Is that possible at all?
...
I am using OpenLayers to create a box of interest with my program. I am using this code:
var control = new OpenLayers.Control();
OpenLayers.Util.extend(control, {
draw: function () {
this.box = new OpenLayers.Handler.Box( control,
{"done": this.notice},
{keyMask: OpenLayers.Handler.MOD_SHIFT});
...
I am using an image to display my map with OpenLayers. My JS code looks like this:
map = new OpenLayers.Map('map');
var options = {numZoomLevels: 7,
isBaseLayer: true,
};
var globe = new OpenLayers.Layer.Image(
'Globe ESA',
'http://upload.wikimedia.org/wikipedia/commons/0/07/World_map_blank_blac...
Is there a way to access SQLite results by column name (like a C++ Map) instead of index number in C/C++?
For example, Python's SQLite access allows dictionary access
Results = Query("SELECT * FROM table");
print Results['colname']
print Results['anothercol']
Any similar methods available in C++ for the SQLite's interface?
...