TP properties...
-------------------------------Address local_addr1. When the protocol layer is started, the TP layer first obtains local_addr. If local_addr is null, the event is triggered.Event. get_local_address: Wait for the upper layer to tell the TP layer local_addr, and then obtain the TP that interacts with the machines in the group to break through NAT.For example, the TCP physical address is composed of the TP properties external_addr, bind_addr, bind_port, and port_range,The logic is:
AddHandler method, and each handler can define different log levels to achieve a log-rating filter display.Filter: provides an elegant way to determine whether a log record is sent to handler.Formatter: Specifies the specific format of the logging output. The formatter construction method requires two parameters: the format string of the message and the date string, both of which are optional.
Basic methods of Use
Some small programs we do not need to construct too complex log system, you can
the full name of your email.
Here is the Sohu mail server settings, if you use 163 of the mailbox, set to: smtp.163.com
2. In the C-disk search php.ini, the choice is not a shortcut to the php.ini, should be inside the c/windows, open it, like the above modify it, save.
When you are done, remember to restart the Apache server, and then the Mail () function is available.
Cases
The code is as follows
Copy Code
When you send an HTML e-mail message, always set the C
class must inherit the unittest below TestCase
To create a test method, the test method must start with test
The assertion method is used with unittest , and self is required if you want to use the method below the parent class . Method
Use main function to execute case in UnitTest
The parameter definition of the assertequal method: The first parameter of the method under all classes must be Self,first = The result of the case execution Result,second = expected result,
I. Conversion between jquery objects and DOM objectsOnly jquery objects can use methods defined by jquery. To differentiate whether the operation is Dom or jquery$ (Document. getelementbyid ("mydiv") converts a DOM object to a jquery object.Jquery objects are collections. If jquery objects are to be converted to Dom, one of them must be taken out.$ ("# Mydiv") [0]$ ("Div"). eq (1) [0]$ ("Div"). Get () [1]$ ("TD") [6]The following statements are correct:$ ("# Mydiv" pai.html ()$ ("# Mydiv") [0].
Here's the error code map:Lang.errMsg.login = {'-1 ': {Msg: ' system error, please try again later, Field: "},' 1 ': {Msg: ' The account you entered is not in the correct format ',Field: ' UserName '},' 2 ': {Msg: ' The account you entered does not exist, can Field: ' UserName '},' 3 ': {Msg: ' The verification code do
, Intent Intent) {String msg = Intent.getstringextra ("msg"); LOG.I (TAG, MSG);}}Within the OnReceive method, the data in the intent that comes with the broadcast can be obtained and processed.2, after the creation of Broadcastreceiver, it is also necessary to register.-Static Registration: Configuring in the Androidmanifest.xml file After the configuration, a
server email list. For security reasons, smtp servers often block this command.
SMTP. verify (address): determines whether the specified email address exists on the server. For security reasons, smtp servers often block this command.
SMTP. login (user, password): log on to the smtp server. Currently, almost all smtp servers must verify that the user information is valid before sending emails.
SMTP. sendmail (from_addr, to_addrs, msg [, mail_options,
Memory leak analysis when using handlerIn Android, there are often some operations on the main thread after processing an asynchronous task, so we might use handler, the following are common uses of handler:publicclass MainActivity extends AppCompatActivity { privatenew Handler() { @Override publicvoidhandleMessage(Message msg) { //TODO } };}But when we use this, we see a hint:
This Handler class should i
1. unit2:
Unit unit2; interfaceuses windows, classes, nmicmp, sysutils, stdctrls, messages; const wm_my_ping = wm_user + 1024; Type // message record to be transferred. tpingmsg = record MSG: array [0 .. 1023] of char; ID: integer; handled: Boolean; msg2: string; // It is recommended that you use a list or a character array if you need dynamic management, // If the structure is not properly processed during dynamic use, using string may cause memory l
, B)
second, some of the recently collated In the official documents to see the tidying up, some too late translation.
Assertalmostequal (first, second[, places, ...])
Applies to decimals, Place is supposed to be at least several equal Boolean values to be 1(default is 7), if the Place The assertion fails if there are different bits within it.
Assertdictcontainssubset (expected, actual[, MSG])
Check if
An error is reported after heartbeat is started. Urgent! Help !! -- Linux Enterprise Application-Linux server application information. For details, refer to the following section. After heartbeat is started, the following errors are repeatedly reported in the log:
Nov 25 16:51:43 wh3-1 heartbeat: [24818]: ERROR: process_status_message: bad node [wh2-1] in message
Nov 25 16:51:43 wh3-1 heartbeat: [24818]: ERROR: MSG: Dumping message with 12 fields
Nov
A very important mechanism in Android is thread + message. Of course, the thread is not unique to android. Next, let's briefly talk about what should be paid attention to when using the thread.
We use the simplest method to create an android thread + message example.
1. Thread + Handler
[Java]
Copy codeThe Code is as follows: package com. example. test_thread;
Import android. app. Activity;Import android. OS. Bundle;Import android. OS. Handler;Import android. OS. Message;Import android. widget
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.