. Public attribute values through the 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
Definitions
Symbol:
K
Module:
222. OBJ (222)
The above error occurs because the variable k is repeatedly defined. Add extern before the variable definition in your header file, and then define it before a program in a C file.
* ** Warning L1: unresolved external symbol
Symbol:
K
Module:
111. OBJ (111)
* ** Warning L2: reference made to unresolved external
Symbol:
K
Module:
111. OB
example, in Form form1Form2 F2 = new form2 ();F2.showdialog (this );// OrF2.show (this );// OrF2.owner = this;F2.showdialog ();
In this way, the F2 owner is form1.
B. input values in winformI learned about the display of the form, and then summarized the method of passing values in the form:
1. ConstructorFeatures: it is easy to transmit values in one way (values cannot be transferred to each other ).The implementation code is as follows:In form form2Int value1;String value2;
Public form2 (INT
;F2.showdialog ();
In this way, the F2 owner is form1.
B. input values in winformI learned about the display of the form, and then summarized the method of passing values in the form:
1. ConstructorFeatures: it is easy to transmit values in one way (values cannot be transferred to each other ).The implementation code is as follows:In form form2Int value1;String value2;
Public form2 (INT value1, string value2){Initializecomponent ();
This. value1 = value1;This. value2 = value2;}
This is called in
The Magic constant $ _ SERVER of php stores information about the current SERVER. several values are as follows: $ _ SERVER ["QUERY_STRING"], $ _ SERVER ["REQUEST_URI"], $ _ SERVER ["SCRIPT_NAME"] and $ _ SERVER ["PHP_SELF"] are often confusing. The following describes the differences between QUERY_STRING, REQUEST_URI, SCRIPT_NAME, and PHP_SELF variables in the $ _ SERVER function through examples, master the relationships between the four, so that you can correctly obtain the required values in
I learned about the display of the form, and then summarized the method of passing values in the form:
1. ConstructorFeatures: it is easy to transmit values in one way (values cannot be transferred to each other ).The implementation code is as follows:In form Form2Int value1;String value2;
Public Form2 (int value1, string value2){InitializeComponent ();
This. value1 = value1;This. value2 = value2;}
This is called in form Form1.New Form2 (111, "222").
passed back, or it is stored in other variables to access the variable.Iv. through the form's public property valuesFeatures: Simple to implementThe implementation code is as follows:Define a public property form2value in form Form2, get and set the text value of TextBox1public 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 the TextBox1 to Form2 OKF2. ShowDialog ();V. Through th
The first method:Create a class that declares the fields that are used to store the received. It is stored in the field when it is used, and is called directly by the class name. (This method of passing is bidirectional)The second method:1. Defined in Form1public string Name = "* * * *"2. Create the Form1 object in the Form2,Form1 f = new Form1 ();And then you can go through F. Name is value.The third method: Use the constructor functionIn the form Form2int value1;String value2;Public Form2 (int
the values to the other form first, the form is passed back, or it is stored in other variables to access the variable. Iv. through the form's public property values Features: Simple to implement The implementation code is as follows: Define a public property form2value in form Form2, 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 = "O
passed in the same time. For example, jump to the Home page (index), index and then determine the value of Mes_status, to the user to prompt.
2. If you send it to more than one person
In fact, your message table of the primary key is message_id, and sent to several people is not related, when he logged in, only query the user himself as the receiver, the number of messages received. For example, there are some data in the data table:
message_id
send_id
Message_date
Messa
(String)Print (Re.search (' w.b ', ' www.baidu.com '))Results: Print (Re.search (' w.b ', ' www.baidu.com '). Group ())Results: w.bPrint (Re.search (' WWA ', ' www.baidu.com '))Result: Nonedef sub (pattern, REPL, String, count=0, flags=0): "" "Return the string obtained by replacing the leftmost Non-overlapping occurrences of the pattern in string by the Replacement repl. REPL can be either a string or a callable; If a string, backslash escapes in it is processed. If it is A ca
. Assume that string 111 is placed on the position table [1] and the generated Entry address is 0x00000001. The figure shows this:
If you are familiar with the source code of the listing list, it is not difficult to understand, or explain it. Note that the existingEntry indicates the header:
1. after = existingEntry, that is, the after = header address of the newly added Entry, that is, after = 0x00000000
2. before = existingEntry. before: The before of the newly added Entry is the before addre
path
1, $ _ SERVER ["QUERY_STRING"]Description: query string2, $ _ SERVER ["REQUEST_URI"]Description: The URI required to access this page
3, $ _ SERVER ["SCRIPT_NAME"]Description: path containing the current script
4, $ _ SERVER ["PHP_SELF"]Description: File Name of the script being executed
Instance:1, http://www.bKjia. c0m/(open the home page directly)Result:$ _ SERVER ["QUERY_STRING"] = ""$ _ SERVER ["REQUEST_URI"] = "/"$ _ SERVER ["SCRIPT_NAME"] = "/index. php"$ _ SERVER ["PHP_SELF"] = "/i
('invite you to dinner') elif choice = '6 ': print ('Week-free jobs') elif choice = '3': print ('play together ') else: print ('input error ')
Execution output
= Compare= Value assignment
5th types of Structures
If condition: Result else: Result
As long as the requirement exists, if
Example
Age = int (input ('Guess my age: ') if True: if age = 18: print ('Congratulations, you guessed it') else: print ('This cannot be seen... ') else: print ('input error ')
Execution output
Strings cannot b
[Switch] parse json data for Android and parse json data for android
1. json format2. json parsing 3. gson parsing 4. fastjson parsing 1. Json format a lightweight data exchange format. Xml and json are generally used for data transmission and exchange over the network. Two structures: 1) object (key-value set) {"id": "1001", "name": "zhangshan", "address": "shanghai"} 2) array (array object), with the key-value object included in []
{"Students": [{"sid": 1001, "name": "zhangsan", "addr": "Yicha
I test the model for Millet 3TD version. Millet 3 Ringtones Increase is the use of the RE manager directly modify the system etc file parameters, the following values have a 225 of the value suggested that everyone set to 222 best.
The other do not move, the first group of numbers is the number of hundreds of the volume of the headset, 222 of the value is related to the ring size, the specific
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.