Search Results

Search found 16637 results on 666 pages for 'lat long'.

Page 4/666 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Get street address at lat/long pair

    - by Chris Wenham
    I've seen that it's possible to get the latitude and longitude (geocoding, like in Google Maps API) from a street address, but is it possible to do the reverse and get the street address when you know what the lat/long already is? The application would be an iPhone app (and why the app already knows lat/long), so anything from a web service to an iPhone API would work.

    Read the article

  • Google Map lng + lat to hidden field not working

    - by user547794
    Hello, I am trying to get Marker data into hidden fields on my form. I'm not sure why this isn't working, it must be something in my js syntax: var initialLocation; var siberia = new google.maps.LatLng(60, 105); var newyork = new google.maps.LatLng(40.69847032728747, -73.9514422416687); var browserSupportFlag = new Boolean(); function initialize() { var myOptions = { zoom: 6, mapTypeId: google.maps.MapTypeId.HYBRID }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); myListener = google.maps.event.addListener(map, 'click', function(event) { placeMarker(event.latLng), google.maps.event.removeListener(myListener); }); // Try W3C Geolocation (Preferred) if(navigator.geolocation) { browserSupportFlag = true; navigator.geolocation.getCurrentPosition(function(position) { initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); map.setCenter(initialLocation); }, function() { handleNoGeolocation(browserSupportFlag); }); // Try Google Gears Geolocation } else if (google.gears) { browserSupportFlag = true; var geo = google.gears.factory.create('beta.geolocation'); geo.getCurrentPosition(function(position) { initialLocation = new google.maps.LatLng(position.latitude,position.longitude); map.setCenter(initialLocation); }, function() { handleNoGeoLocation(browserSupportFlag); }); // Browser doesn't support Geolocation } else { browserSupportFlag = false; handleNoGeolocation(browserSupportFlag); } function handleNoGeolocation(errorFlag) { if (errorFlag == true) { alert("Geolocation service failed."); initialLocation = newyork; } else { alert("Your browser doesn't support geolocation. We've placed you in Siberia."); initialLocation = siberia; } } function placeMarker(location) { var marker = new google.maps.Marker({ position: location, map: map, draggable: true }); map.setCenter(location); } } var lat = latlng.lat(); var lng = latlng.lng(); document.getElementById("t1").value=lat; document.getElementById("t2").value=lng; <input type="hidden" name="lat" id="t1"> <input type="hidden" name="long" id="t2">

    Read the article

  • int datatype in 64bit JVM. Is it more "inefficient" than long?

    - by Zwei Steinen
    I heard that using shorts on 32bit system is just more inefficient than using ints. Is this the same for ints on a 64bit system? Python recently(?) basically merged ints with long and has basically a single datatype long, right? If you are sure that your app. will only run on 64bit then, is it even conceivable (potentially a good idea) to use long for everything in Java?

    Read the article

  • Faster, secure, protocol/code required for long-distance transfer.

    - by Chopper3
    I've ran into a problem and I'm looking for a new secure protocol/client/server that's faster over a 1Gb/s fibre link - let me tell you the story... I have a pair of redundant, diversely-routed, 1Gb/s links over a distance of around 250 miles or so (not dark fibre but a dedicated point to point link, not a mesh). At the 'client' end I have a HP DL380 G5 (2 x dual-core 2.66Ghz Xeon's, 4GB, Windows 2003EE 32-bit), at the 'server' end I have a HP BL460c G6 (2 x quad-core 2.53Ghz Xeons, 48GB, Oracle Linux 5.3 64-bit). I need to transfer around 500 x 2GB files per week from the client to the server machines per week - but the transfer NEEDS to be secure. Using both iPerf or regular FTP I can get ~80MB/s of transfer pretty consistently, which is great. Using WinSCP or Windows SFTP I can't seem to get more that ~3-4MB/s, at this point the server's CPU is 3% busy while CPU0 of the client goes to ~30% utilised. We've tried editing various TCP window sizes with little success. Both ends are connected to quite low-usage Cisco Cat6509's with Sup720's. I can replace the client machine with a newer machine and/or move it to Linux - but this will take time. Clearly these single-threaded secure Windows clients are introducing too much latency doing their encryption. So a few questions/thoughts; Are there any higher performing secure protocols or client software for Windows that I could try? I'm pretty protocol-gnostic so long as it'll work between Windows and Linux. Should I be using hardware to do the encryption, either in the client or the network parts? If so what would you recommend? I'm not convinced that just swapping the server would be that much faster, the CPU was only at 30% but then again that's higher than I'd have expected given the load - moving to Linux at the client end may be a better idea but would be quite disruptive. Am I missing a trick? Thanks in advance.

    Read the article

  • a php script to get lat/long from google maps using CellID

    - by user296516
    Hi guys, I have found this script that supposedly connects to google maps and gets lat/long coordinates, based on CID/LAC/MNC/MCC info. But I can't really make it work... where do I input CID/LAC/MNC/MCC ? <?php $data = "\x00\x0e". // Function Code? "\x00\x00\x00\x00\x00\x00\x00\x00". //Session ID? "\x00\x00". // Contry Code "\x00\x00". // Client descriptor "\x00\x00". // Version "\x1b". // Op Code? "\x00\x00\x00\x00". // MNC "\x00\x00\x00\x00". // MCC "\x00\x00\x00\x03". "\x00\x00". "\x00\x00\x00\x00". //CID "\x00\x00\x00\x00". //LAC "\x00\x00\x00\x00". //MNC "\x00\x00\x00\x00". //MCC "\xff\xff\xff\xff". // ?? "\x00\x00\x00\x00" // Rx Level? ; if ($_REQUEST["myl"] != "") { $temp = split(":", $_REQUEST["myl"]); $mcc = substr("00000000".dechex($temp[0]),-8); $mnc = substr("00000000".dechex($temp[1]),-8); $lac = substr("00000000".dechex($temp[2]),-8); $cid = substr("00000000".dechex($temp[3]),-8); } else { $mcc = substr("00000000".$_REQUEST["mcc"],-8); $mnc = substr("00000000".$_REQUEST["mnc"],-8); $lac = substr("00000000".$_REQUEST["lac"],-8); $cid = substr("00000000".$_REQUEST["cid"],-8); } $init_pos = strlen($data); $data[$init_pos - 38]= pack("H*",substr($mnc,0,2)); $data[$init_pos - 37]= pack("H*",substr($mnc,2,2)); $data[$init_pos - 36]= pack("H*",substr($mnc,4,2)); $data[$init_pos - 35]= pack("H*",substr($mnc,6,2)); $data[$init_pos - 34]= pack("H*",substr($mcc,0,2)); $data[$init_pos - 33]= pack("H*",substr($mcc,2,2)); $data[$init_pos - 32]= pack("H*",substr($mcc,4,2)); $data[$init_pos - 31]= pack("H*",substr($mcc,6,2)); $data[$init_pos - 24]= pack("H*",substr($cid,0,2)); $data[$init_pos - 23]= pack("H*",substr($cid,2,2)); $data[$init_pos - 22]= pack("H*",substr($cid,4,2)); $data[$init_pos - 21]= pack("H*",substr($cid,6,2)); $data[$init_pos - 20]= pack("H*",substr($lac,0,2)); $data[$init_pos - 19]= pack("H*",substr($lac,2,2)); $data[$init_pos - 18]= pack("H*",substr($lac,4,2)); $data[$init_pos - 17]= pack("H*",substr($lac,6,2)); $data[$init_pos - 16]= pack("H*",substr($mnc,0,2)); $data[$init_pos - 15]= pack("H*",substr($mnc,2,2)); $data[$init_pos - 14]= pack("H*",substr($mnc,4,2)); $data[$init_pos - 13]= pack("H*",substr($mnc,6,2)); $data[$init_pos - 12]= pack("H*",substr($mcc,0,2)); $data[$init_pos - 11]= pack("H*",substr($mcc,2,2)); $data[$init_pos - 10]= pack("H*",substr($mcc,4,2)); $data[$init_pos - 9]= pack("H*",substr($mcc,6,2)); if ((hexdec($cid) > 0xffff) && ($mcc != "00000000") && ($mnc != "00000000")) { $data[$init_pos - 27] = chr(5); } else { $data[$init_pos - 24]= chr(0); $data[$init_pos - 23]= chr(0); } $context = array ( 'http' => array ( 'method' => 'POST', 'header'=> "Content-type: application/binary\r\n" . "Content-Length: " . strlen($data) . "\r\n", 'content' => $data ) ); $xcontext = stream_context_create($context); $str=file_get_contents("http://www.google.com/glm/mmap",FALSE,$xcontext); if (strlen($str) > 10) { $lat_tmp = unpack("l",$str[10].$str[9].$str[8].$str[7]); $lat = $lat_tmp[1]/1000000; $lon_tmp = unpack("l",$str[14].$str[13].$str[12].$str[11]); $lon = $lon_tmp[1]/1000000; echo "Lat=$lat <br> Lon=$lon"; } else { echo "Not found!"; } ?> also I found this one http://code.google.com/intl/ru/apis/gears/geolocation_network_protocol.html , but it isn't php.

    Read the article

  • Convert Lat/Longs to X/Y Co-ordinates

    - by michael
    I have the Lat/Long value of New York City, NY; 40.7560540,-73.9869510 and a flat image of the earth, 1000px × 446px. I would like to be able to convert, using Javascript, the Lat/Long to an X,Y coordinate where the point would reflect the location. So the X,Y coordinate form the Top-Left corner of the image would be; 289, 111 Things to note: don't worry about issues of what projection to use, make your own assumption or go with what you know might work X,Y can be form any corner of the image Bonus points for the same solution in PHP (but I really need the JS)

    Read the article

  • Querying a perimeter around a Geocode-Location (Lat/Lon)

    - by Tim
    Hi, how can I search for geo-objects in a certain perimeter ? E.g. I have several objects with Lat/Lon coordinates stored in my DB. Now I want to retrieve all the objects which lie in a specific perimeter (10 miles or 20 miles) around a given point. I guess what I would have to do is to form some query like: SELECT * FROM objects o where o.lat < (myPositionLat+x) AND o.lon < (myPositionLon+y) Is this right? How do I determine/set the values for x and y?

    Read the article

  • Returning a users lat lng as a string iPhone

    - by Joshmattvander
    Is there a way to return the users location as a string from a model? I have a model thats job is to download same JSON data from a web service. When sending in my request I need to add ?lat=LAT_HERE&lng=LNG_HERE to the end of the string. I have seen tons of examples using the map or constantly updating a label. But I cant find out how to explicitly return the lat and lng values. Im only 2 days into iPhone dev so go easy on me :)

    Read the article

  • How do I view how many concurrent long polling requests there are on my server?

    - by Pascal
    My host is Joyent. My host says I have 15 process limit and prstat -J shows those processes but that doesn't tell me how many long polling requests are currently being served. I could record it myself but that would add alot of performance overhead. I need to know when the server is at its long polling limits. I know this limit occurs far before the memory or CPU is used up. From experimentation, I've already verified that the number of long polls open is NOT equivalant to the number of processes running, probably because each process has multiple threads, each serving a request. thanks.

    Read the article

  • SEO & SEM Long Tail Keyword Marketing Strategy

    Long tail marketing strategies for SEO & SEM often return higher conversion rates by up to 200% as compared to short tail generic keyword terms. These long tail keyword terms can be extremely profitable for SEM (search engine marketing) in terms of lower cost or bid for keywords and larger returns on pay per click investment.

    Read the article

  • What is a Long Tail Keyword?

    Did you know that a long tail keyword will out convert a root keyword 9 times out of 10. In this article, I will discuss the reasons why the long tail is a better keyword to chase than the more common methods of chasing the root.

    Read the article

  • Winning With Long Tail Keywords - Become an Authority in Your Niche

    Most accomplished webmasters and SEO experts will mirror my words here. Winning in the long tail is essential to becoming an authority in your niche. Too often do webmasters go for the "frontal assault" when trying to win a niche, which more often than not results in their competition finding out about them, then pushing them out of the game with their strong list of long tail rankings. So, what can you do in order to dominate your niche and become an authority?

    Read the article

  • Java: random long number in 0 <= x < n range.

    - by Vilius Normantas
    Random class has a method to generate random int in a given range. For example: Random r = new Random(); int x = r.nextInt(100); This would generate an int number more or equal to 0 and less than 100. I'd like to do exactly the same with long number. long y = magicRandomLongGenerator(100); Random class has only nextLong(), but it doesn't allow to set range.

    Read the article

  • Tips To Manage An Effectively Come Back To Work After A Long Vacation

    - by Gopinath
    Vacations are very relaxing – no need to reply to endless mails, no marathon meeting or conference calls. It’s all about fun during the vacation. The troubles begin as you near the end of vacation and plans to think about getting back to work. Once we are back to work after a long vacation there will be many things to worry – a pile of snail mails, hundreds of unread emails,  a flood of phone calls to answer and a stream of scheduled meetings. How to handle all the backlog and catch up quickly with the inflow of work? Here is a management tip from Harvard Business Review blog to get back to work the right way after a long vacation Block off your morning. Make sure you don’t have any meetings scheduled or big projects due. Then before you open your inbox, pause and think about your work priorities. As you make your way through emails and voicemails, focus on returning the messages that are connected to what matters most. Defer or delegate things that aren’t top priority. And remember it will probably take more than one day to get caught up, so be easy on yourself. Hope these tips lets you plan a right comeback to work after your vacation. cc Image credit: flickr/dfwcre8tive This article titled,Tips To Manage An Effectively Come Back To Work After A Long Vacation, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • Path is too long

    - by kaleidoscope
    Bugged by the irritating "Path is too long after being fully qualified" error while running in the Development Fabric? The solution is pretty funny and not so obvious unfortunately. The culprit here is not your app, but the Development Fabric. The DevFab accumulates a lot of temporary junk comprising of local storage locations, cached binaries, configuration, diagnostics information and cached compiled web site content files over its lifetime. They are typically stored at C:\Users\<username>\AppData\Local\dftmp. The Azure Tools will periodically clean this up, but some time you have to play janitor and take the law in your hands ;). The csrun.exe has quite a few tricks up its sleeve. One of them is the ability to clean the development fabric's temporary junk accumulated over time. You can do this by  running the Azure command prompt with elevated privileges and running csrun.exe /devfabric:shutdown and then csrun.exe /devfabric:clean If the problem still persists then the application directory structure could indeed be too long. A workaround to this is changing the Development Fabric temporary directory to point to a shorter path. The temporary directory path can be addressed by an environment variable _CSRUN_STATE_DIRECTORY. You can try setting its value to something like "C:\WA" or "C:\A" this will reduce some 25+ characters from your path. Do not forget to close Visual Studio and expressly shutdown the dev fab with csrun.exe /devfabric:shutdown (Under elevated privileges of course). Source: http://geekswithblogs.net/IUnknown/archive/2010/02/03/no-more-path-is-too-long.aspx  :D   Sarang, K

    Read the article

  • Distance between Long Lat coord using SQLITE

    - by munchine
    I've got an sqlite db with long and lat of shops and I want to find out the closest 5 shops. So the following code works fine. if(sqlite3_prepare_v2(db, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) { while (sqlite3_step(compiledStatement) == SQLITE_ROW) { NSString *branchStr = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 0)]; NSNumber *fLat = [NSNumber numberWithFloat:(float)sqlite3_column_double(compiledStatement, 1)]; NSNumber *fLong = [NSNumber numberWithFloat:(float)sqlite3_column_double(compiledStatement, 2)]; NSLog(@"Address %@, Lat = %@, Long = %@", branchStr, fLat, fLong); CLLocation *location1 = [[CLLocation alloc] initWithLatitude:currentLocation.coordinate.latitude longitude:currentLocation.coordinate.longitude]; CLLocation *location2 = [[CLLocation alloc] initWithLatitude:[fLat floatValue] longitude:[fLong floatValue]]; NSLog(@"Distance i meters: %f", [location1 getDistanceFrom:location2]); [location1 release]; [location2 release]; } } I know the distance from where I am to each shop. My question is. Is it better to put the distance back into the sqlite row, I have the row when I step thru the database. How do I do that? Do I use the UPDATE statement? Does someone have a piece of code to help me. I can read the sqlite into an array and then sort the array. Do you recommend this over the above approach? Is this more efficient? Finally, if someone has a better way to get the closest 5 shops, love to hear it.

    Read the article

  • Calculating bounding box a certain distance away from a lat/long coordinate in Java

    - by Bryce Thomas
    Given a coordinate (lat, long), I am trying to calculate a square bounding box that is a given distance (e.g. 50km) away from the coordinate. So as input I have lat, long and distance and as output I would like two coordinates; one being the south-west (bottom-left) corner and one being the north-east (top-right) corner. I have seen a couple of answers on here that try to address this question in Python, but I am looking for a Java implementation in particular. Just to be clear, I intend on using the algorithm on Earth only and so I don't need to accommodate a variable radius. It doesn't have to be hugely accurate (+/-20% is fine) and it'll only be used to calculate bounding boxes over small distances (no more than 150km). So I'm happy to sacrifice some accuracy for an efficient algorithm. Any help is much appreciated. Edit: I should have been clearer, I really am after a square, not a circle. I understand that the distance between the center of a square and various points along the square's perimeter is not a constant value like it is with a circle. I guess what I mean is a square where if you draw a line from the center to any one of the four points on the perimeter that results in a line perpendicular to a side of the perimeter, then those 4 lines have the same length.

    Read the article

  • Is "as long as it works" the norm?

    - by q303
    Hi, My last shop did not have a process. Agile essentially meant they did not have a plan at all about how to develop or manage their projects. It meant "hey, here's a ton of work. Go do it in two weeks. We're fast paced and agile." They released stuff that they knew had problems. They didn't care how things were written. There were no code reviews--despite there being several developers. They released software they knew to be buggy. At my previous job, people had the attitude as long as it works, it's fine. When I asked for a rewrite of some code I had written while we were essentially exploring the spec, they denied it. I wanted to rewrite the code because code was repeated in multiple places, there was no encapsulation and it took people a long time to make changes to it. So essentially, my impression is this: programming boils down to the following: Reading some book about the latest tool/technology Throwing code together based on this, avoiding writing any individual code because the company doesn't want to "maintain custom code" Showing it and moving on to the next thing, "as long as it works." I've always told myself that next job I'm going to get a better shop. It never happens. If this is it, then I feel stuck. The technologies always change; if the only professional development here is reading the latest MS Press technology book, then what have you built in 10 years but a superficial knowledge of various technologies? I'm concerned about: Best way to have professional standards How to develop meaningful knowledge and experience in this situation

    Read the article

  • How can I stop sorl thumbnail from breaking with very long filenames?

    - by bitbutter
    I've noticed that when working with SORL thumbnail, sometimes a user will upload an image with a very long filename, longer than the varfield in the database can hold. The name gets truncated in the database and the project gives errors whenever the image is requested. Is there a smart and safe way to have django automatically truncate long filenames in sorl uploads (prior to saving them in the database) to prevent this sort of thing? As reference, here's how the relevant model from my current project looks: class ArtistImage(models.Model): artist = models.ForeignKey(Artist) position = models.IntegerField() image = ThumbnailField( thumbnail_tag='<span class="artistimagewrapper"><img class="artistimage" src="%(src)s" width="%(width)s" height="%(height)s"></span>', upload_to='uploaded_images/artistimages', size=(900,900), quality=100, options={'crop': 'center'}, extra_thumbnails={ 'small':{ 'size':(92,92), 'quality':100, 'options':{'crop': 'center'}, } } ) class Meta: ordering = ('image',) def __unicode__(self): return (u"%s" % self.image)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >