Android development accumulation _ 1) Get files, folder buckets, and use Toast in a user-friendly manner
Record the file-related content that needs to be used frequently. In other words, good memory is not as good as bad writing!
1)
/*** Obtain the total memory space of a file or folder in the path *** @ return */public static long getTotalMemorySize (String
ShopBuilder online store get-type SQL Injection packaging (1 ~ 5) The demo test on the official website is successful.
First, the get type is filtered.
If (inject_check ($ _ SERVER ["REQUEST_URI"]) {die ('invalid URL! ');} Function inject_check ($ SQL) {return preg_match ("/(select | insert | delete | \. \. \/| \. \/| union | into | load_file | outfile | \ '| %
Java reflection (1): Get the Class Object
The entrance to all reflection operations is java. lang. Class. Except java. lang. reflect. ReflectPermission, no class under the java. lang. reflect package has a common constructor. To obtain these classes, it is necessary to call the appropriate methods of the Class. Object, Class name, type, or existing Class.
Object. getClass ()
If you can
can also get a contact's avatar thumbnail, just add it to the projection:New string[]{ ContactsContract.Data.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.Data.PHOTO_THUMBNAIL_URI };The last condition, and then normally get the string type of Imageuri:intNameidx =Datacursor.getcolumnindexorthrow (ContactsCon
Preface
When talking about the word "message mechanism", we will all think of Windows message mechanism. The system packs the keyboard and mouse behavior into a Windows message, then, the system sends these windows messages to a specific window. In fact, messages are sent to the Message Queue of the thread where the specified window is located, the message loop of the application continuously obtains messages from the message queue, and sends the messages to the Window Process of the specific wi
I found some small problems in my work today. I checked it online to find out that my Js is the tip of the iceberg. I will learn from others with an open mind in the future.
1. Differences between obtaining DOM objects by JS and jquery
I used to think that the two are the same. I recently learned that the two are different.
The former uses var jstab = Document. getelementbyid ("tab"); // Where tab is the attribute value of the selected DOM object ID.
In Java classes, except constants declared as static and public, general object data scopes are declared as private. In this way, the attributes of the object will not be changed at will, and debugging will be much more convenient: In the public method of the class, you can see where the attribute value is changed by adding a call stack. Data declared as private is generally not allowed to write some set and get methods. Powerful eclipse provides us w
1. OverviewMost network applications Divide: Client (client) and servers (server) complex network applications: Asynchronous callback communication, where the server initiates a request message to the customer. Protocol stack: Application protocol, TCP protocol, IP Protocol, Ethernet protocol LAN (local area Network,lan), WAN (wide area Network,wan). Routers are architecture devices for WANs.Internet: The largest wide area network today.POSIX: A stand
the function name itself is a variable. For function declarations and function expressions as shown below, it is very useful to understand that a function in JavaScript cannot be overloaded without considering the difference between a function declaration and a function expression.1 function f (a) {2 return a + 3} 4 5 function f (a) {6 return a-10; 7} 8 9//without considering the difference between function declaration and function expressi
Python day 1, python get the first day of this week
The first line of var1.py code:
1 #! Usr/bin/env python2 #-*-coding: UTF-8-*-3 # Author calmyan4 print ('Hello World ') 5 name = 'yan' 6 name2 = name7 print ('My name: ', name, name2) 8 name = 'utem '9 print ('My name :', name, name2)
Compared with C, C is more clean and easy to understand!
This is the Huang Teacher Sword Point of offer above the 12th question, this question first notice cannot use the integer int type as the operand, because N is large when obviously overflows. This big data is generally used as a string to represent.The direct method is: 1. For the addition of strings, it involves cyclic carrying and jumping out of judgment.2. Print out the string, note that printing 01 is legal, otherwise you need to add additional ju
How does a MySQL DBA get Facebook offer? (1)
We will not go into details about how powerful Facebook's technical capabilities are. It is a very challenging and interesting thing to be able to engage in technical work in such a large number of Internet companies. In fact, many programmers from China work at Facebook's headquarters. For example, the following cenalulu detailed the entire process of obtaining
Link: http://www.doriandeng.cn/archives/99.html
Through the learning of the first two parts, the object acquisition is very simple. Here, we will summarize the previously used object acquisition methods and supplement the methods that have not been used.
The methods for getting objects in the Unity container also include the generic method and the corresponding non-generic overload. Here, only the generic method is described.
Get objects by
Get the name of the current methodString methodName = Thread.CurrentThread (). Getstacktrace () [1].getmethodname ();getstacktrace() returns an array of stack trace elements representing the stack dump of the thread. If the thread has not been started or has been terminated, the method returns a 0-length array. If the returned array is not 0-length, its first element represents the top of the stack, which
condition, there is no corresponding value, when NULL is expressed as "empty" concept.Here are some practical suggestions:
If the return type of the method is collections, when the returned result is empty, you can return an empty collections (empty list) without returning NULL. This return can be handled boldly by the calling side, such as when the call side gets returned and can print directly List.size () without having to worry about null pointer problems. What If you want to call
pursuit. Regardless of your pursuit of excellence in the process is how, the shape of the learning curve is a platform period of a rising period of a platform period of a rising period of alternating with each other, originally painted a picture out, but painters really anxious ah, forget ...There is no shortcut to success, you have to turn learning into a habit. Learning anything new will first go through a period of rapid growth and then fall back to the platform stage. Want to succeed, need
-1 Monday output is this Monday time, very strange
Reply content:
-1 Monday output is this Monday time, very strange
Because the foreigner thinks "this Monday" is next Monday, "Last Monday" is this MondayJust "-2 Monday", or "Monday last week"?
Date (' y-m-d ', strtotime ('-'). (6+date (' W ')). ' days '));
-7 days
last week
Usually in two steps, get
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.