Search Results

Search found 1096 results on 44 pages for 'never quit'.

Page 26/44 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • xvfb on a machine with a display, can an application run 'in the background?'

    - by marfarma
    I'm setting up to cron a web scraping job, using xvfb, firefox, and watir on my Mac OS X. In testing the script so far, firefox pops up visibly on the local desktop, the watir script executes, and then firefox exits (I quit firefox in my script). I'd like to set the xvfb DISPLAY such that firefox will run, but won't be seen on the local desktop, running 'in the background' so to speak. Nothing I've been able to find online discusses such a possibility - nor explains that it's not possible. Is it possible? If so, what do I need to do to make it work?

    Read the article

  • How do I make PyScript work? Says it cant find python26.dll

    - by Alex
    I installed PyScript to try it out but it just wont start. It only gives me the error: "Error126: Could not open Dll "python26.dll" followed by: "Python could not be properly initialized. We must quit." I think this may have something to do with the PYTHONPATH but since I'm a newbie and dont know what it is or exactly what to put in the PYTHONPATH, after some googling, I ask here. Also, when I tried to install wxPython it was impossible becouse the PYTHONPATH could not be found. I have installed ActivePython 2.6 and the PATH is set so I can access python in cmd.

    Read the article

  • How do I dynamically specify a file in DOS?

    - by donde
    I am trying to use c# in .net to run dos commands to ftp a a file. Technically, it calls a BAT file which calls a CMD file which executes the DOS code. It was up to the CMD file. The CMD fiel will work if I hardcode the path, but I need to dynamically specify the path of the file. BAT File... ftp.exe -s:%~dp0\mycmdfile.cmd And in the cmd file... open <my ost> <my user name> <my pw> quote site cyl pri=1 sec=1 lrecl=1786 blksize=0 recfm=fb retpd=30 put <here is where I need the dynamic path> + localfilename remotefilename quit

    Read the article

  • How to make Mac OS X CrashReporter invoke debugger?

    - by StasM
    I have an appache module on Mac OS X that produces random crashes. I can reproduce these crashes with certain sequence of actions, and these crashes produce Crash Reporter dialog "httpd quit unexpectedly". Is there a way to cause Crash Reporter launch debugger (xcode, gdb, anything) instead of just displaying the backtrace? I've tried running httpd under gdb with httpd -X but the crash doesn't happen then - it happens only if many httpd's are running at once, and I found no way to attach gdb to all of them at once. So I was hoping maybe I can cause CrashReporter to attach the debugger when specific process crashes - is there a way to do it?

    Read the article

  • breaking out from socket select

    - by kamziro
    I have a loop which basically calls this every few seconds (after the timeout): while(true){ if(finished) return; switch(select(FD_SETSIZE, &readfds, 0, 0, &tv)){ case SOCKET_ERROR : report bad stuff etc; return; default : break; } // do stuff with the incoming connection } So basically for every few seconds (which is specified by tv), it reactivates the listening. This is run on thread B (not a main thread). There are times when I want to end this acceptor loop immediately from thread A (main thread), but seems like I have to wait until the time interval finishes.. Is there a way to disrupt the select function from another thread so thread B can quit instantly?

    Read the article

  • Catching KeyboardInterrupt when working with PyGame

    - by Sebastian P.
    I have written a small Python application where I use PyGame for displaying some simple graphics. I have a somewhat simple PyGame loop going in the base of my application, like so: stopEvent = Event() # Just imagine that this eventually sets the stopEvent # as soon as the program is finished with its task. disp = SortDisplay(algorithm, stopEvent) def update(): """ Update loop; updates the screen every few seconds. """ while True: stopEvent.wait(options.delay) disp.update() if stopEvent.isSet(): break disp.step() t = Thread(target=update) t.start() while not stopEvent.isSet(): for event in pygame.event.get(): if event.type == pygame.QUIT: stopEvent.set() It works all fine and dandy for the normal program termination; if the PyGame window gets closed, the application closes; if the application finishes its task, the application closes. The trouble I'm having is, if I Ctrl-C in the Python console, the application throws a KeyboardInterrupt, but keeps on running. The question would therefore be: What have I done wrong in my update loop, and how do I rectify it so a KeyboardInterrupt causes the application to terminate?

    Read the article

  • connecting to exchange server

    - by MyHeadHurts
    I am using this code to connect to my exchange server. I am trying to retrieve an inbox of basically emails that have not been read however, i am just getting a bunch of gibberish and its reading an email. can you help me modify my code to just read the most recent messages. Try tcpClient.Connect(hostName, 110) Dim networkStream As NetworkStream = tcpClient.GetStream() Dim bytes(tcpClient.ReceiveBufferSize) As Byte Dim sendBytes As Byte() networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("User " + userName + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("Pass " + userPassword + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("STAT" + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("RETR " + messageNumber + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) returnMessage = Encoding.ASCII.GetString(bytes) EmailContent.Text = returnMessage sendBytes = Encoding.ASCII.GetBytes("QUIT" + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) tcpClient.Close() Catch ex As Exception EmailContent.Text = "Could not retrieve email or your inbox is empty" End Try

    Read the article

  • PROC FCMP PROBLEM

    - by Bruno
    I copy the code from a paper that i found on internet. proc fcmp outlib=work.funcs.Test; function whatAmI(); return(42); endsub; quit; options cmplib=work.funcs; data null; rci = whatAmI(); put rci=; /* should be 42 */ run; When I execute the code, it show the message: ERROR 68-185: The function WHATAMI is unknown, or cannot be accessed. I tried other functions and always show this message. I change the libname, but nothing work. What´s wrong?

    Read the article

  • Regarding Shell variable

    - by arav
    I need to call another shell script testarg.sh within my main script. This script testarg.sh has arguments ARG1 ,ARG2, ARG3. I need to call up the below way ./testarg.sh -ARG1 -ARG2 -ARG3 ARG1 and ARG3 argument Variables are mandatory ones. If its not passed to the main script then i quit. ARG2 is an optional one. If the ARG2 variable is not set with value or it's not defined then i need not pass it from main script.So i need to call up the below way ./testarg.sh -ARG1 -ARG3 If the value exist for the ARG2 Varibale then i need to call the below way ./testarg.sh -ARG1 -ARG2 -ARG3 Do i need to have a if else statement for checking the ARG2 variable is empty or null. Is there any other way to do it.

    Read the article

  • Why does setting a form's enabled property crash the application?

    - by Ruirize
    private void launchbutton_Click(object sender, EventArgs e) { launchbutton.Enabled = false; Process proc = new Process(); proc.EnableRaisingEvents = true; proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; //The arguments/filename is set here, just removed for privacy. proc.Exited += new EventHandler(procExit); proc.Start(); } private void procExit(object sender, EventArgs e) { MessageBox.Show("YAY","WOOT"); Thread.Sleep(2000); launchbutton.Enabled = true; } 2 Seconds after I quit the created process, my program crashes. Why?

    Read the article

  • printing menu in terminal and choosing an option, how to?

    - by carlos
    I'm a haskell beginner. I'm trying to make a program that shows a menu through terminal and ask user to introduce an option. Here is the code: main :: IO () main = do putStrLn "0 <- quit" putStrLn "1 <- Hello" putStr "Choose an option: " c <- getChar case c of '0' -> return () '1' -> putChar '\n' >> putStrLn "Hello World" >> main When I use this module in the ghci interpreter everything works like it's suposed to do. But if i compile this with: ghc hello.hs and run it in the terminal, it doesn't display the line "Choose an option:" before ask for a char to be introduced. I think this may be caused because of haskell lazy nature and I don't know how to fix it. Any ideas?

    Read the article

  • Why doesn't infinite recursion hit a stack overflow exception in F#?

    - by Amazingant
    I know this is somewhat the reverse of the issue people are having when they ask about a stack overflow issue, but if I create a function and call it as follows, I never receive any errors, and the application simply grinds up a core of my CPU until I force-quit it: let rec recursionTest x = recursionTest x recursionTest 1 Of course I can change this out so it actually does something like this: let rec recursionTest (x: uint64) = recursionTest (x + 1UL) recursionTest 0UL This way I can occasionally put a breakpoint in my code and see the value of x is going up rather quickly, but it still doesn't complain. Does F# not mind infinite recursion?

    Read the article

  • iPhone screen rotates at random !

    - by Baldoph
    I use a tabBar Controller as root controller. It has 4 tabs and each of its ViewControllers has - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return YES; } as long as the tabBarController itself. But when I rotate the device (real or simulator), the screen turns at random! If it doesn't turn when I open the application it would have the same behavior until I quit the app. I tried to add the 4 viewControllers one by one in IB to see if one was problematic, but I obtained the same issue. It only always works when there is no tabs at all! Please tell me if you have any ideas. Thanks!

    Read the article

  • use Variable on VBS

    - by Amirreza
    I Convert a reg file to VBS commands. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run] @="" "VPService"="C:\\Windows\\System32\\VPService.exe" but i can't use %systemroot% variable instead C:\Windows\ on this. Option Explicit Dim objShell Set objShell = CreateObject("WScript.Shell") Dim strComputer, ArrOfValue, oReg const HKEY_USERS = &H80000003 const HKEY_LOCAL_MACHINE = &H80000002 const HKEY_CURRENT_USER = &H80000001 const HKEY_CLASSES_ROOT = &H80000000 strComputer = "." Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\", "" objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\", "", "REG_SZ" 'Default value objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\VPService", "C:\\Windows\\System32\\VPService.exe", "REG_SZ" Set objShell = Nothing WScript.Quit how can use %systemroot% variable instead C:\Windows\ on this code?

    Read the article

  • catching an event in VBScript

    - by be here now
    Hi, guys. This is a VBS script that opens google, fills a form, and clicks a search button. set ie = CreateObject("InternetExplorer.Application") ie.navigate("www.google.com") ie.visible = true while ie.readystate <> 4 wscript.sleep 100 WEnd set fields = ie.document.getelementsbyname("q") set buttons = ie.document.getelementsbyname("btnG") fields(0).value = "some query" buttons(0).click ie.quit Sub OnClickSub() MsgBox "button clicked!", 0 End Sub Obviously, buttons(0).click fires an onclick event of the button, which I somehow need to catch in my script, and provide it with some processing like launching OnClickSub(). Has anyone got any ideas how this should be done?

    Read the article

  • C++ (g++) Compile Error, Expected "="/etc. Before 'MyWindow" (my class name)

    - by Ell
    Hi all, I have a very strange problem and the following code wont compile: #ifndef MYWINDOW_HPP_INCLUDED #define MYWINDOW_HPP_INCLUDED class MyWindow{ private: WNDCLASSEX window_class; HWND window_handle; HDC device_context_handle; HGLRC open_gl_render_context; MSG message; BOOL quit; public: Window(int height=416, int width=544, WindowStyle window_style=WINDOWED); void Show(); void Close(); ~Window(); }; #endif // MYWINDOW_HPP_INCLUDED I get the following error: error: expected '=', ',', ';', 'asm' or 'attribute' before 'MyWindow' I can't see any syntax errors here, although I coukd be wrong as I am very (very) new in c++. Thanks in advance, ell.

    Read the article

  • How do I change my current directory from a python script?

    - by misterloogs
    I'm trying to implement my own version of the 'cd' command that presents the user with a list of hard-coded directories to choose from, and the user has to enter a number corresponding to an entry in the list. The program, named my_cd.py for now, should then effectively 'cd' the user to the chosen directory. Example of how this should work: /some/directory $ my_cd.py 1) ~ 2) /bin/ 3) /usr Enter menu selection, or q to quit: 2 /bin $ Currently, I'm trying to 'cd' using os.chdir('dir'). However, this doesn't work, probably because my_cd.py is kicked off in its own child process. I tried wrapping the call to my_cd.py in a sourced bash script named my_cd.sh: #! /bin/bash function my_cd() { /path/to/my_cd.py } /some/directory $ . my_cd.sh $ my_cd ... shows list of dirs, but doesn't 'cd' in the interactive shell Any ideas on how I can get this to work? Is it possible to change my interactive shell's current directory from a python script?

    Read the article

  • stuck in while loop python

    - by user1717330
    I am creating a chat server in python and got quite far as a noob in the language. I am having 1 problem at the moment which I want to solve before I go further, but I cannot seem to find how to get the problem solved. It is about a while loop that continues.. in the below code is where it goes wrong while 1: try: data = self.channel.recv ( 1024 ) print "Message from client: ", data if "exit" in data: self.channel.send("You have closed youre connection.\n") break except KeyboardInterrupt: break except: raise When this piece of code get executed, on my client I need to enter "exit" to quit the connection. This works as a charm, but when I use CTRL+C to exit the connection, my server prints "Message from client: " a couple of thousand times. where am I going wrong?

    Read the article

  • GetMessage with a timeout

    - by qdii
    I have an application which second thread calls GetMessage() in a loop. At some point the first thread realizes that the user wants to quit the application and notifies the second thread that he should terminate. As the first thread is stuck on GetMessage(), the program never quits. Is there a way to wait for messages with a timeout? I’m open to other ideas too. EDIT: (additional explanations) The second thread runs that snippet of code: while ( !m_quit && GetMessage( &msg, NULL, 0, 0 ) ) { TranslateMessage( &msg ); DispatchMessage( &msg ); } The first thread sets m_quit to true.

    Read the article

  • Stop native web app from reloading itself upon opening on iOS

    - by cguedel
    I'm trying to build a "native web app" using HTML + JS on iOS. As you may know you can add such an application to the homescreen and it will more or less look just like a normal native app. However if I quit such an app and reopen it again it reloads the whole page again. This also happens when switching to such an application from another over the multitasking bar. Is this expected behaviour or is there a way to stop the device from doing this? As an example you can add the jqTouch-Demos from here to your homescreen and test it: http://jqtouch.com/preview/demos/main/

    Read the article

  • How to use interop for reading word document and get page number?

    - by monkey_boys
    Microsoft.Office.Interop.Word.Application app = new Microsoft.Office.Interop.Word.Application(); object nullobj = System.Reflection.Missing.Value; object file = openFileDialog1.FileName; Microsoft.Office.Interop.Word.Document doc = app.Documents.Open( ref file, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj); doc.ActiveWindow.Selection.WholeStory(); doc.ActiveWindow.Selection.Copy(); IDataObject data = Clipboard.GetDataObject(); string text = data.GetData(DataFormats.Text).ToString(); textBox2.Text = text; doc.Close(ref nullobj, ref nullobj, ref nullobj); app.Quit(ref nullobj, ref nullobj, ref nullobj); But not have page number how to ?

    Read the article

  • android dev: how to implement for add method in menu interface?

    - by wsgjj
    who knows about the method "add" in menu interface? how to implement exactly? which is it's imlementation class? i couldn't find detail implementation in source code of sdk. i want to check how to implement in android source code for "add" method. e.g. public boolean onCreateOptionsMenu(Menu menu) { menu.***add***(0, MENU_NEW_GAME, 0, "New Game"); menu.add(0, MENU_QUIT, 0, "Quit"); return true; } thanks in advance!

    Read the article

  • Should a company prevent employees from publishing an app in an appstore in their free time?

    - by Tommy
    My company is trying to pass a policy forbidding distribution of any application (even free) in any appstore for all developers. Their reasoning is that "outside work activities create a conflict of interest". They don't want that "you use your spare time to work on your app, and once it takes off you quit your job" (quoting the Head of Development). A few developers (myself included) have already said it was an abusive, pointless and most of all counter-productive policy (developers will actually be demotivated to work here under such control and to be denied of the freedom to distribute their project). Personally, I think it is actually in the interest of the company to promote side projects (even commercial activities, if there is no conflict). I'm also curious, is that common practice?

    Read the article

  • Why do my Xcode default font starts to look ugly after some time, until I restart?

    - by mystify
    I plugged in an external monitor. All resolutions match perfectly. MacBookPro LCD is closed. After about 10 minutes my fonts in Xcode start to look very bad. Only in Xcode. When I restart the mac and don't use an external monitor, fonts look all right again. When I attach the monitor again, fonts look nice. Then I close XCode and reopen it: Fonts suck. All other fonts look great. It seems like Xcode isn't antialiasing them properly after something happens. For my observation it happens when I quit and reopen Xcode while an external monitor is in use. Only way to fix it then is to completely reboot. Is there a fix for this problem?

    Read the article

  • Saving Excel Spreadsheet using Interop C#

    - by Wesley
    static void Main() { Application excelapp = new Application(); Workbook book = excelapp.Workbooks.Open(@"C:\HWYFAB.xlsx", 0, false, 5, "", "", false, XlPlatform.xlWindows , "", true, false, 0, true, false, false); Worksheet sheet = (Worksheet)book.Sheets[1]; Range cell = (Range)sheet.Cells[3, 2]; Console.WriteLine(cell.Text); cell.ClearContents(); book.Close(true, "HWYFAB.xlsx", false); excelapp.Quit(); } This program runs and exits as expected. It does print the correct value that's in cell B3 to the console. When closing it asks if I want to replace the existing file. I click yes. When I open the spreadsheet in Excel, the value is still in cell B3 despite the cell.ClearContents(). Any thoughts?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >