Search Results

Search found 10374 results on 415 pages for 'close'.

Page 22/415 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Is there any way to automatically close filename completetion buffers in Emacs?

    - by Rayne
    For example, when you open a file via C-x-C-f, you can TAB complete file names, and if there are more than one possible completions, it will pop open a completion buffer with a list of possible completions. The problem is, after you've opened the file, the window the buffer was in switches back to normal, but it doesn't close. Is there any way I can make those buffers close automatically after the file has been opened?

    Read the article

  • how to attach window.close to cntrl+w keypress event in a xul window?

    - by Erik Vold
    I have a XUL window, and I want the cntrl+w hotkey to close the window, but when I attach: window.addEventListener("keypress", function(ev) { GM_log("onkeypress handler: \n" + "keyCode property: " + ev.keyCode + "\n" + "which property: " + ev.which + "\n" + "charCode property: " + ev.charCode + "\n" + "Character Key Pressed: " + String.fromCharCode(ev.charCode) + "\n"); }, true); to the page, it treats pressing 'w' and 'cntrl+w' the same, charCode 119.. how can I determine that cntrl+w was pressed so that I may window.close() ?

    Read the article

  • Java io ugly try-finally block

    - by Tom Brito
    Is there a not so ugly way of treat the close() exception to close both streams then: InputStream in = new FileInputStream(inputFileName); OutputStream out = new FileOutputStream(outputFileName); try { copy(in, out); } finally { try { in.close(); } catch (Exception e) { try { // event if in.close fails, need to close the out out.close(); } catch (Exception e2) {} throw e; // and throw the 'in' exception } out.close(); }

    Read the article

  • How to close all, or only some, tabs in Safari using AppleScript?

    - by Form
    I have made a very simple AppleScript to close all tabs in Safari. The problem is, it works, but not completely. The problem is that only a couple of tabs are closed. Here's the code: tell application "Safari" repeat with aWindow in windows repeat with aTab in tabs of aWindow if [some condition is encountered] then aTab close end if end repeat end repeat end tell I've also tried this script: tell application "Safari" repeat with i from 0 to the number of items in windows set aWindow to item i of windows repeat with j from 0 to the number of tabs in aWindow set aTab to item j of tabs of aWindow if [some condition is encountered] then aTab close end if end repeat end repeat end tell ... but it does not work either (same behavior). I tried that on my system (MacBook Pro jan 2008), as well as on a Mac Pro G5 under Tiger and the script fails on both, albeit with a much less descriptive error on Tiger. Running the script a few times closes a few tab each time until none is left, but always fails with the same error after closing a few tabs. Under Leopard I get an out of bounds error. Since I am using fast enumeration (not using "repeat from 0 to number of items in windows") I don't see how I can get an out of bounds error with this... My goal is to use the Cocoa Scripting Bridge to close tabs in Safari from my Objective-C Cocoa application but the Scripting Bridge fails in the same manner. The non-deletable tabs show as NULL in the Xcode debugger, while the other tabs are valid objects from which I can get values back (such as their title). In fact I tried with the Scripting Bridge first then told myself why not try this directly in AppleScript and I was surprised to see the same results. I must have a glaring omission or something in there... (seems like a bug in Safari AppleScript support to me... :S) I've used repeat loops and Obj-C 2.0 fast enumeration to iterate through collections before with zero problems, so I really don't see what's wrong here. Anyone can help? Thanks in advance!

    Read the article

  • Open a terminal window & run command, then close the terminal window if command completed successfully?

    - by Caspar
    I'm trying to write a script to do the following: Open a terminal window which runs a long running command (Ideally) move the terminal window to the top left corner of the screen using xdotool Close the terminal window only if the long running command exited with a zero return code To put it in Windows terms, I'd like to have the Linux equivalent of start cmd /c long_running_cmd if long_running_cmd succeeds, and do the equivalent of start cmd /k long_running_cmd if it fails. What I have so far is a script which starts xterm with a given command, and then moves the window as desired: #!/bin/bash # open a new terminal window in the background with the long running command xterm -e ~/bin/launcher.sh ./long_running_cmd & # move the terminal window (requires window process to be in background) sleep 1 xdotool search --name launcher.sh windowmove 0 0 And ~/bin/launcher.sh is intended to run whatever is passed as a command line argument to it: #!/bin/bash # execute command line arguments $@ But, I haven't been able to get the xterm window to close after long_running_cmd is done. I think something like xterm -e ~/bin/launcher.sh "./long_running_cmd && kill $PPID" & might be what I'm after, so that xterm is launched in the background and it runs ./long_running_cmd && kill $PPID. So the shell in the xterm window then runs the long running command and if it completes successfully, the parent process of the shell (i.e. the process owning the xterm window) is killed, thereby closing the xterm window. But, that doesn't work: nothing happens, so I suspect my quoting or escaping is incorrect, and I haven't been able to fix it. An alternate approach would be to get the PID of long_running_cmd, use wait to wait for it to finish, then kill the xterm window using kill $! (since $! refers to last task started in the background, which will be the xterm window). But I can't figure out a nice way to get the PID & exit value of long_running_cmd out of the shell running in the xterm window and into the shell which launched the xterm window (short of writing them to a file somewhere, which seems like it should be unnecessary?). What am I doing wrong, or is there an easier way to accomplish this?

    Read the article

  • Windows XP: Make Google Chrome's minimize, restore and close buttons match other programs?

    - by TRiG
    I like the way Google Chrome puts the tabs above the address bar, but I don't like the way the minimize, restore, close buttons are a different shape to every other program's. It means that if I sit the mouse in the top corner and minimize everything, I find that I've restored Chrome, not minimized it. Is there any way to get these buttons to a normal shape and size? That's Firefox in front, looking normal, like every other program, and Chrome above and behind, with the buttons at an off-standard position and size.

    Read the article

  • Windows XP: Make Google Chrome's minimize, restore and close buttons match other programs?

    - by TRiG
    I like the way Google Chrome puts the tabs above the address bar, but I don't like the way the minimize, restore, close buttons are a different shape to every other program's. It means that if I sit the mouse in the top corner and minimize everything, I find that I've restored Chrome, not minimized it. Is there any way to get these buttons to a normal shape and size? That's Firefox in front, looking normal, like every other program, and Chrome above and behind, with the buttons at an off-standard position and size.

    Read the article

  • Make Google Chrome's minimise, restore and close buttons look like other programs?

    - by TRiG
    I like the way Google Chrome puts the tabs above the address bar, but I don't like the way the minimise, restore, close buttons are a different shape to every other program's. It means that if I sit the mouse in the top corner and minimise everything, I find that I've restored Chrome, not minimised it. Is there any way to get these buttons to a normal shape and size? That's Firefox in front, looking normal, like every other program, and Chrome above and behind, with the buttons at an off-standard position and size.

    Read the article

  • How do you close a VMWare Fusion VM Window without shutting it down or suspending it?

    - by Chris
    There are a few parts to this question. The first is: I'm running a virtual machine guest using vmrun and nogui, when I open the VMWare Fusion application, the window library opens but subsequently also opens any window of a running VM. Is there a way to prevent this? Secondly, but related: Once it does pop up or I have that separate VM Window open, is there a way to close the window such that it does not suspend or shutdown the vm i.e. convert it back to nogui mode?

    Read the article

  • How to close window/app when i cant see it? ubuntu

    - by tm1rbrt
    Im running ubuntu. I just tried to play supertux but my LCD didnt support the resolution and all i got was a blank screen and music playing. I tried to close it and go back to the desktop by pressing ctrl + z but that didnt work so i had to hard reset my computer! In future what should i press when this happens?

    Read the article

  • IE 8 issue where window.close() is not occuring after winword.exe is fired to print a document

    - by Dave
    In my web application, a popup page is called using window.open javascript. There is a Print button on the page that has an onclick event that calls a printchecks() function. The code in the printchecks() function is function printchecks(){ window.print(); window.close(); } Issue is that the window.print brings up the printer dialog fine and then you select a printer. The page is actually then printed and is a reference to an rtf document that opens in winword.exe behind the scenes. For some reason in IE 8, the window.close() does not occur. This worked in IE 7. In both cases, WINWORD.EXE process appears to run in the background after the page is printed but in the case of IE 8, control is not give back to that popup page until the WINWORD.EXE process dies which takes a minute or so. I am thinking that becasue control is not being sent back to the page in IE 8, the page is not closed automatically. You can close the page after control is given back after the minute or so. This does happen in IE on both Windows XP and Windows 7. Any ideas if there is a setting in IE 8 or some other reason this may be occuring?

    Read the article

  • Maximize/Minimize is causing Close Button to be re-enabled after disabling it -- Why?

    - by Brainsick
    I have used P/Invoke to call GetSystemMenu and EnableMenuItem (win32api) to disable the close functionality. However, after minimizing or maximizing my Windows Forms application the button is re-enabled. Obviously minimizing or maximizing is causing the behavior, but how? I'm not sure where to look to prevent this behavior. Should I be preventing the maximize and minimize behavior or is there something particularly wrong with the way in which I P/Invoked the calls? Once the application (main form) has loaded, I call the static method from a button click. class PInvoke { // P/Invoke signatures [DllImport("user32.dll")] static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert); [DllImport("user32.dll")] static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem, uint uEnable); // SysCommand (WM_SYSCOMMAND) constant internal const UInt32 SC_CLOSE = 0xF060; // Constants used with Add/Check/EnableMenuItem internal const UInt32 MF_BYCOMMAND = 0x00000000; internal const UInt32 MF_ENABLED = 0x00000000; internal const UInt32 MF_GRAYED = 0x00000001; internal const UInt32 MF_DISABLED = 0x00000002; /// <summary> /// Sets the state of the Close (X) button and the System Menu close functionality. /// </summary> /// <param name="window">Window or Form</param> /// <param name="bEnabled">Enabled state</param> public static void EnableCloseButton(IWin32Window window, bool bEnabled) { IntPtr hSystemMenu = GetSystemMenu(window.Handle, false); EnableMenuItem(hSystemMenu, SC_CLOSE, MF_BYCOMMAND | (bEnabled ? MF_ENABLED : MF_GRAYED)); } }

    Read the article

  • How can I close the output stream after a jsp has been included.

    - by stu
    I have a webpage that makes an ajax call to get some data. That data takes a long time to calculate, so what I did was the first ajax server call returns "loading..." and then the thread goes on to calculate the data and store it in a cache. meanwhile the client javascript checks back every few seconds with another ajax call to see if the cache has been loaded yet. Here's my problem, and it might not be a problem. After the initial ajax to the server call, I do a ...getServletContext().getRequestDispatcher(jsppath).include(request, response); then I use that thread to do the calculations. I don't mind tying up the webserver thread with this, but I want the browser to get the response and not wait for the server to close the socket. I can't tell if the server is closing the socket after the include, but I'm guessing it's not. So how can I forcibly close the stream after I've written out my response, before starting my long calculations? I tried o = response.getOutputStream(); o.close(); but I get an illegal state exception saying that the output stream has already been gotten (presumably by the jsp I'm including) So my qestions: 1) is the webserver closing the socket (I'm guessing not, because you could always include another jsp) 2) if it is as I assume not closing the socket, how do I do that?

    Read the article

  • SQL query sample

    - by qods
    Hi, my table is look like this order.. I would like count the TermID's with these conditions; If it's possible also want to get resultset with these headers - TermID must have close or open status - TermID Status must turn to Open (close to open) - Status Date (open status) must be bigger date than close status date with my regards, ID TermID Status Date 103990107 103641 Close 28/05/2010 104000600 103641 Open 31/05/2010 103980976 106458 Close 26/05/2010 103990045 106458 Open 27/05/2010 103939537 106475 Open 18/05/2010 103908130 117220 Open 13/05/2010 103929653 117220 Open 13/05/2010 103999017 117360 Open 31/05/2010 103834814 117402 Open 05/05/2010 103993973 117420 Open 28/05/2010 103849795 119377 Close 05/05/2010 103955266 119377 Close 21/05/2010 103995229 119377 Close 29/05/2010 103979873 119704 Open 25/05/2010 103832225 119767 Open 04/05/2010 103925429 123229 Close 15/05/2010 103986986 123932 Open 27/05/2010

    Read the article

  • How to close an oracle db connection from php on an apache server? I mean close instantly.

    - by Valentin Jacquemin
    Usually closing a connection is simply done by oci_clone($connection); or in a worse case when the php script ends the connection pass away. In my case however, I face a different behavior. If I access my application which uses PHP 5.2.8, Apache 2.2.11 and oci8 1.2.5, the connection is kept during several minutes. Actually it seems to: if I launch netstat -b I see that the process httpd.exe remains with the ESTABLISHED status on the database's URL during a while (a few minutes). Could someone enlighten me on that behavior? P.S. I do not use persistent connections.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >