"To the programmer on the road."
For a developer, the ability to develop any module in a system is the embodiment of its core value.
For an architect, mastering the advantages of various languages and ahli them into the system, thus simplifying the development of the system, is the first step in their architectural career.
For a development team, in the short term to develop a user satisfaction of the software system is the core competitiveness of the embodiment.
Every programmer can not be complacent, to contact the new industry, new technology field, break through the ego.
Relationship between 32-bit and 64-bit address and memory 4G = 4*1024m = 4*1024*1024k = 4*1024*1024*1024 byte = 2^32
32 bits, the pointer is 4 bytes
#include <stdio.h>void main () { int num = ten; printf ("%p\n", &num); int *p = # printf ("p=%d\n", sizeof (p)); GetChar ();}
Flirt Window Program
Using Hack tool, Spy, find//findwindowa parameters: Window class name, title
#include <stdio.h> #include <stdlib.h> #include <Windows.h>/* When the window is hidden, you can see from Task Manager that this process is already running, Use the command in the CMD command to end the process c:\users\wuyingqiang>taskkill/f/im notepad.exe succeeded: The process "notepad.exe" was terminated with a PID of 7556. Success: The process "notepad.exe" has been terminated with a PID of 1384. Success: The process "notepad.exe" has been terminated with a PID of 3572. Success: The process "notepad.exe" has been terminated with a PID of 5272. Success: The process "notepad.exe" has been terminated with a PID of 6212. */void Opencalc () {//int i=0; for (i; i<5; i++)//{////system ("Calc"); Shellexecutea (0, "open", "Calc", 0, 0, 1); The first parameter is to represent the system eject////The second parameter is the execution of the/////third parameter Execution command line////fourth, fifth default 0,////sixth parameter, 0 for window Hidden, 1 means normal, 3 maximized, 6 minimized//Sleep (2000); } shellexecutea (0, "open", "Calc", 0, 0, 1); Sleep (2000);} void Closecalc () {System ("taskkill/f/im calc.exe");//End process} void Movecalc () {int i=0; HWND win;//pointer, returns the window's number//findwindowa parameter: Window class name, title win = Findwindowa ("Calcframe", "Calculator");//Find calculator if (win == null)//null pointer to avoid wild pointer {printf ("Calculator play missing"); } else {printf ("calculator found"); }//Control hidden Field display//while (1)//{//ShowWindow (Win, sw_hide);//hide;//Sleep (2000); ShowWindow (Win, sw_show);//display;//Sleep (2000); }//for (i = 0; I <=; i + =)//{//SetWindowPos (Win, NULL, I, 0, 300, 400, 1);//move Moving window//Sleep (30); //for Diagonal Move for (i = 0; i <; i++) {SetWindowPos (win, NULL, I, I*9/16, 300, 400 , 1);//Mobile Window Sleep (50); }} void Main () {Opencalc (); Movecalc (); Sleep (5000); Closecalc (); System ("Pause");}
Data separation algorithm
the number of daffodils refers to a N Number of digits (n≥3) , it's the number on each bit of the N The sum of the second power equals itself. (Example:1^3 + 5^3+ 3^3 = 153)
#include <stdio.h> #include <stdlib.h>void main () { int i; for (i = 10; I <= 999; i++)//Traverse all data { int ge = i% 10;//remove single digit int shi = i/10% 10;//Remove-bit int bai = i/10/10;//Remove the Hundred //filter if (ge*ge*ge + Shi*shi*shi + Bai*bai*bai = = i)//judgment condition { printf ("%d^3+%d^3+%d^3=%d\ n ", Ge, Shi, bai, i);//Print } } printf (" \ n "); GetChar ();}
Memory retrieval
Plants vs. Zombie games, automatically increases the sun. Locate the memory address, write the DLL, and use the DllInject.exe tool to inject.
Two-Part search method
Ensure that the data is sorted before it is found.
#define _crt_secure_no_warnings#include <stdio.h> #include <stdlib.h> void showarray (int a[], int n) {fo R (int i = 0; i < n; i++) {printf ("%d,", a[i]); } printf ("\ n");} void Paixu (int a[], int n) {for (int i = 0; i < n-1; i++) {for (int j = 0; J < n-1-I ; J + +) {if (a[j]>a[j+1]) {int temp = a[ J]; A[J] = a[j + 1]; A[j + 1] = temp; }}}}//num is the data to be looked up, return array subscript int searchfor (int a[], int n, int num) {for (int tou = 0, Wei = n-1, Zhong = (tou + wei)/2; Tou <= Wei; zhong= (Tou+wei)/2) {printf ("\ n start looking for%d,%d,%d", Tou, Wei, Zhong); if (a[zhong] = = num) {return zhong; } else if (A[zhong]>num) {Wei = zhong-1; } else {tou = zhong + 1; }}} int searchwhile (int a[], int n, int num) {int tou = 0; int wei = n-1; int Zhong = (tou + wei)/2; while (Tou <= Wei) {printf ("\ n start looking for%d,%d,%d", Tou, Wei, Zhong); if (a[zhong] = = num) {return zhong; } else if (a[zhong]>num) {wei = zhong-1; Zhong = (tou + wei)/2; } else {tou = zhong + 1; Zhong = (tou + wei)/2; }}} void Main () {int a[50] = {0}; time_t ts; Srand ((unsigned int) time (&ts));//random number seed for (int i = 0; i <; i++) {A[i] = rand ()% 100; printf ("%d,", a[i]); } Paixu (A, 50); Showarray (A, 50); int num; printf ("Plesae input your Find num:"); scanf ("%d", &num); The scan data receives input//int RET = Searchfor (A, B, num); int ret = Searchwhile (A, B, num); if (ret = =-1) {printf ("not find\n"); } else {printf ("Find [%d]\n", A[ret]); } system ("Pause");}
Myvc
Use MFC to build your own IDE, find the bat batch file in the paths of VS and codeblocks, and use the System directive to invoke the bat batch file by clicking the button.
such as D:\Program Files\Microsoft Visual Studio 11.0\common7\tools\ Vsdevcmd.bat
|=========== Wu Yingjiang csdn Blog Column ==============|
|== the content of the A/C + + College column (not updated regularly) ===|
|== Linux-Driven development explores the secrets of Linux's underlying ==========|
|== basic knowledge of Java Basic Learning =====|
| ====== Daily Progress a little, healthy and happy every day ========|
Copyright NOTICE: Welcome reprint, Hope in your reprint at the same time, add the original address, thank you for your cooperation!
0723-32-bit and 64-bit/molested window program/Data separation algorithm/memory retrieval/Two-point lookup method/MYVC