As a continuation of my min/max across an array of objects I was wondering about the performance comparisons of filter vs map.
So I put together a test on the values in my code as was going to look at the results in FireBug.
This is the code:
var _vec = this.vec;
min_x = Math.min.apply(Math, _vec.filter(function(el){ return el["x"]; }...
This only happens in some IE's. Here: http://animactions.ca/Animactions/volet_entreprise.php
You may notice that when you click and drag on one of the circles, you will get something similar to this: http://img534.imageshack.us/img534/7578/errorra.png
I cannot figure it out. Here is my image map:
<p class="style2">
<map id="FPMap0" ...
Hi.
I've taken a large image and divided it in to square tiles (256x256). It is made for google maps also, so the whole image is divided into z_x_y.png (Depending on zoom level).
z=0 => 1x1 tile
z=1 => 2x2 tilesthe
z=2 => 4x4 tiles
My imageMap is "flat" and is not based on a sphere like the worldmap.
I'm gonna use this map on a wind...
Hi!
I'm wondering if the Javascript functionality Wikimapia.org has for adding a new place (Goto Edit Map -> Add Place) is public available?
I want this functionality but place in on my own pictures and div's (to create some kind of custom imagemaps or something like that).
Is this possible or is there anyone that can reproduce this f...
I want to convert a code from perl to c++, and my problem is multi key map in perl!
example:
perl:
$address{name}{familyName} = $someAddress;
and keys are not unique.
I want similar data structure in c++ using map or ...!?
also I want to search and obtain values with first key for example I want such %keys{name} in c++ .
edited: I ...
I have a program that reads data from a file line-by-line. I would like to copy some substring of that line in to a map as below:
std::map< DWORD, std::string > my_map;
DWORD index; // populated with some data
char buffer[ 1024 ]; // populated with some data
char* element_begin; // points to some location in buffer
char* element...
Hi,
Suppose I have such an if/else-if chain:
if( x.GetId() == 1 )
{
}
else if( x.GetId() == 2 )
{
}
// ... 50 more else if statements
What I wonder is, if I keep a map, will it be any better in terms of performance? (assuming keys are integers)
...
I seem to be having a problem with using ItemizedOverlay and OveralyItems in it.
I can get the first overlayItem to appear on the map but not any items after that.
Code sample is on:
http://www.anddev.org/multiple_overlay_items-t12171.html
Quick overview here:
public class Markers extends ItemizedOverlay {
private Context ctx;
p...
I am doing iPhone development and what I want is a custom map framework (not route-me, not Google Maps). So far I found CATiledLayer and UISCrollView are helpful. But I am still not clear about the stuff(any kind of view, or anything from CoreAnimation framework, or anything else?) which would be perfectly fit this.
So far I've just mad...
I can create a sparse php array (or map) using the command:
$myarray = array(10=>'hi','test20'=>'howdy');
I want to serialize/deserialize this as JSON. I can serialize it using the command:
$json = json_encode($myarray);
which results in the string {"10":"hi","test20":"howdy"}. However, when I deserialize this and cast it to an arr...
hi, can someone help me out with this pretty please? i dont know what went wrong with my codes, i want to display the location address in the info window but everytime it displays the previous result instead of the current one. for example when i first click a location it adds a marker but the address displayed is undefined (which is the...
Hi all,
I am a C++ newbie trying to use a map so I can get constant time lookups for the find() method.
The problem is that when I use an iterator to go over the elements in the map, elements do not appear in the same order that they were placed in the map.
Without maintaining another data structure, is there a way to achieve in order...
Does anyone knows a java library that could easily encode java Maps into json objects and the other way around?
UPDATE
For reasons couldn't explain ( and I hate sometimes ) I can't use generics on my environment.
What' I'm trying to do is to have something like this:
Map a = new HashMap();
a.put( "name", "Oscar" );
Map b = new Ha...
I am needing to create a named-query, and use it with one of the maps, that i currently have defined as a fluent map.
is it possible to continue using the fluent map, and be able to create the named-query dynamically in code? or, is switching to a hbm map the only option?
...
I would like to have a mapping which maps two string into one string. For example: map["MainServer","Status"] return "active". What is the best way to do it in Java. Should I use HashMap which include another HashMap as its elements?
...
I found the following statement:
Map is an object that stores
key/volume pairs. Given a key, you can
find its value. Keys must be unique,
but values may be duplicated.
For example I have just one key/value pair (3,4). And now I put a new pair (3,5). It will remove the old pair. Right? But if I put (2,4) instead of (3,4) I wil...
I have been working on it for quite a while, but still can't figure out what's wrong with my code.
Each Service has multiple profiles, but each profile only has one Service.
Service
{
Long service_id; // primary key
... getter/setter
}
Profile
{
Long profile_id; // primary key
Long service_id; // foreign key
... getter and setter
}
i...
Let's say I have two maps:
typedef int Id;
std::map<Id, std::string> idToStringMap;
std::map<Id, double> idToDoubleMap;
And let's say I would like to do a set operation on the keys of the two maps. Is there an easier way to do this than to create a custom "inserter" iterator? such that I could do something like:
std::set<Id> res...
I'm working on a Civilization-like game and I'm looking for a good algorithm for generating Earth-like world maps. I've experimented with a few alternatives, but haven't hit on a real winner yet.
One option is to generate a heightmap using Perlin noise and add water at a level so that about 30% of the world is land. While Perlin noise (...
Hello, I am looking for a javascript/jquery solution to build a map with selectable tracks. It will consist of area's map (image) with some river routes for boats that have to be selectable - route have to be made clearer on mouse hover and after user clicks on a route a popup window should emerge. Basically I am just looking for a solut...