location

PHP Redirect Without Modifying Headers

I have a PHP script that is redirecting the user via some code like: header ('Location: http://someurl/somepage.php'); Then in somepage.php I am trying to access $_SERVER['HTTP_REFERER'] to determine where the page request has come from. I find that $_SERVER['HTTP_REFERER'] is empty when a page is called using the header location meth...

How do you test the performance of your website from multiple locations world-wide?

Following on from http://stackoverflow.com/questions/53738/how-do-you-test-the-performance-of-a-website : What tools/sites/services do you use to find out the performance of your website from multiple locations around the world? There are always complaints that sites are slow under certain circumstances (especially from physically-di...

Firefox: Get actual screen location of viewport

Hey all, For firefox is there anyway to determine the TopLeft location of the "viewport" (ie the client area)? I know the height/width is available via window.innerHeight and window.innerWidth. But I also need to know "innerTop" and "innerLeft" (which don't exist). Thanks, Rob ...

How to read app.config from a custom location, i.e. from a database in .NET

I am trying to override the ApplyConfiguration method in my custom ServiceHost to read the configuration from a database instead of app.config. Ideally I would want to be able to do something like this: Configuration config = GetConfigFromMyDatabase(...); ServiceModelSectionGroup serviceModel = ServiceModelSectionGroup.GetSectionGroup(...

Figure out if I'm nearby something

I've got my current location lat long and I've got a list of places and there lat long. What I'd like to do is figure out if I'm nearby one of the places, nearby would be something like +100m. I don't want to display a map, just know if I'm near it. What kind of php libraries are available for comparing location/lat long? Or can I solv...

How to specify the location a Mvc view will be created for a Mvc controller?

Important Update Since the release of MVC 2.0 Preview 1 this feature has been implemented as the part of the actual framework itself in the form of Areas. More details available on Phil Haack's blog here I have a controller called ListManagerController. This controller contain an ActionResult method called Index(). When I right ci...

Fleet tracking - Retrieving location data from cellphones, C# libraries

Hello - I need to retrieve latitude & longitude information from cellphones carried by delivery trucks. I've found a few examples of how this can be done here: http://msdn.microsoft.com/en-us/magazine/2009.01.wm6gps.aspx http://www.codeproject.com/KB/mobile/DeepCast.aspx Is it possible to retrieve cell phone location information from a...

Django -- ForeignKey() uses different column than the row ID?

Hi, I have an application called Location. Location has Country, State, City, Big_City_Nearby, Longitude, latitude. I have an application for an item for sell. Item has Title, Link, Description, Price & Location which is a ForeignKey(). Now, if someone wants to see all items for sell in the US, they click on a link (let say http://ex...

Convert string to CLLocationCoordinate2D

Hi all, I have an array with NSString's in it. Some of these are latitude and longitudes and I need to use this with the below code. The latText and lonText are my strings that I am trying to use as co-ordinates.... CLLocationCoordinate2D pinlocation=mapView.userLocation.coordinate; pinlocation.latitude = latText; pinlocation...

Standard non-code resource location for python packages

This should be a common scenario, but could not find any relevant post yet.. I plan to deploy a Python library (I guess the same applies to regular applications) which makes use of some images and other resource files. What is the standard location for such items? I imagine, for project Foo, the choices would be Have resources directo...

iframe location is null

Sometimes I use: window.frames[framename].location.href ..only to find firebug reporting window.frames[framename].location is null, why would this be? ...

iPhone location button

Ya know the little location button in the lower-left corner of the Maps application? Does anybody know where I can find that? I looked in UIButtonType and UITabBarSystemItem but came up blank. I'd prefer to use a system image or a system something-or-other, to help ensure consistency with other system functions. ...

Strange behavior of javascript

Hi I'm using following function to goto a proxypage on a click of href. for first click to the href it works fine. but second click onwards the code does not call the window.event.returnValue=true; statement while if i use debugger it works as expected. function CallDownloadProxy(url) { //debugger; try { window.location = u...

jQuery x y document coordinates of DOM object

I need to get the X,Y coordinates (relative to the document's top/left) for a DOM element. I can't locate any plugins or jQuery property or method that can give these to me. I can get the top and left of the DOM element, but that can be either relative to its current container/parent or to document. ...

Fastest distance lookup given latitude/longitude?

I currently have just under a million locations in a mysql database all with longitude and latitude information. With this I use another lat/lng to find the distance of certain places in the database but it's not as fast as I want it to be especially with 100+ hits a second. Is there a faster formula or possibly a faster system other th...

Mysql outfile to current working directory?

Is there a way I can make the OUTFILE statement in a .sql file point to the path of the current working directory of the .sql file itself, without manually specifying an absolute path name? As it is now, the default location is the data directory of the schema that I'm working with (ie. C:\progra~1\mysql\etc\etc). Thanks! ...

Default absolute path to grep in Linux kernel 2.6.18-128.1.10.el5

There was a recent change on the server I do most of my work on and all PHP exec()'s now need absolute paths. Its faster than asking IT to ask it here. So, does anyone know where grep is by default? ...

Keeping history of hash/anchor changes in JavaScript

I'm currently implementing a JavaScript library that keeps track of the history of changes to the hash part in the address bar. The idea is that you can keep a state in the hash part, and then use the back button to go back to the previous state. In most of the recent browsers, this is automatic and you only have to poll the location.ha...

Optimizing address routes - web-based

We are trying to better understand how to set up MapPoint (or another map application) to optimize delivery routes for us. We have the ability to push lists of delivery addresses from our .NET system but need some simple options for the drivers to select a starting point address and to be able to reorder the addresses visually if necessa...

How do I prevent an included PHP script from changing the Location URL?

I'm including a PHP script that changes the URL. // index.php ob_start(); include "script.php"; // This script redirects using header("Location:"); $out = ob_get_clean(); // I use the $out data for calculations echo $out; Is there a simple way to counter or undo this unwanted redirect? How about: header("Location: index.php"); ...