Career change to engage in hardware. ACM is to go to the end, after all, electronics is their own professional characteristics.The first single-chip microcomputer, buy the board is stc89c52 (a treasure 58 of the ocean Amoy. Guo Tianxiang The new concept of the book (seems a bit not matching but live to get it also. )Let's talk about the mistakes that are easy to make.1. The serial drive has been engaged for 1 hours. Have not been installed, then followed the tutorial to do2. The book on the cont
51 kernelSingle Chip MicrocomputerOne annoying feature is that the IO port is in a high state during the reset period. If the device controlled by the IO port is triggered by a high level, the device will be triggered immediately after the reset.
Summarize the following solutions:
1. Switch the MCU to another system, such as AVR and PIC. When these single-chip microcomputer are reset, the IO port is in a floating high-impedance state and will not be
sampling rate, which is played at 25 FPS. Why do you want to design it like this and sell it first? Hey ~~
The video can be generated using the lcdmodx on the second floor. Recently, I am working on this. For the Demo Video, note that I want to adjust the modulo rules. My 19264 video is "Byte vertical, horizontal scan; start at the top left and end at the bottom right; low position first ". Different screens require different drivers. For how to write your LCD driver, refer to my source code, i
51. Fish placement
Question: put 20 fish in 10 buckets, each bucket can be 0 ~ 10, total number of methods.
int Function(int NumOfBox,int NumOfFish,int max){if(NumOfBox==0 || NumOfFish==0 || (NumOfBox==1NumOfFish>10))return 0;if(NumOfBox==1NumOfFish52. Longest echo substring question: Write a function and return the length of the longest echo string in a string.
Int longestpalindrome (char * STR, int length) {If (STR = NULL | length 53. All valid per
because when we used the AT command, we used the data line on the single chip microcomputer to communicate with the computer, and what data the single chip computer received was what data Bluetooth received, therefore, the connection ports of Bluetooth and single chip microcomputer are the same. When we use Bluetooth for communication, after Bluetooth receives the data, it sends the received data to the MCU, that is, the sender of the Bluetooth is connected to the receiver of the MCU, and the r
that generates a device context that corresponds to the client area of the window, and another class CWINDOWDC is a derived class of the CDC class that corresponds to the client and non-client areas, that is, CCLIENTDC can only draw in the client area, CWINDOWDC can be plotted in customer and non-client areas.Here, someone will ask, what is the customer area, what is the non-client area? The non-client area includes the title bar in the window, the menu bar, the status bar, the scroll bar, the
Initial value 10msTF0 = 0; Clear the TF0 flagTR0 = 1; Timer 0 Start TimerEt0=1;Ea=1;}void Main (){Timer0init ();Task_test ();Task_test2 ();while (1);}void Rwcl () Task time to switch back to real time{ From the timing time minus 1, look for which task to, task time to real-time switch back tounsigned char i;for (i=0;i{if (Task_time[i]){task_time[i]--;if (task_time[i]==0)sp=task_stack[i]+1;}}}void Tm0_isr () Interrupt 1 using 1{Timed Time overloadingTimer_reload ();RWCL (); Task time to switch b
;MK = -; - Aboutcout "After changing ..."Endl; $ - d.print (); - - return 0; A}Polymorphic Object ModelC + + polymorphism implementation principle:
? When a virtual function is declared in a class, the compiler generates a virtual function table in the class
? A virtual function table is a data structure that stores the address of a member function
? Virtual function tables are automatically generated and maintained by the compiler.
? The virtual member function is pl
can participate in other activities earlier, so to the end of the order.The code is simple, as follows:#include #includeusing namespacestd;structperiod{intstart; intend;};//Sort by EndintCmp_period (Const void* _a,Const void*_b) {Period* A = (period*) _a; Period* B = (period*) _b; //if ((*a). End! = (*b). End) return(*a). End-(*b). end; //Else//return (*a). Start-(*b). Start;}period ps[100001];intMainintargcChar Const*argv[]) { intN; CIN>>N; for(inti =0; I i) {cin>>ps[i].start>>P
/local/php-fpm/var/log/php_errors.1og
Test againcurl -x127.0.0.1:80 test.com/sleep.php -I
Change www.conf again, modify the path, test againphp_admin_value[open_basedir]=/data/wwwroot/test.com:/tmp//usr/local/php-fpm/sbin/php-fpm -t/etc/init.d/php-fpm reloadTest againViewing the error logIv. PHP-FPM Process Managementcat /usr/local/php-fpm/etc/php-fpm.d/www.confPM = dynamic/Active process management, can also be static when the following line settings do not take effectPm.max_children = 50/
; } return* This; }};classMan {Private: age age; Public: Man (int_age): Age (_age) {}}; Mans Man1 ( A); Mans Man2 ( A); Man1= Man2;Compiler hints:[Note] ' man man::operator= (const man) ' is implicitly deleted because the default definition would be ill-formed: [Error] ' age age::operator= (const age) ' is private Some of the members of the B.2 class are const or reference types, and we know that the const variable cannot be assignment after the assignment, and the reference t
Title DescriptionGiven an array a[0,1,..., n-1], build an array b[0,1,..., n-1], where the elements in B b[i]=a[0]*a[1]*...*a[i-1]*a[i+1]*...*a[n-1]. You cannot use division.Idea 1:Violence1 Importjava.util.ArrayList;2 Public classSolution {3 Public int[] Multiply (int[] A) {4 int[] B =New int[a.length];5 for(inti = 0;i){6B[i] = 1;7 for(intj = 0;j)8 if(j!=i)9b[i]*=A[j];Ten } One returnB; A } -}Idea 2:Bi equals the product of
= p3^0;
F = (A B | c | d) E; A line of statements can
This topic, in the textbook, is generally required to use 51 single-chip microcomputer bit operation instructions to program, so, the answer should be used in assembly language.However, see most netizens, to the assembly is relatively dull, so, also put C language in here.
//==================================
Some netizens directly follow the logic diagram to write the program, no prior logic si
In the 51 MCU C programming, in order to improve the portability of the program, it is necessary to use the name of the portable variable type alias programming. Save the following to the include directory of the programming software and save it in order to mytype.h the file. If you are using Keil, this directory may be: Keil\c51\inc
#ifndef _mytype_
#define _mytype_
typedef unsigned int uint16;
typedef unsigned int UINT;
typedef unsigned int uint
‘, master_port=3306,master_user=‘repl‘, master_password=‘lvlinux‘, master_log_file=‘lvlinux.000001‘, master_log_pos=429;
start slave;
还要到主上执行 unlock tables Note: Master_log_file and Master_log_pos in turn fill in the information obtained by Lord Show master status3 Viewing master-slave statusOperate from topshow slave status\G;Two threads run properly, the master-slave configuration is marked as successful. If the error concernsseconds_behind_master:0//main from the time of the delaylast_io_e
by ID Issues to be aware of when using foreign keysCreate a foreign key in the following way Mysql>create table temp (id int, name char, foreign key (ID) references outtable (ID) on DELETE cascade on update CAs CADE); Note: InnoDB Types of tables support foreign keys, myisam types of tables, although creating foreign keys can be successful, but do not work, mainly because foreign keys are not supported.MySQL Help usesHow many commands in MySQL can be remembered is a problem, here is a very good
more detail, see the "Jian"); the 2-way merge sort, when the two arrays are first merged, The two arrays are already ordered (here in ascending order), so if temp[i]>temp[j], it means that all the elements from position I to position middle are greater than temp[j], so that total and increase middle-i + 1. (3) In addition, there is a point to note, that is, if there are equal elements in the array, and is less than the case, so when Temp[i] The time complexity of the method is O (N*logn), the s
][j] represents the smallest path and from the upper-left corner to Grid[i-1][j-1]. DP[RI][CI] = grid[ri-1][ci-1] + min (Dp[ri-1][ci], dp[ri][ci-1]);AC Code:Class Solution {public: int minpathsum (vectorOptimization algorithm: Reduced space complexity to O (min (row, col))Idea:Dp[i][j] about only the previous row of Dp[i-1][j] and the previous column of Dp[i][j-1], Dp[i][j] is a line of calculation (according to the Loop), Dp[j-1] represents the value of the previous column (has been updated
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.