Search Results

Search found 24382 results on 976 pages for 'tutor process procedure f'.

Page 79/976 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • C# - opening process and changig window position

    - by bartq
    I want to open from c# an application (standalone flashplayer) and set it position to (0,0) on the screen. How can I do this? So far I've managed to open flashplayer: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace swflauncher { class Program { static void Main(string[] args) { Process flash = new Process(); flash.StartInfo.WindowStyle = ProcessWindowStyle.Normal; flash.StartInfo.FileName = "D:\\development\\flex4\\runtimes\\player\\10\\win\\FlashPlayer.exe"; flash.Start(); } } }

    Read the article

  • Unsafe, super-fast cross-process memory buffer?

    - by John
    Cross-process memory buffers always have some overhead, and my understanding is this is quite high. But what if you're implementing a cross-process render-buffer, this isn't critically important in the same way as other data so are there techniques we can use to get 'raw' access to a chunk of memory from multiple processes, with no safety nets apart from it not crashing? Or do modern operating systems simply not work with unabstracted memory in a way to make this possible? I'm working in C++ but the question applies to Win XP/Vista/7, MacOSX 10.5+ (& Linux less importantly).

    Read the article

  • Can a process have two pid's?

    - by limp_chimp
    I'm studying computer systems and I've made this very simple function which uses fork() to create a child process. fork() returns a pid_t that is 0 if it's a child process. But calling the getpid() function within this child process returns a different, nonzero pid. In the code I have below, is newPid only meaningful in the context of the program, and not to the operating system? Is it possibly only a relative value, measured against the pid of the parent? #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <string.h> #include <errno.h> #include <stdlib.h> void unixError(char* msg) { printf("%s: %s\n", msg, strerror(errno)); exit(0); } pid_t Fork() { pid_t pid; if ((pid = fork()) < 0) unixError("Fork error"); return pid; } int main(int argc, const char * argv[]) { pid_t thisPid, parentPid, newPid; int count = 0; thisPid = getpid(); parentPid = getppid(); printf("thisPid = %d, parent pid = %d\n", thisPid, parentPid); if ((newPid = Fork()) == 0) { count++; printf("I am teh child. My pid is %d, my other pid is %d\n", getpid(), newPid); exit(0); } printf("I am the parent. My pid is %d\n", thisPid); return 0; } Output: thisPid = 30050, parent pid = 30049 I am the parent. My pid is 30050 I am teh child. My pid is 30052, my other pid is 0 Lastly, why is the child's pid 2 higher than the parent's, and not 1? The difference between the main function's pid and its parent is 1, but when we create a child it increments the pid by 2. Why is that?

    Read the article

  • Account for cancelling an update process

    - by Aerus
    I'm trying to develop the logic of updating my (Java) application but I'm stuck on a particular problem. The user can, at any time, be it on purpose (by clicking the Cancel button) or unwillingly (system/power failure) cancel the update process. If the updater was busy downloading files or unpacking files and thus didn't make any changes to the main application yet, this can be easily recovered by re-downloading the files and continuing the update process like normally. But, how can i account for changes made to the main application (i.e. a file was only partially replaced, some files were corrupted, etc.) that result in a main application that can't be launched anymore? Is it possible to rollback the changes made during the update without having to keep a full backup of my application or without doing a full reinstall? Are there any standards for updating an application that can help me with this?

    Read the article

  • Detecting when a process has finished (but not exited)

    - by Egwor
    I have a program that's run in unix (that I have no control over) that when finished prints 'Completed successfully' but does not exit. I want to automatically detect when the process finishes (by checking the output of the command), so that I can kill the process and so that I can proceed do other activities. The complexity comes because I want to be able to run multiples of these scripts concurrently. (One activity I need to do requires the script to be called with various inputs, but each time the script runs it takes a while to return, and so I want to do them in parallel) Has anyone done something similar to this? I could redirect the stderr and stdout output of the command to a temporary file which has a random file name, then tail the file and pipe to grep for the end conditions (I.e. the certain log lines). The problem is, surely tail -f would keep running, and so it would never exit. Should I poll? If so, what's the best approach?

    Read the article

  • Autostart application/process in WP7

    - by sv88erik
    How is it possible to auto start my application or run a process when the user turns on the phone. If you look at ex. Outloock WP7 included in the operating system then updates the icon so that you can see that there are new mail. This is a process in the background running. But I've read a bit about this now, but can not find out that this is possible using the SDK from Microsoft? Is it not possible?? If possible, how does one do that? Notice: I do not want any solution that involves jailbreak.

    Read the article

  • C# - opening process and changing window position

    - by bartq
    I want to open from c# an application (standalone flashplayer) and set it position to (0,0) on the screen. How can I do this? So far I've managed to open flashplayer: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace swflauncher { class Program { static void Main(string[] args) { Process flash = new Process(); flash.StartInfo.WindowStyle = ProcessWindowStyle.Normal; flash.StartInfo.FileName = "D:\\development\\flex4\\runtimes\\player\\10\\win\\FlashPlayer.exe"; flash.Start(); } } }

    Read the article

  • executorservice to read data from database in chuncks and run process on them

    - by TazMan
    I'm trying to write a process that would read data from a database and upload it onto a cloud datastore. How can I decide the partition strategy of the data? I want to query the table in chunks and process each chunk in 10 threads. Each thread basically will send the data to an individual node on a 10 node cluster on the cloud.. Where in the below multi threading code will the dataquery to extract and send 10 concurrent requests for uploading data to cloud would be? public class Caller { public static void main(String[] args) { ExecutorService executor = Executors.newFixedThreadPool(10); for (int i = 0; i < 10; i++) { Runnable worker = new DomainCDCProcessor(i); executor.execute(worker); } executor.shutdown(); while (!executor.isTerminated()) { } System.out.println("Finished all threads"); } }

    Read the article

  • Process incoming emails with script

    - by luckytaxi
    Remember iwantsandy.com? It was quite popular for what it did. ANyways, I'm looking to do something similar, but my question is, how does one process incoming emails? Let's assuming I'm using PHP or maybe even Ruby to do this. I would need a way to process the emails and dump them into a DB or something. Ok fine, but my main question is getting a script to kick off when an email comes in. I have a VPS so I have full control over my environment and it's running Centos.

    Read the article

  • C++ hook process and show status

    - by David
    Ok so I am learning C++ slowly. I am familiar with all the console syntax and everything, but now I'm moving on to windows programming. Now what im trying to do, is create a DLL that I inject into a process, so it's hooked in. All I want the C++ application to do, is have text in it, that says "Hooked" if it's successfully injected, and an error if something wrong happened. Or even if I can do it without a DLL, Just open an executable, and when the certain process I'm trying to hook is opened, the status is changed to "Hooked". Also I have a safaribooksonline.com account so if there is any good reads you would recommend, just write it down. thanks

    Read the article

  • Find original owning process of a Linux socket

    - by Rob H
    In Linux and other UNIX-like operating systems, it is possible for two (or more) processes to share an Internet socket. Assuming there is no parent-child relationship between the processes, is there any way to tell what process originally created a socket? Clarification: I need to determine this from "outside" the processes using the /proc filesystem or similar. I can't modify the code of the processes. I can already tell what processes are sharing sockets by reading /proc/<pid>/fd, but that doesn't tell me what process originally created them.

    Read the article

  • Delphi How to wait for socket answer inside procedure?

    - by Astronavigator
    For some specific needs i need to create procedure that waits for socket request (or answer) in dll: TForm1 = class(TForm) ServerSocket1: TServerSocket; ...... procedure MyWaitProc; stdcall; begin Go := false; while not Go do begin // Wating... // Application.ProcessMessages; // Works with this line end; end; procedure TForm1.ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket); begin MessageBoxA(0, PAnsiChar('Received: '+Socket.ReceiveText), '', MB_OK); Go := true; end; exports MyWaitProc; When I call Application.ProcessMessages everything works fine: application waits for request and then continues. But in my case calling Application.ProcessMessages causes to unlocking main form on host application (not dll's one). When I don't call Application.ProcessMessages application just hangs couse it cannot handle message... So, how to create such a procedure that's wating for socket answer ? Maybe there a way to wait for socket answer without using Application.ProcessMessages ? EDIT I also tried to use TIdTCPServer, for some reasons, the result is the same. TForm1 = class(TForm) IdTCPServer1: TIdTCPServer; ..... procedure MyWaitProc; stdcall; begin Go := false; while not Go do begin // Waiting ... // Application.ProcessMessages; end; end; procedure TForm1.IdTCPServer1Execute(AContext: TIdContext); var s: string; begin s := AContext.Connection.Socket.ReadString(1); AllText := AllText + s; Go := True; end;

    Read the article

  • Sybase stored procedure - how do I create an index on a #table?

    - by DVK
    I have a stored procedure which creates and works with a temporary #table Some of the queries would be tremendously optimized if that temporary #table would have an index created on it. However, creating an index within the stored procedure fails: create procedure test1 as SELECT f1, f2, f3 INTO #table1 FROM main_table WHERE 1 = 2 -- insert rows into #table1 create index my_idx on #table1 (f1) SELECT f1, f2, f3 FROM #table1 (index my_idx) WHERE f1 = 11 -- "QUERY X" When I call the above, the query plan for "QUERY X" shows a table scan. If I simply run the code above outside the stored procedure, the messages show the following warning: Index 'my_idx' specified as optimizer hint in the FROM clause of table '#table1' does not exist. Optimizer will choose another index instead. This can be resolved when running ad-hoc (outside the stored procedure) by splitting the code above in two batches by addding "go" after index creation: create index my_idx on #table1 (f1) go Now, "QUERY X" query plan shows the use of index "my_idx". QUESTION: How do I mimique running the "create index" in a separate batch when it's inside the stored procedure? I can't insert a "go" there like I do with the ad-hoc copy above. P.S. If it matters, this is on Sybase 12.

    Read the article

  • How to get resultset with stored procedure calls over two linked servers?

    - by räph
    I have problems filling a temporary table with the resultset from a procedure call on a linked server, in which again a procedure on another server is called. I have a Stored Procedure sproc1 with the following code, which calls another procedure sproc2 on a linked server. SET @sqlCommand = 'INSERT INTO #tblTemp ( ModuleID, ParamID) ' + '( SELECT * FROM OPENQUERY(' + @targetServer + ', ' + '''SET FMTONLY OFF; EXEC ' + @targetDB + '.usr.sproc2 ' + @param + ''' ) )' exec ( @sqlCommand ) Now in the called sproc2 I again call a third procedure sproc3 on another linked server, which returns my resultset. SET @sqlCommand = 'EXEC ' + @targetServer +'.database.usr.sproc3 ' + @param exec ( @sqlCommand ) The whole thing doen't work, as I get an SQL error 7391 The operation could not be performed because OLE DB provider "%ls" for linked server "%ls" was unable to begin a distributed transaction. I already checked the hints at this microsoft article, but without success. But maybe, I can change the code in sproc1. Would there be some alternative to the temp table and the open query? Just calling stored procedures from server A to B to C and returning the resultset is working (I do this often in the application). But this special case with the temp table and openquery doesn't work! Or is it just not possible what I am trying to do? The microsft article states: Check the object you refer on the destination server. If it is a view or a stored procedure, or causes an execution of a trigger, check whether it implicitly references another server. If so, the third server is the source of the problem. Run the query directly on the third server. If you cannot run the query directly on the third server, the problem is not actually with the linked server query. Resolve the underlying problem first. Is this my case? PS: I can't avoid the architecture with the three servers.

    Read the article

  • Singleton object in IIS Web Garden

    - by Anwar Chandra
    I have a lot of Singleton implementation in asp.net application and want to move my application to IIS Web Garden environment for some performance reasons. CMIIW, moving to IIS Web Garden with n worker process, there will be one singleton object created in each worker process, which make it not a single object anymore because n 1. can I make all those singleton objects, singleton again in IIS Web Garden?

    Read the article

  • Automatically Creating A Zip after Code Signing in Xcode

    - by sylvanaar
    I have a custom script step in my build process that zips the executable. However this is executing before the executable is signed which is pretty useless. Is there a way to zip the build output after the code is signed, within the Xcode build process. I can certainly do it externally if i need to, but I'd like to make it part of my Xcode build script.

    Read the article

  • Terminate a python script from another python script

    - by Nick
    I've got a long running python script that I want to be able to end from another python script. Ideally what I'm looking for is some way of setting a process ID to the first script and being able to see if it is running or not via that ID from the second. Additionally, I'd like to be able to terminate that long running process. Any cool shortcuts exist to make this happen?

    Read the article

  • How to execute a batch file from C#?

    - by Jim C
    I didn't think this was going to be hard. I have a commmand file, d:\a.cmd which contains: copy /b d:\7zS.sfx + d:\config.txt + d:\files.7z d:\setup.exe But this line of C# wont' execute it: Process.Start("d:\\a.cmd"); Throws Win32Exception: "%1 is not a valid Win32 application." Process.Start opens .pdf files...why not execute command files? Thanks in advance, Jim

    Read the article

  • Service not able to access a mapped drive.

    - by Rohit
    Hi All, I have read in many forums that mapped drives are not accessible from a service as no user is logged on. Question 1) I tried making my service as a log on - as some account and i had my network drive mapped in that very account. The service still cannot access it. Why? Question 2) From the same sevice, i invoke another process. Under what user account will the process run? Thanks

    Read the article

  • Planning a requirements gathering session using Agile

    - by Dave Smith
    We are planning on introducing Agile into our development process (a shift from the waterfall we've been using so far). We are leaning towards a hybrid model in whcih the requirements gathering session is comprised of a business analyst, subject matter experts, technical person and a user interface person. The plan is to create user stories that the development team can use in their agile process with 1 month sprints. Has anyone had experience with a hybrid model? How has it worked for you so far?

    Read the article

  • Silent mode exection with java.exe

    - by srinannapa
    I would like to know if there is a way to execute the "java.exe" as a background process (silent mode execution) Ex: java -cp . MyClass arg1 I want to run the above statement as a background process , without opening command window

    Read the article

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >