I am trying to build up a string which will link directly to the Google maps print view.
e.g. http://maps.google.co.uk/maps?f=d&source=s_d&saddr=brixton&daddr=bath+to:bournemouth&hl=en&geocode=FUQ7EQMdyDr-_ym5RCh-QQR2SDGm1XOO93zFHA%3BFbQEEAMdMgfc_ykt4T50pnhxSDEJmm3W0CeLEw%3B&mra=ls&sll=51.75764,-1.241455&...
Say there is a list of integers [1,2,3,4,5] and a map function that multiplies each element with 10 and returns modified list as [10,20,30,40,50] , with out modifying the original list.
How this can be done efficiently in c++.
...
Okay, so I've got a piece of Python code which really needs optimizing.
I need to iterate over every single pixel of a small (80x60) image and extract the RGB values from it. The code in the loop itself isn't too slow, but I'm doing it using nested for loops, which I assume add quite a bit of overhead...
xr = xrange(80)
yr = xrange(60)...
In Go, what's the easiest way to get the keys in a map sorted alphabetically? This is the shortest way I can do it:
package main
import "container/vector"
import "fmt"
import "sort"
func main() {
m := map[string]string {"b":"15", "z":"123123", "x":"sdf", "a":"12"}
var keys vector.StringVector;
for k,_ := range ( m ) {
...
Hello. I am currently developing an application which has a maps feature. My map is working, but I still need to create a Directions option. In previous versions of the Android SDK there used to be a class called DrivingDirections, which did exactly what I want. Now it's gone and I don't know how to add this feature to my current map. I ...
Hello,
does anyone know what is the name of the button in the right corner of the toolbar in the new Maps application? It's the button that unfolds the map and the view underneath offers buttons to switch between map modes. I would like to use it in my map application if it's a part of the SDK!
...
I know I can iterate over a map m by,
for k, v := range m { ... }
and look for a key but is there a more efficient way of testing a key's existence in a map? Thanks. I couldn't find an answer in the language spec.
...
I created a class DateTime (which wraps GregorianCalendar). I also created a class Event.
I would like to create a collection of events from which I can retrieve an event by its date.
For instance:
event is of type Event;
date1 and date2 are of type DateTime and also date1.equals(date2);
'events' is my event collection.
event.put(date1,...
Hello,
what's the best way to draw a (black) border around a line in quartz for iphone? I'm drawing lines on streets on map and if the line is yellow (which is a legit use case), it blends in with the street color. One thing I could do is lay my lines over a little thicker black line, but this doesn't sound very efficient.
...
I am writing a web application using GWT and App Engine. My application will need to post and query items based on their latitude, longitude.
As a result of google's distributed database design you can't simple query a set of inequalities. Instead they suggest doing geohashing. The method is described on this page.
http://code.goo...
I want to define a mapping in my .gvimrc such that if the last key pressed is held, the triggered action is repeated. Specifically, I want to do something like
map <SPACE>t :set transparency-=1
map <SPACE>T :set transparency+=1
for MacVim, but I want the transparency to continue to be decreased/increased when t/T are held (don't want ...
I want to create an application where users can mark on map location of polluting factories. Google map provides a MAP editor feature. We would like to have our own website like www.toxic-map.org where people could mark these locations. What would be the best approach for this?
Additionally we should be able to backup this database whic...
All -
I'm trying to understand the first section of the Map file produced by the MS Visual Studio 2005 linker. I know it has something to do with memory sections, but can someone help me decipher it?
Timestamp is 4b4f8d2b (Thu Jan 14 14:31:23 2010)
Preferred load address is 00400000
Start Length Name C...
I am doing some stuff with GIS(or map), and I know how to calculate Y position from latitude in mercator projection. But I don't know how it comes?
Why it is ln(tan(x)+sec(x)) ? I couldn't figure out why there is a 'ln'?
I know it is not directly related to programming, but I hope some one could help me understanding about this (bett...
Hi,
I am trying to print the contents of the map and this is where my code fails. I have tested all my methods and I have no problem to read from file, filer the word, put it into map, and even the print function is working.
However, when I am calling the printer function from main it does not print the map.
I am new to polymorphism and...
void FloodFill(int layer, int x, int y, int target, int replacement)
{
if (x < 0) return;
if (y < 0) return;
if (x >= _mapWidth) return;
if (y >= _mapHeight) return;
if (_mapLayers[layer, x, y] != target) return;
_mapLayers[layer, x, y] = replacement;
FloodFill(layer, x - 1, y, target, replacement);
Flo...
I'm using Getopt::Lucid to process CLO and I've run into an interesting and unexpected problem. The following code:
push @clo_spec, map { Switch($_) } qw(-c -m -s -p),
map { Switch($_) } qw(--help --man --usage --version),
map { Switch($_) } qw(--debug --verbose),
map { Param($_) } keys ...
An example list of lists:
[
["url","name","date","category"]
["hello","world","2010","one category"]
["foo","bar","2010","another category"]
["asdfasdf","adfasdf","2010","one category"]
["qwer","req","2010","another category"]
]
What I wish do to is create a dictionary -> category : [ list of entries ].
The resultant dictionary would...
I want create arrays with object keys in PHP, i.e. something like this:
<?php
$keyObject = new KeyObject;
$valueObject = new ValueObject;
$hash = array($keyObject => $valueObject);
However, this raises an error. Arrays may only have integer or string keys. I end up having to do something like:
$hash = array(
'key' => $keyO...
Using OpenLayers, is there an easy way to tell if a map image has loaded correctly, perhaps using the “loadend” event?
We are reading map tiles from GeoServer, and using OpenLayers to display them. Most of the time, the image displays in a reasonable time. Occasionally (especially when scrolling back and forth using the mouse wheel), ...