With more and more users of mobile devices, Android phones have more than 1.3 million activations per day, so our webapp for mobile terminals are starting to follow. This paper mainly introduces the knowledge and experience of webapp development and debugging, and gives several alternative solutions.
I. Basic CONCEPTS
(1) CSS pixels and device pixels
CSS Pixels: An abstract unit used by browsers to draw content on a Web page.
Device pixels: Displays the smallest physical unit of the screen,
Knowledge required for mobile webapp development and webapp Development
There are more and more mobile devices, and more than 1.3 million android mobile phones are activated every day. Therefore, our webapps for mobile terminals are also starting to follow up. This article describes the knowledge and experience of webapp development and debugging, and provides several optional solutions.I. Basic concepts (1) CSS pixels and device pixels
CSS pixels: the abstract unit used by the browser to draw c
Just started to touch the mobile page refactoring, is not very confused how much size should be made? 320, 640 or 720? Do you need to write other sizes to fit different screen sizes when you refactor the pages according to the 640 design? - This stems from a viewport and px understanding .A lot of mobile pages have been refactored, but it's unclear why you should design the page in 640 size. Give the element a fixed pixel value, but the strange thing is that it looks pretty much the same size on
One pixel knowledge 1.1 device pixel (Devices pixel)It is a physical concept, referring to the physical pixels used in the device (physic pixel). This unit is represented by PX, which is a [relative absolute unit] ————That is, on the same device, the physical length (such as inches) represented by each of the 1 device pixels is fixed (that is, the absolute nature of the device pixels);However, between different devices, the physical length (such as inches) represented by each of the 1 device pix
PPI = Pixels per inch, number of pixels on average, "pixel density"
xhdpi:2.0
hdpi:1.5
mdpi:1.0 (baseline)
ldpi:0.75
DRAWABLE-LDPI, drawable-mdpi, drawable-hdpi accuracy are low, medium (Android default), high. The corresponding picture sizes are: 36x36, 48x48, 72x72. xxhdpi:144*144 xhdpi:96*96 hdpi:72*72 mdpi:48*48 ldpi:36*36 DP are virtual pixels that are automatically adapted on devices with different pixel densities
AnyForWeb sharing: pixels! Do you really know ?, Anyforweb sharing
"Pixel" should not be familiar with front-end staff and designers, but there will still be many obstacles to pixel communication during their communication, the reason is not because of inconsistent views, but because pixels are divided into two types.
AnyForWeb first introduces the differences between the two pixels.
Pixels are divided into device pixels and CSS pixels ). Device pixels are the pixels we use in devices. They ar
) Initial parameters
(2) E-step (request for expectation)
Fetch:
In fact, the most appropriate formula here should be the expected expression of the log-likelihood function
In fact, 3) the calculation of the parameters of the log likelihood function is also used to find the desired expression of the derivative is equal to 0 of the simplified formula, and these formulas for (7), so the e-step can only ask for (7) formula, in order to simplify the calculations, do not need to seek partial guidanc
a physical pixel.
About Pixel Pixel's past life, you can see here: 78768942
Display hardware in the light point (dot) and image resolution in the pixel (Pixel) is easy to confuse the two concepts, display hardware points can be said to be the smallest display unit of hardware devices, and pixels are a point, but also a collection of multiple points.
When the scanner scans the image, each sample point of the scanner corresponds to each pixel of the resulting image, and the DPI value set at the
Mydevice.ioMobile devices, in responsive Web Design, relate to a core value which is the value of the CSS width or ("Device-widt H "), in CSS Device independant Pixels, which depends both of the browser and user zoom settings.Smartphones phablets Tablets Other connected
Common Smartphones Values
name
Phys.Width
phys.Height
CSSWidth
CSSHeight
PixelRatio
phys. PPI
CSS
Label: style blog HTTP Io color ar SP for div 1, Short int I;Char;Short int * PI; I = 50;Pi = I; ---------------- Pointer, strong Factory Short int ** PPI; // This is a pointer to the pointer. Note that there are two * numbers.PPI = PI; ------ Result: The PPI is the IP address of pi. * The PPI is the content in the PI address value, that is, the I ad
就是和drawable的区别了。options不做任何设置,就是取原图CreateBitmap scale by length-to-width ratiomatrix00matrix, false);The calculations for ScaleWidth and ScaleHeight are similar SCALEWIDTH=200/800=1/4 where 200 of the dimensions they want to zoom to, Of course here the ScaleWidth and ScaleHeight can be specified separately to different sizes, and there is no limit to the int type.The parameter in the Bitmap.createbitmap function is Bitmap to the specified scale object, and the next 0, 0, Bmpwith, Bmpheight is th
PPI = Pixels per inch, number of pixels on average, "pixel density"
xhdpi:2.0
hdpi:1.5
mdpi:1.0 (Baseline)
ldpi:0.75
DRAWABLE-LDPI, drawable-mdpi, drawable-hdpi accuracy are low, medium (Android default), high.The corresponding image sizes are: 36x36, 48x48, 72x72.xxhdpi:144*144xhdpi:96*96hdpi:72*72mdpi:48*48Ldpi:36*36DP is a virtual pixel that is automatically adapted to devices with different pixel densities, such as:At 320
the standard PPI is rarely seen, mostly retina retina devices, for example, iphone5s device pixel ratio of 2,iphone6s device pixel ratio is 3. (Note: The Retina Retina screen is an ultra-high-density screen with a PPI value of more than 300, but Apple has given it a big name). You can see the DPR of more devices in the Http://DevicePixelRatio.com website. Pixel density (
tobject* objtemp; = Getobjectproperty (this"Font"); if (objtemp) { ppropinfo ppi; " Size " ); if (PPI (*ppi->proptype)->kind = = Tkinteger ) A ); }Cb6 to write his own function Getobjectproperty,xe6 the system comes with the Datasnap.Provider.hpp defined in theConst String Apropname) { ppropinfo
= 3.146; Const double* Const PI =π //double const* const PI =π cout cout Double alpha = 3.14 *pi = Alpha; Error. Because pi points to a constant, *PI cannot be changed. //pi =α//error. Because pointer pi is a constant, it cannot be changed again. The ②const modifier reference Const modifier Reference is not as complex as a pointer-decoration pointer, but only in one form. The reference itself cannot be changed, but the object being pointed to can be changed, see above "first, basic kno
not specify what type of data it points to. The void * Pointer acts as a generic pointer that can be converted to and from other pointers (except function pointers) without the need for a type cast, but cannot be dereferenced and subscript. The return value of the malloc function in C is a void * pointer, and we can assign it directly to a pointer of another type, but from a safe programming style perspective and compatibility, you might want to cast the returned pointer to the desired type, pl
data it points to. The void * Pointer is a generic pointer that can be converted to and from any other type of pointer (other than a function pointer) without the need for a type cast, but cannot be dereferenced and subscript. The return value of the malloc function in C is a void * pointer, which we can assign directly to a pointer of another type, but it is best to cast the returned pointer to the desired type from a safe programming style point of view and compatibility, in addition, malloc
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.