);
5. The difference between typedef int X[10] and # define x INT[10]
typedef int X[10] Sets X to the type of an integer array containing 10 elements. #define X INT[10] simply replaces the text.
typedef int X[10];
x arr1, arr2, ARR3; Legal
#define X INT[10];
x arr1, arr2, ARR3; Illegal
#define PEACH INT
unsigned peach i; Legal
typedef int Banana;
unsigned banana i; Illegal
#define INT_PTR int *
INT_PTR Chalk, cheese; Chalk to int*, cheese to
, Containerid and page, the first two addresses plus page=1 can also be requested, the browser automatically omitted. Observe these requests and find their type, value, and containerid consistent. The value of type always Uid,value is the number in the link of the page, in fact this is the user's ID, there is also a containerid, after observing that it is 107603 and then add the user ID. So the value of the change is page, it is obvious that this parameter is used to control the paging, page=1 f
responded to the cancellation request of the main thread after setting the Pthread_cancel_disable state to the new one.2.2 Types that can be canceledThe above-mentioned thread will check to see if it is canceled when it arrives at a cancellation point. This type of cancellation is also known as deferred cancellation. In addition, there is a cancellation type that is asynchronous cancellation. When a thread's cancellation type is asynchronous, the thread can be canceled at any time.A thread can
: Lists the portions reserved as bad lanes-H: Lists the data for Superblock, and does not list other sections.DF: This command brings up the current Mount device4. ext2/ext3 file access and log file system: In general, the Inode table and data block become data regions, and other regions become metadata (intermediate regions). Log file system: 1: prestaged, when the system writes to a file, the log records are now always logged to the qualified file to prepare the information for writing. 2:
file has been reached.D. A negative value means an error has occurred that indicates what error occurred and the error code is defined in 2.write Method:like read, write can transmit less than the requested amount of data according to the following return value rules:A. If the return value equals count, the requested number of bytes is completedB. If the return value is positive, but less than count, only part of the data is transferred. The program may try to write the rest of the data again.C
as a target object, which contains methods that target objects with methods such as:Method of proxy Object = method of proxy object + Enhanced methodSteps:1. Define common business components.2. Define Pointcuts.3. Define enhanced processing.Key concepts of AOPSlice-aspectConnection Points-jion PointNotify-advicePointcut Point CutIntroduction of introductionDestination Agent target ObjectAOP Agent-AOP ProxyWoven into the-weavingThe popular summary of AOPA component A does not care about other s
the stack. The object variable is somewhat different from C and is dynamically generated, similar to malloc ()-free () in C, which is stored in the heap. Object-c thus introduces dynamic runtime-based management mechanisms such as GABEGECOLLECTION,MRC,ARC, based on reference counting, to Retain,weak,copy,unsafe_unretained,strong, Assign and other keywords to manage reference counts. ARC is relatively easy to use with MRC and does not have to be manually released by the program Ape, but there ar
Say you has an array for which the i-th element is the price of a given-stock on day I.Design an algorithm to find the maximum profit. You are in most of the transactions.Note:Engage in multiple transactions on the same time (ie, you must sell the stock before you buy again).Problem Solving Ideas:Since it is a two-time deal, it is divided into two areas. First, according to the idea of a transaction to calculate the maximum value of the transaction, in an array, and then forward from the back,
=mysql.from_conf () obj2= Mysql ('10.1.183.16', 8080) Obj1.tell_info () Obj2.tell_info ()Small case two. Isinstance and IssubclassIsinstance (obj,cls) checks if obj is an object of class CLSclass Foo: Pass = Foo ()# type judgment print(isinstance (Obj,foo))Issubclass (sub,super) Check if Sub class is a subclass of super classclass Foo: Pass class Bar (Foo): Pass = Foo ()# determines if subclass print(Issubclass (Foo,bar))Three. ReflectionPython-oriented reflection in objects: man
interest and: P = 1000* (1+n*r);//n/a 1-year deposit and principal: P = 1000* (1+r) ^n;//current deposit and interest: P = 1000* (1+R/4) ^4n--a quarter of interest and interest and #inclu De Home purchase from the bank loans a sum of D, quasi-this monthly repayment amount is p, the monthly interest rate is r, calculate how many months to pay off. d = 300000 p = 6000 r = 0.01 to the month after the decimal point, second bit rounded//m = log (p/(p-d*r))/log (1+r) #include Translate "China" in
the thread pool (thread pool)?A: In object-oriented programming, it takes time to create and destroy objects because you create an object to acquire memory resources or other resources. More so in Java, virtual machines will attempt to track each object so that it can be garbage collected after the object is destroyed. Therefore, one of the means to improve the efficiency of the service process is to minimize the number of objects created and destroyed, especially the resource-intensive object
), Super.show (O), This.show ((Super) O), Super.show ((Super) O).Following the above object method call precedence and we are not hard to find the reason here!There are two main types of object polymorphism:(1) The Java system is automatically completed when the subclass object is transformed to the parent class object.(2) down transformation, when a parent object transforms into a subclass object, it must explicitly indicate the type of subclass to be transformed.Java implementation polymorphis
+ Local VariablesDef Py_func (A, B): c = 1 Py_func (1, 2)//bytecode instruction 9 load_name 0 (py_func) load_const 1 (1) load_const 2 (2) call_function 2 >>> Py_func (1, 2) [call_function]:na=2, Nk=0, n=2[call_function]:co->co_argcount=2, co->co_nlocals=3 This co_nlocals=3 is taken for granted, because there is finally a local variable inside the Py_func function. From the command that executes the function call, there is no instruction
Synchronization block for wait is not run until the 1,notify sync block is finished2,interrupt () is not a static method, there will be interuptexception on the wait thread, and the lock will be released.3,notify () Wake-up thread is random, did not know what to wake up, learned that notify is an object, which is locked with the relevant object, will unlock which4,object.wait (5000) No notify during the period, they will automatically wake upJava multithreaded Programming core technology, chapte
(value = "/head2", consumes = {"application/x-www-form-urlencoded"}) @ResponseBody public String testHeader2 () { return "TestHeader2";} // equivalent to: headers = {"Accept=application/json;charset=utf-8"}@RequestMapping (value = "/head3", produces = {" Application/json;charset=utf-8 "}) @ResponseBody public String TestHeader3 () { return "TestHeader3";}3, the producer and the consumer to narrow is the cover rather than the inheritance= "text/html")publicclass TestController4 { = "
According to the previous article's configuration, Servicetask has been able to invoke WebService with @webparam and @webresult releases, but how to invoke the webservice of these publications without these parameters, Because other languages do not @webparam these parameters, consider the following example:Counter.javaAfter publishing, the WSDL file is as follows (key content):We will find that the first parameter name of the Prettyprintcounttwo method defaults to arg0, and the second parameter
defined in the header file. Its definition can occur more than once, as long as it appears only once in a source file and exactly the same in all files.
Overloaded functions
A function cannot implement overloading only on the basis of a different return type. Whether a parameter is const is affected only when the reference or pointer is a parameter.
The overload of the function is determined in three steps: The candidate function, select the feasible function, find the best match.
11, how to compile the compiled Python script for PYC format[CPP]View Plaincopy
#!/usr/bin/python
Import Py_compile;
Import SYS;
File=raw_input ("Enter your file name");
Py_compile.compile (file);
Sys.exit ();
12,python's Glob module ~The Glob module is a python-brought module that you can use to find file path names and files that match a specific rule. Only three matches are used to find a file: "", "?", "[]". "" matches 0 or more characters; "?" Match a sing
to run, the function pauses and saves all current run information, returning the value of yield, each time the yield is encountered.and continue running from the current location the next time the next () method is executed.Invokes a generator function that returns an Iterator object.In short, a yield pause is encountered, and the next call continues from the current position
Two instances--Fibonacci Seriesdef Fibonacci (N): # Generator Function-Fibonacci A, b, counter = 0, 1, 0 while
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.