HashMap, the order of the elements obtained is basically not the order of put
HashMap is thread safe
Non-thread safe
Add dataFirst, take a look at the HashMap storage Unit entry:Static Class EntryBefore a write LinkedList article, which wrote to LinkedList is a doubly linked list, from HashMap entry See, entry is composed of a one- way list, because there is only entry successor entry, Without entry's precursor entry. The graph indicates that it should be such a d
Php uses a string to call a function example. 1. the code for copying call_user_func is as follows: functiona ($ B, $ c) {echo $ B; echo $ c;} call_user_func (a, 111,222); call_user_func (a, 333,444 ); show 111222333444? Call 1. call_user_func
The code is as follows:
Function a ($ B, $ c ){Echo $ B;Echo $ c;}Call_user_func ('a, "111", "222 ");Call_user_func ('a, "333", "444 ");// Display 111 222 333 444?
function is similar to a particular method of calling a function, using the following method:
function A ($b, $c)
{
Echo $b;
Echo $c;
}
Call_user_func (' A ', "111", "222");
Call_user_func (' A ', "333", "444");
Display 111 222 333 444
?>
Call the method inside the class is rather strange, incredibly using an array, do not know how developers think, of course, save new, is full of innovative:
Class A {
CSS vertical center, css vertical center
1. Vertical center: Single Row in-Row Element Solution
Center element: the line element of a single row, that is, the inline or inline-* type element, such as text or link.
Solution: Set the height and inline-height of the element in the row to the height of its parent element.
HTMLCSS# Container {
Background: #222;
Height: 200px;
}
A {
/* Height: 200px ;*/
Line-height: 200px;
Color: # fff;
}
2. Vertical cente
#建立一个222. rb file and enter the character file = File.Open ("222.rb", "w+") file.puts "123\NWADWA\N12124124\NDWDW" File.close #输出222. RB Content Fil
E.open ("222.rb", "r+") do |file|
While line = File.gets puts line end #直接用IO操作文件 Io.foreach ("222.rb") do |line| Puts lines i
-perm [/|-]mode:
Mode: Exact lookup of-perm-664 file permissions exactly conforms to mode (mode is a octal representation of file permissions). 0 means that the permissions are not related to their location
/mode: Any one of the user (U,g,o) permissions (RWX) meets the condition that the file Permissions section conforms to mode
A "or" relationship exists between 9-bit permissions-mode: Each type of user (U,g,o) in the permissions of each (E,W,X) at the same time meet the condition is satis
Common Ruby file operation code instances and ruby code instances
# Create a 222. rb file and the input character File = file. open ("222.rb"," w + ") file. puts "123 \ nwadwa \ n12124124 \ ndwdw" file. close # output 222. rb content File. open ("222.rb"," r + ") do | file | while line = file. getsputs lineendend # dir
can be;Four: The service corresponds to the specified real servermy needs : When the requested directory is/111 the request is sent to the machine rs1, and when the requested directory is/222/, the request is sent to the machineRS2, except for directory/111 and directory/222/, other requests are sent to the machine rs2.Vim usr/local/nginx/conf/vhosts/1b.confUpstream QQ{Server 192.168.11.20:80;}Upstream Ten
1. Call_user_func
Copy the Code code as follows:function A ($b, $c) {Echo $b;Echo $c;}Call_user_func (' A ', "111", "222");Call_user_func (' A ', "333", "444");Display 111 222 333 444?>
Call the method inside the class is rather strange, incredibly using an array, do not know how developers think, of course, save new, is full of innovative:
Copy the Code code as follows:Class A {Function B ($c) {Echo $c;}}
I. Several Questions1. Find a string that does not contain "ABC"Test Case 1 ==> ABC (non-conforming)Test Case 2 ==> xabc (not met)Test Case 3 ==> abcy (not met)Test Case 4 ==> xabcy (not met)Test Case 5 ==> XXXX xabcy (not met)Test Case 6 ==> XXX abcy dabc (not met)Test Case 7 ==> abcy (not met)Test Case 8 ==> XYZ (compliant)
2. Extract the specified position (Column 2nd) string, which does not contain "ABC"Test Case 1 ==> 111 ABC 222 (not met)Test Ca
Redis Sentinel provides a high level of availability for Redis to monitor, notify, and fail over replication clusters.
Just right there are two servers for Centos 6.4, which has Redis 3.2 and Redis master-slave replication installed.
Server name: Centos222, ip:192.168.1.222, master-slave role: Master
Server name: Centos224, ip:192.168.1.224, master-slave role: Slave
On the basis of replication, Redis Sentinel is now configured with the following basic structure.
#
Let's share with you the usage of the call_user_func_array and call_user_func functions. The func_get_args () function and func_num_args () function are also provided !!
Let's share with you the usage of the call_user_func_array and call_user_func functions. The func_get_args () function and func_num_args () function are also provided !!
Call_user_func function is used only when the function needs to be called dynamically. This function has two usage methods:The first is to call a lonely
form
Features: easy to implement
The implementation code is as follows:
Define a public attribute Form2Value in the form Form2 to get and set the text value of textBox1
Public string Form2Value
{
Get
{
Return this. textBox1.Text;
}
Set
{
This. textBox1.Text = value;
}
}
This is called in form Form1.
Form2 f2 = new Form2 ();
F2.Form2Value = "OK"; // assign OK to textBox1 of Form2
F2.ShowDialog ();
5. Public attribute values and Owner attributes of the form
Features: simple and flexible
The im
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.