() = = ". png" | | _tp. ToLower () = = ". swf") {Get file streamSystem.IO.Stream Stream = _file[0]. InputStream;Save FileString savename = DateTime.Now.ToString ("YYYYMMDDHHMMSS") + _tp; String path = Server.MapPath ("") + "/upload/area/" + savename; _file[0]. SaveAs (path);}}Later thought, how to determine whether the folder exists? If it does not exist, the direct save will be wrong, or already exist, will not overwrite it?Use the following meth
1
I 've posted some of the articles I 've used to write code recently. I 'd like to thank those elders for some good methods.
2
3
%
4
'
========================================================== ====
5
'
Formatting time (Display)
6
'
Parameter: n_flag
7
'
1: "yyyy-mm-dd hh: mm: SS"
8
'
2: "yyyy-mm-dd"
9
'
3: "HH: mm: SS"
10
'
4: "mm DD, YYYY"
11
'
5: "yyyymmdd"
12
'
6: "
in yyyymmddhhmmss format, depending on whether the function is in a string or in a numberThe context is used.Mysql> select now ();->'1997-12-15 23:50:26'Mysql> select now () + 0;-> 19971215235026
Unix_timestamp ()Unix_timestamp (date)If no parameter is called, a Unix Time Stamp (from'00:00:00'The number of seconds since GMT ). If unix_timestamp () is called with a date parameter, it returns'00:00:00'The second value starting with GMT. Date can be a n
("yyyymmddhhmmss") + datetime. now. millisecond. tostring () + ". html "; if (aspxtohtml. createlist (URL, FNA) {response. write ("
The second method is to use an HTML template to generate an HTML page. The template contains the corresponding tag, which can be used to retrieve data from the database and other places. Fill in this tag to generate an HTML page, this method is useful in many news systems.
Private string createdetailpage (string eventid,
Referencing the Zxing class library
Implementation features:
1 Create a QR code with logo
2 drawing the QR code onto the image
3 drawing text on a picture
Generate two-dimensional code
public string Createqrcode (string md5str,string name,int sex) {string str = sex = = 1? "Sir": "Lady"; String Logopath = AppDomain.CurrentDomain.BaseDirectory + "/logo.png"; String Qrcodepath = path + DateTime.Now.ToString ("YYYYMMDDHHMMSS
();-> '23: 50: 26'Mysql> select CURTIME () + 0;-> 235026
NOW () SYSDATE () CURRENT_TIMESTAMPReturns the current date and time in 'yyyy-MM-DD HH: MM: ss' or YYYYMMDDHHMMSS format, depending on whether the function is in a string or in a numberThe context is used.Mysql> select NOW ();-> '2017-12-15 23:50:26'Mysql> select NOW () + 0;-> 19971215235026
UNIX_TIMESTAMP () UNIX_TIMESTAMP (date)If no parameter is called, a Unix timestamp (in seconds starti
Generation ID template: year, month, day, hour, minute, and second + 6-bit auto-increment code, id Template
Because the order ID, product ID, or any ID is generated, and you do not want to use auto-increment, and are afraid of repetition, you can use the year and day minute and second + 6-digit auto-increment codes (a total of 20 characters) as the ID
NOTE: If your ID is of the Long type, you must note that the maximum length of Long is 19 BITs. If you want to convert it directly, you are advis
'TIME_FORMAT (time, format)Similar to DATE_FORMAT (), but TIME_FORMAT only processes hours, minutes, And seconds (other symbols generate a NULL value or 0)CURDATE ()CURRENT_DATE ()Returns the current date value in 'yyyy-MM-DD 'or YYYYMMDD format (depending on the context in which the returned value is a string or number)Mysql> select CURDATE ();-> '2017-12-15'Mysql> selectCURDATE () + 0;-> 19971215CURTIME ()CURRENT_TIME ()Returns the current time value in 'hh: MM: ss' or HHMMSS format (based on
ERROR. % r: // output the relative time after setting. % t: // output thread name % T: // output throwable details. %: // output %.Microlog. appender. FileAppender. File this attribute sets the folder name, the default path is the logs folder under the program external SD card data directory.Microlog. appender. FileAppender. Options sets the attributes of the output file.
% A: // append to the log file. if no, a new file is created. % f: // specify the date used to name the file. The specific d
dateFromString: s1];
// Convert the time format
NSDateFormatter * df2 = [[NSDateFormatteralloc] init]; // format
[Df2 setDateFormat: @ "yyyyMMddHHmmss"];
[Df2 setLocale: [[NSLocalealloc] initWithLocaleIdentifier: @ "zh_CN"];
NSLog (@ "% @", [df2stringFromDate: date]);Printed as "20140716155436"
Next is the second one:
Convert "20140716155436" to "15:54:36"
First, convert 20140716155436 to the time format.
// Convert the time format
NSDateFormatter
In. net, date-related computing is too simple. There is a direct method. Why is Java so troublesome!
Public static void main (string [] ARGs ){String strnow = "20060821010101"; // the current date in yyyymmddhhmmss formatString stradddays = "-100"; // calculate the date of the first 100 days
date dt = new date (strnow. substring (0, 4) + "/" + strnow. substring (4, 6) + "/" + strnow. substring (6, 8) + "" + strnow. substring (8, 10) + ":" +
hhmmss format, depending on whether the function is used in a string or in the context of a number.Mysql> select curtime ();-> '23: 50: 26'Mysql> select curtime () + 0;-> 235026
Now ()Sysdate ()Current_timestampReturns the current date and time in 'yyyy-MM-DD hh: mm: ss' or yyyymmddhhmmss format, depending on whether the function is in a string or in a numberThe context is used.Mysql> select now ();-> '2017-12-15 23:50:26'Mysql> select now () + 0;-
value or 0.Curdate ()Current_dateReturns today's date value in 'yyyy-MM-DD 'or yyyymmdd format, depending on whether the function is used in a string or numeric context.Mysql> select curdate ();-> '2017-12-15'Mysql> select curdate () + 0;-> 19971215
Curtime ()Current_timeReturns the current time value in 'hh: mm: ss' or hhmmss format, depending on whether the function is used in a string or in the context of a number.Mysql> select curtime ();-> '23: 50: 26'Mysql> select curtime () + 0;-> 23502
context of a number.Mysql> select curtime ();-> '23: 50: 26'Mysql> select curtime () + 0;-> 235026
Now ()Sysdate ()Current_timestampReturns the current date and time in 'yyyy-MM-DD hh: mm: ss' or yyyymmddhhmmss format, depending on whether the function is in a string or in a numberThe context is used.Mysql> select now ();-> '2017-12-15 23:50:26'Mysql> select now () + 0;-> 19971215235026
Unix_timestamp ()Unix_timestamp (date)If no parameter is called,
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.