Search Results

Search found 20799 results on 832 pages for 'long integer'.

Page 52/832 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • MySQL SELECT WHERE returning empty with long numbers, although they are there

    - by brybam
    Alright, so basically the most simple query ever... I've done this a million times... SELECT * FROM purchased_items WHERE uid = '$uid' if $uid == 123 It works fine and returns all data in rows where uid is 123 if $uid == 351565051447743 It returns empty... I'm positive 351565051447743 is a possible uid in some rows, i literally copied and pasted it into the table. $uid is a string, and is being passed as a string. This is something i've done a million times, and i've never had this simple query not work. Any ideas why this is not working?

    Read the article

  • BackgroundWorker acting bizarrely...

    - by vdh_ant
    Hi guys I'm working on some code that calls a service. This service call could fail and if it does I want the system to try again until it works or too much time has passed. I am wondering where I am going wrong as the following code doesn't seem to be working correctly... It randomly only does one to four loops... protected virtual void ProcessAsync(object data, int count) { var worker = new BackgroundWorker(); worker.DoWork += (sender, e) => { throw new InvalidOperationException("oh shiznit!"); }; worker.RunWorkerCompleted += (sender, e) => { //If an error occurs we need to tell the data about it if (e.Error != null) { count++; System.Threading.Thread.Sleep(count * 5000); if (count <= 10) { if (count % 5 == 0) this.Logger.Fatal("LOAD ERROR - The system can't load any data", e.Error); else this.Logger.Error("LOAD ERROR - The system can't load any data", e.Error); this.ProcessAsync(data, count); } } }; worker.RunWorkerAsync(); } Cheers Anthony

    Read the article

  • Soundboard app: Play sound as long as the user is pressing the button

    - by Pantelis Proios
    I am making a soundboard app and i am using sounds with over 30sec duration. I am playing the sound by connecting in IB my action with a "touch down" event, however the sound keeps playing once started. I connected in the some button a "touch cancel" & "touch up outside" event that is supposed to stop the sound but for some reason it doesn't. Can anybody provide a solution to my problem? ---Edit--- Here is my code: -(IBAction)playSound:(id)sender { NSString *soundFile; soundFile = [[NSBundle mainBundle] pathForResource:@"testSound" ofType:@"mp3"]; audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:soundFile] error:nil]; audioPlayer.volume = volumeSlider.value; audioPlayer.numberOfLoops = -1; [audioPlayer prepareToPlay]; [audioPlayer play]; } -(IBAction)stopSound:(id)sender { [audioPlayer stop]; }

    Read the article

  • SWFUpload and long filenames.

    - by HKBemis
    Everything is working fine with SWFuploader, however when uploading files that have longer filenames the SWF applet expands to become wider then my content pane. Does anyone have a method or hack to trim the filename and alt text fields of SWFUpload?

    Read the article

  • Reading long lines from text file

    - by sonofdelphi
    I am using the following code for reading lines from a text-file. What is the best method for handling the case where the line is greater than the limit SIZE_MAX_LINE? void TextFileReader::read(string inFilename) { ifstream xInFile(inFilename.c_str()); if(!xInFile){ return; } char acLine[SIZE_MAX_LINE + 1]; while(xInFile){ xInFile.getline(acLine, SIZE_MAX_LINE); if(xInFile){ m_sStream.append(acLine); //Appending read line to string } } xInFile.close(); }

    Read the article

  • python truncate a long string

    - by Hulk
    How to truncate sthe string to 75 characters only in python This is how it was done in javascript var data="saddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsaddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsadddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" var info = (data.length > 75) ? data.substring[0,75] + '..' : data;

    Read the article

  • PHP include taking too long

    - by wxiiir
    I have a php file with around 100mb which is full of arrays (only arrays). I've made a script that includes this file (for processing), first it exhausted the default Xampp 128mb memory limit, i've raised it to 1024mb but it just takes forever and doesn't do anything. I'm sure the problem is being created by the sheer size of the file because i've tried removing all lines of code and just leaving the include and an echo for me to know when it finishes executing, and it does the same thing (which is taking forever), i've also tried to run the 100mb file in separate and same thing again. A 10mb file is taking forever as well but a similar 1mb file is almost instantly read and executed so the problem must be more than just the file size. I was avoiding using c++ for a simple project as this and would rather not to as php is easier for me and the task that will be executed doesn't need to benefit from the added speed that it would have if it had been done in c++ but if i have no luck in solving this problem i guess i'll have to. EDIT Reasons for not using a database: 1-Whoever made it didn't used a database and it will be pretty hard to store this in an organized database if i'm not able to do something with it first, like just reading it, copying parts from it or putting in memory or something. 2-I don't have experience working with databases as pretty much all stuff i've ever done in php didn't needed large amounts of stored data, 50kb at best, if i was thinking about a big project or huge chunks of data as this one, i definitely would, but i didn't made this mess to start with and now i have to undo it. 3-The logic for having to store a small portion of data like 10mb in hard drive when now every computer has pretty much enough ram to fit the whole OS in it is pretty much incomprehensible unless someone gives a good explanation about it, if i had to access a lot of said files simultaneously i would understand but like i said, this is a simple project, this is the only file that will be accessed at a given time this isn't even to make some kind of website, it's to run a few times and be done with it.

    Read the article

  • Calculating average (AVG) and grouping by week on large data set takes too long

    - by caioiglesias
    I'm getting average prices by week on 7 million rows, it's taking around 30 seconds to get the job done. This is the simple query: SELECT AVG(price) as price, yearWEEK(FROM_UNIXTIME(timelog)) as week from pricehistory where timelog > $range and product_id = $id GROUP BY week The only week that actually gets data changed and is worth averaging every time is always the last one, so this calculation for the whole period is a waste of resources. I just wanted to know if mysql has a tool to help out on this.

    Read the article

  • Emacs and Long Shell Commands

    - by darrint
    Is there a way to run a shell command, have the output show up in a new buffer and have that output show up incrementally? Eshell and other emacs terminal emulators do a find job of this but I see no way to script them. What I'd like to do is write little elisp functions to do stuff like run unit tests, etc. and watch the output trickle into a buffer. The elisp function shell-command is close to what I want but it shows all the output at once when the process finishes.

    Read the article

  • How long is a CS degree good for?

    - by Recursion
    I came upon a comment on another forum today and one user responding to another suggested that a CS degree is really only good for one through two years at the most, and after that its as if you never had it. Is this really true? is this what employers think? When I did CS I never learned anything new, we learned fundamentals like data structures, algorithms, time complexity, OS fundamentals, language characteristics. Most of this stuff has been around for the past 20 years or so.

    Read the article

  • Link to Google Streetview using Lat/Long

    - by Dan Monego
    I'm trying to make an app that links to Google streetview using latitude/longitude coordinates, and shows a streetview of the nearest road. This is coming from a fairly small and well covered area, so there isn't going to be any coordinates in the middle of the ocean. Is there a published API showing the get parameters you need to link directly to streetview?

    Read the article

  • MySQL Insert Query Randomly Takes a Long Time

    - by ShimmerTroll
    I am using MySQL to manage session data for my PHP application. When testing the app, it is usually very quick and responsive. However, seemingly randomly the response will stall before finally completing after a few seconds. I have narrowed the problem down to the session write query which looks something like this: INSERT INTO Session VALUES('lvg0p9peb1vd55tue9nvh460a7', '1275704013', '') ON DUPLICATE KEY UPDATE sessAccess='1275704013',sessData=''; The slow query log has this information: Query_time: 0.524446 Lock_time: 0.000046 Rows_sent: 0 Rows_examined: 0 This happens about 1 out of every 10 times. The query usually only takes ~0.0044 sec. The table is InnoDB with about 60 rows. sessId is the primary key with a BTREE index. Since this is accessed on every page view, it is clearly not an acceptable execution time. Why is this happening? Update: Table schema is: sessId:varchar(32), sessAccess:int(10), sessData:text

    Read the article

  • Warning: date() expects parameter 2 to be long, string given in

    - by Simon
    its the $birthDay = date("d", $alder); $birthYear = date("Y", $alder); i dont know what it is here is my code //Dag $maxDays = 31; $birthDay = date("d", $alder); echo '<select name="day">'; echo '<option value="">Dag</option>'; for($i=1; $i<=$maxDays; $i++) { echo '<option '; if($birthDay == $i){ echo 'selected="selected"'; } echo ' value="'.$i.'">'.$i.'</option>'; } echo '</select>'; //Måned echo '<select name="month">'; $birthMonth = date("m", $alder); $aManeder = 12; echo '<option value="">Måned</option>'; for($i = 1; $i <= $aManeder; $i++) { echo '<option '; if($birthMonth == $i) { echo 'selected="selected"'; } echo ' value="'.$i.'">'.$ManderArray[$i].'</option>'; } echo '</select>'; //År $startYear = date("Y"); $endYear = $startYear - 30; $birthYear = date("Y", $alder); echo '<select name="year">'; echo '<option value="">år</option>'; while($endYear <= $startYear) { echo '<option '; if($birthYear == $endYear) { echo 'selected="selected"'; } echo ' value="'.$endYear.'">'.$endYear.'</option>'; $endYear++; } echo '</select>';

    Read the article

  • Adding my own items to Long Click on Text Box menu on android

    - by Boardy
    Hi all, I am currently developing an application for android. I'm not sure if this is possible but here it goes. When the user clicks and holds on a text box whether it is a website or a piece of software a menu is displayed which shows paste and input method. What I want to be able to do is add my own items to this menu and when the user clicks on my item it will load my app, they can select an item from a list view. It will then copy the contents and automatically paste it into the text field the user selected. Thanks for your help in this matter

    Read the article

  • Data-binding taking too long to update

    - by Justin
    In my application I have this code in my view model: hiddenTextContainer.PreHideVerticalOffset = VerticalOffset; hiddenTextContainer.HiddenText = Text.Remove(SelectionStart, SelectionLength); hiddenTextContainer.HasHiddenText = true; hiddenTextContainer.NonHiddenTextStart = SelectionStart; Text = Text.Substring(SelectionStart, SelectionLength); SelectionStart = Text.Length; hiddenTextContainer.ImmediatePostHideVerticalOffset = VerticalOffset; This code is used to hide selected text in a textbox. Text is a string property data bound to the text property of a textbox and VerticalOffset is a double property data bound to the VerticalOffset property of that same textbox. I need to save the VerticalOffset before and after the hiding of selected text takes place, but with my code below both hiddenTextContainer.PreHideVerticalOffset and hiddenTextContainer.ImmediatePostHideVerticalOffset are always set to the same value no matter what. I have figured out that this is because the text of the textbox has not been updated by the time the code reaches: hiddenTextContainer.ImmediatePostHideVerticalOffset = VerticalOffset; Is there any way I can fix this?

    Read the article

  • Alternative to CURL due to long waiting

    - by aalan
    Hey Guys I currently run a PHP-script using CURL to send data to another server, to do run a PHP-script that could take up to a minute to run. This server doesn't give any data back. But the CURL-request still has to wait for it to complete, and then it loads the rest of the orignal page. I would like my PHP-script to just send the data to the other server and then not wait for an answer. So my question is how should I solve this? I have read that CURL always has to wait. What are your suggestions? Thank You!

    Read the article

  • Long list of if statements in Java

    - by steve
    Hi, Sorry I can't find a question answering this, I'm almost certain someone else has raised it before. My problem is that I'm writing some system libraries to run embedded devices. I have commands which can be sent to these devices over radio broadcasts. This can only be done by text. inside the system libraries I have a thread which handles the commands which looks like this if (value.equals("A") { doCommandA() } else if (value.equals"B") { doCommandB() } else if etc. The problem is that there are a lot of commands to it will quickly spiral to something out of control. Horrible to look out, painful to debug and mind boggling to understand in a few months time.

    Read the article

  • Rendering ListBox takes too long on Windows Phone

    - by Bhawk1990
    I am working on a Windows Phone 7 Application using Local SQLite Database and I'm having an issue with the rendering time of pages that use DataBinding. Currently it takes 60-70ms to retrieve the data from the database. Then it takes about 3100ms to render the data retrieved using a ListBox with DataBinding. Here you can see the DataTemplate of the ListBox: <DataTemplate x:Key="ListBoxItemTemplate"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="68" /> <ColumnDefinition /> </Grid.ColumnDefinitions> <TextBlock x:Name="TimeColumn" Text="{Binding TimeSpan}" Grid.Column="0" Grid.Row="0" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" /> <TextBlock Text="{Binding Stop.StopName}" Grid.Column="1" Grid.Row="0" Margin="15,0,0,0" TextWrapping="NoWrap" Foreground="Black" HorizontalAlignment="Left" VerticalAlignment="Center" /> </Grid> </DataTemplate> Comment: I have tried it using Canvas instead of Grid too, same result. Then, the database loads data into a CSList (using ViciCoolStorage) and that gets Binded to the ListBox: StationList.ItemsSource = App.RouteViewModel.RouteStops; Comment: I have tried to add the elements of the CSList to an ObservableCollection and bind that to the interface but didn't seem to change anything. Question: Am I doing something wrong that results in a huge load time - even if just loading 10 elements -, or this is normal? Do you have any recommendations to get a better performance with DataBinding? Thank you for your answers in advance!

    Read the article

  • delete taking really long time! mysql

    - by every_answer_gets_a_point
    i am doing this: delete calibration_2009 from calibration_2009 join batchinfo_2009 on calibration_2009.rowid = batchinfo_2009.rowid where batchinfo_2009.reporttime like '%2010%'; both tables have about 500k lines of data i suspect that 250k match the criteria to be deleted so far it has been running for 2 hours!!! is there something wrong?

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >