1. 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.
Note that the dip is related to the screen density, and the screen density is related to the specific hardware. Incorrect hardware settings may cause the dip to fail to be properly displayed. On a display with a screen density of 160, 1dip = 1px, som
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
Three scenarios:
1. An error occurred while executing sp. For example, the connection is abnormal and the database permission is abnormal.
2. SPCodeThrow an exception
3. the return value/output parameter value does not comply with the conventions.
In the latter two cases, you need to record the parameter values of the input SP when an exception occurs. The business logic layer needs to capture and re-
pointer related source code in the following two files:Frameworks\base\include\utils\refbase.hFrameworks\base\libs\utils\refbase.cppTwo smart pointer types are defined in Android, one is a strong pointer sp (strong pointer) and one is a weak pointer (weak pointer). It is more appropriate to be a strong reference and a weak reference. A strong pointer is the same concept as a general-purpose smart pointer, and a reference count is used to record how m
When you use the following code, you find that the font size does not grow larger, but it becomes smaller:size = (int) mtext.gettextsize () + 1;Mtext.settextsize (size);It was later found that the GetTextSize return value is in pixels (px), and Settextsize () is in SP, which results from inconsistent units.Here you can use a different form of settextsize () to specify the unit:settextsize (int unit, int size)TypedValue.COMPLEX_UNIT_PX:PixelsTypedValue
way, the same pictures on the different phones display the size of almost no difference.3.dipDensity independent pixels, device independent pixels.Exactly the same as DP, with different names, no more explanations.4.spAbstract pixels independent of scale (Scale-independent Pixel).and DP very similar but the only difference is that the Android system allows users to customize the text size (small, normal, large, oversized, etc.), when the text is normal large hours 1SP=1DP, other sizes larger th
Due to hardware driver support issues, the upgrade of the 4.7.0 kernel is mainly to be able to use the Intel HD Graphics 630 driver, but there are problems, such as Compiz effect caused by the desktop if more than one of the same programs start, and then click again when there will be flashing and crash issues. The lookup logs are as follows:COMPIZ[4852]: Segfault at the IP 00007f88cae087f0 SP 00007ffce354c268 error 4 in libscale.so[7f5ce70cb000+24000
The most recent is a time project may need to provide SMS functionality, customers as an SP side to provide SMS business; A search on the internet, found a relatively good CMPP30 class code, the code basically realized the CMPP3.0 protocol in the SMS Transceiver, network and other functions. I rebuilt it, providing support for synchronous sending, asynchronous sending (the original version of asynchronous send is not a standard. NET asynchronous send
4. Screen density: Indicates how many display points per inch, and the resolution is two different concepts.Android mainly has the following kinds of screens: the following table
SceneTyep
WidthPixels
HeightPixels
SizeRange (inches)
Screen density
QVGA
240
320
2.6-3.0
Low
Wqvga
240
400
3.2-3.5
Low
Fwqvga
240
432
3.5-3.8
Low
HVGA
320
480
3.0-3.5
Medium
Functions | Encryption how does Microsoft SQL Server encrypt passwords? How do I make an undisclosed cryptographic function?
If the users of the MSSQL information is interested, may find master.dbo.sysxlogins inside the user's password, but, password field if not NULL is a bunch of binary can not understand, this password is how to encrypt it?
In fact, as long as a careful look at the master.dbo.sp_addlogin will know, MSSQL SP can see the code, is r
SQLDelete all trigger and SP from a database Author : CC Abba 2014-6-14 in Daily SQL database operation, how to quickly delete all Trigger and SP ? There are three ways to handle this quickly. -- First Kind -- How transactions are handled Begin Transaction Begin try Declare @SQL varchar(max) Set @SQL=" select Span style= "Font-size:10.0pt;font-family:"courier new";" > @SQL = @SQL Span sty
the dip, the font unified use SPFor example, the difference between PX and dip:px pixels, if using PX, will be used to draw the actual pixel, than a bar, with a line length of 240px, in the 480 wide simulator is half the screen width, and in the 320 wide simulator is 2/3 of the screen width. Dip, that is, the height of the screen is divided into 480 points, the width divided into 320 points. For example, you make a 160dip horizontal line, whether you are in 320 or 480 of the simulator, is half
MySQL stored procedure SP explanation
1. Introduction to stored procedures
The commonly used Operating Database Language SQL statements must be compiled and then executed before execution. the Stored Procedure (Stored Procedure) is a set of SQL statements for specific functions, after compilation, the stored procedure is stored in the database. you can call and execute the stored procedure by specifying the name of the stored procedure and specifyi
Anti-tampering and anti-sp, sending PGP encrypted emails on OS X
Bitcoin researchers have heard of PGP encrypted email communication. It is said that Satoshi Nakamoto and his friends used PGP encryption to send emails. Even in the popular CZ vs OKCoin events over the past few days, PGP has been involved in the discussion.
PGP-encrypted email communication allows the recipient to determine who sent the email without tampering, this allows the sender to
of this function follows the normal function naming standard The callback function takes a handle to the parameter window to dispatch the window's message, unsigned integer message designator, two parameters that carry additional information (WParam and LParam). The last two parameters are used to supplement the data when processing the message in the callback function requires more data.The exit message is handled by calling the Win32 function PostQuitMessage, which causes the MSG object in th
The effect you want to implement, such as title.At the beginning, it is set by Sizetv.settextsize (GetResource (). Getdimension (R.dimen.text_size)).At this point the students using as will find that the value returned by the AS hint is 18sp. getdimension. Looks pretty normal.But run out of the actual effect, will be more than in the layout file directly set 18SP font to BIG!!Temporarily not to understand the role of getdimension and why the hint is 18sp instead of 18DP or the unit here is not a
JQuery: SP. NET Autocomplete Textbox Using jQuery, JSON and AJAX, jqueryautocomplete
///
. Net 4.0
Using System; using System. collections. generic; using System. linq; using System. web; using System. web. UI; using System. web. UI. webControls; using System. web. services; namespace DuCms. web {//
Refbase provides a function: Extendobjectlifetime (int32_t mode); The value that is used to set the Mflags in the constructor.and defines an enumeration:enum {Object_lifetime_weak = 0x0001; Binary as B01Object_lifetime_forever = 0x0003; The binary is B11, that is, forever contains the weak case.};1. When mflags is 0 o'clock, the strong reference count controls the actual object life cycle, and the weak reference count controls the Shadow object life cycle.2. When Mflags is Object_lifetime_weak,
1. Edit the document library list display page, such as:2, add content editor, such as:3, add the following in the "Content editor"-"edit source", add the following JS code, such as:?The code is as follows:???????????????????4. Make sure to save the page.5, test, upload the SWF file in the document library, open as follows:Tips:Ø How to implement the SP's document library similar to the effect of Baidu document library, you can run Windows services in the background or timerjob upload the variou
1. Edit the document library list display page, for example:
2. Add a Content Editor, such:
3. Add the following JavaScript code in [Content Editor]-[edit source] and add the following JavaScript code, for example:
?
The Code is as follows:
???????????????????
4. Confirm to save the page.
5. Test: Upload the SWF file in the document library and open it as follows:
Tip:
? How to realize the effect of SP document library similar to
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.