手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表Tag:thinkphp

经典格斗游戏《街头霸王4》试玩截图

由CAPCOM负责开发的格斗游戏《街头霸王4》(Street Fighter 4)最新试玩截图公布,本作将承袭系列作传统2D玩法,并采用最新的3D绘图技术,以更华丽的方式重现原作独特的2D绘图风格。PC版发售日期未 定,XBOX360/PS3即将2月17日发售。

另外,CAPCOM透露将推出内含限量非卖版人偶模型(PS3 版为隆,Xbox 360 版为深红毒蛇)、Studio 4C 制作之65分钟高分辨率动画影片(PS3版为BD蓝光影片,Xbox 360 版为专用高分辨率DVD影片,非一般 DVD 影片)、原声配乐 CD、攻略指引手册与独家下载内容的典藏版,定价 79.99美元。

以上内容来自于:http://www.lingaoyi.com/screens/new-street-fighter-4-screenshots/,同时以下图片也来自于该站(我只取了两张与我有关的图片)

更多图片请去该网站查看。。。

大小: 85.45 K
尺寸: 500 x 283
浏览: 1985 次
点击打开新窗口浏览全图

大小: 85.29 K
尺寸: 500 x 283
浏览: 1934 次
点击打开新窗口浏览全图

Tags: game, sf4, classic, gouki, ryu

QEE PHP 发布

QEEPHP终于发布了,没有看到廖羽雷吃笔记本,也是一种遗憾。

要知道QeePHP可是让人等了整整一年,当年论坛上就有人说:宁可相信世上有鬼也不相信老廖的嘴。可见让人有多失望

不过,在昨天凌晨的时候,QeePHP还是提供了下载,不过下载完了之后还没有时间仔细观摩。

初步看了一下,目录结构与ZF相类似,自动加载类库也使用了spl_auto_load,因为使用了这个函数,造成的后果是,文件名全部是小写了。呵呵(不知道原因的可以去查看这个函数)

其他还没有仔细看。

可以先看官方:http://qeephp.com

Tags: php, framework, qeephp, fleaphp, 廖羽雷

Mysql时间函数

说实话,在我的应用当中,很少会用到这些MYSQL自带的时间函数,除非是在使用PHPMYADMIN的时候,于是,经常在有人问我,时间上加一天怎么办,减一天怎么办,当前月的最后一天怎么处理,上个月的今天到这个月的今天怎么搞,我都是临时翻手册来加以解释。毕竟大多数的情况下,我们都是会把这些处理交给PHP计算好再使用SQL查询,而真的很少利用自带函数。

在看到Taobao的DBA们把它们整理出来时,不禁暗暗 的YING笑了一番,以后方便了,不用找手册了。。。。。

原文:http://rdc.taobao.com/blog/dba/html/234_mysql_date_func.html

作者:丁原 

内容:

通常我们会有一些时间的转换需求,比如要统计某个时间段的收入,比如要截取某个时间的年份,比如要根据某个日期推算出是星期几等个,这些都可以通过Mysql自带的时间函数很容易实现。因为我对Mysql的函数还不熟,而通常又会调用这些时间函数,这边稍加总结以便查询。
–返回当前时间

mysql> select now(),date(now()),sysdate();
+---------------------+-------------+---------------------+
| now()               | date(now()) | sysdate()           |
+---------------------+-------------+---------------------+
| 2008-12-02 10:11:36 | 2008-12-02  | 2008-12-02 10:11:36 |
+---------------------+-------------+---------------------+
1 row in set (0.00 sec)
mysql> select curdate(),curdate()+0,curtime(),curtime()+0;       
+---------------------+-------------+---------------------+
| curdate()  | curdate()+0 | curtime() | curtime()+0   |
+---------------------+-------------+---------------------+
| 2008-12-02 | 20081202    | 10:00:33  | 100033.000000 |
+---------------------+-------------+---------------------+

–返回日期当月最后一天

mysql> select last_day('2008-12-02');
+------------------------+
| last_day('2008-12-02') |
+------------------------+
| 2008-12-31             |
+------------------------+
1 row in set (0.00 sec)

–返回日期的星期几

mysql> select dayname('2008-12-02'),dayofweek('2008-12-02');
+-----------------------+-------------------------+
| dayname('2008-12-02') | dayofweek('2008-12-02') |
+-----------------------+-------------------------+
| tuesday               |                       3 |
+-----------------------+-------------------------+
1 row in set (0.00 sec)

–返回日期的年,月,日

mysql> select month('2008-12-02'),year('2008-12-02'),day('2008-12-02');
+---------------------+--------------------+-------------------+
| month('2008-12-02') | year('2008-12-02') | day('2008-12-02') |
+---------------------+--------------------+-------------------+
|                  12 |               2008 |                 2 |
+---------------------+--------------------+-------------------+
1 row in set (0.00 sec)

–返回日期的小时,分,秒

mysql> select hour('10:05:03'),minute('10:05:03'),second('10:05:03');       
+------------------+--------------------+--------------------+
| hour('10:05:03') | minute('10:05:03') | second('10:05:03') |
+------------------+--------------------+--------------------+
|               10 |                  5 |                  3 |
+------------------+--------------------+--------------------+
1 row in set (0.00 sec)

1.subdate(d,t):起始时间加上一段时间(year,month,day…)

mysql> select date_add('1998-01-02', interval 31 day),adddate('1998-01-02', 31);     
+-----------------------------------------+---------------------------+
| date_add('1998-01-02', interval 31 day) | adddate('1998-01-02', 31) |
+-----------------------------------------+---------------------------+
| 1998-02-02                              | 1998-02-02                |
+-----------------------------------------+---------------------------+
1 row in set (0.00 sec)
mysql> select date_add('1998-01-02',interval 2 year);
+-----------------------------------------------------+
| date_add('1998-01-02', interval 2 year)
+-----------------------------------------------------+
| 2000-01-02                                 
+-----------------------------------------------------+
1 row in set (0.00 sec)
mysql> select date_add('1998-01-02', interval 2 hour);
+-----------------------------------------------------+
| date_add('1998-01-02', interval 2 hour)
+-----------------------------------------------------+
| 1998-01-02 02:00:00                   
+-----------------------------------------------------+
1 row in set (0.00 sec)

2.subdate(d,t):起始时间减去一段时间

mysql> select subdate('1998-01-02', interval 31 day),subdate('1998-01-02', 31);
+----------------------------------------+---------------------------+
| subdate('1998-01-02', interval 31 day) | subdate('1998-01-02', 31) |
+----------------------------------------+---------------------------+
| 1997-12-02                             | 1997-12-02                |
+----------------------------------------+---------------------------+
1 row in set (0.00 sec)

3.addtime(d,t):起始时间d加入时间t

mysql> select addtime('1997-12-31 23:59:50','00:00:05'), addtime('23:59:50','00:00:05') ;
+-------------------------------------------+--------------------------------+
| addtime('1997-12-31 23:59:50','00:00:05') | addtime('23:59:50','00:00:05') |
+-------------------------------------------+--------------------------------+
| 1997-12-31 23:59:55                       | 23:59:55                       |
+-------------------------------------------+--------------------------------+
1 row in set (0.00 sec)

4.subtime(d,t):起始时间d减去时间t

mysql> select subtime('1997-12-31 23:59:50','00:00:05'), subtime('23:59:50','00:00:05');     
+-------------------------------------------+--------------------------------+
| subtime('1997-12-31 23:59:50','00:00:05') | subtime('23:59:50','00:00:05') |
+-------------------------------------------+--------------------------------+
| 1997-12-31 23:59:45                       | 23:59:45                       |
+-------------------------------------------+--------------------------------+
1 row in set (0.00 sec)

5.datediff(d1,d2):返回起始时间d1和结束时间d2之间的天数

mysql> select datediff('1997-12-31 23:59:59','1997-12-30');
+----------------------------------------------+
| datediff('1997-12-31 23:59:59','1997-12-30') |
+----------------------------------------------+
|                                            1 |
+----------------------------------------------+
1 row in set (0.00 sec)

6.date_format(date,format):根据format字符串显示date值的格式

mysql> select date_format('2008-12-02 22:23:00', '%y %m %m %h:%i:%s');
+---------------------------------------------------------+
| date_format('2008-12-02 22:23:00', '%y %m %m %h:%i:%s') |
+---------------------------------------------------------+
| 2008 12 12 22:23:00                                     |
+---------------------------------------------------------+
1 row in set (0.00 sec)

7.str_to_date(str,format) 字符串转化为时间

mysql> select str_to_date('04/31/2004', '%m/%d/%y %h:%i:s');
+-----------------------------------------------+
| str_to_date('04/31/2004', '%m/%d/%y %h:%i:s') |
+-----------------------------------------------+
| 2004-04-31 00:00:00                           |
+-----------------------------------------------+
1 row in set (0.00 sec)

8.timestamp(expr) , timestamp(expr,expr2) :
对于一个单参数,该函数将日期或日期时间表达式 expr 作为日期时间值返回.对于两个参数, 它将时间表达式 expr2添加到日期或日期时间表达式 expr 中,将theresult作为日期时间值返回

mysql> select timestamp('2003-12-31'), timestamp('2003-12-31 12:00:00','12:00:00');
+-------------------------+---------------------------------------------+
| timestamp('2003-12-31') | timestamp('2003-12-31 12:00:00','12:00:00') |
+-------------------------+---------------------------------------------+
| 2003-12-31 00:00:00     | 2004-01-01 00:00:00                         |
+-------------------------+---------------------------------------------+
1 row in set (0.00 sec)

9.取当天0点0分,下一天0点0分

mysql> select timestamp(date(sysdate())),timestamp(adddate(date(sysdate()),1));     
+----------------------------+---------------------------------------+
| timestamp(date(sysdate())) | timestamp(adddate(date(sysdate()),1)) |
+----------------------------+---------------------------------------+
| 2008-12-02 00:00:00        | 2008-12-03 00:00:00                   |
+----------------------------+---------------------------------------+
1 row in set (0.00 sec)

--EOF--

Tags: mysql, database, 时间函数

纪念那逝去的生命:71周年

纪念那逝去的年华,那些生命的远离在我们心中是永远的痛,71周年了,这些年人,国人均应当没齿不忘,当然对于某些崇洋媚X的人例外。

悉闻南京各大中小学均在纪念,不禁还是有几分暗暗高兴,几年后几十年后,或许会有人淡忘,也会有所谓的友好。但身为一名中国人,对于历史是永远不能遗忘的。

短文以作纪念。

(背景:一九三七年十二月十三日至一九三八年一月的六个星期时间里,侵华日军制造了惨绝人寰的南京大屠杀,中国同胞三十多万人遇害,南京城三分之一以上街道和建筑物被毁。一九九四年起,南京市民每年在十二月十三举行集体悼念活动,牢记国耻,祈祷和平。http://www.chinanews.com.cn/gn/news/2008/12-13/1485861.shtml)

 

Tags: 纪念, 南京

为windows的WEB服务器添加高性能的FTP组件

在windows服务器里面,如果我们要用FTP函数,速度应该是很慢的,而且效率不高,如果有大量文件需要上传,用自带的FTP函数,恐怕是要死人的吧。
windows服务器,windows哦,可以装N多软件的windows哦。虽然不建议在服务器上装上很多软件,但是也可以装一些FTP软件的嘛。这里以cuteftp举例。
cuteftp安装完毕后,会在软件目录里有一个Scripts目录,现在的版本不象很久以前的了,如今的版里只有一个Sample.vbs,记得几年前的cuteftp里面会有各种各样的vbs文件的。
闲话不多说,打开vbs文件,内容为:

ASP/Visual Basic代码
  1. 'This default template script is in VBScript. You can write scripts in your language of choice and save them with the proper extension, or use your an editor specific to that language.  
  2. 'See the TESDK help file for more details on how the scripting feature works and for information on each supported method and property.  
  3. 'You must have Windows Scripting Host installed for the COM enabled engine to work. Run the Transfer Engine once to register it (as a COM object) on the target system.  
  4. 'If you're having problems with running scripts while not logged in, or when trying to run them using MS scheduler, refer to our online knowledgebase for help (http://www.globalscape.com/support)  
  5. 'Look into c:\temp folder to observe local activity (for testing purposes) or right click on the Transfer Engine icon in the systray and select "show current transfers"  
  6. 'This sample script performs an anonymous login to ftp://ftp.globalscape.net  
  7.    'First declare a variable called Mysite. This will hold the reference to the TE COM object.  
  8.    Dim MySite  
  9.    'Create a connection object and assign it to the variable  
  10.    Set MySite = CreateObject("CuteFTPPro.TEConnection")  
  11.    ' Now set each property for the site connection   
  12.    ' You can omit this section to use the default values, but you should at least specify the Host  
  13.    'The default Protocol is FTP, however SFTP (SSH2), FTPS (SSL), HTTP, and HTTPS can also be used)  
  14.    MySite.Protocol = "FTP"  
  15.    MySite.Host = "ftp.globalscape.com"  
  16.    'following lines are optional since the default is anonymous if no login and password are defined  
  17.    MySite.Login = "anonymous"  
  18.    MySite.Password = "user@user.com"  
  19.    'if necessary, use the UseProxy method and ProxyInfo or SocksInfo properties to connect through a proxy server  
  20.    MySite.UseProxy = "BOTH"  
  21.    'now connect to the site (also called called implicitly when most remote methods are called)  
  22.    MySite.Connect  
  23.    'perform some logic to verify that the connection was made successfully  
  24.    If (Not Cbool(MySite.IsConnected)) Then    
  25.       MsgBox "Could not connect to: " & MySite.Host & "!"  
  26.       Quit(1)  
  27.    End If  
  28.    'The script will now check to see if the local folder c:\temp exists and will create it if necessary  
  29.    If (Not (MySite.LocalExists("c:\temp"))) Then  
  30.       MySite.CreateLocalFolder "c:\temp"  
  31.    End If  
  32.    'Change TE's local working folder to to c:\temp  
  33.    MySite.LocalFolder = "c:\temp"  
  34.    'Check for existence of remote folder "/pub/cuteftp"  
  35.    b = MySite.RemoteExists("/pub/cuteftp/")  
  36.    If (Not CBool(b)) Then  
  37.       'Verify existence of remote folder  
  38.       MsgBox "Remote folder not found!. Please make sure that the Pub folder exists on the remote site"  
  39.       Quit(1)  
  40.    End If  
  41.    'Now download the index file to the local destination folder  
  42.    MySite.Download "/pub/cuteftp/index.txt"  
  43.    'Complete.  Show the status of this transfer.  
  44.    MsgBox "Task done, final status is '" + MySite.Status + "'"  
  45.   MySite.Disconnect  
  46.   MySite.Close  
  47. 'End of sample script. You can save you script and then run it by either selecting it from the Tools > Run Script menu or by double clicking on the script file in Windows  

看到这样的文件,你应该知道如何调用一些FTP软件自带的方法了吧?现在,我们用PHP模拟一遍。。。。。
请看详细内容

» 阅读全文

Tags: ftp, com, windows, cuteftp, vbs

Records:2112345