摘要:Ubuntu上直接下载wkhtmltopdf,解压后执行命令操作确实可以实现截屏,但存在从html直接转为pdf时的部分样式、字体、的错位和色差。由于mac osx上使用wkhtmltopdf需要编译qt,所以老老实实的阅读了README_WKHTMLTOPDF,并按照官方的操作步骤走了一遍(详见osx10.8编译wkhtmltopdf),发现木有Ubuntu上之前的那些个失真现象,所以在Ubuntu上试了下qt的整套编译,发现编译了qt以后再本地编译生成wkhtmltopdf也不会出现失真现象,Nice!详细编译步骤如下:1)编译环境:X11, gcc, git,openssl;Ubuntu
阅读全文
摘要:1)下载安装相应的wmctrl安装包2)安装对应的astrill client即可。
阅读全文
摘要:Description: windows下无线网驱动可用,切换到Ubuntu下,无线网驱动失效。Reason: boardcom在Ubuntu下没有安装默认的驱动,需要自己手动配置install。 Solution: 1)有线连接网络,安装b43-fwcuttersudo apt-get install b43-fwcutter2)重启机器,进入系统设置-硬件3)重启电脑即可。参考资料:b43 and b43legacy
阅读全文
摘要:安装依赖:git, wget, gcc, xcode, X11.wkhtmltopdf是一个将html页面转成pdf的工具。这段时间公司涉及到将html转成pdf/jpg的相关功能,我查了很多资料,网上大能找到的方法主要有以下两种:a)利用swt的panel.setPage(url)和Graphics2D结合b)HtmlImageGenerator1)下载wkhtmltopdf-qt$ git clone git://gitorious.org/+wkhtml2pdf/qt/wkhtmltopdf-qt.git$ cd wkhtmltopdf-qt2)编译wkhtmltopdf-qt(这阶段时
阅读全文
摘要:1packagespecialNumber;23importjava.util.ArrayList;4importjava.util.Arrays;5importjava.util.HashSet;6importjava.util.Iterator;7importjava.util.List;8importjava.util.Set;910publicclassSushu{1112publicstaticvoidmain(String[]args){13List<Integer>result=newArrayList<Integer>();14for(inti=1;i&
阅读全文
摘要:命令行如下:curl -O http://themainframe.ca/wp-content/uploads/2011/06/htop.zipunzip htop.zipsudo mv htop /binrm htop.zip
阅读全文
摘要:步骤1)下载Tomcat,我下的是Tomcat 7.0.14(Binary Distributions tar.gz)。2)解压,文件夹改名为tomat3)移动该文件夹,至你习惯的目录,比如/usr/local/4)执行/usr/local/tomcat/bin下的startup.sh5)打开http://localhost:8080查看是否已经启动6)解决文件权限问题:sudo chmod 755 /usr/local/tomcat/bin/*.sh7)定义JAVA_HOME,在/etc/profile中新增:export JAVA_HOME=/Library/Java/Home在/tomc
阅读全文
摘要:# 添加mysql的path$ sudo mate ~/.bash_profileexport PATH=/usr/local/mysql/bin:$PATH# 保存配置:wq$ source ~/.bash_profile# 修改mysql密码$ mysqladmin -u root password# 登录mysql$ mysql -u root -p# 启动/停止开机启动中的mysql服务$ sudo /Library/StartupItems/MySQL/MySQL start/stop
阅读全文
摘要:1:首先根据端口号netstat -Aan | grep 9001返回f1000089c27a2358 tcp4 0 0 *.9001 *.* LIST EN2:rmsock f100089c27a2358 tcpcbThe socket 0x702f6800 is being heldby proccess 4986 (inetd).得到id为49863:ps -ef |grep4986即可看到是什么进程。两外可以找个软件:lsof,可以在http://aixpdslib.seas.ucla.edu/packages/lsof.html下载。然后lsof -i:9001即可查看此端口的进程。
阅读全文