1. Obtain the path of the current file
1. system. Diagnostics. process. getcurrentprocess (). mainmodule. filenameObtain the complete path of the module, including the file name.2. system. environment. currentdirectoryObtain and set the fully
Ambiguous operators need parenthesesAmbiguous operations must be enclosed in parenthesesAmbiguous symbol 'xxx''Ambiguous symbolsArgument list syntax errorParameter table methodArray Bounds missingMissing Number delimiterArray size toolargeThe size
Functions to be implemented
C Programming
Linux Shell Script Programming
Passing Program/Script Parameters
Int main (INT argc, char ** argv){If (argv! = 4 ){Printf ("Usage: % s arg1 arg2 arg3", argv [0]);Return 1;}Printf ("arg1: %
1. Hierarchical Design to isolate the Code related to the platform. Just like testability, portability also needs to begin with design. In general, the top and bottom layers do not have good portability. The top layer is GUI, and most guis are not
System: Ubuntu 11.04 little-end
Description: this problem was encountered when studying ts Header Parsing. Two methods are used to retrieve ts headers, but the results are different.
Time consumed: 2 days
Program:
1. Define the TS packet header
Impossible to install SDK R17 on win 7x64
"Failed to find Java version for 'C: \ windows \ system32 \ java.exe" SOLUTION
OS: Windows 7x86 64bitJDK installed: http://download.oracle.com/otn-pub/java/jdk/7u3-b05/jdk-7u3-windows-x64.exe
Option
Most of the space in a two-dimensional array is not used. To increase the efficiency of array memory usage, We need to compress it.
Well, go to the code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/
First, let's look at code 1:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 # include
2 # include
3
4 int main (INT argc, char * argv [])
5 {
6 int score [10] = };
7 int num;
8 int grade;
9
First, go to the source code:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 void main ()
2 {
3 int score [10];/* Student Score array */
4 int I;
5 Int num;/* student count */
6 int sum;/* Total
/// /// main entry point of the application. /// [stathread] staticvoid main () {// prevent the program from running if (! Oneinstance. isfirst ("getpayinfo") {MessageBox. Show ("Warning: The program is running! Do not open the program again! You
Original Author: Chris sells (www.sellsbrothers.com)
Tight coupling
Once upon a time, in a strange land in the south, Peter was a worker, who was very diligent and he was always obedient to his boss. However, his boss is a mean person. He never
Using system;
Using system. Collections. Generic;
Using system. text;
Using system. diagnostics;
Using system. Management;
Namespace MachineInfo
{
Class getinfo
{
Public static string getvolumeserial (string strdriveletter)
{
If (strdriveletter = "
In programming, we sometimes want to get a copy of an existing object.There are two types of copy:(1) shallow copy (also known as superficial copy); (2) Deep copy (also known as deep copy)1. Shallow copyAll non-reference data types are copied from
The C ++ exception mechanism consists of two parts:Throw endAndProcessing end. When a program throws an exception, the control does not return to the throw end.
At the throw end, we can throw a number or object or a pointer.
It is worth noting that
Structure with nested character array
Some functions accept structures with nested character arrays. For example,GetTimeZoneInformation()The function accepts pointers pointing to the following structure:
typedef struct _TIME_ZONE_INFORMATION {
///
/// Close the process
///
/// process name
Private void killprocess (string processname)
{
Process [] myproc = process. getprocesses ();
Foreach (process item in myproc)
{
If (item. processname = processname)
{
Item. Kill ();
}
}
}
// Force
// C # determine whether the common type format is correct
Public class gf_isok
{
///
/// Identify whether it is an IP address
///
///
///
Public static bool isipstr (string in_str)
{
IPaddress IP address;
Return IPaddress. tryparse (in_str,
In C #, you can use pocess. Start to call the doscommand to complete many operations, which is very convenient. For example, shut down the current application and restart the computer.
The following describes several common commands:
// Restart the
I. Call format
Using system. runtime. interopservices; // reference this namespace to simplify the subsequent Code
// Use the dllimportattribute feature to introduce API functions. Note that empty methods are declared, that is, the method body is
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service