linux ÏÂc++¼°mysql¶Ôʱ¼ä´¦ÀíµÄ³£Óü¼ÇÉ
mysql ½Øȡijһ¸öʱ¼ä(datetimeÀàÐÍ)µÄÈÕÆÚ£º
·½·¨1£ºselect date(row_name) from table_name where row = row1;
·½·¨2£ºselect left(row_name, 10) from table_name where row = row1;
·½·¨3£ºselect cast(row_name as char[10]) from table_name where row = row1;
È¡µÃij¸öÈÕÆÚµÄtime_tÊýÖµ£ºselect unix_timestamp(date(row_name)) from table_name where row = row1;
ÒÔtime_tΪ²ÎÊýÈ¡µÃij¸öʱ¼ä
time_t ÊÇ'1970-01-01 00:00:00'ÒÔÀ´µÄÃëÊý
select '1970-01-01 00:00:00'+ INTERVAL time_t_num SECOND ;
È¡µÃµ±Ç°ÈÕÆÚ£ºselect curdate();
È¡µÃµ±Ç°Ê±¼ä£ºselect now();
½«ÈÕÆÚת»¯Îª¶ÌÈÕÆÚ¸ñʽ
SELECT REPLACE(date(row_name), '-0', '-');
linuxÏÂc++³£ÓÃʱ¼ä´¦Àíº¯Êý
clock()ÓÃÀ´³ÌÐò¼Æʱ
ÀýÈ磺 ÒÔÏÂÕª×Ô
#include “stdio.h”
#include “stdlib.h”
#include “time.h”
int main( void )
{
long i = 10000000L;
clock_t start, finish;
double duration;
/* ²âÁ¿Ò»¸öʼþ³ÖÐøµÄʱ¼ä*/
printf( "Time to do %ld empty loops is ", i );
start = clock();
while( i-- ) ;
finish = clock();
duration = (double)(finish - start) / CLOCKS_PER_SEC;
printf( "%f seconds\n", duration );
system("pause");
}
ʾÀý³ö´¦£ºDIY²¿Âä(http://www.diybl.com/course/3_program/vc/vc_js/20090307/159296.html)
time_tÀàÐÍ
time_t t = time(NULL);
time_tת³ÉtmÀàÐÍ
struct tm* t_tm = localtime(time(NULL));
time_tת³É×Ö·û´®¸ñʽ
struct tm* tm_ago = localtime(&t);
sprintf(date_days_ago, "%04d-%02d-%02d", 1900+tm_ago->tm_year,
tm_ago->tm_mon+1, tm_ago->tm_mday);
time_t t_now = time(NULL); //seconds since 1970-01-01
struct
Ïà¹ØÎĵµ£º
°²×°×¼±¸£º
ÏÂÔØÎļþ
l Oracle Database 10g Release 2(10.2.0.1) Software
½âѹÎļþ
½âѹÎļþÃüÁ
unzip 10201_database_linux32.zip
½âѹºóµÄÎļþ¼Ð¿ÉÄÜ“database”»ò“db/Disk1”
HostsÎļþ
ÔÚ/etc/hosts ÎļþÖаüº¬Ò»¸öÍêÕûºÏ· ......
£¨1£©¡¢yum°²×°mysql
//yum°²×°
yum -y install mysql mysql_server
//ÔÚ·þÎñÇåµ¥ÖÐÌí¼Ómysql·þÎñ
chkconfig --add mysqld
//·þÎñÆô¶¯
service mysqld start
//³õʼ»¯mysqlÊý¾Ý¿â
/usr/bin/mysql_secure_installation
£¨2£©¡¢°²×°apache
yum -y install httpd
service httpd start
Ìí¼ÓiptablesÔÊÐí·Ã ......
ÔÎĵØÖ· http://johnylai.blog.sohu.com/63406924.html
µäÐ͵ÄḬ̈߳üÀ¨Ò»¸öÔËÐÐʱ¼äϵͳ£¬Ëü¿ÉÒÔ°´Í¸Ã÷µÄ·½Ê½À´¹ÜÀíÏ̡߳£Í¨³£Ḭ̈߳ü°üÀ¨¶ÔÏ̵߳Ĵ´½¨ºÍɾ³ý£¬ÒÔ¼°¶Ô»¥³âºÍÌõ¼þ±äÁ¿µÄµ÷Óá£POSIX±ê×¼Ï߳̿â¾ßÓÐÕâЩµ÷Óá£ÕâЩ°ü»¹ÌṩÏ̵߳Ķ¯Ì¬´´½¨ºÍɾ³ý£¬Òò´Ë£¬Ö±µ½ÔËÐÐʱ¼ä֮ǰ£¬Ï̵߳ĸöÊý²»±ØÖªµÀ¡£
  ......
1¡¢PHP·¢ËÍÖÐÎÄ¡¢Ajax½ÓÊÕ
Ö»ÐèÔÚphp¶¥²¿¼ÓÈëÒ»¾ä£º
header('Content-type: text/html;charset=GB2312');
xmlHttp»áÕýÈ·½âÎöÆäÖеÄÖÐÎÄ¡£
2¡¢Ajax·¢ËÍÖÐÎÄ¡¢PHP½ÓÊÕ
Õâ¸ö±È½Ï¸´ÔÓ£º
AjaxÖÐÏÈÓÃencodeURIComponent¶ÔÒªÌá½»µÄÖÐÎĽøÐбàÂë
PHPÖУº
$GB2312string=iconv( ‘UTF-8′, ‘gb2312//I ......