摘要:
用gd网图片里写文字gd的bug是毫无疑问的。 问题是怎么解决。1:重新编译查找了一下php.ini的设置没有发现相关选项,于是又一个问题来了,这个默认编码是在哪里设置的呢?还是史文大哥牛,发现了PHP 编译参数里面有一个“–enable-gd-jis-conv”的参数十分可疑,Google一下果然发现了很多乱码问题与这个编译参数有关……官方给出的参数说明是“GD: Enable JIS-mapped Japanese font support.”,也就是让GD支持日文编码的字库(可恶,为什么没有支持中文编码字库的编译选项……PHP也国籍歧视么= =b),说白了开启了这个选项的话GD就会把TT 阅读全文
posted @ 2012-06-28 18:03
johnsonshu
阅读(463)
评论(0)
推荐(0)
摘要:
这个站点是最好用的http://converticon.com/ 阅读全文
posted @ 2012-06-28 18:01
johnsonshu
阅读(140)
评论(0)
推荐(0)
摘要:
ffmpeg -i aaa.wmv -an -b 512k -r 25 -vf crop=150:100:0:2 -s 150x112.5 out150x100.flv-an:忽略音频 或者可以用 -ar 22050 -b 512k : 数据采集率? 对画质很有影响-r 25: 每秒帧数-vf crop: 缩放之后的,窗口大小剪切参数-s: 缩放参数另外一个例子ffmpeg -i yourfile.mov -acodec mp3lame -vcodec flv outputfile.flv 阅读全文
posted @ 2012-06-28 18:00
johnsonshu
阅读(315)
评论(0)
推荐(0)
摘要:
参考站点:http://hudeyong926.iteye.com/blog/1047304# <?php # // *nix # echo DIRECTORY_SEPARATOR; // / # echo PHP_SHLIB_SUFFIX; // so # echo PATH_SEPARATOR; // : # # // Win* # echo DIRECTORY_SEPARATOR; // \ # echo PHP_SHLIB_SUFFIX; // dll # echo PATH_SEPARATOR; // ; # ?> f (st... 阅读全文
posted @ 2012-06-28 17:59
johnsonshu
阅读(168)
评论(0)
推荐(0)
摘要:
好象需要序列化之后才能保存,取得时候再反序列化还原如果不这样的话,出现 [instance of __PHP_Incomplete_Class given]错误? $cond = new Search_Cond_Tour(); if ($cond_to_session) { $cond->_customer_type = $_POST['customer_type']; $cond->_tour_type = $_POST['tour_type... 阅读全文
posted @ 2012-06-28 17:58
johnsonshu
阅读(379)
评论(0)
推荐(0)
摘要:
svn在源代码中嵌入作者或版本等信息以前在dreamarts时觉得特别好用。能知道文件名是哪一个调试的时候找的话,就方便多了目前支持5个关键字:Date(修改时间)、Revision(版本)、Author(提交者)、HeadURL(库路径)、Id(前面4个的组合) 必须在eclipse把项目整体给设置一下参考:http://hi.baidu.com/gevilrror/bl ... 87f016a18bb791.htmlHowever keyword substitution is not activated by default from within Eclipse and its SVN 阅读全文
posted @ 2012-06-28 17:56
johnsonshu
阅读(375)
评论(0)
推荐(0)
摘要:
http://www.javaroad.jp/opensource/js_tomcat3.htmLoadModule proxy_module modules/mod_proxy.soLoadModule proxy_ajp_module modules/mod_proxy_ajp.so<Location /docs/>ProxyPass ajp://localhost:8009/docs/</Location> 阅读全文
posted @ 2012-06-28 17:55
johnsonshu
阅读(154)
评论(0)
推荐(0)
摘要:
2009年的文章?反正安装这个下来,特别容易就装上了。 测试没有问题但编辑文本的话,我还是用vi来的方便。http://www.rackspace.com/knowledge_center/index.php/CentOS_-_Installing_ffmpegLet's add the repository by adding an entry into YUM, the default package manager for CentOS.# sudo nano -w /etc/yum.repos.d/dag.repo You will need to add the follow 阅读全文
posted @ 2012-06-28 17:53
johnsonshu
阅读(170)
评论(0)
推荐(0)
摘要:
上网调查,有的说是ghostscript8.7安装包的事http://thomas-genin.com/blog/command-line-2/ghostscript-convert-error-undefined-in-findresource/写了一堆,感觉不是针对日文pdf的,所以搜索关键字加上了 Adobe-Japan1 ,终于出现了靠谱的文章http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=149341) installed Japanese-support yum groupinstall jap 阅读全文
posted @ 2012-06-28 17:52
johnsonshu
阅读(683)
评论(0)
推荐(0)
摘要:
find ./ -type d -print0 |xargs -0 chmod 777 阅读全文
posted @ 2012-06-28 17:50
johnsonshu
阅读(184)
评论(0)
推荐(0)
摘要:
如果不能随心制定下载方式的话,查查这些参数 header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.$f_name.'"'); header('Content-Length: ' . filesize($f_full));另外,CI里有download he 阅读全文
posted @ 2012-06-28 17:49
johnsonshu
阅读(221)
评论(0)
推荐(0)
摘要:
1) php.ini文件的位置查看,可以用 [php --ini]查看,apache的时候,写个php调用phpinfo()函数进行查看 2) 编译单个模块 参考:http://mattiasgeniar.be/2008/09/ ... nsions-from-source/ 以mysqli作例子 1. cd php-5.3.6/ext/mysqli 2. phpize 3. ln -s /usr/lib/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so 4. ./configure 5. make 6. cp /root/php-5.3.6 阅读全文
posted @ 2012-06-28 17:48
johnsonshu
阅读(157)
评论(0)
推荐(0)
摘要:
参考:http://codeigniter.com/forums/viewthread/96428/ Before the query runs: $this->db->_compile_select();And after it has run: $this->db->last_query(); 阅读全文
posted @ 2012-06-28 17:47
johnsonshu
阅读(243)
评论(0)
推荐(0)
摘要:
参考: http://developer.51cto.com/art/200912/167105.htm http://blog.csdn.net/feng_sundy/archive/2008/10/15/3080862.aspxMAX_FILE_SIZE 隐藏字段(单位为字节)必须放在文件输入字段之前,其值为接收文件的最大尺寸。这是对浏览器的一个建议,PHP 也会检查此项。在浏览器端可以简单绕过此设置,因此不要指望用此特性来阻挡大文件。实际上,PHP 设置中的上传文件最大值是不会失效的。但是最好还是在表单中加上此项目,因为它可以避免用户在花时间等待上传大文件之后才发现文件过大上传失败的麻烦 阅读全文
posted @ 2012-06-28 17:46
johnsonshu
阅读(276)
评论(0)
推荐(1)
摘要:
在iptables的设置上受尽折磨。 最后发觉问题在于vmware的nat网关, 对于生成的vpn网卡的ip,不知道怎么去路由。 所以必须做一个SNAT才可以。 参考文章:http://man.chinaunix.net/network/iptables-tutorial-cn-1.1.19.html网络环境: vmnet8: NAT网关,vmware客户机通过这个网关上internet 192.168.44.0 网关地址 192.168.44.2 vmnet2: XP系统与CentOS构建的局域网CentOS的eth0:192.168.44.131 eth1:192.168.72.128 X 阅读全文
posted @ 2012-06-28 17:45
johnsonshu
阅读(186)
评论(0)
推荐(0)
摘要:
感觉说的挺靠谱的,但没有试过http://hi.baidu.com/li_zhongnan/blog/item/318effa9314ddbfa1f17a25a.html如果想正确显示UTF-8字符,可以按照以下步骤操作:1、打开CMD.exe命令行窗口2、通过 chcp命令改变代码页,UTF-8的代码页为65001chcp 65001执行该操作后,代码页就被变成UTF-8了。但是,在窗口中仍旧不能正确显示UTF-8字符。3、修改窗口属性,改变字体在命令行标题栏上点击右键,选择"属性"->"字体",将字体修改为True Type字体"Lu 阅读全文
posted @ 2012-06-28 17:43
johnsonshu
阅读(334)
评论(0)
推荐(0)
摘要:
当实行的php语句正好在行末的时候,解释出来的文本会把换行给吃掉。做一般的web时倒是没有什么问题,php做邮件模板的时候问题就出来了。当然,解决方法很简单,后面再放个空格就解决了。(或者多给一个回车让它吃去)参照文章:http://shiflett.org/blog/2005/oct/php-stripping-newlines 阅读全文
posted @ 2012-06-28 17:42
johnsonshu
阅读(215)
评论(0)
推荐(0)
摘要:
必须上传到服务器之后才可以运行。好像是flash的安全限制http://stackoverflow.com/questions/2083128/youtube-api-not-firing-onyoutubeplayerreadyYou need to be on a web server with your test script, as stated in the documentation:Note: To test any of these calls, you must have your file running on a webserver, as the Flash playe 阅读全文
posted @ 2012-06-28 17:40
johnsonshu
阅读(150)
评论(0)
推荐(0)
摘要:
参考:http://www.richardlord.net/blog/dates-in-php-and-mysql$mysqldate = date( 'Y-m-d H:i:s', $phpdate );$phpdate = strtotime( $mysqldate ); 阅读全文
posted @ 2012-06-28 17:38
johnsonshu
阅读(263)
评论(0)
推荐(0)
摘要:
用maven编译了google的示例代码,在eclipse里却找不到jar的类库。网上找到了这个帖子,默认是下载到C:\Users\Administrator\.m2下面,通过修改settings.xml的localRepository可以修改路径http://www.mkyong.com/maven/where-is-maven-local-repository/ 阅读全文
posted @ 2012-06-28 17:37
johnsonshu
阅读(148)
评论(0)
推荐(0)
摘要:
本来在另一个项目用的好好的代码段在新项目就出错了。 查了一下才知道 有两个同名的annotation的,我用错了http://stackoverflow.com/questions/5719571/what-am-i-missing-for-using-hibernate-annotationThere are two sets of persistence annotations (@Entity and @Table) - JPA annotations (in package javax.persistence) and Hibernate annotations (in package 阅读全文
posted @ 2012-06-28 17:36
johnsonshu
阅读(159)
评论(0)
推荐(0)
摘要:
在DB内部存储的时候,肯定全是unicdoe,但是客户端可不只是java.控制台上运行ij的时候,最好指定一下字符集。我改完的shift-jis版本的ij.bat::runNoClasspath "%_JAVACMD%" %DERBY_OPTS% -Dderby.ui.locale=ja_JP -Dderby.ui.codeset=SJIS -classpath "%LOCALCLASSPATH%" org.apache.derby.tools.ij %DERBY_ARGS% %DERBY_CMD_LINE_ARGS% goto end:runWithC 阅读全文
posted @ 2012-06-28 17:34
johnsonshu
阅读(281)
评论(0)
推荐(0)
摘要:
java输出的csv文件,用excel读出来是乱码。经调查发现,utf-8得csv必须有bom头,excel才能正常读取。 而java文件IO默认不会给你BOM头的。(但是mac却是一定不要bom头的,烦人)参照了下面的文件,作出了bomhttp://koti.mbnet.fi/akini/java/java_utf8_xml/final byte[] bom = new byte[] { (byte)0xEF, (byte)0xBB, (byte)0xBF }; fos.write(bom); 阅读全文
posted @ 2012-06-28 17:32
johnsonshu
阅读(582)
评论(0)
推荐(0)
摘要:
用java -jar执行文件时,classpath参数无效。 必须在把程序打包成jar的时候,在manifiest里设置好NoClassDefFoundError while trying to run my jar 阅读全文
posted @ 2012-06-28 17:28
johnsonshu
阅读(301)
评论(0)
推荐(0)
摘要:
找到MSN运行程序右键→属性→兼容性将兼容性选到Vista,然后重启试试,应该就可以最小化到右下角了http://zhidao.baidu.com/question/186414537.html 阅读全文
posted @ 2012-06-28 17:24
johnsonshu
阅读(162)
评论(0)
推荐(0)
摘要:
span标记的样式设定width属性:<html><body><span style="width:80%">新闻标题</span><span style="20%">2006-5-27</span></body></html>加上<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xh 阅读全文
posted @ 2012-06-28 17:22
johnsonshu
阅读(2266)
评论(0)
推荐(0)
摘要:
pdfinfoというコマンドがあります。使い方は以下のとおりです。# pdfinfo PDFファイル名以下のようにすればページ数のみ取得できます。# pdfinfo xxx.pdf 2>/dev/null | gawk '/Pages/ {print $2}' 阅读全文
posted @ 2012-06-28 17:19
johnsonshu
阅读(463)
评论(0)
推荐(0)
摘要:
噩梦般的环境搭建终于结束了,以下是总结。虽然参考了很多官方文档,但是trac不是从源程序安装的。那一部分没有参考官方的。 另外,trac环境目录和发布目录最好是要分开,而官方文档竟然是想把他们和在一起的,所以也没有参考。trac安装最主要的是,得安装setuptools, 之后通过easy_install这个工具安装其他组件。起重安装Genshi时,不知道为什么给我装了低版本的0.5 , 卸载后, 用 -U 参数,好像更新到了0.6easy_install Trac==0.12.2 编辑配置文件 conf/trac.ini,将默认语言改成utf8default_charset = iso-88 阅读全文
posted @ 2012-06-28 17:18
johnsonshu
阅读(526)
评论(0)
推荐(0)
摘要:
excel 中最开头的一行显示加号 减号 标志,并可以隐藏或者展开下面对应的列你对数据进行“分类汇总”就会出现这样的效果快捷键显示:alt+D, G , G隐藏:alt+D, G , C 阅读全文
posted @ 2012-06-28 17:15
johnsonshu
阅读(320)
评论(0)
推荐(0)
摘要:
database = mysql://trac:trac@localhost/trac 阅读全文
posted @ 2012-06-28 17:13
johnsonshu
阅读(134)
评论(0)
推荐(0)
摘要:
[windows]建立一个文本文件,取名为kill-svn-folders.reg(扩展名由txt改为reg),内容如下:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN] @="Delete SVN Folders"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command] @="cmd.exe /c \"TITLE Removing 阅读全文
posted @ 2012-06-28 17:09
johnsonshu
阅读(267)
评论(0)
推荐(0)
摘要:
1)出处: 这里启动httpd时出现同样的问题,还以为自己权限没设好,或者是httpd.conf配置错了。结果搜索了一下才知道,是SELinux捣鬼。 这玩意有用吗? 老是出来坏事。解决:setsebool -P httpd_disable_trans on2)接着在ftp时又出现问题226 Transfer done (but failed to open directory).用echo 0 > /selinux/enforce暂时关闭 SeLinux(编辑 /etc/selinux/config 设置成disabled, 可以永久关闭) 阅读全文
posted @ 2012-06-28 15:27
johnsonshu
阅读(370)
评论(0)
推荐(0)
摘要:
yum install php53-mcrypt , 结果报告错误, 没有找到。其他模块都是没有问题的。上网检索,发觉有篇英文的说的挺对路链接: Install mcrypt extension for php53 in CentOS5.61. yum -y install php53 php53-mysql php53-xml php53-gd2. download php53 source from php.net and extract3.cd /the/path/to/php5.3.3/ext/mcyrpt/phpizeaclocal./configuremakemake instal 阅读全文
posted @ 2012-06-28 14:16
johnsonshu
阅读(210)
评论(0)
推荐(0)
摘要:
在 这里 看到了解决方案打开putty,选择保存的一个session,或者已经打开某一个session。如果是打开了某一个session,则右键单击putty上边的边框,选择 "change settings...” ,然后选择"windows“ ---> "colours" ---> "select a colour to adjust" ---> 选择要调整的颜色,我这里选择的是"ANSI Blue" ---> "Modify",然后调整自己想要的颜色。 我这里把原来 阅读全文
posted @ 2012-06-28 13:51
johnsonshu
阅读(1029)
评论(0)
推荐(0)
摘要:
可以从本机访问80端口, 但是不能从外部解决:插入一条规则iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT然后保存设置service iptables save 阅读全文
posted @ 2012-06-28 12:47
johnsonshu
阅读(823)
评论(0)
推荐(0)
浙公网安备 33010602011771号