# includevoid f (int* parr,int len)//Two parameters determine an array, first: The address of the first element of the array: Parr, sectionTwo: The length of the array: Len{int i;for (i=0; i{printf ("%d", * (Parr + i));//* (Parr + i) equivalent to Parr[i]}}int main (void){int a[5] = {1, 2, 3, 4, 5};printf ("%d\n", a[3]);f (a,5);//A represents the address of the first element, and 5 represents the length of the array.return 0;}Pointers and one-dimensional arrays-
different from traditional programs, and Sun is introducing Java as an open technology. Tens of thousands of Java development companies around the world are required to design Java software that must be compatible with each other. "The Java language relies on the power of the community rather than the power of the company" is one of Sun's slogan, and has been recognized by the vast number of software developers. This is completely different from the focus on the elite and the closed model advoc
encapsulation./*Final keyword:1,final is a modifier that can be used to modify classes, methods, and variables.2,final-Modified classes cannot be inherited.3,final-Modified methods cannot be overridden.A variable modified by 4,final is a constant that can be assigned only once.Why use final modifier variables. Actually in the program if a data is fixed,So it is possible to use this data directly, but the reading is poor, so it has the name of the data.And the value of this variable name cannot
C:when c:otherwise Implement IF--else if--else effect---implement switch effect7, C:foreach implementation of the ForEach loop effect-----Traversal array, List, MAP, control the specified number of loops sum, in a special number of operations8, C:fortokens complete string cutting9, C:param can not be used alone, usually with the URL-related tags used in conjunction with the C:url to complete the Chinese code10, C:import Import the target page, save the content of the target page, and then use i
employees of the company, programmers and managers can be extracted. Establish the system. *///describe the employee. Abstract classemployee{PrivateString name; PrivateString ID; Private DoublePay ; Employee (String name,string ID,DoublePay ) { This. Name =name; This. ID =ID; This. Pay =Pay ; } Public Abstract voidWork (); }//describe the programmer. classProgrammerextendsemployee{Programmer (String name,string ID,DoublePay ) { Super(Name,id,pay);//the instantiation of the
return {};4 Else if(expencted = =Actual)5 return{"Functionx","OK"};6 Else 7 return{"Functionx", expected, actual};8}1 int arr[]; 2 int *p1[]; 3 int (*P2) [P2] is a pointer to an array of 10 integers3.assert preprocessing macro is actually a preprocessing variable that behaves like an inline function, and the Assert macro uses an expression as his condition: assert (expr); First, if the expression is false, Assert output information and abort the program's knowledge, if t
exceptions for programming errors 59th: Avoid unnecessary use of the exception that is examined 60th: try to use the standard exception 61st: throws an exception corresponding to the abstract 62nd: All exceptions thrown by each method must have a document 63rd: contains the failure-capture information in the detail message 64th: Try to keep the failure in the Atomic 65th Bar: Do not ignore exceptions chapter 10th Concurrent 66th: Synchronizing access to shared variable data 67th: Avoid too many
Static use in Java1. Static variables (class variables).2. Static methods (class methods). In fact, the main method we've been writing about is static methods.Need to note:1 static members can be called directly in a static method, but not non-static members directly.If you want to invoke a non-static variable in a static method, you can access the non-static variable by creating the object of the class and then through the object.2, in the ordinary member method, you can directly access the sam
the process of direct referencing (appeal code: Assigning a value to a static variable singleton=new singleTon (), performing a construction method, count1=1;count2= 1; Continue assigning values to static variables: Count1, count2=0)Based on class loading and parental delegation mode we get one of the following rules Code Execution Order: static variable, static initialization block) –> (variable, initialization block) –> constructor; If there is a parent class, the order is: Parent class stat
obtains the CPU execution time, then enters the Run method body to carry on the concrete task; from the ready state to the running stateWait (): Allows the current "executing thread" to hibernate (pause execution) in the specified number of milliseconds, and the lock is released by the running state into a blocking stateSleep (): Allows the current "executing thread" to hibernate (suspend execution) in the specified number of milliseconds, from the running state into a blocking state without re
of method name conflict, the method of displaying the implemented interface is private, so it cannot be called by the object's variable.15. Display implementation interface, the implementation method of this interface can only be called through the interface variables.16. Interface Usage Recommendations:(1) interface--abstract class--class(2) Avoid the definition of "bulky interface", "Multifunctional interface", will cause "interface pollution", only the associated set of members defined in on
program2. Using XML as a configuration fileAndroid SSH-----Programmer in order to ensure the accuracy of XML elements, usually the XML document uses the constraint technologyWhat XML uses constraints? Using constrained XML documents---element content format more canonicalCode is simpler if the XML is not used in the enterprise------The XML is generated by the program and the XML is parsed without constraintsXML constraint technology DTD and SchemaQuick Start with DTD technology1. Write Data XML
circumstances will inheritance be used?The parent class should not inherit as long as a function is not required by the subclass, and the subclass and parent class are the relationships of is a. For example, a dog can walk, and people will walk, but the person class cannot inherit from the dog class, whereas the student class can inherit the man class.11. When a subclass member exists with the same name as the parent class member?When the parent class has the same name as the subclass, if a sub
place, sort by sequencepublic static int[] Xuanzepaixu (int[] array) {for (int i = 0; i int k = i;for (int j = i + 1; j if (Array[j] K = J;}}if (i! = k) {int temp = Array[i];Array[i] = array[k];ARRAY[K] = temp;}}return null;}Insert sort the first number is an ordered array, starting with the second number, comparing with the previous array insert sort, knowing the last numberpublic static int[] Charu (int[] array) {int temp = 0;for (int i = 1; i int j = i-1;temp = Array[i];for (; J >= 0 temp A
as follows:Response message = Status line (General Information Header | response header | entity header) crlf(entity content)Status line =http version number status code reason narrationStatus codes represent response types1XX reserved2XX indicates that the request was successfully received by3XX request further refinement of requests for completion of customer requests4XX Customer Error5XX Server ErrorThe response header information includes the service program name, notifies the client that t
Recently reviewed the basics of the front-end, write a note to facilitate the review again.
1. Delay Script: Add defer property, the script will be delayed until the entire page is resolved after the operation. The Defer property is used only for external script files.
2. Asynchronous script: Add Async property, only for external script files, similar to defer.
3. The value of the e notation equals the number in front of e multiplied by the expo
1. Create an association
Table Structure Reference nhibernate Review series 01. Use Tblpurchasegroup and Tbluser for many-to-many associations, and the association table is tblpurchasegroupuser.
The Purchasegroup and user class code and the mapping configuration file are at the bottom of the article. Run the following test code inside the Nhtest project
Code highlighting produced by Actipro Codehighlighter (freeware)
http://www.CodeHighlighter.com/
is that the previous add view of the Addimagegridview this control, it adds a non-camera view, I put it into a list, Then set the touch event to all the view stored in the list, with an int currentspace record currently being longer than 1 seconds in view in the list position, and the bitmap type Firselect record is long pressed according to the picture bitmap, And then let it hide, when it's time to swap, suppose the swap is J I set the currentspace corresponding view setting bitmap to J's bit
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.