map

Problem with Firefox & IE8 not showing mouseover alt text for image maps

I have the following HTML: <div style="position: relative; text-align: left;"> <img id="chart_6c544b37_ac9d_49ed_912e_5ff8ad6c0181_BaseImage" src="chart.gif" width="460px" height="240px" usemap="#chart_6c544b37_ac9d_49ed_912e_5ff8ad6c0181" border="0"> <map name="chart_6c544b37_ac9d_49ed_912e_5ff8ad6c0181"> <area shape="poly" alt="Secon...

Data lookup method for small data set with Java?

We have to lookup some data based on three input data fields. The lookup has to be fast. There are only about 20 possible lookup combinations. We've implemented this using a static HashMap instance where we create a key by concatinating the three data fields. Is there a better way to do this or is this the way to go? Code is below. ...

Bad idea to use String key in HashMap?

I understand that the String class' hashCode() method is not guarantied to generate unique hash codes for distinct String-s. I see a lot of usage of putting String keys into HashMap-s (using the default String hashCode() method). A lot of this usage could result in significant application issues if a map put displaced a HashMap entry t...

Compound String key in HashMap

We are storing a String key in a HashMap that is a concatenation of three String fields and a boolean field. Problem is duplicate keys can be created if the delimiter appears in the field value. So to get around this, based on advice in another post, I'm planning on creating a key class which will be used as the HashMap key: class The...

Clickable United States map

Hello, I'm trying to find a map that allows the user to click on an individual state. Any recommendations? (non-flash implementations preferably) ...

Creating array from object function using map

I have an array of HTML::Elements obtained from HTML::TreeBuilder and HTML::Element->find and I need to assign their as_text value to some other variables. I know I can really easily do my ($var1, $var2) = ($arr[0]->as_text, $arr[1]->as_text); but I was hoping I could use map instead just to make the code a bit more readable as there ...

ASP .NET with google map api

i am using google map api with asp .net for making a website, apart from C# which programming languages do i need to learn ...

Three map implementations in javascript. Which one is better?

I wrote a simple map implementation for some task. Then, out of curiosity, I wrote two more. I like map1 but the code is kinda hard to read. If somebody is interested, I'd appreciate a simple code review. Which one is better? Do you know some other way to implement this in javascript? var map = function(arr, func) { var newarr = []; ...

Recommend a fast & scalable persistent Map - Java

I need a disk backed Map structure to use in a Java app. It must have the following criteria: Capable of storing millions of records (even billions) Fast lookup - the majority of operations on the Map will simply to see if a key already exists. This, and 1 above are the most important criteria. There should be an effective in memory ca...

Java: Data structure for sorting objects/maintaining a key in that order?

I want to maintain a collection of objects of type Odp. Odp implements Comparable. I need to be able to refer to an object in the collection with its integer name. This integer must correspond to its sort order (not insertion order). Each integer only applies to one Odp, and vice versa. I have a function compareOdp(Odp o1, Odp o2) that ...

Why leading zero not possible in Python's Map and Str

What is the reason that you cannot use zero at the beginning of a number when converting the number to a sequence? Code example map(int,str(08978789787)) which gives Syntax error. I would like to convert numbers which leading digit is zero to a sequence. How can you convert such a number to a sequence? ...

How to reset default location map of Nerddinner?

It's a simple issue which I want to modify for a long time. Could anyone let me know where I could change the default map location from "USA" to "UK" or other country? Many thanks. ...

iphone : embed a fully integrated customized (Google) map in a native app

Hi, 1) Is it possible to send GPS coordinates, a name and hyperlink to a kind of Google map API so that it shows a map, some places with a name and whenever a user clicks on a place would go to a URL ? 2) If so, is it possible to attach this map as a view so that a user can make use of the navigator bar of the native application at any...

Java: Data structure for caching computation result?

I have an expensive computation, the result of which I'd like to cache. Is there some way to make a map with two keys? I'm thinking of something like Map<(Thing1, Thing2), Integer>. Then I could check: if (! cache.contains(thing1, thing2)) { return computeResult(); } else { return cache.getValue(thing1, thing2); } pseudocode. But...

Building a map simulation system

Hi guys, I'm currently working on a project that simulates a map with routes on it that allows users to decide their destination, and the system will calculate the shortest path to it. The map should receives real-time traffic data in which the traffic flow changes along the way while the vehicle is travelling. When the traffic flow chan...

Spring and AOP Configuration on Common Java Type Extensions

I have the following XML cross cutting definition in my context: <bean name="/Details.htm" class="com.DetailServlet"> <property name="myPerfLogger" ref="perfLogger"></property> </bean> <bean id="perfLogger" class="com.PerformanceLogger"/> <bean id="methodLogger" class="com.MethodLogger"/> <aop:config> <aop:pointcut i...

Hibernate - How to use an Enumeration as Map's Key

Hi all, My entity defines a field like Map<String, String> props; I've got this hibernate xml configuration <map name="props" table="PROPS"> <key column="id"/> <index column="name" type="string"/> <element column="value" type="string"/> </map> Now I want my Map to be an EnumMap like Map<MyEnum, String> prop...

JQuery - arrays

Hello, how can I create map to send it like post-data, using ajax? For exmaple, I has an iterator each function, where I should do something like: var map = []; ...each(function() { map[ $(this).key() ] = $(this).val(); }); Or what another synax? ...

Java setting values from a Map to a Set

Hello! I am trying to make a method that takes the first Map whose values are sets and a second empty Map whose values are Lists and fills the second Map with the same key/value Mappings as the first. The 2nd map will have every key in the 1st Map, but associated with it is a List of all the same elements that are in the Set it maps to. ...

Java swap two keys in a Map

Welcome. I have a generic void method swap that takes a Map and 2 keys. The method will swap the values associated with the keys in the Map. I already checked that both keys are contained in the Map somewhere else, but in this method, I can't use looping. My method answer: public static<K, W> swap(Map<K,V m, K key1, K key2>){ m.put(ke...