Search Results

Search found 2965 results on 119 pages for 'bill james'.

Page 87/119 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • How to get the ID of the last insert.

    - by James Jeffery
    I have an application and around 20 accounts are created per minute (on average). I need to implement a new feature which requires the ID of the last insert. I am using PDO. The question is, lets say 5 users create accounts at exactly the same time. Will it return the ID from the database for that users profile that was just created, or will it return the last insert? If you get what I mean.

    Read the article

  • RESTful web service, PUTting an unnamed resource?

    - by James L
    I have a back-end service that creates unique identifiers for resources. The general idea is that resources are saved and versioned, so you can perform: GET http://service/sales/targets/7818181919/latest or GET http://service/sales/targets/7818181919/4 for version 4, and so on. My question is about the most correct way to upload these resources in the first place. How about: PUT http://service/sales/targets/ returning 303 See other /service/sales/targets/ It seems a little wrong as you should PUT and GET from exactly the same place using a resource-oriented interface, but I can't think of a better option. Any ideas?

    Read the article

  • Visual Studio Property Page Inherit Macros From Other Projects

    - by James
    So I am having a very difficult time finding a solution to this problem. Is there any way that I can inherit macros from another project. For example, for the post build I would like to use the macro for the RemoteMachine address that is located in one project in all the other projects. I was thinking something like (ProjectContainingMacro.$RemoteMachine) ... does anyone have any suggestions?

    Read the article

  • char pointer array in c#

    - by james
    consider the following c++ code #include "stdafx.h" #include<iostream> using namespace std; void ping(int,char* d[]); void ping(int a,char *b[]) { int size; size=sizeof(b)/sizeof(int); // total size of array/size of array data type //cout<<size; for(int i=0;i<=size;i++) cout<<"ping "<<a<<b[i]<<endl; } int _tmain(int argc, _TCHAR* argv[]) { void (*funcptr)(int,char* d[]); char* c[]={"a","b"}; funcptr= ping; funcptr(10,c); return 0; } how can i implement the same in c#.. m new to c#. how can i have char pointer array in c#?

    Read the article

  • Reference an object, based on a variable with it's name in it

    - by James G
    I'm looking for a way to reference an object, based on a variable with it's name in it. I know I can do this for properties and sub properties: var req = {body: {jobID: 12}}; console.log(req.body.jobID); //12 var subProperty = "jobID"; console.log(req.body[subProperty ]); //12 var property = "body"; console.log(req[property][subProperty]); //12 is it possible for the object itself? var req = {body: {jobID: 12}}; var object = "req"; var property = "body"; var subProperty = "jobID"; console.log([object][property][subProperty]); //12 or console.log(this[object][property][subProperty]); //12 Note: I'm doing this in node.js not a browser. Here is an exert from the function: if(action.render){ res.render(action.render,renderData); }else if(action.redirect){ if(action.redirect.args){ var args = action.redirect.args; res.redirect(action.redirect.path+req[args[0]][args[1]]); }else{ res.redirect(action.redirect.path); } } I could work around it by changing it to this, but I was looking for something more dynamic. if(action.render){ res.render(action.render,renderData); }else if(action.redirect){ if(action.redirect.args){ var args = action.redirect.args; if(args[0]==="req"){ res.redirect(action.redirect.path+req[args[1]][args[2]]); }else if(args[0]==="rows"){ rows.redirect(action.redirect.path+rows[args[1]][args[2]]); } }else{ res.redirect(action.redirect.path); } }

    Read the article

  • validates_associated not honoring :if

    - by James Ferguson
    I'm totally blocked on this. See this pastie for sample code: http://pastie.org/990040 The first test will fail. The user model validates an associated address model, but is only supposed to do it if a flag is true. In practice it does it all the time. What is going on?

    Read the article

  • Javascript to change image form submit button src not working.

    - by james
    I'm trying to change the src of an image form submit button using an onclick, but it doesn't seem to be working correctly. Am I missing something? <input class="submit_image" id="my_form_button" onclick="$('my_form_button').src='/images/buttons/submitting.gif'" src="/images/buttons/submit.gif" type="image" /> I've also tried using the same JS on the form tag using onsubmit with no luck.

    Read the article

  • How can I iterate through all of the Models in my rails app?

    - by James
    I would like to be able to iterate over and inspect all the models in my rails app. In pseudo-code it would look something like: rails_env.models.each do |model| associations = model.reflect_on_all_associations(:has_many) ... do some stuff end My question is how do I inspect my rails app to get a collection of the models (rails_env.models) ?

    Read the article

  • How do I add animation to an iPhone app?

    - by james p
    So I came from a Flash background where I can animate in timeline. I've completed the Beginning iPhone Development book and just realized that I still don't know how to get an animation in. I'm guessing I need to import png sequences? Can anyone point me to an appropriate place to learn more about this topic? I want to make a game and my game objects need to animate. Thanks in advance!!

    Read the article

  • Initiatives to namespace PHP core and libraries

    - by James Maroney
    With the introduction of Object-Oriented and Namespacing capabilities in PHP, I am loving the new found cleanliness of PHP code that can be produced. The annoying thing though is that the core of PHP is still cluttered, unorganized mess of functions. Are there any initiatives to organize the PHP core and "common" libraries into namespaces and classes?

    Read the article

  • Processing JSON data with jQuery - strange results needing alert()

    - by James
    I have this code below. I randomly ran across that it will work if I have that alert message exactly where it is. If I take it out or move it to any other spot the tabs will not appear. What exactly is that alert doing that allows the code to work and how can I make it work without the alert? If I move the each loop into the success section it does not work even with the alert. $.ajax({ type: "GET", url: "../ajax.php", data: "action=tabs", dataType: "json", success: function(data){ Projects = data; } }); alert("yes"); $.each(Projects, function(i){ /* Sequentially creating the tabs and assigning a color from the array: */ var tmp = $('<li><a href="#" class="tab green">'+Projects[i].name+'<span class="left" /><span class="right" /></a></li>'); /* Setting the page data for each hyperlink: */ tmp.find('a').data('page','../ajax.php?action=lists&projectID='+Projects[i].project_id); /* Adding the tab to the UL container: */ $('ul.tabContainer').append(tmp); }); The ajax code is retuning json with this code $query = mysql_query("SELECT * FROM `projects` ORDER BY `position` ASC"); $projects = array(); // Filling the $projects array with new project objects: while($row = mysql_fetch_assoc($query)){ $projects[] = $row; } echo json_encode($projects); The returning data is very small and very fast so I don't think that is the problem.

    Read the article

  • How do I sync two local file structures.

    - by James
    Hi, I have two large source trees. One of them has some out of date image files. I would like to automatically update all the old image files (png, jpg, gif) in one source tree with the up to date image files in the other source tree. I am using Windows 7 but I have Cygwin installed. I have tried using rsync so far but with no success. I was hoping I could do something like: rsync -r *.png newSourceTree oldSourceTree Any help would be much appreciated.

    Read the article

  • Getting id of row just inserted into MySQL database

    - by James P
    I have my table columns set like this: likes(id, like_message, timestamp) id is the primary key that is auto incrementing. This is the SQL that I use to add a row: $sql = "INSERT INTO `likes` (like_message, timestamp) VALUES ('$likeMsg', $timeStamp)"; Everything works, but now I need to throw back the id attribute of the newly inserted row. For example, if I insert a row and the id of that row is 13, I need to echo out 13 so my AJAX request can pick that up and use it. Any help would be appreciated, as well as related code samples. Thanks :)

    Read the article

  • Is it possible to make a TListView search by the caption of a different column in Delphi?

    - by James
    Hi, When you set the Caption of a TListItem it seems to always set the Text for the first column in the row. When you start typing in the ListView it will search & select the closest match based on the caption of the first column. I have a situation where I need the caption of the first row to be empty, but still need the search functionality to work as normal (in this case the data I would be searching for may be in the 2nd/3rd column). Is this possible without using any 3rd party controls?

    Read the article

  • Implementing a plugin interface

    - by James P.
    What's a good way of adding a plugin interface such that it's possible to have optional components? I'm aware of the Class.forName() approach (used with JDBC for example) but there is also dynamic class loading.

    Read the article

  • How to save massive numbers in php...

    - by James Rattray
    I want Pi to like 100,000,000 decimals/digits... And variables (well for me) say they have a limit of 67,000,000 bytes... Is there any way around this? can you save the first 10,000 characters/digits into one? can you save it into an array 10,000 in each? Is there a way? If so how? Thanks alot...

    Read the article

  • Saving variables (not sessions)

    - by james.bcn
    This may be a silly question, but how do I save variables that are not specific to a particular session. An simple example of why you might want to do this would be a visitor counter - a number that increases by one each time someone visits a web page (note - I'm not actually doing that, my application is different, but that is the functionality I need). The only ways I can think of doing this are either writing the variables to a file, or putting the variables into a database. Both seem a bit inelegant. Is there a better way to to this kind of thing?

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >