Updates from July, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • admin 4:41 pm on July 5, 2009 Permalink | Reply
    Tags: sablog,   

    博客升级成WordPress 2.8,发布转换器! 

    一直使用sablog-x 2.0快两年多了。但由于无法忍受它把我博客文章中的代码整得乱七八糟,今天下定决心转换成WP。

    模板使用了NeoEast的Inove,感谢作者的劳动!http://www.neoease.com/

    同时采用了WP-Syntax 插件处理我博客文章中的大量代码,感觉还可以。

    顺便分享一下我转换时写的博客转换器。

    完美转换博客名字、简介,用户、文章、评论、Trackbacks、友情链接。
    已知问题:
    1. 标签并没有正常转换。
    2. 友情链接并没有正确归入Blogroll类别。

    转换器下载:converter

     
    • zsl 2:56 pm on July 7, 2009 Permalink | Reply

      兄弟 怎么转换呀,能不能具体一点呀,谢谢了

    • sharmy 11:54 am on July 20, 2009 Permalink | Reply

      哈哈,你娃终于投入wp的怀抱了。

  • admin 1:48 pm on October 29, 2008 Permalink | Reply
    Tags:   

    A Minimal Joomla component 

     

    It is designed for Joomla 1.5.x, if you want it to work with joomla 1.0.x, an extra modification will be needed.

    Change

    <install type="component" version="1.5.0">

    To

    <install type="component" version="1.0.0">

    This a minimal joomla component. It is a real joomla component but it does nothing but saying hello.

    It is a good base to develop a new joomla component.

     
  • admin 9:51 am on October 7, 2008 Permalink | Reply
    Tags: , slimbox   

    Slimbox With Iframe support 

    This is a modified version of slimbox, with a iframe support added.

    Find:

    this.eventPosition = this.position.bind(this);

    Add a new line after it:

    this.body = top.document.body;

    Find:

    .injectInside(document.body)

    Replace with:

    .injectInside(this.body)

    Done.

    Modified slimbox.js file can be download here:

    [attach=140]

     
  • admin 4:46 pm on August 14, 2008 Permalink
    Tags:   

    Beijing Olympic Medal Board 

    A simple extension for firefox. It makes easier to check out the Olympic game medal status.

    Install It Now (Upgraded to Version 1.1)

    金牌快速查看。

    V1.2 更新

    舍弃FF自带的Components.utils.import("resource://gre/modules/JSON.jsm");使用json.org的类来解析json数据。

    V1.1 更新:
    1. 支持同时显示几个国家
    2. 显示国旗

    增加Version 1.1的截图。

    [attach=139]

    version 1.0

    [attach=138]

     
    • Seaprince 5:11 pm on August 15, 2008 Permalink

      更新:
      1. 支持同时显示几个国家
      2. 显示国旗

    • admin 5:03 pm on July 16, 2009 Permalink

      Hello, there is no ads accepted on my site right now. Thanks for focusing.

  • admin 9:17 pm on August 5, 2008 Permalink | Reply
    Tags:   

    PHP探针iProber修正版 v1.0 

    旧版无法支持最新的硬件,此版本为修正版本。支持主流硬件的识别。

    或许后期还会追加一些新功能。

    演示:http://u.eaxi.com/iprober/iprober.php

    UPDATE:

    添加SVN:http://svn.zhpanel.com/iprober

     
  • admin 3:45 pm on August 3, 2008 Permalink | Reply
    Tags:   

    PHP4, PHP5, PHP6自由选择 

    今天给服务器装起了PHP4, PHP5, PHP6,并且可以让用户通过.htaccess自由选择PHP版本。同时也对mod_fcgid的的用法有了更深入的了解。

    安装方法
    PHP4:
    http://blog.eaxi.com/wiki/index.php/Installing_PHP4

    PHP5:
    http://blog.eaxi.com/wiki/index.php/Installing_PHP5

    PHP6:
    http://blog.eaxi.com/wiki/index.php/Installing_PHP6

    使用方法

    把后缀.php4的文件定义为PHP4文件。
    AddType application/x-httpd-php .php4
    AddHandler php4-script .php4
    Action php4-script /php4-bin/php-cgi

    把后缀.php5的文件定义为PHP5文件。
    AddType application/x-httpd-php .php5
    AddHandler php5-script .php5
    Action php5-script /php5-bin/php-cgi

    把后缀.php6的文件定义为PHP6文件。
    AddType application/x-httpd-php .php6
    AddHandler php6-script .php6
    Action php6-script /php6-bin/php-cgi

    系统默认使用PHP5来解析.php的文件,你可以覆盖这个设置,用其他版本PHP来解析.php文件。
    AddType application/x-httpd-php .php
    AddHandler php-script .php
    Action php-script /php5-bin/php-cgi

    前提
    Apache必须有mod_actions, mod_fcgid支持。

    DEMO:

    http://u.eaxi.com/phpinfo.php4
    http://u.eaxi.com/phpinfo.php5
    http://u.eaxi.com/phpinfo.php6
    http://u.eaxi.com/phpinfo.php

    请留言报告BUG。。呵呵!

     
  • admin 2:52 pm on August 2, 2008 Permalink | Reply
    Tags: MooTools   

    Image Crop For Mootools 

    A very cool image crop tool for mootools 1.11.

    Check out the demo here: http://blog.eaxi.com/demo/js/crop/index_en.htm

    Using Mouse:

    • Drag the image to change the image position on the fly.
    • Use the mouse wheel to zoom in or zoom out the image.
    • Double click to submit the selection.

    Using Keyboard:

    • Press key <I>(Zoom In), <O>(Zoom Out) to resize the image.
    • Use Up, Down, Left, Right keys to move the image.
    • Hit the enter key to submit the selection.

    鼠标操作技巧:

    • 可以用鼠标拖动更改位置
    • 可以用鼠标滚轮缩放
    • 双击选区提交

    键盘操作技巧:

    • 用键盘的I(Zoom In,放大)、O(Zoom Out,缩小)键控制图片缩放。
    • 用键盘的上、下、左、右方向键控制图片位置。
    • 直接回车提交
     
  • 6:16 pm on July 14, 2008 Permalink | Reply  

    C语言 程序时间统计器 

    Unix command time for windows.

    C++代码
    1. // time.cpp : Defines the entry point for the console application.  
    2. //  
    3.   
    4. #include <stdio.h>  
    5. #include <time.h>  
    6. #include <windows.h>  
    7.   
    8. int gettime() {  
    9.     time_t t;  
    10.     time(&t);  
    11.     return t;  
    12. }  
    13. void printtime(int t) {  
    14.     char buf[20];  
    15.     if (t<0) sprintf(buf,"%d s",0);  
    16.     else if (t<60) sprintf(buf,"%d s",t);  
    17.     else if (t<3600) sprintf(buf,"%d m %d s",t/60, t%60);  
    18.     else sprintf(buf,"%d h %d m %d s",t/3600, (t%3600)/60, (t%3600)%60);  
    19.     puts(buf);  
    20. }  
    21.   
    22. int main(int argc, char* argv[])  
    23. {  
    24.     if(argc<2) {  
    25.         puts("Nothing to run.");  
    26.         return 0;  
    27.     }  
    28.     STARTUPINFO si={0};  
    29.     PROCESS_INFORMATION pi;  
    30.     int i,t1,t2;  
    31.     char argstr[MAX_PATH]={""};  
    32.   
    33.     si.cb=sizeof(STARTUPINFO);  
    34.     t1=gettime();  
    35.     for(i=1;argv[i];i++) {  
    36.         strcat(argstr,argv[i]);  
    37.         strcat(argstr," ");  
    38.     }  
    39.     //puts(argv[1]);  
    40.     //printf("%d\n",t1);  
    41.   
    42.     if(CreateProcess(NULL,argstr,NULL,NULL,FALSE,0,NULL,NULL,&si,π)) {  
    43.         WaitForSingleObject(pi.hProcess,INFINITE);  
    44.         t2=gettime();  
    45.         //printf("%d\n",t2);  
    46.         printtime(t2-t1);  
    47.     } else {  
    48.         printf("Unable to run app!");  
    49.     }  
    50.     return 0;  
    51. }  

    仿linux的time程序。

     
  • admin 5:51 pm on March 10, 2008 Permalink | Reply
    Tags:   

    判断文件是否为图片的函数 

    PHP代码
    1. /**  
    2.  * Detect if a file is valid image file  
    3.  *  
    4.  * @param String $file  
    5.  * @return Boolean  
    6.  * @author Seaprince  
    7.  * @since 10/3/2008  
    8.  */  
    9. function is_image_file($file) {   
    10.     // Pass 1   
    11.     if (!is_file($file)) return false;   
    12.     // Pass 2   
    13.     $allowed_ext = array(‘.jpg’,‘.gif’,‘.png’);   
    14.     $ext = strtolower(strrchr($file,‘.’));   
    15.     if (!in_array($ext$allowed_ext)) return false;   
    16.     // Pass 3   
    17.     list($w,$h,$t,$a) = @getimagesize($file);   
    18.     return $w && $h && $t && $a;   
    19. }  

    一个自我感觉不错的判断一个文件是否为合格图片的函数。

    如果怕getimagesize会耗资源,可以不要这一个。

     
  • admin 7:21 pm on February 14, 2008 Permalink | Reply
    Tags: , ,   

    Beesn Server Package 

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel