Search Results

Search found 4676 results on 188 pages for 'john nash'.

Page 101/188 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • PHP fastest method of reading server response

    - by Peter John
    Hi there, im having some real problems with the lag produced by using fgets to grab the server's response to some batch database calls im making. Im sending through a batch of say, 10,000 calls and ive tracked the lag down to fgets causing the hold up in the speed of my application as the response for each call needs to be grabbed. I have found this thread http://bugs.php.net/bug.php?id=32806 which explains the problem quite well, but hes reading a file, not a server response so fread could be a bit tricky as i could get part of the next line, and extra stuff which i dont want. Any help much appreciated!

    Read the article

  • Change background colour of individual elements on the fly

    - by John
    Hi, Is there a way in CSS or JQuery where I can dynamically change the background of li tags so they get slightly lighter for each element until it gets to white. For example say I had a list of 10 li elements. The first would have a red (#ff0000) background, the next one would then be a lighter shade of red, and so on and so on until we got to the last one which would have a background of white (#FFFFFF) The list can be any length and i just want the background colour to go from one colour e.g. red to another colour e.g. white. My site uses JQuery so if I have to use that I don't mind. Thanks

    Read the article

  • Image Gallery Manager for PHP and MySQL?

    - by John
    Can anyone recommend a plugin or library that allows people to upload images which automatically gets cropped and resized? I don't mind editting some config files to specify how images should be cropped and resized. Additionally, after uploading, the front end user should be able to drag and drop for re-ordering. Can someone recommend something that works with php?

    Read the article

  • How to match multiple substrings in jQuery combobox autocomplete

    - by John R
    I found more than a couple examples of this with a plain jquery autocomplete but not in a way that will work with the autocomplete included in the combobox code from the demo because the structure of the code is structured so differently. I want to match every item that has all of the search tokens anywhere in any word. I don't need to match the start of any word, any part of it is fine. I don't care if the search strings are highlighted in the autocomplete list if that makes things too complicated. Desired search/result combos: (please excuse the spacing) "fi th" "fi rst second th ird" "rs on" "fi rs t sec on d third" "ec rd" "first s ec ond thi rd" but not limited to any max/min length or number of tokens. EDIT I figured part of it out using the code structure from the other autocorrect I had working. source: function( requestObj, responseFunc ) { var matchArry = $("select > option").map(function(){return this.innerHTML;}).get(); var srchTerms = $.trim(requestObj.term).split(/\s+/); // For each search term, remove non-matches $.each (srchTerms, function (J, term) { var regX = new RegExp (term, "i"); matchArry = $.map (matchArry, function (item) { if( regX.test(item) ){ return{ label: item, value: item, option: HTMLOptionElement } ? item :null; } } ); }); // Return the match results responseFunc (matchArry); }, and select: function( event, ui ) { ui.item.option.selected = true; self._trigger( "selected", event, { item: ui.item.option }); $("destination").val(ui.item.value); // I added this line }, but I can't get both multiple words AND being able to click to select working at the same time. If I remove the } ? item :null; on the return in the map function I can click to select an item. If I leave it I can type multiple words, but I can't click any of the items... Is that the problem or the option: this? I've tried replacing it with HTMLOptionElement and null and I'm stuck. I am able to set the value of another field with ui.item.value within the select label but that doesn't put the value in the search box or close the dropdown menu. Fiddle of current code: http://jsfiddle.net/eY3hM/

    Read the article

  • generate php code from wsdl

    - by John Stewart
    I have a bunch of webservices that I need to write PHP clients for. Now I can manually write wrappers for each of the WSDL files but i wanted to see if there is a tool that can help me by generating the wrappers in PHP. Any idea if there are any tools that do this? Thanks

    Read the article

  • SQL: GROUP BY after JOIN without overriding rows?

    - by krismeld
    I have a table of basketball leagues, a table af teams and a table of players like this: LEAGUES ID | NAME | ------------------ 1 | NBA | 2 | ABA | TEAMS: ID | NAME | LEAGUE_ID ------------------------------ 20 | BULLS | 1 21 | KNICKS | 2 PLAYERS: ID | TEAM_ID | FIRST_NAME | LAST_NAME | --------------------------------------------- 1 | 21 | John | Starks | 2 | 21 | Patrick | Ewing | Given a League ID, I would like to retrieve all the players' names and their team ID from all the teams in that league, so I do this: SELECT t.id AS team_id, p.id AS player_id, p.first_name, p.last_name FROM teams AS t JOIN players AS p ON p.team_id = t.id WHERE t.league_id = 1 which returns: [0] => stdClass Object ( [team_id] => 21 [player_id] => 1 [first_name] => John [last_name] => Starks ) [1] => stdClass Object ( [team_id] => 21 [player_id] => 2 [first_name] => Patrick [last_name] => Ewing ) + around 500 more objects... Since I will use this result to populate a dropdown menu for each team containing each team's list of players, I would like to group my result by team ID, so the loop to create these dropdowns will only have to cycle through each team ID instead of all 500+ players each time. But when I use the GROUP BY like this: SELECT t.id AS team_id, p.id AS player_id, p.first_name, p.last_name FROM teams AS t JOIN players AS p ON p.team_id = t.id WHERE t.league_id = 1 GROUP BY t.id it only returns one player from each team like this, overriding all the other players on the same team because of the use of the same column names. [0] => stdClass Object ( [team_id] => 21 [player_id] => 2 [first_name] => Patrick [last_name] => Ewing ) [1] => stdClass Object ( [team_id] => 22 [player_id] => 31 [first_name] => Shawn [last_name] => Kemp ) etc... I would like to return something like this: [0] => stdClass Object ( [team_id] => 2 [player_id1] => 1 [first_name1] => John [last_name1] => Starks [player_id2] => 2 [first_name2] => Patrick [last_name2] => Ewing +10 more players from this team... ) +25 more teams... Is it possible somehow?

    Read the article

  • how to return comma seperated values in oracle SP

    - by john
    If I have a simple query like: OPEN cursor FOR SELECT USER_ID FROM USER_TABLE WHERE USER_ID = V_SOME_USER; this will return records in different rows but how can I return the rows in the following format: 'userid1', 'userid2', 'userid3'.....'useridN' I want to do this because I want to send this off as a parameter to another stored procedure...Also, what is the limit on how big the string can be when passed to the SP as parameter

    Read the article

  • Friendfeed schemaless data in MYSQL

    - by John Stewart
    I read an article around schema-less database which sounds cool. (http://bret.appspot.com/entry/how-friendfeed-uses-mysql) But what isn't clear to me is how do they run search queries on this data? Since the data is in JSON format how do we look for it?

    Read the article

  • Best way to structure AJAX for a Zend Framework application

    - by John Nall
    Sorry, but there's a lot of outdated and just plain bad information for Zend Framework, since it has changed so much over the years and is so flexible. I thought of having an AJAX module service layer, with controllers and actions that interact with my model. Easy, but not very extensible and would violate DRY. If I change the logistics of some process I'll have to edit the AJAX controllers and the normal controllers. So ideally I would load the exact same actions for both javascript and non-javascript users. I have thought about maybe checking for $_POST['ajax'], if it is set I would load a different (json'y) view for the data. Was wondering how/a good way to do this (front controller plugin I imagine?) or if someone can point me to an UP TO DATE tutorial that describes a really good way for building a larger ajax application. thx

    Read the article

  • creating matrix with probabilities

    - by John Chan
    Hi all, I want to generate a matrix of NxN to test some code that I have where each row contains floats as the elements and has to add up to 1 (i.e. a row with a set of probabilities). Where it gets tricky is that I want to make sure that randomly some of the elements should be 0 (in fact most of the elements should be 0 except for some random ones to be the probabilities). I need the probabilities to be 1/m where m is the number of elements that are not 0 within a single row. I tried to think of ways to output this, but essentially I would need this stored in a C++ array. So even if I output to a file I would still have the issue of not having it in array as I need it. At the end of it all I need that array because I want to generate a Market Matrix file. I found an implementation in C++ to take an array and convert it to the market matrix file, so this is what I am basing my findings on. My input for the rest of the code takes in this market matrix file so I need that to be the primary form of output. The language does not matter, I just want to generate the file at the end (I found a way mmwrite and mmread in python as well) Please help, I am stuck and not really sure how to implement this.

    Read the article

  • GridView will not update underlying data source

    - by John Christensen
    So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do with the LinqDataSource, so I added a SqlDataSource and the same thing happens. The aspx is as follows (the code-behind page is empty): <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=devsql32;Initial Catalog=Steam;Persist Security Info=True;" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [LangID], [Code], [Name] FROM [Languages]" UpdateCommand="UPDATE [Languages] SET [Code]=@Code WHERE [LangID]=@LangId"> </asp:SqlDataSource> <asp:GridView ID="_languageGridView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="LangId" DataSourceID="SqlDataSource1"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="LangId" HeaderText="Id" ReadOnly="True" /> <asp:BoundField DataField="Code" HeaderText="Code" /> <asp:BoundField DataField="Name" HeaderText="Name" /> </Columns> </asp:GridView> <asp:LinqDataSource ID="_languageDataSource" ContextTypeName="GeneseeSurvey.SteamDatabaseDataContext" runat="server" TableName="Languages" EnableInsert="True" EnableUpdate="true" EnableDelete="true"> </asp:LinqDataSource> What in the world am I missing here? This problem is driving me insane.

    Read the article

  • How are exceptions allocated on the stack caught beyond their scope?

    - by John Doe
    In the following code, the stack-based variable 'ex' is thrown and caught in a function beyond the scope in which ex was declared. This seems a bit strange to me, since (AFAIK) stack-based variables cannot be used outside the scope in which they were declared (the stack is unwound). void f() { SomeKindOfException ex(...); throw ex; } void g() { try { f(); } catch (SomeKindOfException& ex) { //Handling code... } } I've added a print statement to SomeKindOfException's destructor and it shows that ex is destructed once it goes out of scope in f() but then it's caught in g() and destructed again once it goes out of scope there as well. Any help?

    Read the article

  • Can't get NSDate to work correctly

    - by John
    Hello, having a strange issue, must be something I'm just not seeing. I set up a variable in the .h NSDate *checkIn; @property (nonatomic, retain) NSDate *checkIn; I'm setting a variable to todays date in the initWithNibName: checkIn = [NSDate date]; I also did synthesized it as well. Now later on in my program I use it to build a tablecell with the following line cell.textLabel.text = [dateFormatter stringFromDate:checkIn]; This line kills the simulator, BAD_EXEC. If I put in a checkIn = [NSDate date]; above it, it works fine. So I'm thinking the variable isn't being stored from when I set it in the initWithNibName: Not sure why though, as my strings I do the same way are all working fine from method to method. What am I missing?

    Read the article

  • SVN Repository Search

    - by John
    Is there any good software that will allow me to search through my SVN respository for code snippets? I found 'FishEye' but the cost is 1,200 and well outside my budget.

    Read the article

  • WPF -- Where do you draw the line between code and XAML?

    - by John Franks
    I'm a long-time C#/.NET programmer but totally new to WPF and the System.Windows.Controls namespace and XAML. The more I learn about it the more I realize that you can do pretty much all of your GUI initialization and event handling glue in either XAML or in code (say C# code or VB.Net code). My question is to those who have been working on WPF for longer and ideally those who have shipped apps with it -- where did you find was the best place to 'draw the line' between XAML and code? Did you use XAML wherever you could? Only where interfacing with non-coding UI designers? Any tips in this area would be extremely helpful to myself and other coders who are just getting into WPF programming and are kind of paralyzed by all the choices we can make!

    Read the article

  • beta testing iphone & ipad applications

    - by John Stewart
    I want to roll a beta test session for my iphone and ipad application with general public. Want to get some feedback before officially launching the app. Does anyone know of a a good community that I can tap into? I found http://ibetatest.com via google but not sure how good/bad it is?

    Read the article

  • How can I have a web link perform an action in a specific desktop application?

    - by John
    The specific situation is I have a .zip file that I want to open with a certain application. However, I don't want all ZIP files associated with that application. I think the answer is that instead of saying, "download this zip file, and open it with application X" I could have the browser basically go well my desktop application to go fetch it on its own (the same way directives like itunes: mailto: or aim: do things like launch the itunes store, add buddies, etc). Thoughts?

    Read the article

  • Django show manytomanyfield on form when definition is on other model

    - by John
    Hi I have the definition for my manytomany relationship on one model but want to display the field on a form for the other model. How do I do this? for example: # classes class modelA(models.Model): name = models.CharField(max_length=300) manytomany = models.ManyToManyField(modelA) class modelB(models.Model): name = models.CharField(max_length=300) # forms class modelBForm(forms.ModelForm): class Meta: model = modelB I want to use the form modelBForm but show a select box with a list from modelA (just how it would work if the model was set to modelA in the form class). How can I do this? Thanks

    Read the article

  • Fluent NHibernate - Delete a related object when no explicit relationship exists in the model

    - by John Price
    I've got an application that keeps track of (for the sake of an example) what drinks are available at a given restaurant. My domain model looks like: class Restaurant { public IEnumerable<RestaurantDrink> GetRestaurantDrinks() { ... } //other various properties } class RestaurantDrink { public Restaurant Restaurant { get; set; } public Drink { get; set; } public string DrinkVariety { get; set; } //"fountain drink", "bottled", etc. //other various properties } class Drink { public string Name { get; set; } public string Manufacturer { get; set; } //other various properties } My db schema is (I hope) about what you'd expect; "RestaurantDrinks" is essentially a mapping table between Restaurants and Drinks with some extra properties (like "DrinkVariety" tacked on). Using Fluent NHibernate to set up mappings, I've set up a "HasMany" relationship from Restaurants to RestaurantDrinks that causes the latter to be deleted when its parent Restaurant is deleted. My question is, given that "Drink" does not have any property on it that explicitly references RestaurantDrinks (the relationship only exists in the underlying database), can I set up a mapping that will cause RestaurantDrinks to be deleted if their associated Drink is deleted?

    Read the article

  • Is it possible to swap lines of xml code in soap

    - by John
    I wish to send a request like <v:Envelope xmlns:i="xxx"> <v:Header /> <v:Body> <sendTwoWaySmsMessage xmlns="xxx" id="o0" c:root="1"> <connectionId i:type="d:string">connectionId</connectionId> <twoWaySmsMessage> <message i:type="d:string">love it. It seems to work</message> <mobiles i:type="d:string">345</mobiles> <messageId i:type="d:string">123</messageId> </twoWaySmsMessage> </sendTwoWaySmsMessage> </v:Body> </v:Envelope> what i get is <v:Envelope xmlns:i="xxx"> <v:Header /> <v:Body> <sendTwoWaySmsMessage xmlns="xxx" id="o0" c:root="1"> <twoWaySmsMessage> <message i:type="d:string">love it. It seems to work</message> <mobiles i:type="d:string">345</mobiles> <messageId i:type="d:string">123</messageId> </twoWaySmsMessage> <connectionId i:type="d:string">connectionId</connectionId> </sendTwoWaySmsMessage> </v:Body> </v:Envelope> code is SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, url); SoapObject message = new SoapObject("", "twoWaySmsMessage"); request.addProperty("connectionId", did); message.addProperty("message", "love it. It seems to work"); message.addProperty("mobiles", "435"); message.addProperty("messageId", "123"); request.addSoapObject(message); request.setProperty(0, "connectionId"); when i use SoapUI with the second with the "connectionId" swaped it seem to work can anyone help. of have ideas. I have looked at just about every ksoap question out there and cant seem to find an answer?

    Read the article

  • AssemblyResolve event is not firing during compilation of a dynamic assembly for an aspx page.

    - by John
    This one is really pissing me off. Here goes: My goal is to load assemblies at run-time that contain embedded aspx,ascx etc. What I would also like is to not lock the assembly file on disk so I can update it at run-time without having to restart the application (I know this will leave the previous version(s) loaded). To that end I have written a virtual path provider that does the trick. I have subscribed to the CurrentDomain.AssemblyResolve event so as to redirect the framework to my assemblies. The problem is that the when the framework tries to compile the dynamic assembly for the aspx page I get the following: Compiler Error Message: CS0400: The type or namespace name 'Pages' could not be found in the global namespace (are you missing an assembly reference?) Source Error: public class app_resource_pages__version_1_0_0_0__culture_neutral__publickeytoken_null_default_aspx : global::Pages._Default, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandle I noticed that if I load the assembly with Assembly.Load(AssemblyName) or Assembly.LoadFrom(filename) I dont get the above error. If I load it with Assembly.Load(byte[]) (so as to not lock it), the exception is thrown but my AssemblyResolve handler, when called is returning the assembly correctly (it is called once). So I am guessing that it is called once when the framework parses the asp markup but not when it tries to create the dynamic assembly for the aspx page.

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >