map (7,857)


How to get the Country according to a certain IP?

Does anyone know of a simple way to retrieve the country for a given IP Address? Preferably in ISO_3166-1 format?…


Reading a C/C++ data structure in C# from a byte array

What would be the best way to fill a C# struct from a byte[] array where the data was from a C/C++ struct? The C struct would look something like this(my C is very rusty): typedef OldStuff{CHAR Name[8…


java - How do I configure and communicate with a serial port?

I need to send and receive data over serial connections(RS-232 and RS-422). How do I set up and communicate with such a connection? How do I figure out what the configuration settings(e.g. baud ra…


Mapping values from two array in Ruby

I'm wondering if there's a way to do what I can do below with Python, in Ruby: sum=reduce(lambda x, y: x+y, map(lambda x, y: x*y, weights, data)) I have two arrays of equal sizes with the weigh…


Options for Google Maps over SSL

We recently discovered that the Google Maps API does not play nicely with SSL. Fair enough, but what are some options for overcoming this that others have used effectively? Will the Maps API work o…


Looking for best practice for doing a “Net Use” in C#

I'd rather not have to resort to calling the command line. I'm looking for code that can map/disconnect a drive, while also having exception handling. Any ideas?…


Convert a string to an enum in C#

What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value(which wil…


java - shortcut for creating a Map from a List in groovy?

I'd like some sorthand for this: Map rowToMap(row){def rowMap=[:]; row.columns.each{ rowMap[it.name]=it.val}return rowMap;}given the way the GDK stuff is, I'd expect to be able to do something like: M…


javascript - How to find keys of a hash?

I know in javascript Objects double as hashes but i have been unable to find a built in function to get the keys var h={a:'b',c:'d'}; I want something like var k=h.keys();// k=['a','c']; It is simple…



How to make a tree in C++?

How do I make a tree data structure in C++ that uses iterators instead of pointers? I couldn't find anything in the STL that can do this. What I would like to do is to be able to create and manipul…




example maps google how java array list get javascript from