Search Results

Search found 8557 results on 343 pages for 'infinite loop'.

Page 36/343 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • JQuery delay()-function breaks loop?

    - by Rakward
    I'm trying to fade an element in and out, but with a slight pause in between, it works without the pause, but when I add the pause using the jQuery delay()-function, it just stops; Here's the code: $('#headerimage2').each(function(){ for(i=1;i<50;i++){ $(this).fadeOut(1200).delay(1000).fadeIn(1000).delay(1000); } }); Why does the delay()-function (both first and second) break the loop?

    Read the article

  • Empty "for" loop in Facebook ajax

    - by celticpride
    While surfing facebook and using the Firebug network debugger I noticed that facebook's AJAX responses all start with an empty for loop. Example: for(;;);{...} Does anyone know why this is done? I assume it's to prevent some sort of XSS attack but I don't totally understand. Thanks!

    Read the article

  • Problem with continue in While Loop within Try/Catch in C# (2.0)

    - by csharpnoob
    Hi, when i try to use in my ASPX Webpage in the Code Behind this try{ while() { ... db.Open(); readDataMoney = new OleDbCommand("SELECT * FROM Customer WHERE card = '" + customer.card + "';", db).ExecuteReader(); while (readDataMoney.Read()) { try { if (!readDataMoney.IsDBNull(readDataMoney.GetOrdinal("Credit"))) { customer.credit = Convert.ToDouble(readDataMoney[readDataMoney.GetOrdinal("Credit")]); } if (!readDataMoney.IsDBNull(readDataMoney.GetOrdinal("Bonus"))) { customer.bonus = Convert.ToDouble(readDataMoney[readDataMoney.GetOrdinal("Bonus")]); } } catch (Exception ex) { Connector.writeLog("Money: " + ex.StackTrace + "" + ex.Message + "" + ex.Source); customer.credit = 0.0; customer.credit = 0.0; continue; } finally { } } readDataMoney.Close(); vsiDB.Close(); ... } }catch { continue; } The whole page hangs if there is a problem when the read from db isn't working. I tried to check for !isNull, but same problem. I have a lots of differend MDB Files to process, which are readonly (can't repair/compact) and some or others not. Same Design/Layout of Tables. With good old ASP Classic 3.0 all of them are processing with the "On Resume Next". I know I know. But that's how it is. Can't change the source. So the basic question: So is there any way to tell .NET to continue the loop whatever happens within the try loop if there is any exception? After a lots of wating time i get this exceptions: at System.Data.Common.UnsafeNativeMethods.IDBInitializeInitialize.Invoke(IntPtr pThis) at System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper& sessionWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at GetCustomer(String card)Thread was being aborted.System.Data and System.Runtime.InteropServices.Marshal.ReadInt16(IntPtr ptr, Int32 ofs) System.Data.ProviderBase.DbBuffer.ReadInt16(Int32 offset) System.Data.OleDb.ColumnBinding.Value_I2() System.Data.OleDb.ColumnBinding.Value() System.Data.OleDb.OleDbDataReader.GetValue(Int32 ordinal) System.Data.OleDb.OleDbDataReader.get_Item(Int32 index) Thread was terminated.mscorlib Thanks for any help.

    Read the article

  • How to loop on a JSON object?

    - by Damiano
    Hello, I have this JSON object: {"time":"123456789", "raw":"chat_history", "data":{ "msg":[ {"time":1111111111, "user":"user1", "text":"text from user1"}, {"time":2222222222, "user":"user2", "text":"text from user2"}, {"time":3333333333, "user":"user3", "text":"text from user3"}, {"time":4444444444, "user":"user4", "text":"text from user4"} ] }} I have to create a FOR to loop the elements of data.msg and print it: I would print these results with the FOR: 11111111111 - user1 - text from users1 22222222222 - user2 - text from users2 33333333333 - user3 - text from users3 44444444444 - user4 - text from users4 Could you help me? Thank you very much

    Read the article

  • Python loop | "do-while" over a tree

    - by johannix
    Is there a more Pythonic way to put this loop together?: while True: children = tree.getChildren() if not children: break tree = children[0] UPDATE: I think this syntax is probably what I'm going to go with: while tree.getChildren(): tree = tree.getChildren()[0]

    Read the article

  • Using strtok() in a loop in C?

    - by Alex Xander
    I am trying to use strtok() in nested loop. But this is not giving me desired results. Possibly because they are using same memory location. My code is of the form:- char *token1 = strtok(Str1, "%"); while(token1 != NULL ) { char *token2 = strtok(Str2, "%"); while(token2 != NULL ) { //DO SMTHING token2 = strtok(NULL, "%"); } token1 = strtok(NULL, "%"); // Do something more }

    Read the article

  • escape from a linux cli for loop

    - by aidan
    I'm doing something like this: for f in `find -iname '*.html'`; do scp $f remoteserver:$f; done; I've got through about 3 of the 1000 files and I've decided I want to abort the operation. CTRL+C only escapes the SCP login prompt and takes me to the next one, rather than escaping the for loop. Is there a better way than hitting CTRL+C 9997 times? Thanks!

    Read the article

  • how can i loop through all of the columns of the OracleDataReader

    - by ooo
    I have the following code and i want to loop through all the fields in the result of this query and populate the dictionary called field. Given a datareader is this possible? OracleCommand command = connection.CreateCommand(); string sql = "Select * from MYTABLE where ID = " + id; command.CommandText = sql; Dictionary<string, string> fields = new Dictionary<string, string>(); OracleDataReader reader = command.ExecuteReader();

    Read the article

  • Loop through enumeration

    - by Germ
    What is best way to loop through an enumeration looking for a matching value? string match = "A"; enum Sample { A, B, C, D } foreach(...) { //should return Sample.A }

    Read the article

  • Rails each loop insert tag every 6 items?

    - by dustmoo
    Hello Stack Anon, I have X number of image objects that I need to loop through in a view and want to create a new div every 6 objects or so (for a gallery). I have looked at cycle but it seems to change every other record. Does anyone know of a way to insert code into a view every 6 times? I could probably do it with nested loops but I am kinda stumped on this one. Thanks!

    Read the article

  • Doing a loop on android (Audio)

    - by James Rattray
    I have a track I want to play 'megadeth', i'm calling it by... final MediaPlayer mp = MediaPlayer.create(this, R.raw.megadeth); And playing it by using 'mp.start' And I just want to know, how can I get this audio mp3 to loop? -Can you give me the code? Thanks alot,

    Read the article

  • Using a array variable in a foreach loop

    - by Jess McKenzie
    I am having an issue trying to work out how to use a function variable in a foreach loop so that I can do the following but its not working. $var = array(7) { [0]=> array(3) { ["listingId"]=> int(532712629) } [1]=> array(3) { ["listingId"]=> int(532712202) } Works but not right: foreach($var as $varr) { var_dump($varr['id']); { Goal - Having the array variable as the foreach value foreach($var['id'] as $item) { if($item === $foo) { } }

    Read the article

  • jumping inside loop

    - by Nyan
    C language allows jumping inside loop. What would be the use of doing so? if(n > 3) { i = 2; goto inner; } /* a lot of code */ for(i = 0; i < limit ;i ++) { inner: /* ... */ }

    Read the article

  • Connecting slots and events in PyQt4 in a loop

    - by LukaD
    Im trying to build a calculator with PyQt4 and connecting the 'clicked()' signals from the buttons doesn't as expected. Im creating my buttons for the numbers inside a for loop where i try to connect them afterwards. def __init__(self): for i in range(0,10): self._numberButtons += [QPushButton(str(i), self)] self.connect(self._numberButtons[i], SIGNAL('clicked()'), lambda : self._number(i)) def _number(self, x): print(x) When I click on the buttons all of them print out '9'. Why is that so and how can i fix this?

    Read the article

  • C++ performance, for versus while

    - by aaa
    hello. In general (or from your experience), is there difference in performance between for and while loops? What if they are doubly/triply nested? Is vectorization (SSE) affected by loop variant in g++ or Intel compilers? Thank you

    Read the article

  • Can I use "map" as a substitute for "for each"/"for in"?

    - by John Mee
    For a little while now javascript has the "map" function to loop over arrays. It appears possible to use it as a 'foreach' operator for example: var arr = ['a','b','c'] var doubles = arr.map(function(val){ return val + val }) Is this better or worse than saying for(var i in arr){ ... 50/50: saves having to use the index but adds a callback; it doesn't seem very common so I hesitate to use it but still want to.

    Read the article

  • problem in getting desired date format in loop

    - by Rishi2686
    Hi there, I have a date format like this : $date1 = "Sun May 09 20:07:50 +0000 2010"; and I have to convert it to: 09-05-2010 I am using date("d-m-Y", $date1)); When I print this individually it gives proper result but I am using it in loop it gives me results like: 31-12-1969 I don't understand why this is so? Can you help, please?

    Read the article

  • Foreach/For loop alternative lambda function?

    - by mamu
    We use for or foreach to loop through collections and process each entries. Is there any alternative in all those new lambda functions for collections in C#? Traditional way of doing foreach(var v in vs) { Console.write(v); } Is there anything like? vs.foreach(v => console.write(v))

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >