Daily Archives

Articles indexed Thursday April 1 2010

Page 18/126 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How to extract the lat/lng of pins in google maps?

    - by BCS
    I want to extract the latitude and longitude of a set of about 50-100 pins in a Google maps web page. I don't control the page and I don't need to do it more than once so I'm looking for something quick and dirty. I've got FireFox with FireBug as well as Chrome and all I need is something that's easier than re typing all the numbers.

    Read the article

  • Recommendations to handle development and deployment of php web apps using shared project code

    - by Exception e
    I am wondering what the best way (for a lone developer) is to develop a project that depends on code of other projects deploy the resulting project to the server I am planning to put my code in svn, and have shared code as a separate project. There are problems with svn:externals which I cannot fully estimate. I've read subversion:externals considered to be an anti-pattern, and How do you organize your version control repository, but there is one special thing with php-projects (and other interpreted source code): there is no final executable resulting from your libraries. External dependencies are thus always on raw source code. Ideally I really want to be able to develop simultaneously on one project and the projects it dependends on. Possible way: Check out a projects' dependency in a sub folder as a working copy of the trunk. Problems I foresee: When you want to deploy a project, you might want to freeze its dependencies, right? The dependency code should not end up as a duplicate in the projects repository, I think. *(update1: I additionally assume svn:ignore will pose problems if I cannot fall back on symlinks, see my comment) I am still looking for suggestions that do not require the use junction points. They are a sort of unsupported hack in winxp, which may break some programs* This leads me to the last part of the question (as one has influence on the other): how do you deploy apps whith such dependencies? I've looked into BuildOut for Python, but it seems to be tightly related to the python ecosystem (resolving and fetching python modules from the web etc). I am very eager to learn about your best practices.

    Read the article

  • jQuery autocomplete: taking JSON input and setting multiple fields from single field

    - by Sly
    I am trying to get the jQuery autocomplete plugin to take a local JSON variable as input. Once the user has selected one option from the autocomplete list, I want the adjacent address fields to be autopopulated. Here's the JSON variable that declared as a global variable in the of the HTML file: var JSON_address={"1":{"origin":{"nametag":"Home","street":"Easy St","city":"Emerald City","state":"CA","zip":"9xxxx"},"destination":{"nametag":"Work","street":"Factory St","city":"San Francisco","state":"CA","zip":"94104"}},"2":{"origin":{"nametag":"Work","street":"Umpa Loompa St","city":"San Francisco","state":"CA","zip":"94104"},"destination":{"nametag":"Home","street":"Easy St","city":"Emerald City ","state":"CA","zip":"9xxxx"}}}</script> I want the first field to display a list of "origin" nametags: "Home", "Work". Then when "Home" is selected, adjacent fields are automatically populated with Street: Easy St, City: Emerald City, etc. Here's the code I have for the autocomplete: $(document).ready(function(){ $("#origin_nametag_id").autocomplete(JSON_address, { autoFill:true, minChars:0, dataType: 'json', parse: function(data) { var rows = new Array(); for (var i=0; i<=data.length; i++) { rows[rows.length] = { data:data[i], value:data[i].origin.nametag, result:data[i].origin.nametag }; } return rows; } }).change(function(){ $("#street_address_id").autocomplete({ dataType: 'json', parse: function(data) { var rows = new Array(); for (var i=0; i<=data.length; i++) { rows[rows.length] = { data:data[i], value:data[i].origin.street, result:data[i].origin.street }; } return rows; } }); }); }); So this question really has two subparts: 1) How do you get autocomplete to process the multi-dimensional JSON object? (When the field is clicked and text entered, nothing happens - no list) 2) How do you get the other fields (street, city, etc) to populate based upon the origin nametag sub-array? Thanks in advance!

    Read the article

  • long polling vs streaming for about 1 update/second

    - by jcee14
    is streaming a viable option? will there be a performance difference on the server end depending on which i choose? is one better than the other for this case? I am working on a GWT application with Tomcat running on the server end. To understand my needs, imagine updating the stock prices of several stocks concurrently.

    Read the article

  • How to setup a DotNetNuke Development Environment with Source Control?

    - by Joosh21
    My team is developing a new DotNetNuke web application and would like to know what is recommended to setup a development environment with source control and automated builds? We would like to keep the DNN source code separate from our custom modules and extensions source code. The DotNetNuke Compiled Module template for Visual Studio wants us to store the source code in the DesktopModules directory of the DNN source code and output to the DNN source code bin directory. Is this the recommended structure? I would rather keep the files in different locations, but then it becomes more difficult to run and debug locally as it would require an install of the module for each change. Also, how should an automated build deploy any changes? How have others set this up? Is there a recommended best practice?

    Read the article

  • Transfer music from iPhone to the computer

    - by hmemcpy
    I'd like to transfer the (non-DRM) music I have on my iPhone to my computer. What application can I use to do that? I found several shareware that didn't really work. EDIT I've removed the Windows tag, so please feel free to add solutions for other OSes.

    Read the article

  • Website redirect during maintenece but still with testing acces

    - by jme
    I have an online store that i have recently re-written most of and would like to upload it to my server. While the maintenance is taking place, i would like to redirect all visitors to an "under construction" page. (easily done with php or apache htacess etc...) The issue is that I would like to test everything when i upload it so i still need access while blocking everyone else. I was thinking some php page that is open to all with a cookie flag i could set for just myself? What is the best way to do this? Thanks jme

    Read the article

  • removing special characters in asp

    - by tibin mathew
    hi, I want to identify special characters and remove that special characters from my string or a word for example O'neil - i want to remove (') from this word. Muñoz, A. Patrick - i want to remove above character of n (ñ) similarly i want to remove all special characters from my strings. I want to do this in asp How can i do this

    Read the article

  • ListView selection issue...Using onItemClick(AdapterView<?> parent, View view, ...)

    - by searchMaker
    The problem I hope to resolve here is that when I click on one item in the ListView that item's background changes to light gray, but when I continue to scroll through the list every 4th item has the background changed to light gray even though those other items have not been clicked. How do I make only the item I clicked be effected by the click? ListView lv = (ListView) findViewById(R.id.resultsList); lv.setAdapter(new ArrayAdapter(this, R.layout.resultitem, (String[])labelList.toArray(new String[labelList.size()]))); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View view, int position, long id) { TextView tv = (TextView)view.findViewById(R.id.result); tv.setBackgroundColor(Color.LTGRAY); tv.setTextColor(Color.BLACK);

    Read the article

  • Referencing Environment Variables in web.xml

    - by Udi Bar-On
    I'm pre-packaging a JSP web-app that relies on some file path settings found within web.xml. These settings are unknown at packaging time, because they reference a path the customer will set when deploying the entire application (of which the web-app is a management interface). It seems that the easiest way to avoid tokens and file modifications in my installer script, is to ask the user for an install location, set this location as an environment variable (e.g JAVA_HOME), and have web.xml always reference that variable. Is there a way to reference an environment variable value from within web.xml? Google searches lead to the J2EE method of SETTING environment variables from ejb xml files. This is not what I'm looking for. Thanks Udi

    Read the article

  • NNTP & Socket - How to interrupt?

    - by Cosmo
    Hi. I'm sending a message to a NNTP server in order to fetch an article's body. I don't want to wait for the answer to complete, cause I only need the first 3 lines from the body. How can I interrupt the transfer and move on to the next article? Now when I request another's article message body, I still get data from the previous one. The only way that worked for me, was to close the stream and reopen it. In my opinion this is a little bit hardcore, cause I have to login to the server every time I need a new file. Any help would be appreciated. Kind Regards.

    Read the article

  • Automatize Publish of ClickOnce VS2008

    - by Alhambra Eidos
    Hi all, i have a solution sln, with several projects (vbproj, csproj), and I have Windows Application, and I use ClickOnce for publish it. Now, I need automatize the Publish option using msbuild or another good solution (cmd, vbs, bat scripts). Any help about it ? thanks in advanced, greetings

    Read the article

  • Comet, responseText and memory usage

    - by ithcy
    Is there a way to clear out the responseText of an XHR object without destroying the XHR object? I need to keep a persistent connection open to a web server to feed live data to a browser. The problem is, there is a relatively large amount of data coming through (several hundred K per second constantly), so memory usage is a big problem, because this connection must remain open for at least several minutes. responseText gets very big very quickly, even though the JSON I send back has been crunched as small as it can get. Due to the way the server-side app works, if I use AJAX-style short polling and just destroy the XHR object when I'm done with it, I miss significant amounts of important data even in the few milliseconds it takes to parse the response, create a new XHR and send it out. I do not have the option to use overlapping requests, as the web server only accepts one connection at a time. (Don't ask.) So Comet is exactly the model I need. What I would like to do is parse each JSON chunk as it comes back from the server, and then clear out responseText so that I can keep using the same connection. However, responseText is read-only. It cannot be directly emptied by any method I have found. Is there a part of the picture I am missing here? Does anyone know any tricks I can use to free up responseText when I'm done reading it? Or is there another place the server responses can go? I am not including code because this is really almost a code-agnostic question. The Javascript routines that spawn the XHRs and handle the returned data are very, very simple.

    Read the article

  • Purpose of dereferencing a pointer as a parameter in C.

    - by Leif Andersen
    I recently came along this line of code: CustomData_em_free_block(&em->vdata, &eve->data); And I thought, isn't: a->b just syntactic sugar for: (*a).b With that in mind, this line could be re-written as: CustomData_em_free_block(&(*em).vdata, &(*eve).data); If that's the case, what is the point of passing in &(*a), as a parameter, and not just a? It seems like the pointer equivalent of -(-a) is being passed in in, is there any logic for this? Thank you.

    Read the article

  • How do I sort an array of Person Objects by using compareto()?

    - by Adam
    Here is my code: > import java.util.Scanner; import java.util.Arrays; /** This class tests the Person class. */ public class PersonDemo { public static void main(String[] args) { int count = 0; Scanner in = new Scanner(System.in); boolean more = false; Person first = null; Person last = null; while (more) { System.out.println( "Please enter the person's name or a blank line to quit"); String name = in.nextLine(); if (name.equals("")) more = false; else { Person p = new Person(name); //new person object created with inputted name Person[] people = new Person[10]; //new array of 10 person objects people[count] = p; //declare person object with index of variable count as the new person object first = people[count]; // I have no idea what to do here. This is where I'm stuck. last = people[count]; // I can't figure out what to do with this either. first.compareTo(p); //call compareTo method on first and new person object last.compareTo(p); //call compareTo method on last and new person object count++; // increase count variable } } System.out.println("First: " + first.toString()); System.out.println("Last: " + last.toString()); } } And the Person class: /** A person with a name. */ public class Person implements Comparable { /** * Constructs a Person with a name. * @param aName the person's name */ public Person(String aName) { name = aName; } public String getName() { return name; } @Override public int compareTo(Object otherObject) { Person other = (Person)otherObject; if (name.compareTo(other.name) < 0) return -1; if (name.compareTo(other.name) > 0) return 1; return 0; } /** Returns a string representation of the object. @return name of Person */ public String toString() { return "[name=" + name + "]"; } private String name; }

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >