First, image upload
Accept attributes for HTML <input> tags
Using the Accept attribute in file uploads, the input fields in this example can accept GIF and JPEG two images:
<input type= "file" name= "pic" id= "pic" accept= "image/gif, Image/jpeg"/>
If you do not restrict the format of the image, it can be written as: accept= "image/*". The Accept property can only be used with <input type= "file" >. It specifies the types of files that can be submitted through file uploads.
HTML 5 <input> Type attribute: http://www.w3school.com.cn/html5/att_input_type.asp
Image upload plugin for uploading, previewing and zooming images.
Cropit plug-in: http://scottcheng.github.io/cropit/
FileInputStream is used to read raw byte streams such as image data. To read a character stream, consider using FileReader.
byte data[] = new Byte[length]:length The maximum should be integer.maxvalue, that is, the 2147483647,int data is the largest 2^31-1. Second, the Ajax Foundation
(Default: Automatically determine (XML or HTML) the call time when a request fails.
the//parameter has the following three: XMLHttpRequest object, error message, and (optionally) the error object captured.
//If an error occurs, the error message (the second parameter), in addition to the NULL,
//may also be "timeout", "error", "Notmodified", and "ParserError".
//textstatus: "Timeout", "error", "Notmodified" and "ParserError".
error:function (XMLHttpRequest, Textstatus, Errorthrown) {
Third, the CSS Foundation
Display:flex;
Align-items:center;
Achieve effect: Vertical centering Four, Java Foundation
5 ways to print an array in Java
Arrays.tostring (arr)
for (int n:arr)
System.out.println (n+ ",");
for (int i = 0; i < arr.length; i++) {
System.out.print (Arr[i] + ",");
}
System.out.println (Arrays.aslist (arr));
Retainall method de-Weight: object cannot be implemented, and conversion to string can be implemented.
public static void Main (string[] args) {
set<object> list1 = new hashset<object> ();
List1.add (jsonarray.tojsonstring (New Accountentity ("Lily"));
List1.add (jsonarray.tojsonstring (New Accountentity ("Jim"));
List1.add (jsonarray.tojsonstring (New Accountentity ("Tom"));
set<object> list2 = new hashset<object> ();
List2.add (jsonarray.tojsonstring (New Accountentity ("Tom"));
List2.add (jsonarray.tojsonstring (New Accountentity ("Tony"));
List2.add (jsonarray.tojsonstring (New Accountentity ("Lily"));
List1.retainall (LIST2);
Iterator<object> it = List1.iterator ();
while (It.hasnext ()) {
System.out.println (It.next ());
}
}