actual data storage is likely to be different, the following gives several specific storage forms:(1) YUV 4:4:4YUV Three channel sampling rate is the same, so in the generated image, the three component information of each pixel is complete (each component is usually 8 bits), after 8 bit quantization, uncompressed each pixel occupies 3 bytes.The following four pixels are: [Y0 U0 V0] [Y1 U1 V1] [Y2 U2 V2] [Y3 U3 V3]The stored stream is: Y0 U0 V0 Y1 U1
are: [Y0 U0 V0] [Y1 U1 V1] [Y2 U2 V2] [Y3 U3 V3]The stored stream is: Y0 U0 V0 Y1 U1 V1 Y2 U2 V2 Y3 U3 V3(2) YUV 4:2:2The sampling rate of each chromatic channel is half that of the luminance channel, so the chromaticity sampling rate in the horizontal direction is only half 4:4:4.For uncompressed 8-bit quantization images, a macro pixel consisting of two pixels adjacent to each other horizontally takes up
that each vertex stores an 8-bit brightness value (that is, the Y value), and each 2x2 points stores a Cr and Cb value, the image does not feel much changed to the naked eye. Therefore, the original RGB (R, G, B are all 8bit unsigned) models, 4 points need 8x3 = 24 bites. Currently, only 8 + (8/4) + (8/4) = 12 bites are required, and each point occupies 12 bites on average. In this way, the image data is halved.
The above only provides a theoretical example, which may be different in actual dat
8bit unsigned) models, 4 points require 8x3 = 24 bites (such as the first figure ). now, we only need 8 + (8/4) + (8/4) = 12 bites, and each point occupies 12 bites on average (such as the second figure ). In this way, the image data is halved. The above only provides a theoretical example, which may be different in actual data storage. Below are several specific storage formats: (1) YUV 4: 4 The sampling rate of the three channels of YUV is the same. Therefore, in the generated image, the
color.
This storage method is mainly used to ensure the quality of the image (to prevent image quality reduction during processing ).
Four pixels are collected. Their data structures are as follows: [y0 U0 V0] [Y1 U1 V1] [Y2 U2 V2] [Y3 U3 V3: y0 U0 V0 Y1 U1 V1 Y2 U2 V2 Y3 U3 v3
(2) yuv422, two brightness values share one color
Most people cannot tell the difference between 444 and 422.
Likewise, the thre
// I want to make an efficient query to find all users who have theiruserids listed in a usergroup.// Ideally I want to make this as a single request to mongodb.// What I want corresponds to nested selects in SQL.// I have tried this in the mongo shell:db.user.save({_id:"u1", Name:"u1 name"});db.user.save({_id:"u2", Name:"u1 name"});db.user.save({_id:"u3", Name:"u3 name"});db.usergroup.save({_id:"g1", Users
(string name) { return "Hello" + name; } public List getusers () { List List = new ArrayList (); user u1 = New user (); u1.setname ("Jack"); U1.setage (; u1.setsex ("male"); User u2 = new User (); u2.setname ("Tom"); u2.setage (+); u2.setsex ("Female "); User U3 = New user (); u3.setname ("Rose"); nbsp; u3.setage ();
");
// Create a data model
Map root = new hashmap ();
List
User U1 = new user ();
U1.setid ("123 ");
U1.setname ("Wang Wu ");
Users. Add (U1 );
User U2 = new user ();
U2.setid ("2345 ");
U2.setname ("James ");
User U3 = new user ();
U3.setid ("fgh ");
U3.setname ("Li Si ");
Users. Add (U2 );
Users. Add (U3
get the length of the S string, you should use sizeof (S. c_str (), because the string member function c_str () returns the first address of the string. In fact, the string class provides its own member functions to obtain the capacity and length of the string, namely capacity () and length (). String encapsulates string operations, so it is best to use string to replace C-type strings during C ++ development.
8. view the CPU peer bounds from the sizeof problem of union
Consider the following:
pointer. If you want to use strlen to get the length of the S string, you should use sizeof (S. c_str (), because the string member function c_str () returns the first address of the string. In fact, the string class provides its own member functions to obtain the capacity and length of the string, namely capacity () and length (). String encapsulates string operations, so it is best to use string to replace C-type strings during C ++ development.
8. view the CPU peer bounds from the sizeof pro
ASP for one month first. Third, using glassfish as a server is really easy to build. You don't have to worry too much about it, and there won't be different cases of different machines.
Okay, so I started to build the platform.
We first download the relevant software from the Oracle website.
1. JDK 6 (required)
Http://www.oracle.com/technetwork/java/javase/overview/index.html
2. Java EE 6 SDK with JDK 7 U3 (comes with the glassfish open source Edi
the table data together, and MyBatis will automatically group. SELECTU1.name asMood_user,u2.name asComment_user,u3.name asReply_user, Mood.mood_id,mood.id asMood_userid,mood_content,mood_time, Moodcomment.moodcommentid,moodcomment.id asComment_userid,moodcomment.comment_content,moodcomment.comment_time, Moodcommentreply.moodcommentid, Moodcommentreply.id asReply_userid,reply_content,reply_time fromMood Left JOINMoodcomment onmoodcomment.mood_i
if the object's class does not
* support the Cloneable interface. Subclasses
* that override the clone method can also
* throw this exception to indicate that an instance cannot
* be cloned.
* @see java.lang.Cloneable
*/
protected native Object clone() throws CloneNotSupportedException;
}
Well, it's a huge string of chicken sausage. Don't think I'm here to get together the words. These are all technical a
following is the sorting code for testing. Here, the sorting is based on the attr2 and attr3 attributes of embedded object B of object.
from operator import itemgetter, attrgettera1 = A(B('u1', 'AAA', 100))a2 = A(B('u2', 'BBB', 100))a3 = A(B('u3', 'BBB', 10))aaa = (a1, a2, a3,)print sorted(aaa, key=attrgetter('b.attr2', 'b.attr3'))print sorted(aaa, key=attrgetter('b.attr2', 'b.attr3'), reverse=True)
Run the test and the result is as follows:
[[u1, AA
. * * Whose class is * Exception at run time. * * @return A clone of this instance. * @exception clonenotsupportedexception If the object ' s class does not * Support the * That override the * Throw this exception to indicate a instance cannot * Be cloned. * @see java.lang.Cloneable */ Protected native Object clone () throws Clonenotsupportedexception;}Hehe, but also a l
$ jOAUXAIi $ DoDRVX1YVB0MMCfHGpvaE3mgLzmWUs6QP/fingerprint: 502: 502:/home/testuser2:/bin/bash
USER parameter modification: yppasswd, ypchfn, ypchsh is not demonstrated here)Yppasswd: Same function as passwd command;Ypchfn: Same as chfn;Ypchsh: Same as chsh.
Start the test below:Su to testuser1 on the client; we didn't have this account locally;
[Root @ www ~] # Su-testuser1su: Warning: Unable to switch to/home/testuser1: No file or directory
You can find that the switch is successful, but the
accountMyCount MyCount =NewMyCount ("95599200901215522", 10000); //Create a Lock objectLock lock =NewReentrantlock (); //Create a pool of threadsExecutorservice pool =Executors.newcachedthreadpool (); //create some concurrent access users, a credit card, save, take the take, good lively ahUser u1 =NewUser ("Zhang San", MyCount,-4000, lock); User U2=NewUser ("Three Fathers", MyCount, 6000, lock); User U3=NewUser ("Three brothers", MyCount, 8000, lock)
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.