a design ideafirst , create a class in file and write the task name and class name (note the capitalization of the class name); The second step is the input of the parameter, and the sum variable is defined, and the third step is the requirement of the parameter data type, to convert the character type to an integer type and output (which is also the focus of this topic), This step is, of course, placed in the for loop of the input parameter, and finally the sum of the arguments and the output p
Execute with shellexcute
Use waitforsingleobject to wait for its end
---------------------------------------------------------------
How to start
Program Until it stops running?
Shellexecuteinfo shexecinfo = {0 };
Shexecinfo. cbsize = sizeof (shellexecuteinfo );
Shexecinfo. fmask = see_mask_nocloseprocess;
Shexecinfo. hwnd = NULL;
Shexecinfo. lpverb = NULL;
Shexecinfo. lpfile = "C: \ myprogram.exe ";
Shexecinfo. lpparameters = "";
Shexecinfo. lpdire
Cause: it is suspected that during initialization, it takes time to read the USB flash disk information. Therefore, the code for reading the USB flash disk information is moved to domodal (), so that it can be properly displayed on the USB flash disk.
Cnewregdlg regdlg(this);regdlg.exe directory = pketang-> exedirectory; regdlg. bhasverified = bhasverified; regdlg. bu_hasverified = bu_hasverified; regdlg. makeu_machincode (regdlg. m_umachincode); // if it is placed in the initialization fun
Execution time
Method 1Copy codeThe Code is as follows:Import datetimeStarttime = datetime. datetime. now ()# Long runningEndtime = datetime. datetime. now ()Print (endtime-starttime). seconds
Method 2Copy codeThe Code is as follows:Start = time. time ()Run_fun ()End = time. time ()Print end-start
Method 3Copy codeThe Code is as follows:Start = time. clock ()Run_fun ()End = time. clock ()Print end-start
Methods 1 and 2 both contain the CPU usage time of other programs, which is the running t
Q: How do I run another program after a program runs? 1. The easiest way to run another program inside a program is to include them sequentially in a batch file (with the extension. BAT file), the programs listed in the batch file are run automatically when it is executed.In either C or DOS, there is no specific way to
mixerSetControlDetails, find an article, the name is "volume adjustment and mute" (http://www.csdn.net/develop/article/17/17257.shtm), the author is Haofei. Next, it is a complete unit of Delphi. There are four functions to get the volume GetVolume (DN), set the volume SetVolume (DN, Value), and get the mute GetVolumeMute (DN) and set the mute SetVolumeMute (DN, Value ).
Put it in your own program and write two lines of code, which is completely corr
Python is a programming language for rapid development of software, its syntax is simple, easy to grasp, but there is a slow implementation of problems, and in dealing with some problems, such as access to computer hardware systems, access to media files and so on. As a software development of the traditional programming language C language, but in these problems can be a good way to make up for the lack of Python language. Therefore, this article studies how to integrate the existing C language
Relationship between the MFC program and the Win32 Program
MFC encapsulates winmain internal operations with relatively fixed behaviors in cwinapp, and wndproc internal operations with relatively fixed behaviors in cframewnd.
It can be said that cwinapp is used to replace winmain's position in the SDK program, and cframewnd replaces the position of window functio
工欲善其事, its prerequisite. Python is an interpreted language, but it's too cumbersome to add a python shell to execute a program under Windows. And here's what it means to convert a Python program to an EXE file. Here are some common tools , but it seems that py2exe is more widely used.
Py2exe http://py2exe.sf.net
Only support Windows platform, it should be the most people heard a name, a lot of users, so the
A recent project needs to implement camera image acquisition, after a series of toss, finally realized this function, now tidy up.
In the Java technology itself, to achieve two development of the camera, capture camera pictures, need to use to JMF,JMF suitable for use in the J2SE program, I need to call the camera in the Web program, it is obvious that JMF is uncertain, want to write an applet
A simple example of a Linux Java program communicating with a C language program through a socketthis morning, I experimented with a Java program communicating with a C language program through a socket. Because did not learn Java, so just write the C language side of the code, the Java side of the code is from the Web
A year ago, when I got a PHP program called Twig, was immediately impressed by the author OOP programming ideas, it is difficult to imagine Twig all the functions (calendar, mail, personalization) in a php file (index.php3) executed, This is because the author used the idea of separating the program code from the page frame, but I also see that despite the great efforts of the author, the
First, why do you want to make the program in the backgroundThe procedures we calculate are very long, usually a few hours or even one weeks. The environment we use is to connect remotely to a Japanese Linux server using Putty. So the following three benefits of running the program in the background: 1: Whether the shutdown of our side does not affect the Japanese side of the
Several features of the program are:
1: The Complete search engine
2: Three sorts of objects. (add time, download times, program name). and two sorts of sorting methods (reverse, order).
3: The administrator changes at any time.
4: Report link error. For the administrator to revise at any time.
5: Paging function.
To create a table:
CREATE TABLE Download (
Author varchar (15),
Title varchar (30),
URL varch
Reprint Address: Http://www.infoq.com/cn/articles/why-and-how-log
Logging in a program typically has two purposes: Troubleshooting (fault location) and display program running status. Good logging can provide us with enough information on how to locate problems. Logging can be considered simple, but it is not easy to use the log to efficiently locate the problem. Here are the following three aspects of the
First, Java implementation of the. exe program boot automatically1. Description The Java project that I wrote in Eclipse was packaged with the Exe4j Wizard as an. exe executable file and enabled the user to boot automatically.2. Steps1. Get the path to the. exe executable file in the software2. On the Windows system, the boot bar holds the shortcut to the. exe executable file, enabling the boot to start automatically.3. Codeprivate void Startfoldermet
How is Windows Phone program started, and what is the difference between him and the Android program, we focus on the native code level to analyze
When the Windows Phone program is started:
Use the application definition in XAML to specify the starting page (which is the page that is loaded automatically when the WindowsPhone7
Program
Php+java's Program
.....................
Java Program:
/*The following procedure is a timing tracing analysis program for the futures trading data of Yuyao Plastics cityis a preliminary analysis of the data, drawing analysis to the further PHP program to completeTh
It was previously only known at development time to rely on database transactions to guarantee data integrity when the program was closed.But sometimes a business-required atomic operation does not necessarily include only databases, such as external interfaces or message queues. At this point the database transaction is helpless.At this point we can rely on Java to provide a tool method: Java.lang.Runtime.addShutdownHook (Thread Hook)The Addshutdownh
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.