In-depth analysis on prototype of ctipt PT: Is prototype attributes a copy, a reference, or a fixed search method?
---- 01 _ modifying prototype attributes//
//
Output:
After the instance is created, person1.username: zhangsanAfter the instance is created, person2.username: zhangsan
After the prototype is modified, person1.username: LisiAfter the prototype is modified, person2.username: LisiQ: Why does the attribute values of person1 and person2 of tw
In-depth analysis on prototype of ctipt PT: Is prototype attributes a copy, a reference, or a fixed search method?
---- 03 _ add the Same Name attribute of prototype to the instance
//
//
Output:
After the instance is created, person. Username: zhangsanAfter adding an attribute with the same name as prototype to the instance, person. Username: Lisi
After deleting the username attribute on the instance, person. Username: zhangsan
Problem: After
In-depth analysis on prototype of ctipt PT: Is prototype attributes a copy, a reference, or a fixed search method?
---- 02 _ add prototype attributes
//
//
Output:
After the instance is created, person1.username: zhangsanAfter the instance is created, person2.username: zhangsanBefore adding the property age to the prototype, person1.age: UndefinedBefore adding the property age to the prototype, person2.age: Undefined
After adding the property age
Differences between Android px, dp, pt, and sp
Android, such as px (pixel) mm, is not recommended.
Why can I use web development on a computer instead of Android?
Because px indicates the number of pixels, the resolution is usually the same on the computer.
Both 14-inch and 15-inch versions are 1366*768, and the resolution of mobile phones is generally different.
Googe solution:
Dp (dip) (calculated by Pixel based on screen density)
For mobile
screen. For example, 320*480 screens have 320 pixels horizontally and 480 pixels vertically.
In: indicates the inch, which is the physical size of the screen. Each inch equals 2.54 cm. For example, the screen size of a mobile phone is often described as 3.2 (English), 3.5 (English), and 4 (English. These dimensions are the diagonal length of the screen. If the phone screen is 3.2 inch, the diagonal line length of the phone screen (visible area) is 3.2*2.54 = 8.128 cm. You can measure your mobi
the screen density change. Next, let's take a look at the meaning of other units. Px: the actual pixel of the screen. For example, 320*480 screens have 320 pixels horizontally and 480 pixels vertically. In: indicates the inch, which is the physical size of the screen. Each inch equals 2.54 cm. For example, the screen size of a mobile phone is often described as 3.2 (English), 3.5 (English), and 4 (English. These dimensions are the diagonal length of the screen. If the phone screen is 3.2 in
(120/160/240)In Android, 1pt is roughly equal to 2.22SP.For reference, if the UI can provide the best design in SP, if there is no concept of SP in the design, the developer can also take approximate values by appropriate conversion.In the past, programmers typically designed computer user interfaces in pixels. For example, you define a form field with a width of 300 pixels, a space between columns of 5 pixels, an icon size of 16x16 pixels, and so on. The problem with this approach is that if y
data modification, and then perform the final rename operation.Therefore, when you modify the table structure, you should try to choose to perform more appropriately when the business is relatively idle, at least when the data operation on the table is low. 2, if the foreign key table operation, four kinds of foreign key operation types need to be based on the data volume and reliability of the table to choose.For reasons of reliability, use the rebuild_constraints type as much as possible and
The OS is as follows:
1. Ubuntu netbook remix
2. moblin
3. jolicloud
4. GOS
5. Android
6. chromiumos
Now the 1, 3, 4, and 5 trials have been completed. For the current experience, 1 and 3 feel good, and the balance between ease of use and
1. OverviewIn the past, programmers often designed computer user interfaces in pixels. For example, the image size is 80x32 pixels. The problem with this processing is that if you run the program on a new display with a dot (dpi) higher per inch,
Dip:device independent pixels (device independent pixel). Different devices have different display effects, this is related to the device hardware, we generally support the WVGA, HVGA and QVGA recommended to use this, do not rely on pixels.px:pixels
1: Nonsense not much to say, look directly like the table:
2:PX does not introduce too much, is the size of the pixel, add your screen resolution of 1920, then each of the equivalent of each has a transverse 1920 pixels;
3:em is a relative unit,
Android unit conversion, the network has a lot of related conversion code. However, I recommend using the official conversion method TypedValue. applyDimension.
/*** Converts an unpacked complex data value holding a dimension to its final floating*
NAT (Network Address Translation) is the process of converting the IP address in the IP address data packet header to another IP address. In practical applications, Nat is mainly used to enable private networks to access public networks. By using a
Px: The pixel of the screen.In: inchesMM: mmPT: LB, 1/72 inchDP: an abstract unit based on density. If a screen of DPI is displayed, 1dp = 1px.Dip: equivalent to DPSP: similar to DP, but it also scales according to the user's font size preference.We
Dip: device independent pixels (device independent pixel ). different devices have different display effects, which are related to the hardware of the device. We recommend that you use this function to support WVGA, HVGA, and QVGA without pixels.
Px:
1. OverviewIn the past, programmers used to design computer user interfaces in pixel units. For example: The picture size is 80x32 pixel. The problem with this is that if you run the program on a new monitor that is higher in dots per inch (dpi),
Introduction of Percona-toolkit Tools
The Percona-toolkit, "PT Tool", is a collection of advanced command-line tools for performing various MySQL and system tasks that are complex and cumbersome to perform by hand, including:
Check the consistency of master and slave data
Effectively archive records
Look for Duplicate indexes
Summarizing Server information
Analyze queries from logs and tcpdump
Collect important system information when something goes w
Mysql toolkit is a small plug-in used to monitor and analyze databases. It is usually used to call perl to analyze and compare the current environment and database. It is worth learning.
Http://www.percona.com/redir/downloads/percona-toolkit/LATEST/RPM/percona-toolkit-2.2.5-2.noarch.rpm
The following software may need to be added during installation
yum install -y perl-DBD-mysql perl-IO-Socket-SSLrpm -ivh percona-toolkit-2.2.5-2.noarch.rpm
Command list
/usr/bin/
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.