Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java£¬php£¬mysqlʱ¼ä´¦Àí

javaÖÐʱ¼ä´ÁºÍʱ¼ä×Ö·û´®Ö®¼äµÄת»»
»ñÈ¡µ±Ç°µÄunixʱ¼ä´Á
new Date().getTime()
System.currentTimeMillis()
·µ»ØµÄÊǺÁÃëÊý£¬Òª×ª»»long t = System.currentTimeMillis()/1000;
»ñÈ¡µ±Ç°ÄêÔÂÈÕÒÔ¼°Ê±·ÖÃë
Calendar c = Calendar.getInstance();
c.get(Calendar.YEAR))  c.get(Calendar.YEAR))  c.get(Calendar.DATE)
½«UNIXʱ¼ä´Áת»»³Éʱ¼ä×Ö·û´®
new SimpleDateFormat("yyyy/MM/dd").format(new Date(timestamp*1000));
½«Ê±¼ä×Ö·û´®×ª»»³ÉUNIXʱ¼ä´Á
new java.text.SimpleDateFormat (”dd/MM/yyyy HH:mm:ss”).parse(”09/22/2008 16:33:00″).getTime()
ÔÚjavaÖÐ×Ö·û´®ºÍunixʱ¼ä´ÁÖ®¼äÓÐÒ»¸öÖÐרÀàÐÍÊÇDate
Date.getTime()  ÓÉDateµ½unixtime
new Date(unixtime)  ÓÉunixtimeµ½Date
×¢Ò⣺
Çë×¢Ò⣡¶ÔÓ벻ͬµÄÊ±Çø´¦ÀíÉÏÓвîÒ죬Ê×ÏÈÒªÇå³þ×Ô¼ºËùÔÚµÄÊ±Çø¡£
String timezone_info = System.getProperty(”user.timezone”);
System.out.println(”µ±Ç°µÄÊ±Çø:”+timezone_info);
System.out.println(”Ê±ÇøÐÅÏ¢:”+TimeZone.getDefault());
Êä³ö£º
µ±Ç°µÄÊ±Çø:Asia/Shanghai
Ê±ÇøÐÅÏ¢:sun.util.calendar.ZoneInfo[id="Asia/Shanghai",offset=28800000,
dstSavings=0,useDaylight=false,transitions=19,lastRule=null]
´¦Àí²»Í¬µÄÊ±ÇøµÄ·½·¨£º
SimpleDateFormat sd = new SimpleDateFormat(”yyyy-MM-dd HH:mm:ss”);
sd.setTimeZone(TimeZone.getTimeZone(”GMT+8″));
String strDate = sd.format(new Date(1215782027390L));
System.out.println(”Õý°ËÇøµ±Ç°Ê±¼ä:”+strDate);
Êä³ö£º
Õý°ËÇøµ±Ç°Ê±¼ä:2008-07-11 21:13:47
phpÖÐʱ¼ä´ÁºÍʱ¼ä×Ö·û´®Ö®¼äµÄת»»
mktime()
date("format", unixtime)
time()
date('Y')
mysqlÖÐʱ¼ä´ÁºÍʱ¼ä×Ö·û´®Ö®¼äµÄת»»
°Ñʱ¼ä×Ö·û´®×ªÎªunixʱ¼ä´Á£¨¸ñʽҪYYYY-mm-dd hh:ii:ss) ¼´Êý¾Ý¿âÖÐtimestampÉú³ÉµÄ
UNIX_TIMESTAMP(date)
°Ñunixʱ¼ä´ÁתΪʱ¼ä×Ö·û´®
DATE_FORMAT(date,format)
»ñÈ¡µ±Ç°Ê±¼ä£¨unixʱ¼ä´Á£©
now
¸ù¾Ýformat×Ö·û´®¸ñʽ»¯dateÖµ¡£
%M ÔÂÃû×Ö(January……December)
%W ÐÇÆÚÃû×Ö(Sunday……Saturday)
%D ÓÐÓ¢Óïǰ׺µÄÔ·ݵÄÈÕÆÚ(1st, 2nd, 3rd, µÈµÈ¡££©
%Y Äê, Êý×Ö,


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔǰ£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

MySQLÖ®¶¯Ì¬±íÌØÕ÷

Èç¹ûÒ»¸öMyISAM±í°üº¬Èκοɱ䳤¶ÈÁУ¨VARCHAR, BLOB»òTEXTDynamic£©£¬»òÕßÈç¹ûÒ»¸ö±í±»ÓÃROW_FORMAT=DYNAMICÑ¡ÏîÀ´´´½¨£¬¶¯Ì¬´æ´¢¸ñʽ±»Ê¹Óá£
 
Õâ¸ö¸ñʽ¸üΪ¸´ÔÓÒ»µã£¬ÒòΪÿÐÐÓÐÒ»¸ö±íÃ÷ÐÐÓж೤µÄÍ·¡£µ±Ò»¸ö¼Ç¼ÒòΪ¸üеĽá¹û±»±äµÃ¸ü³¤£¬¸Ã¼Ç¼Ҳ¿ÉÒÔÔÚ³¬¹ýÒ»¸öλÖô¦½áÊø¡£
 
Äã¿ÉÒÔʹÓÃOPTIMIZE TAB ......

MySQL¹ÜÀíÔ±Ö¸ÄÏÖ®

ÎȹʶøÖªÐ£¬×î½üÓÖÓõ½ÁË£¬²Ý²ÝÄÃÀ´ÎÂϰһÏ£º×ª×Ô http://www.bccn.net/Article/sjk/mysql/jc/200601/3411.html
MySQL¹ÜÀíÔ±Ó¦¸ÃÖªµÀÈçºÎÉèÖÃMySQLÓû§Õ˺ţ¬Ö¸³öÄĸöÓû§¿ÉÒÔÁ¬½Ó·þÎñÆ÷£¬´ÓÄÄÀïÁ¬½Ó£¬Á¬½ÓºóÄÜ×öʲô¡£MySQL
3.22.11¿ªÊ¼ÒýÈëÁ½ÌõÓï¾äʹµÃÕâÏ×÷¸üÈÝÒ××ö£ºGRANTÓï¾ä´´½¨MySQLÓû§²¢Ö¸¶¨ÆäȨÏÞ£¬¶øREV ......

½«MySQLÖÐsqlÔËÐнá¹û±£´æµ½Îļþ

 ÓÐÁ½ÖÖ·½·¨¡£
·½·¨Ò»£ºÔÚmysql>Ìáʾ·ûÖÐʹÓÃtee
mysql> tee output.txt
Logging to file 'output.txt'
mysql> notee
Outfile disabled.
»òÕß
mysql> \T output.txt
Logging to file 'output.txt'
mysql> \t
Outfile disabled.
Õâ¸öÀàËÆÓÚsqlplusµÄspool¹¦ÄÜ£¬¿ÉÒÔ½«ÃüÁîÐÐÖеĽá¹û±£´æµ½Í ......

PHP

ÎÒÊÇѧµç×ÓÉÌÎñµÄѧÉú£¬Ö÷Ҫѧϰ·½ÏòÊǵç×ÓÉÌÎñ¼¼Êõ²ãÃæµÄ¶«Î÷¡£Ñ§ÁËÒ»Äê¶àµÄʱ¼äÁË£¬¸Ð¾õСÓÐÊÕ»ñ¡£
ǰ¶Îʱ¼ä³öÈ¥ÃæÊÔflashµÄʱºò·¢ÏÖ×Ô¼ººÍ±ðÈ˵ÄÒªÇó²î¾àÉõÔ¶£¬»Øµ½Ñ§Ð£ºóŬÁ¦µÄѧϰPHP£¬×ÔÎҸоõ»¹²»´í£¬È«°àֻʣϼ¸¸öÈËÔÚѧºǫ́ÓïÑÔÁË£¬²»ÖªµÀÊÇÒòΪÓÐÁËÉÏÒ»´ÎµÄ´ò»÷»¹ÊÇÒòΪÎÒÊʺÏѧPHP£¬×ÔÈÏΪѧµÃ±È½Ï¿ì£¬ÖÁÉÙ±ÈÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ