Search Results

Search found 1610 results on 65 pages for 'timer'.

Page 12/65 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to add Timer to loop.

    - by mukeshpawar
    how to add timer to loop. i am making a urlConnection so i want that the loop execute for a time and if there is no connection it should exit. Does it work..... [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1f]]; Thanks in advance.

    Read the article

  • Flash date and time and coutdown timer

    - by c11ada
    hey all, does any one know of any good countdown timer's for flash which i can use to be implemented in a flash game or quiz ? also i have the following line of code var endDate:Date = new Date(2010,7,30); how would i go about having the endDate to be the current time and date + 30 minutes ? thanks

    Read the article

  • JQuery timer, how do I do this

    - by Roland
    Is there anyway to implement a timer for JQuery, eg. every 10 seconds it needs to call a js function. I tried the following window.setTimeout(function() { alert('test'); }, 1000); but this only executes ones and then never again.

    Read the article

  • jquery - resetting timer

    - by Phil Jackson
    Hi, im using a plugin to do something ever 10 secs: function status_updates(){ $("p").everyTime(1000,function(i) { if(i==10){ alert("foo"); // something here }else{ $(this).html(i); } }); } status_updates(); where it says something here I need to add something to reset the timer but i dont know how. The plugin is here: http://jquery.offput.ca/every/ or if you know of an other way it would be much appreciated.

    Read the article

  • Neko and haxe.Timer.delayed()

    - by vava
    As every haXe developer knows, you could use haxe.Timer.delayed() to delay function call for some time. But this function doesn't exist for neko at all. Is there a way to achieve the same results?

    Read the article

  • Countdown timer?

    - by Khou
    How do you make a Countdown timer? When the user loads the page, clock starts counting down, it reaches time, it redirects browser to a new page. Found this, it was not too useful. http://encosia.com/2007/07/25/display-data-updates-in-real-time-with-ajax/

    Read the article

  • Timer code for online quiz on mobiles

    - by prathyusha
    hello everyone, We are doing project on online quiz tool for mobile devices using J2ME. We got the code for midlet interface, webserver and connections. But we need to implement timer in it. So anyone can give suggestions for that code and where can be it beneficial to implement it?

    Read the article

  • Running A timer when application quits

    - by Joy
    I'm new to iphone development. I want to develop a multi-timezone enabled alarm clock which can be run on iphone. But i'm not sure whether it is possible to run a timer in the background even if the application quits. If not then is there any other way to do that. Looking forwadr to any kind of help. Thanks in advance Koushik

    Read the article

  • C#: Why am I still getting an RCW error when exiting my application?

    - by shifuimam
    To be specific, the error is: An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss. The application in question is a small applet that displays the current clock speed of the CPU as a system tray icon. I'm using a System.Timers.Timer object to refresh the systray icon at an interval of 2.5 seconds. There's a single context menu item to exit the application, which uses the following function to unload everything: public void ExitApp(object sender, EventArgs e) { //stop and disable the timer theInterval.Stop(); theInterval.Enabled = false; //unload the system tray icon TheIcon.Visible = false; //exit the application Application.Exit(); } If I take out everything but Application.Exit(); I get an RCW error and the systray icon doesn't go away until I mouse over it. Everything was working perfectly until I changed the window style of the hidden form used to initialize the systray icon and the timer. If it helps any, I'm using C# 2010 Express.

    Read the article

  • Application crashing on getting updated information from database using timer and storing it on loca

    - by Amit Battan
    In our multi - user application we are continuously interacting with database. We have a common class through which we are sending POST queries to database and obtaining xml files in return. We are using delegates of NSXMLParser to parse the obtained file. The problem with us is we are facing many crashes in it generally when application is idle and changed data in database is being fetched in background through timer which is invoked after every few seconds. We have also dealt with error handling through try and catch but it proves to be of no use in this case and mostly application crashes with following error : Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000020 Strange thing is that many times the fetching of updated data at background works very fine, same methods being successfully executed under similar conditions but suddenly it crashes on one of them. The codes we are using is as follows: // we are using timer in this way: chkOnlineUser=[NSTimer scheduledTimerWithTimeInterval:15 target:mmObject selector:@selector(threadOnlineUser) userInfo:NULL repeats:YES]; // this method being called in timer -(void)threadOnlineUser{//HeartBeat in Thread [NSThread detachNewThreadSelector:@selector(onlineUserRefresh) toTarget:self withObject:nil]; } // this performs actual updation -(void)onlineUserRefresh{ NSAutoreleasePool *pool =[[NSAutoreleasePool alloc]init]; @try{ if(chkTimer==1){ return; } chkTimer=1; if([allUserArray count]==0){ [user parseXMLFileUser:@"all" andFlag:3]; [allUserArray removeAllObjects]; [allUserArray addObjectsFromArray:[user users]]; } [objHeartBeat parseXMLFile:[loginID intValue] timeOut:10]; NSMutableDictionary *tDictOL=[[NSMutableDictionary alloc] init]; tDictOL=[objHeartBeat onLineList]; NSArray *tArray=[[NSArray alloc] init]; tArray=[[tDictOL objectForKey:@"onlineuser"] componentsSeparatedByString:@","]; [loginUserArray removeAllObjects]; for(int l=0;l less than [tArray count] ;l++){ int t;//=[[tArray objectAtIndex:l] intValue]; if([[allUserArray valueForKey:@"Id"] containsObject:[tArray objectAtIndex:l]]){ t = [[allUserArray valueForKey:@"Id"] indexOfObject:[tArray objectAtIndex:l]]; [loginUserArray addObject:[allUserArray objectAtIndex:t]]; } } [onlineTable reloadData]; [logInUserPopUp removeAllItems]; if([loginUserArray count]==1){ [labelLoginUser setStringValue:@"Only you are online"]; [logInUserPopUp setEnabled:YES]; }else{ [labelLoginUser setStringValue:[NSString stringWithFormat:@" %d users online",[loginUserArray count]]]; [logInUserPopUp setEnabled:YES]; } NSMenu *menu = [[NSMenu alloc] initWithTitle:@"menu"]; NSMenuItem *itemOne = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""]; [menu addItem:itemOne]; for(int l=0;l less than [loginUserArray count];l++){ NSString *tempStr= [NSString stringWithFormat:@"%@ %@",[[[loginUserArray objectAtIndex:l] objectForKey:@"user_fname"] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]],[[[loginUserArray objectAtIndex:l] objectForKey:@"user_lname"] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; if(![tempStr isEqualToString:@""]){ NSMenuItem *itemOne = [[NSMenuItem alloc] initWithTitle:tempStr action:NULL keyEquivalent:@""]; [menu addItem:itemOne]; }else if(l==0){ NSMenuItem *itemOne = [[NSMenuItem alloc] initWithTitle:tempStr action:NULL keyEquivalent:@""]; [menu addItem:itemOne]; } } [logInUserPopUp setMenu:menu]; if([lastUpdateTime isEqualToString:@""]){ }else { [self fetchUpdatedInfo:lastUpdateTime]; [self fetchUpdatedGroup:lastUpdateTime];// function same as fetchUpdatedInfo [avObject fetchUpdatedInfo:lastUpdateTime];// function same as fetchUpdatedInfo [esTVObject fetchUpdatedInfo:lastUpdateTime];// function same as fetchUpdatedInfo } lastUpdateTime=[[tDictOL objectForKey:@"lastServerTime"] copy]; } @catch (NSException * e) { [queryByPost insertException:@"MainModule" inFun:@"onlineUserRefresh" excp:[e description] userId:[loginID intValue]]; NSRunAlertPanel(@"Error Panel", @"Main Module- onlineUserRefresh....%@", @"OK", nil, nil,e); } @finally { NSLog(@"Internal Update Before Bye"); chkTimer=0; NSLog(@"Internal Update Bye");// Some time application crashes after this log // Some time application crahses after "Internal Update Bye" log } } // The method which we are using to obtain updated data is of following form: -(void)fetchUpdatedInfo:(NSString *)UpdTime{ @try { if(initAfterLoginComplete==0){ return; } [user parseXMLFileUser:UpdTime andFlag:[loginID intValue]]; [tempUserUpdatedArray removeAllObjects]; [tempUserUpdatedArray addObjectsFromArray:[user users]]; if([tempUserUpdatedArray count]0){ if([contactsView isHidden]){ [topContactImg setImage:[NSImage imageNamed:@"btn_contacts_off_red.png"]]; }else { [topContactImg setImage:[NSImage imageNamed:@"btn_contacts_red.png"]]; } }else { return; } int chkprof=0; for(int l=0;l less than [tempUserUpdatedArray count];l++){ NSArray *tempArr1 = [allUserArray valueForKey:@"Id"]; int s; if([[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"] intValue]==profile_Id){ chkprof=1; } if([tempArr1 containsObject:[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"]]){ s = [tempArr1 indexOfObject:[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"]]; [allUserArray replaceObjectAtIndex:s withObject:[tempUserUpdatedArray objectAtIndex:l]]; }else { [allUserArray addObject:[tempUserUpdatedArray objectAtIndex:l]]; } NSArray *tempArr2 = [tempUser valueForKey:@"Id"]; if([tempArr2 containsObject:[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"]]){ s = [tempArr2 indexOfObject:[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"]]; [tempUser replaceObjectAtIndex:s withObject:[tempUserUpdatedArray objectAtIndex:l]]; }else { [tempUser addObject:[tempUserUpdatedArray objectAtIndex:l]]; } } NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"user_fname" ascending:YES]; [tempUser sortUsingDescriptors:[NSMutableArray arrayWithObject:sortDescriptor]]; [userListTableView reloadData]; [groupsArray removeAllObjects]; for(int z=0;z less than [tempGroups count];z++){ NSMutableArray *tempMArr=[[NSMutableArray alloc] init]; for(int l=0;l less than [allUserArray count];l++){ if([[[allUserArray objectAtIndex:l] objectForKey:@"GroupId"] intValue]==[[[tempGroups objectAtIndex:z] objectForKey:@"group_id"] intValue]){ [tempMArr addObject:[allUserArray objectAtIndex:l]]; } } [groupsArray insertObject:tempMArr atIndex:z]; [tempMArr release]; tempMArr= nil; } for(int n=0;n less than [tempGroups count];n++){ [[groupsArray objectAtIndex:n] addObject:[tempGroups objectAtIndex:n]]; } [groupsListOV reloadData]; if(chkprof==1){ [self profileShow:profile_Id]; }else { } [self selectUserInTable:0]; }@catch (NSException * e) { NSRunAlertPanel(@"Error Panel", @"%@", @"OK", nil, nil,e); } } // The method which we are using to frame select query and parse obtained data is: -(void)parseXMLForUser:(int)UId stringVar:(NSString*)stringVar{ @try{ if(queryByPost) [queryByPost release]; queryByPost=[QueryByPost new]; // common class used to invoke method to send request via POST method //obtaining data for xml parsing NSString *query=[NSString stringWithFormat:@"Select * from userinfo update_time = '%@' AND NOT owner_id ='%d' ",stringVar,UId]; NSData *obtainedData=[queryByPost executeQuery:query WithAction:@"query"]; // method invoked to perform post query if(obtainedData==nil){ // data not obtained so return return; } // initializing dictionary to be obtained after parsing if(obtainedDictionary) [obtainedDictionary release]; obtainedDictionary=[NSMutableDictionary new]; // xml parsing if (updatedDataParser) // airportsListParser is an NSXMLParser instance variable [updatedDataParser release]; updatedDataParser = [[NSXMLParser alloc] initWithData:obtainedData]; [updatedDataParser setDelegate:self]; [updatedDataParser setShouldResolveExternalEntities:YES]; BOOL success = [updatedDataParser parse]; } @catch (NSException *e) { NSLog(@"wtihin parseXMLForUser- parseXMLForUser:stringVar: - %@",[e description]); } } //The method which will attempt to interact 4 times with server if interaction with it is found to be unsuccessful , is of following form: -(NSData*)executeQuery:(NSString*)query WithAction:(NSString*)doAction{ NSLog(@"within ExecuteQuery:WithAction: Query is: %@ and Action is: %@",query,doAction); NSString *returnResult; @try { NSString *returnResult; NSMutableURLRequest *postRequest; NSError *error; NSData *searchData; NSHTTPURLResponse *response; postRequest=[self directMySQLQuery:query WithAction:doAction]; // this method sends actual POST request NSLog(@"after directMYSQL in QueryByPost- performQuery... ErrorLogMsg"); searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; returnResult = [[NSString alloc] initWithData:searchData encoding:NSASCIIStringEncoding]; NSString *resultToBeCompared=[returnResult stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSLog(@"result obtained - %@/ resultToBeCompared - %@",returnResult,resultToBeCompared); if(![resultToBeCompared isEqualToString:@""]){ }else { sleep(10); postRequest=[self directMySQLQuery:query WithAction:doAction]; searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; if(![resultToBeCompared isEqualToString:@""]){ }else { sleep(10); postRequest=[self directMySQLQuery:query WithAction:doAction]; searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; if(![resultToBeCompared isEqualToString:@""]){ }else { sleep(10); postRequest=[self directMySQLQuery:query WithAction:doAction]; searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; if(![resultToBeCompared isEqualToString:@""]){ }else { sleep(10); postRequest=[self directMySQLQuery:query WithAction:doAction]; searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; if(![resultToBeCompared isEqualToString:@""]){ }else { return nil; } } } } } returnResult = [[NSString alloc] initWithData:searchData encoding:NSASCIIStringEncoding]; return searchData; } @catch (NSException * e) { NSLog(@"within QueryByPost , execurteQuery:WithAction - %@",[e description]); return nil; } } // The method which sends POST request to server , is of following form: -(NSMutableURLRequest *)directMySQLQuery:(NSString*)query WithAction:(NSString*)doAction{ @try{ NSLog(@"Query is: %@ and Action is: %@",query,doAction); // some pre initialization NSString *stringBoundary,*contentType; NSURL *cgiUrl ; NSMutableURLRequest *postRequest; NSMutableData *postBody; NSString *ans=@"434"; cgiUrl = [NSURL URLWithString:@"http://keysoftwareservices.com/API.php"]; postRequest = [NSMutableURLRequest requestWithURL:cgiUrl]; [postRequest setHTTPMethod:@"POST"]; stringBoundary = [NSString stringWithString:@"0000ABCQueryxxxxxx"]; contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", stringBoundary]; [postRequest addValue:contentType forHTTPHeaderField: @"Content-Type"]; //setting up the body: postBody = [NSMutableData data]; [postBody appendData:[[NSString stringWithFormat:@"\r\n\r\n--%@\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"code\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:ans] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"action\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:doAction] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"devmode\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"devmode"]] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"q\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:query] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postRequest setHTTPBody:postBody]; NSLog(@"Direct My SQL ok");// Some time application crashes afte this log //Some time application crashes after "Direct My SQL ok" log return [postRequest mutableCopy]; }@catch (NSException * e) { NSLog(@"NSException %@",e); NSRunAlertPanel(@"Error Panel", @"Within QueryByPost- directMySQLQuery...%@", @"OK", nil, nil,e); return nil; } }

    Read the article

  • How do you link a time stamp to a cell using a userform button control? [migrated]

    - by Chad Cochrane
    Hello fellow VB Developers/Users/Hobbyists/What-Have-You! I have a user form that has two buttons: 1. Start 2. Stop When I press start, I would like it to record the current time with this format: (dd/mm/yy hh:nn:ss:) in a specific column. Then when I press the Stop Button I would like it to record the time again in the cell next to it. Then if I press start Again I would like it to record below the first cells current record. Basically I am building a timer to record data to see how long certain tasks take. I will post the excel file and provide more information were necessary. Thanks for any help provided. CURRENT CODE Public runTimer As Double Public startTime As Date Dim counter As Date Sub setStart() counter = 0 startTime = Now runTimer = Now + TimeSerial(0, 0, 1) Application.OnTime runTimer, "setStart", , True Set myTime = Sheet4.Range("F1") Set timeRng = Sheet4.Range("C8:C100") i = WorksheetFunction.CountA(timeRng) i = i + 1 Cells(i, "C") = myTime Sheet4.Cells(i, "C").NumberFormat = "yyyy/mm/dd HH:mm:ss" If i >= 2 Then Cells(i, "D8") = Cells(i, "C8") - Cells(i - 1, "C8") Sheet4.Cells(i, "C").NumberFormat = "yyyy/mm/dd HH:mm:ss" End If Application.EnableEvents = False End Sub Sub setStop() Application.OnTime runTimer, "setStop", , True Set myTime = Sheet4.Range("F1") Set timeRng = Sheet4.Range("D8:D100") i = WorksheetFunction.CountA(timeRng) i = i + 1 Application.EnableEvents = False Cells(i, "D") = myTime Sheet4.Cells(i, "D").NumberFormat = "yyyy/mm/dd HH:mm:ss" End Sub

    Read the article

  • Need explanation for this boost::asio timer example

    - by ApplePieIsGood
    There is a line in the 3rd tutorial on Boost asio that shows how to renew a timer and yet prevent there from being drift. The line is the following: t->expires_at(t->expires_at() + boost::posix_time::seconds(1)); Maybe it's me but I wasn't able to find documentation on the 2nd usage of expires_at(), with no parameters. expires_at(x) sets the new expiration, cancelling any pending completion handlers. So presumably expires_at() does what, return time of the last expiry? So by adding one second, if there should be some number of ms, say n ms, then it will in essence be "subtracted" from the next expiry since the time is being accounted for? What happens then if the time it takes to perform this handler is greater than 1 second in this example? Does it fire immediately?

    Read the article

  • Jquery making div fadeout with timer

    - by nharry
    Looking to make a div fadeout after 10 seconds. Tried various things but can't get the timer working. This is the code: $('#deletesuccess').show(); Edit: This is the full code: function refreshTable() { //timestamp to get around ie caching issue var tsTimeStamp= new Date().getTime(); $('#deletesuccess').show().fadeOut(); $.get('table.php', {action: "get", time: tsTimeStamp}, function(data){ $('#customertable').html(data).fadeIn(); }); return true; } I need to show the div and then hide it after x amount of seconds.

    Read the article

  • How do I build a specialized JQuery Timer

    - by Sayem Ahmed
    I have an asp.net page where two grid views are available showing current stock market price updates. I need to update these two grid views every 20 seconds. So I was thinking of using JQuery to do this job. What I need is a timer which will fire every 20 seconds, send an ajax request to the servers, bring the order lists from the server using json and then update those two grid views. If a request to the server is still being served 20 seconds after it is fired, then I want the old one to be aborted without causing any trouble. I already know how to bring objects using json. I just need to figure out how to send a request every 20 seconds and cancel a request if it is still being server for 20 seconds.

    Read the article

  • Tab Page launching a timer

    - by Lumpy
    I have a project that uses a timer to update the position of motors. I am adding 3 more motors and would like to control each of them the same way as the first. I tried moving my controls to a Tab Control but my update timers are not triggering. I made the UpdateTimer.SynchronizingObject = TheMainForm; Because if I tried to make it the Tab Page I got an error. I am very new to threaded projects. What am I doing wrong. Will post more code if its needed.

    Read the article

  • Delphi: OnTimer event of my own Timer never happens

    - by Mikhail
    I need a Timer in a 'no form' Delphi unit, so I do this: unit ... interface type TMyTimer = Class(TTimer) public procedure OnMyTimer(Sender: TObject); end; var MyTimer: TMyTimer; implementation procedure TMyTimer.OnMyTimer(Sender: TObject); begin ... end; initialization MyTimer := TMyTimer.Create(nil); with MyTimer do begin Interval := 1000; Enabled := True; OnTimer := OnMyTimer; end; finalization FreeAndNil(MouseTimer); The problem is that the OnMyTimer procedure is never run. I'll truly appreciate any ideas as to why :-)

    Read the article

  • Count down timer

    - by Ohmnastrum
    I have a timer set up and it gets called when ever the player is in their turn phase. I also have a multiplier that decrements slowly while the player is committing actions. for some odd reason my mult variable is returning garbage values I initialized it to 1 in the onLoad statement but it still seems to have trouble. -(void) Timerbar:(NSTimer *)barTimer { if(!waitForPlayer) { [barTimer invalidate]; } if(mult > 0.0) { mult -= 0.01; if(mult < 0) { mult = 0; } } power = (mult * 10) / pwrBarMaxWidth; pwrBarWidth = (int)power % limit; NSLog(@"%d", mult); } Do I have a syntax error somewhere?

    Read the article

  • Jquery Page Timer

    - by Rhepungus
    Hey y'all. Is this possible using jQuery/PHP? I am looking to have my webpage automatically go to a different web page at a certain time of day. For example, i have a 'breakfast' page that is supposed to auto-redirect to the 'Lunch' (www.mylunchpage.com) page at noon. Then the lunch page go to 'Dinner' (www.mydinnerpage.com) page at 5pm. I want it all based on time of day on not on a timer. Yes, the browser will be open all day... Any idea on how to make this work? Any advise will be greatly appreciated.

    Read the article

  • .NET "Timer" would block other method calls?

    - by Ricky
    Hi guys: In ASP.NET 3.5, we suspect a delegate triggering by a "Timer" will block other method calls. From logs, some function calls will wait for the finishing of the delegate and continue to work. Is it true? If yes, what workaround can I do? PS: The delegate contains codes to use WCF to retrieve data and the following code private void Replace<T>(ref IList<T> src, IList<T> des) { lock(src) { while (src.Count > 0) { GC.SuppressFinalize(src.ElementAt(0)); src.RemoveAt(0); } GC.SuppressFinalize(src); src = des; } } Thanks a lot.

    Read the article

  • Windows 7 is shutting down unexpectedly, according to the logs.

    - by dlamblin
    Here's a message from my eventvwr EventLog (Windows Logs System): The previous system shutdown at 11:51:15 AM on ?7/?29/?2009 was unexpected. This is funny because I was wondering why the system shut down while I was playing Civilizations IV full screen. Now I know. It was unexpected. Has anyone encountered and resolved this? A little background: I am running Windows 7 RC inside VMWare Fusion 2 (just updated a few months back) on a MacBook (Bitterly not Pro) aluminum-body. Windows 7 occasionally will shut down. This isn't a quick turn-off, it's a shutdown where all the programs are exited, the system waits until they quit (and Civ4 doesn't prompt me to save), it even installed Windows Updates before restarting. And yes it is restarting right after the shutdown. Because I run a game in full screen mode I do not notice any dialog with a countdown timer or anything like that that might be a warning. As I have iStat on my dashboard widgets I can see about 8 temperature monitors. I have seen the CPU get up to 74C before, but during the shutdown, though it seemed hot to the touch (always is), it read 61C for the CPU, 60C for heatsink A, 50C for heatsink B and in the 30s-40s for the enclosure and harddrives. As I type this now, the temps are actually higher, so I don't think the temperature caused it. I have at least six such events dating first from 5/17 which was a week after installing Windows 7. I did find one information level warning from USER32 in the system log that says: The process C:\Windows\system32\svchost.exe (DLAMBLIN-WIN7) has initiated the restart of computer DLAMBLIN-WIN7 on behalf of user NT AUTHORITY\SYSTEM for the following reason: Operating System: Recovery (Planned) Reason Code: 0x80020002 Shutdown Type: restart Comment: And another 15 minutes before that from Windows Update: Restart Required: To complete the installation of the following updates, the computer will be restarted within 15 minutes: - Cumulative Security Update for Internet Explorer 8 for Windows 7 Release Candidate for x64-based Systems (KB972260) Which I think kind of explains it. Though I don't know why restarting after an update would create an error event of "shutdown was unexpected", isn't that pretty odd? Now, how do I set it to never restart after an update unless I click something. Application of solution: As fretje reminded me, there's a couple of configurable settings for this, in windows 7 they're much in the same place as in Windows 2000 SP3 and XP SP1. Running gpedit.msc pops up a window that looks like: Windows 7 has changed the order and added a couple of newer options I've italicized: Do not display 'Install Updates and Shut Down' in Shut Down Windows dialog box Do not adjust default option to 'Install Updates and Shut Down' in Shut Down Windows dialog box Enabling Windows Power Management to automatically wake up the system to install scheduled updates Configure Automatic Updates Specify intranet Microsoft update service location Automatic Updates detection frequency Allow non-administrators to receive update notifications Turn on Software Notifications Allow Automatic Updates immediate installation Turn on recommended updates via Automatic Updates No auto-restart with logged-on users for scheduled Automatic Updates Re-prompt for restart with scheduled installations. Delay Restart for scheduled installations Reschedule Automatic Updates schedule

    Read the article

  • TypeError #1009, XML and AS3

    - by VideoDnd
    My animation is advanced forward, but it's frozen. It throws a TypeError #1009. How do I get rid of this error and get it to play? ERROR TypeError: Error #1009: Cannot access a property or method of a null object reference. at _fla::MainTimeline/frame1() TypeError: Error #1009: Cannot access a property or method of a null object reference. at _fla::MainTimeline/incrementCounter() at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() download http://sandboxfun.weebly.com/ XML <?xml version="1.0" encoding="utf-8"?> <SESSION> <TIMER TITLE="speed">1000</TIMER> <COUNT TITLE="starting position">10000</COUNT> </SESSION> FLA //DynamicText 'Count' var timer:Timer = new Timer(10); var count:int = 0; var fcount:int = 0; timer.addEventListener(TimerEvent.TIMER, incrementCounter); timer.start(); function incrementCounter(event:TimerEvent) { count = myXML.COUNT.text(); count++; fcount=int(count*count/1000); mytext.text = formatCount(fcount); } function formatCount(i:int):String { var fraction:int = i % 100; var whole:int = i / 100; return ("0000000" + whole).substr(-7, 7) + "." + (fraction < 10 ? "0" + fraction : fraction); } //LOAD XML var myXML:XML; var myLoader:URLLoader = new URLLoader(); myLoader.load(new URLRequest("time.xml")); myLoader.addEventListener(Event.COMPLETE, processXML); /*------CHANGED TIMER VALUE WITH XML------*/ timer = new Timer( Number(myXML.TIMER.text()) ); //timer.start(); //PARSE XML function processXML(e:Event):void { myXML = new XML(e.target.data); trace(myXML.COUNT.text()); trace(myXML.TIMER.text()); } //var count:int = 0;//give it a value type /*------CHANGED COUNT VALUE WITH XML------*/ count = myXML.COUNT.text();

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >