close

How to close a thread in Java?

I'm very new to Java, and I'm trying to modify an example of a socket server to power a flash-based game. To allow flash to connect to the server, I need to serve up a policy file. I've never coded a server application before, so I'm not too familiar with the things which need to happen. Anyway, I have made it so that it outputs the fi...

Prevent Context Menu from closing on clicking item (specifically checkbox item)

If I have a checkable item in a Context Menu or ordianry Menu, how do I prevent the menu from closing when the item is selected? ...

SubSonic - Is it necessary to/how to explicitly close the database connection?

Traditionally when using a DbCommand when retrieving data from a sproc, something like the following is good practice: DbCommand cmdDbCommand... dbGetData = DatabaseFactory.CreateDatabase("MyDatabase"); cmdDbCommand = dbGetData.GetStoredProcCommand("MySproc"); . . . try { ... } catch (System.Exception ex) { if (cmdDbCommandcmdDbComm...

WPF Popup close automatically

How to close the WPF Popup in a WPF Control if clicked outside the Popup area or if the Parent Control is moved ? I cannot check it from the Parent Control, Everything must be done by the control itself. ...

Run fucntion on popup close - flex

I've got a flex project that I'm working on. Currently I've got a popup that consists of another mxml file containing a form. Once the form is filled in and submitted I'd like to run another function then the popup closes on the main mxml file, but I'm not sure how to go about doing this? Here's my popup code private var weightadd...

Strange jQueryUI dialog error

I have dialog created like this $('#add_error').click(function(e) { $('<div>') .load('/someaction/format/html/') .dialog({ title: 'Some title', modal: true, width: 385, close: function() { $(this).remove(); ...

How to close on pressing X on PocketPC

On PocketPC, when you tap the (X) to "close" the application, it stays open in the background. The only way to close it (without third-party programs) is to go to the settings->memory and close the program. Or you can run other programs so when the PPC gets to no memory it will close the earlier programs. I am developing an application ...

Mysqli query results: Best approach, do you close, free, both?

Hello all, I have some questions about using mysqli, queries, and related memory management. The code here is just to clarify my questions, so don't dump on it for error checking, etc. I know that needs to be done :) Suppose I have something like this: @ $db = new mysqli($dbhost, $un, $ps, $dbname); $query = "SELECT field1, field2 ". ...

does close() imply flush() in Python?

Hi, In Python, and in general - does a close() operation on a file object imply a flush() operation? Adam ...

Should I close sockets from both ends?

I have the following problem. My client program monitor for availability of server in the local network (using Bonjour, but it does not rally mater). As soon as a server is "noticed" by the client application, the client tries to create a socket: Socket(serverIP,serverPort);. At some point the client can loose the server (Bonjour says t...

Can I close and reopen a socket?

I learned an example of usage of sockets. In this example a client sends a request to a server to open a socket and then the server (listening to a specific port) opens a socket and everything is fine, socket is "opened" from both sides (client and server). But it is still not clear to me how flexible is this stuff. For example, is it p...

How to remove the upper right close button

I need to kill the close 'x' button at the top of a jQuery UI modal dialog box. I have a modal that opens with an OK button that redirects to the site. The site behind the modal is in an iframe. When the user agrees to the statement in the dialog box and clicks the 'OK' button, it redirects to the site that is outside the iframe. If the ...

Java BufferedWriter, OutputStreamWriter able to write to closed FileOutputStream

I was expecting the following code to throw an exception when I goto write data to the Stream: File file = new File("test.txt"); FileOutputStream fs = new FileOutputStream(file); OutputStreamWriter ow = new OutputStreamWriter(fs); BufferedWriter writer = new BufferedWriter(ow); fs.close(); try { ow.write(65); writer.write("tes...

wpf exit thread automatically when application closes

Hi, I have a main wpf window and one of its controls is a user control that I have created. this user control is an analog clock and contains a thread that update hour, minute and second hands. Initially it wasn't a thread, it was a timer event that updated the hour, minutes and seconds but I have changed it to a thread because the appli...

Close smartpart view

I am developing windows Forms application, for this i am using SmartClient. Here i click workspace close('X') event at the time i want to display messageBox based on user input (OK/Cancel) i have to decide pane has to be close or not. ...

How to close Modal popup Extender from Server side

How to close Modal Popup extender from server side code on click of close link in popup. ...

How to stop C++ console application from exiting immediately?

Hello everybody. Lately, I've been trying to learn C++ from this website. Unfortunately whenever I try to run one of the code samples, I see that program open for about a half second and then immediately close. Is there any way to stop the program from closing immediately so that I can see the fruits of my effort? Thanks in advance. ...

C#/.NET: Closing another process outside the main window

Hi, I just wanna ask your opinion/suggestion on how to 'terminate' a running application/process is C# Right now, I do have the following codes: Process myProcess; private void btnOpen_Click(object sender, RoutedEventArgs e) { DirectoryInfo di = new DirectoryInfo(System.Environment.GetFolderPath(Environment.Special...

When I get the Force Close dialog, I have a Report button. Where did it come from?

I feel a little bit silly asking this, but I haven't been able to find any answers on my own. My Force Close dialog has a "Report" button. I think it's a great idea, and I wish everyone had it. At first, I thought it must be something I turned on without realizing it, but not only can't I find any setting that I might have touched, I al...

Eclipse script for commit on close?

Hi, I was wondering how to create a Eclipse script (Eclipsemonkey) to commit the current project on closing of Eclipse? You can listen to commands such as "org.eclipse.ui.file.save" (on file save) etc. but what's the command for editor closing? And how can you call a commit action? ...