Core code
You can try these small functions when you encounter a system with a date command that does not give you power.
#日期转天数 function Date2days {echo "$*" | awk ' {z=int (14-$2)/12); y=$1+4800-z;
J=int ((153*m+2)/5) +$3+y*365+int (Y/4)-int (y/100) +int (y/400)-2472633; Print J} '} Date2days ' echo ' 2010-08-18 18:59:19 | Sed ' s/-//g;s/://g ' #天数转日期 function days2date {echo ' $ | awk ' {a=$1+2472632; B=int ((4*a+3)/146097); C=int ((
For 255 to 65535 members, two bytes are required for storage. Up to 65535 members are allowed.Create a data table with Enumeration type using SQL statements.
The Code is as follows:
Create table user_sex (sex enum ('M', 'F '));
Write several pieces of test data into the table:
Insert into user_sex values ('M'), ('s '), ('2'), ('F ');
When you view the written results in a table, it turns into M, F (note that each character is a record ). The results show that the enum type is case-insensitive,
-all:word breaks may is inserted between and chararcter for NON-CJK (Chinese/japanese/korean). You can wrap lines in non-CJK words.
Chinese line is the same as our writing rules, we mainly look at the book English and the number, the three differences. Consider a string of numbers as a whole, creating a non-existent word lon.....ng.InstanceHtml1 DivID= "Outbox">2 Divclass= "Innerbox">3 h6>Word-break:normalh6>4
For 255 to 65,535 members, 2 bytes of storage are required. Up to 65,535 members are allowed.A data table with enumerated types is created first through the SQL statement.
The code is as follows
CREATE TABLE User_sex (Sex enum (' M ', ' F '));
Write a few more test data to the table:
INSERT into user_sex values (' M '), (' s '), (' 2 '), (' F ');
When you view the results of a write in a table, the discovery becomes such a m,m,m,f (note that each character is a record). It is known from t
MySQL tutorial SQL enum data type INSERT, UPDATE, delete operation
The enum column always has 1 default values. If you do not specify a default value, the default value is NULL for columns that contain NULL, otherwise the 1th enumeration value will be treated as the default.
If an incorrect value is inserted in the enum column, or if you force the value to be inserted into the enum column using Ignore, it is set to the reserved enumeration value 0, which is displayed as an empty string for the
private key, 2048 bit long modulus................................................+++.........................+++e is 65537 (0x10001)Enter pass phrase for ./demoCA/private/cakey.pem:Verifying - Enter pass phrase for ./demoCA/private/cakey.pem:
Generate CA certificate request
To obtain a CA root certificate, we need to make a certificate request first. The previously generated ca key pair is used to sign the certificate request.
$ OpenSSL req-New-days 365
Microsoft has announced two new versions of the Office software suite, Office 2013 and Office 365, respectively. Compared to the complex, bloated old version of Office, the new Office features a more powerful, more concise interface to become an excellent product.
Microsoft is also taking steps to strengthen office, under the challenge of Google Drive and Apple Iwork/icloud. In the past, almost everyone used office, but few people liked the softwar
IIS7: configure the ftp site through scripts, iis7ftp
Appcmd.exe is a command line tool for site management provided by IIS7. It supports Ftp and Http sites at the same time. Its functions are powerful. For details, refer to the Microsoft website.Requirement
My example here mainly configures an Ftp site and allows the CcUser to have the read and write permissions on its directory:
@ Echo offset character = c: \ CC_Inboxset character = c: \ CC_Outboxset appcmd_exe = % systemroot % \ system32 \ in
test on n73, N95, and e71.
Symbian MTM sends MMS 2
In the previous blog, I introduced sending MMS via an editing box, but in some cases we may needSend text messages in the dark, that is, to make users unaware. How can this problem be achieved?Let's take a look at the following implementation scheme
Void cmssender: sendmmsl (const tdesc aaddress, const tdesc acontent){
Cmsventry * entry = cmsventry: newl (* isession, kmsvglobaloutboxindexentryid
, Tmsvselectionordering ());Cleanupstack: pushl
";Uri urisms = URI. parse (struriinbox); // if you want to access all SMS, just replace the URI string to "content: // SMS /"Cursor c = mcontext. getcontentresolver (). Query (urisms, null );// Delete all SMS here when every new SMS occures.While (C. movetonext ()){// Read the contents of the SMS;For (int I; I {String strcolumnname = C. getcolumnname (I );String strcolumnvalue = C. getstring (I );}
// Delete the SMSString uri = "content: // SMS ";Mcontext. getcontentresolver (). Delete (URI. pa
client can use this class to obtain de objects inherited from cbasemtm.CbasemtmThis class is mainly used to operate the content of SMS. For example, you can create and modify SMS. The usage method is described in the Code below. For more details, you can also view the help of the specific SDK.CmsventryIt is equivalent to an entry of a specific message server. The current entry is associated with its specific content. Cmsventry has two functions: one is to allow access to different types of data
protection port, Buried Steel Pipe try-on. Describe the cabling system structure, cabling process, key points of quality, and protection of cables. Planning Group, a group of cabling cables, for a group, select the cabling start point. The cable is transported to the starting point, label, and record the scale of the distribution frame end. This group is worn to the distribution frame and the remaining length is required. Measure the length from the start point to the end of the socket, truncat
phone. The content will be different depending on the conditions.If the server in the issued text message, does not include the phone number, the phone is unable to obtain the phone number. If the text contains a number, the phone will cache it for his use. In addition, for other operators ' SIM cards or Uim cards, the MDN may be saved in the UIM card. 100% being able to get a native number is unlikely.Mobile Shenzhou Line, Unicom's card can be taken. The dynamic zone is not available. Other ca
directly, IBOXDB requires code to achieve synchronization, which is available in two different forms:Either way, Iboxdb uses Iboxrecycler for data synchronization.A simple implementation of the interface is to extract the data from master into memory. Publicclass package { public socket socket; Public byte [] OutBox; Public classInmemoryboxrecycler:iboxrecycler {ListQbuffer; PublicInmemoryboxrecycler (Longname, Database
configuration, everything is OK. Go to MySQL command line, call the show Processlist statement, find the heaviest load SQL statement , combined with the Discuz Forum source code, found that the following statements caused the CPU to rise:Mysql> Show processlist;+-----+------+----------------+---------+---------+------+------------+-------------- ------------------------------------------------------------+| Id | User | Host | db | Command | Time | State | Info
Always wanted to add mail to the framework, so organize under the Python mail send function
First Python is a mail -enabled send, a built-in SMTP library, a message that supports sending plain text, HTML, and adding attachments . After the mailbox, such as 163, QQ, Sina and other mailboxes by default to turn off the SMTP service, we need to open manually, open, through the sender's mailbox, authorization password through the sender's SMTP service sent
The code is as follows:
#!/usr/bin/env py
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.