02 2011 档案

摘要:以下都转载与http://plog.longwin.com.tw在 Windows 使用 GetText要在 Windows 使用 xgettext, msgmerge, msgfmt ... 等, 要安裝哪些東西?Windows 的 GetText 工具安裝於GetText for Windows下載 Binaries 版, 安裝即可. (假設安裝於 C:\gettext)GetText 所需相關 Library 安裝上述套件下載後, 於 Windows XP 會缺下述兩個 Library:libexpat.dlllibiconv2.dll可自行去尋找, 或者 直接下載 :gettext-d 阅读全文
posted @ 2011-02-24 10:06 Jake.Xu 阅读(2600) 评论(1) 推荐(0)
摘要:http://www.bjwindows.net/?action=show&id=16http://hi.baidu.com/luanxian/blog/item/31bdb31298f1c0cdc3fd78d9.htmlhttp://www.laruence.com/2011/02/13/1870.html 阅读全文
posted @ 2011-02-23 15:45 Jake.Xu 阅读(146) 评论(0) 推荐(0)
摘要:硬盘安装xubuntu-8.04于是,我下载了ubuntu-8.04.1-alternate-i386.iso,直接放到C盘。然后硬盘安装,刻盘安装的同学跳过此段。1、查看C盘,保证里面没有menu.lst文件(当然也可以是别的盘,不过C盘在Linux里面是(hda0,0)第一个硬盘的第一个分区,比较好记。D盘是(hda0,4),E盘是(hda0,5),以此类推)先要到 ——控制面板——文件夹选项修改,显示系统文件,显示已知扩展名。2.分区,分出来一个空闲的分区,最好是EXT3格式,其次是FAT32,最好不要用NTFS,有一部分Linux兼容起来比较麻烦。分区软件我推荐Paragon Part 阅读全文
posted @ 2011-02-22 15:08 Jake.Xu 阅读(1319) 评论(0) 推荐(0)
摘要:http://releases.ubuntu.com/10.04.2/ 阅读全文
posted @ 2011-02-22 14:52 Jake.Xu 阅读(116) 评论(0) 推荐(0)
摘要:Syntax: RewriteRule Pattern Substitution [flags]  一条RewriteRule指令,定义一条重写规则,规则间的顺序非常重要。对Apache1.2及以后的版本,模板(pattern)是一个POSIX正则式,用以匹配当前的URL。当前的URL不一定是用记最初提交的URL,因为可能用一些规则在此规则前已经对URL进行了处理。  对mod_rewrite来说,!是个合法的模板前缀,表示“非”的意思,这对描述“不满足某种匹配条件”的情况非常方便,或用作最后一条默认规则。当使用!时,不能在模板中有分组的通配 阅读全文
posted @ 2011-02-22 13:13 Jake.Xu 阅读(283) 评论(0) 推荐(0)
摘要:windows下apache配置虚拟主机方法一:对httpd.conf进行设置:1.注释以下三行#ServerAdmin#ServerName#DocumentRoot2.去掉mod_proxy.so和mod_proxy_ajp.so的注释3.#Virtual hosts#Include conf/extra/httpd-vhosts.conf (查找这行,把前面的#去掉)4.打开 /conf/extra/httpd-vhosts.conf#192.168.1.24为本地IpNameVirtualHost 192.168.1.24:80<VirtualHost 192.168.1.24: 阅读全文
posted @ 2011-02-22 09:42 Jake.Xu 阅读(195) 评论(0) 推荐(0)
摘要:http://www.tsingfeng.com/ 阅读全文
posted @ 2011-02-21 15:12 Jake.Xu 阅读(90) 评论(0) 推荐(0)
摘要:1.A Form of Madness2.How to Build Cross-Browser HTML5 Forms/ E2 N( Y6 [3 Fg3.Have a Field Day with HTML5 Forms4.Fun with HTML5 FormsCSS 代码:1.Styling a Simple Form using CSS32.Using CSS3 to style forms... 阅读全文
posted @ 2011-02-21 10:55 Jake.Xu 阅读(2939) 评论(0) 推荐(0)
摘要:1.HTML5 & CSS3 Readiness2.HTML5 Security Cheatsheet3.Button Maker4.When can I use…5.CSS3 Color Names6.CSS3 Generator7.Modernizr8.The HTML5 test9.CSS Border Radius10.FindMeByIP11.CSS3 Gradient Generato... 阅读全文
posted @ 2011-02-21 10:35 Jake.Xu 阅读(287) 评论(0) 推荐(0)
摘要:Question:I get the following error in Chrome's developer tools window when I try to set a cookie usingthisjQuery plugin:Uncaught Error: SECURITY_ERR: DOM Exception 18What does this error mean and how can I fix it? I get the same error when I usethisjQuery plugin.Answer:You're most likely using this 阅读全文
posted @ 2011-02-17 12:42 Jake.Xu 阅读(4135) 评论(0) 推荐(0)
摘要:jCarousel 是个非常好看又好用的内容滚动切换插件,可以实现按序水平或垂直方向的内容列表的切换。滚动切换的内容可以是静态的HTML内容,也可以是JS的对象列表,也可以是利用AJAX技术动态载入的内容。使用方法 使用此插件,需要在<head>标签内引入jQuery库,jCarousel源文件和CSS样式等:jCarousel在HTML文档中使用一个非常简单的HTML标记结构:jCarousel自动生成需要的HTML标记内容。class属性标明jCarousel使用的"name"名称的外观。应用jCarousel,需要在<head>标记内增加以下代码:jCarou 阅读全文
posted @ 2011-02-17 09:33 Jake.Xu 阅读(11401) 评论(0) 推荐(0)
摘要:http://www.phpchina.com/resource/manual/css/rdl_index.html属性(Properties)版本(Version)兼容性(Compatibility)简介(Description)文本属性 Text Propertiestext-indentCSS1IE4+ , NS4+检索或设置对象中的文本的缩进。text-overflowIE专有属性IE6+设置或检索是否使用一个省略标记(...)标示对象内文本的溢出。vertical-alignCSS1/CSS2IE4+ , NS4+设置或检索对象内容的垂直对其方式。text-alignCSS1IE4+ 阅读全文
posted @ 2011-02-14 14:47 Jake.Xu 阅读(1085) 评论(0) 推荐(0)
摘要:imagecopyresized()所生成的图像比较粗糙但速度快imagecopyresampled()对图像重新采样resampling,采用插值算法生成更平滑的图像,但速度慢(GD2.x新增) 阅读全文
posted @ 2011-02-14 10:33 Jake.Xu 阅读(409) 评论(0) 推荐(0)
摘要:GD and Image 函数gd_infogetimagesizeimage_type_to_extensionimage_type_to_mime_typeimage2wbmpimagealphablendingimageantialiasimagearcimagecharimagecharupimagecolorallocateimagecolorallocatealphaimagecoloratimagecolorclosestimagecolorclosestalphaimagecolorclosesthwbimagecolordeallocateimagecolorexactima 阅读全文
posted @ 2011-02-14 09:31 Jake.Xu 阅读(239) 评论(0) 推荐(0)
摘要:接口使用接口(interface),你可以指定某个类必须实现哪些方法,但不需要定义这些方法的具体内容。我们可以通过interface来定义一个接口,就像定义一个标准的类一样,但其中定义所有的方法都是空的。接口中定义的所有方法都必须是public,这是接口的特性。实现要实现一个接口,可以使用implements操作符。类中必须实现接口中定义的所有方法,否则 会报一个fatal错误。如果要实现多个接口,可以用逗号来分隔多个接口的名称。Note:实现多个接口时,接口中的方法不能有重名。Note:接口也可以继承,通过使用extends操作符。常量接口中也可以定义常量。接口常量和类常量的使用完全相同。 阅读全文
posted @ 2011-02-12 13:34 Jake.Xu 阅读(153) 评论(0) 推荐(0)
摘要:抽象类PHP5支持抽象类和抽象方法。抽象类不能直接被实例化,你必须先继承该抽象类,然后再实例化子类。抽象类中 至少要包含一个抽象方法。如果类方法被声明为抽象的,那么其中就不能包括具体的功能实现。继承一个抽象类的时候,子类必须实现抽象类中的所有抽象方法;另外,这些方法的可见性必须和抽象类中一样(或者更为宽松)。如果抽象类中某个抽象方法被声明为protected,那么子类中实现的方法就应该声明为protected或者public,而不 能定义为private。Example #1 抽象类代码示例&lt;?phpabstractclassAbstractClass{//强制要求子类定义这些方 阅读全文
posted @ 2011-02-12 13:32 Jake.Xu 阅读(161) 评论(0) 推荐(0)
摘要:Static关键字声明类成员或方法为static,就可以不实例化类而直接访问。不能通过一个对象来访问其中的静态成员(静态方法除外)。为了兼容PHP4,如果没有指定&ldquo;可见性&rdquo;,属性和方法默认为public。由于静态方法不需要通过对象即可调用,所以伪变量$this在静态方法中不可用。静态属性不可以由对象通过-&gt;操作符来访问。用::方式调用一个非静态方法会导致一个E_STRICT级别的错误。就像其它所有的PHP静态变量一样,静态属性只能被初始化为一个字符值或一个常量,不能使用表达式。 所以你可以把静态属性初始化为整型或数组,但不能指向另一个变量或 阅读全文
posted @ 2011-02-12 13:14 Jake.Xu 阅读(286) 评论(0) 推荐(0)
摘要:http://www.leapsoul.cn 阅读全文
posted @ 2011-02-11 13:19 Jake.Xu 阅读(130) 评论(0) 推荐(0)
摘要:支持以图片和文字两种方式给图片添加水印。图片支持GIF,PNG,JPG三种格式,水印图片支持PNG和GIFfunctionsetWater($imgSrc,$markImg,$markText,$TextColor,$markPos,$fontType,$markType){ $srcInfo=@getimagesize($imgSrc); $srcImg_w =$srcInfo[0]; $srcImg_h =$srcInfo[1]; switch($srcInfo[2]) { case1: $srcim=imagecreatefromgif($imgSrc); break; case2: $ 阅读全文
posted @ 2011-02-11 13:18 Jake.Xu 阅读(4240) 评论(2) 推荐(0)
摘要:functionresizeImage($im,$maxwidth,$maxheight,$name,$filetype){ $pic_width=imagesx($im); $pic_height=imagesy($im); if(($maxwidth&amp;&amp;$pic_width&gt;$maxwidth)||($maxheight&amp;&amp;$pic_height&gt;$maxheight)) { if($maxwidth&amp;&amp;$pic_width&gt;$maxwidth) { $ 阅读全文
posted @ 2011-02-11 13:14 Jake.Xu 阅读(17052) 评论(1) 推荐(0)
摘要:MySQL 函数mysql_ affected_ rowsmysql_ client_ encodingmysql_ closemysql_ connectmysql_ create_ dbmysql_ data_ seekmysql_ db_ namemysql_ db_ querymysql_ drop_ dbmysql_ errnomysql_ errormysql_ escape_ stringmysql_ fetch_ arraymysql_ fetch_ assocmysql_ fetch_ fieldmysql_ fetch_ lengthsmysql_ fetch_ objec 阅读全文
posted @ 2011-02-09 16:54 Jake.Xu 阅读(199) 评论(0) 推荐(0)
摘要:在PHP中,mysqli 已经很好的封装了mysql事务的相关操作。如下示例:view plaincopy to clipboardprint?$sql1="updateUsersetScoreCount=ScoreCount+10whereID='123456'";$sql2="updateScoreDetailsetFScore=300whereID='123456'";$sql3="insertintoScoreDetailID,Score)values('123456',60)" 阅读全文
posted @ 2011-02-09 16:17 Jake.Xu 阅读(428) 评论(0) 推荐(0)
摘要:1.PHP的文件上传/资源指令1.file_uploads=on/off2.max_execution_time=integer3.memory_limit=integer M4.upload_max_filesize=integer M5.upload_tmp_dir=string6.post_max_size=integer M2.$_FILES数组1.$_FILES['userfile']['error']2.$_FILES['userfile']['name']3.$_FILES['userfile'][& 阅读全文
posted @ 2011-02-09 13:37 Jake.Xu 阅读(242) 评论(0) 推荐(0)
摘要:1.验证日期bool checkdate(int month, int day, int year)2.格式化日期和时间string date(format[, timestamp])3.mixed gettimeofday([return_float])转换友好时间值4.getdate([timestamp])5.处理时间戳time()mktime(hour[,minute[,second[,month[,day[,year[,is_dst]]]]]])1.设置默认的本地化环境setlocale(mixed category,array locale)2.strftime(format[,t 阅读全文
posted @ 2011-02-09 11:01 Jake.Xu 阅读(182) 评论(0) 推荐(0)
摘要:1.获取路径的文件名basename(path[,suffix])2.获取路径的目录dirname(path)3.了解更多关于路径的信息array pathinfo(path)4.确定绝对路径realpath(path)1.确定文件大小filesize(filename)2.计算磁盘可用空间disk_free_space(directory)3.计算磁盘总容量disk_total_space(directory)1.确定文件的最后访问时间fileatime(filename)2.确定文件的最后改变时间filectime(filename)3.确定文件的最后修改时间filemtime(filen 阅读全文
posted @ 2011-02-09 09:59 Jake.Xu 阅读(227) 评论(0) 推荐(0)
摘要:http://book.cakephp.org/cn 阅读全文
posted @ 2011-02-01 15:03 Jake.Xu 阅读(171) 评论(0) 推荐(0)