close

boost::regex and tilde (~)

Please could you explain why given the following boost::regex pattern: boost::regex re("/\\S+\\w"); /index.html is a match and /~index.html is not? RegexBuddy in Perl mode finds a match in both cases. Could you suggest a pattern that would work? Thanks!! P.S. The \\w at the end is needed in order to ignore the punctuation on the en...

Best way to kill application instance

What is the best way to kill an application instance? I am aware of these three methods: Application.Exit() Environment.Exit(0) Process.GetCurrentProcess().Kill() Can anyone tell me which is better or when using each of the above would be appropriate? ...

Removing loaded jQuery AJAX element

I was working on a dialog with content loaded by AJAX, but I'm not able to remove it. A must was to have a multiple, php-supported, drag-able and close-able dialog. (.center() function present) $('a.event').click(function() { var url = this.href; var getrel = $(this).attr('rel'); var getid = $(this).attr('id'); var dialo...

Javamail does not completely close socket on timeout

When sending a mail trough javamail, a socket to the smtp server is opened. Now, we got the case, that the connection of the mail server went down while the connection was still alive and while javamail was waiting for the server (spam scanning took a few seconds). Therefor the TCP connection was never really closed and the client deadlo...

Is there a built in method that is call-able as the app is about to close?

I have an iphone app, and I need to capture some data right as the app is about to close... Is it possible to associate a method call with the clicking of the iphone home button? So that I can get the most recent and current data of a particular type that I can? ...

System.Windows.Forms.Form Opened As Modal Dialog Closes When Button Is Pressed, Even Though Close() not called./

I'm writing a Windows application that basically runs in the background with a notification icon to interact with it. The notification icon can do basic things like exit the application or show information about it. It can also launch a modal configuration dialog. The code that creates the dialog is pretty straightforward: using(var fr...

Using the applicationWillTerminate method doesn't seem to be working...or I am not using it right...

I am wanting to save some app state data for when the user is quitting the app. I am thinking that I should be using the applicationWillTerminate method inside of my appDelegate, but when I try and do anything there, it's not doing anything: - (void) applicationWillTerminate:(UIApplication *)application { NSLog(@"test"); } When I run...