Java BASICS (8) Object-oriented (3) and java basics object-oriented
Here are some of the knowledge points and code I summarized in my previous class. Most of the notes I think are very good and classic, sincerely hope that these will help those who want to learn!
It is inconvenient to upload code by module. There are also many things, and they are also clear! If you need it, you can leave your email in the
1, the computer's memory unit
The data in the computer is represented by 0 and one, and one of the 0 or 1 is called a bit.
8 bits are called a byte (byte), two bytes are called a word (word), and four bytes are called two-word (Dword).
1byte=8bit, 1kb= 1024 Byte, 1m=1024 KB.
2, Java has four categories of 8 basic types
Python 3.x Study Notes 8 (OS module and xml modification), python3.x
1. OS module operations
OS. getcwd (): # view the current path.
OS. listdir (path): # lists all objects in the directory and returns the list type.
OS. path. abspath (path): # returns the absolute path of path.
OS. path. join (path1, path2,...): # combines paths. If there is an absolute path, th
As described in this topic, are there any UTF-8 encoded Chinese characters whose byte length is not 3 (2 or 4 )? As described in this topic, are there any UTF-8 encoded Chinese characters whose byte length is not 3 (2 or 4 )?
Reply content:
As described in this topic, are there any UTF-
Order: 2Then, to arrange a deck of cards in the following order:Plum 2, ..., plum blossom A, block 2, ..., square A, Hearts 2, ..., Hearts A, spades 2, ..., spades a.There are two kinds of sorting methods:"2" Code implementation(1) The MSD method is implementedThe highest-bit precedence method is usually a recursive process:(2) LSD method realizationThe lowest bit priority method first sorts all the objects according to the lowest bit key KD,Then acc
Sed (Stream editor) row editor (full screen Editor: VI)SED: Display mode spaceDo not edit the file by default, only the data in the pattern space is processedThen, after processing is finished, the mode is displayed on the screenSed-n ' Addresscommand ' file ...Single/double quotes can be, double quotation marks can be used to implement variable substitution-N: Silent mode no longer defaults to display the contents of the mode space-I: Modify source files directly-E script-e script: Multiple scr
Backend mounting: Write 8 interfaces in three lines of code !, Backend 3 rows
Some may think:
How is this possible?
Even with SpringBoot with almost zero configuration, three lines of code are required to write the simplest interface!
@RequestMapping("test/{request}") public String test(@PathVariable String request) { return request + ": Hello World"; }
There will be 24 lines of code for ei
,intentfilter);5. Order broadcast priority and features:The way to send an ordered broadcast is sendorderedbrocast ()Other operations and priorities are similar to regular broadcasts, but we will find that ordered broadcasts can either truncate the broadcast or process the broadcast data, that is, the data sent by the BroadcastReceiver1 can be processed in the BroadcastReceiver2. (ordinary broadcast can not be processed)6. Introduction to asynchronous broadcast (sticky stranded broadcast)(
Alter procedure prtradingdelete @ ID varchar (4000) asbegin update DBO. Trading set isdel = 1 where ID in (@ ID) endgo
An exception occurs when the above stored procedure is executed. Tip: failed to convert varchar values '1, 2, 3, 4, 5, 6, 7, 8' to data type Int.
Change the stored procedure:
Alter procedure prtradi
As mentioned in the title, is there a byte length not 3 (2 or 4) for all Chinese characters encoded by utf-8 so far?
Reply content:
As mentioned in the title, is there a byte length not 3 (2 or 4) for all Chinese characters encoded by utf-8 so far?
Accounted for 2 bytes: 0
involves closely monitoring their execution and determining when to create a thread and when to release unnecessary threads. Similarly, we usually need synchronization primitives such as locks and tokens to synchronize the asynchronous parts of the application and make their internal coordination and interaction possible. However, it is important to know when and how to create these synchronization primitives, And the implementation is also accurate.
1
Isinstance () (for class inheritance relationships) A is not convenient for inheriting relationships with class by using type () . To determine the type of class, you can use the isinstance () function. B In other words, isinstance () determines whether an object is the type itself, or is on the parent inheritance chain of that type. C can usetype()The basic type of judgment can also be usedisinstance()Judge: >>> isinstance(‘a‘, str) True >>> isinstance(
! "));
// Schedule the toast to appear 30 seconds from now
VaR date = new date (). gettime () + 30000 );
Varstn = toast. scheduledtoastnotification (template, date );
Notifier. addtoschedule (STN );
}
});
})();
3.InDefault.htmlAdd the followingScriptElement:
Html
4.InDefault.html, Add the following highlighted content to"Reminder"Command:
Html
, Onclick: Notifications. scheduletoast} ">
5.The last task before testing is t
, a method does not need to be implemented, completely to the subclass to implement, this method needs to be declared as an abstract method, curly braces need to be removed.2. Classes that contain abstract methods must be declared as abstract classes, and abstract classes can have no abstract methods and cannot be instantiated, even without abstract methods.3. Abstract classes cannot be instantiated (new is not available).4. When a subclass of an abst
flagship Edition
Linux testing environment:
Fedora 17 (kernel version: Linux 3.3.4-5)
Windows test environment:
Windows 7x64 SP1 ultimate
Windows 8x64 Professional
Because the virtual machines used for testing have different expressions on configurations, to ensure the accuracy and fairness of testing. Set the virtual machine to the following Configuration:
The CPU is a four-core or dual-core four-Thread
Memory is set to 2048 MB (2 GB)
Hard disk capacity is 30 GB
You can set the video memory to
, associated object, and associated method.Key must be a unique constant, in the above example using the Associatedobject method of the selector as key, using any other unique constant as a key is also possible.The association is equivalent to the attributes of the attribute, and all the associated ways are listed as follows:The 2 parameters of the Objc_getassociatedobject () function are: The associated source object, key.This key must be the same as the Objc_setassociatedobject () function Lee
Keyword interface
There is no way to implement in an interface
Cannot use data, can have constants
Java interface: http://blog.csdn.net/a289672082/article/details/51518398
interfaceCode{//public $data = 123; Cannot have access to the property's data in the error interfaceConstdata =123;///The correct interface can use constants Public function_print();//public function _print2 () {}; Error, an implementation method cannot be used in an interface} classcplusplusimplementsCode{ Public func
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.