February 2017 first half month logbook

Source: Internet
Author: User
Tags arrays
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 ());
	}
}

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.