ITeye博客

Here I Am

kevin.wang · 共 149 篇文章

python 多进程 Threading Multiprocessing

参考 http://developer.51cto.com/art/201405/438178.htm python多线程的局限性 为何thread不能利用多核? 如何利用多核? 进程池 http://www.coder4.com/archives/3352

2015-07-20 09:08 · language · 评论(0)

ireport字体设置 无效

使用ireport5.6.0版本设计报表 使用struts在线生产报表: jasperreports-5.2.0.jar struts2-jasperreports-plugin-2.3.24.jar 1.反复测试,发现设置的字体及大小无效 怀疑版本问题 使用ireport5.1.0重新打开模板编辑 字体成功设置 2.为什么Excel里面的数据是从第二行,第B列开始显示的  因为第一行和第A列分别是用来表示page top margin 和 page left margin的. 对于Excel来说, 纯粹多余. 解决方法是把page margin 设成0. 不过如果这个report还需要以…

2015-07-16 10:21 · Web · 评论(0)

tornado 异步

def asynchronous(method): """Wrap request handler methods with this if they are asynchronous. This decorator is for callback-style asynchronous methods; for coroutines, use the ``@gen.coroutine`` decorator without ``@asynchronous``. (It is legal for legacy reasons to use the two decorators together…

2015-07-13 14:29 · language · 评论(0)

mysql启动失败

查看mysqld.log /opt/redmine-2.6.0-1/mysql/bin/mysqld.bin: Error writing file '/opt/redmine-2.6.0-1/mysql/data/mysqld.pid' (Errcode: 28) Can't start server: can't create PID file: No space left on device 用df -h 查看 文件系统 容量 已用 可用 已用%% 挂载点 /dev/mapper/VolGroup-lv_root 36G 34G 0 100% / tmpfs 2.0G 0 2.0G 0…

2015-07-10 15:12 · DB · 评论(0) · MySQL

mysql 安装

1.下载地址 http://downloads.mysql.com/archives/community/ 2.64位linux Linux - Generic (glibc 2.5) (x86, 64-bit), RPM Bundle 3.解压后 rpm -ivh MySQL-client-5.6.24-1.linux_glibc2.5.x86_64.rpm MySQL-devel-5.6.24-1.linux_glibc2.5.x86_64.rpm MySQL-server-5.6.24-1.linux_glibc2.5.x86_64.rpm A random root password…

2015-07-07 15:29 · DB · 评论(0)

linux 安装 svn

1.安装apr 依赖包libtool(rpm) ./configure --prefix=/opt/apr make make install 2.安装apr-util ./configure --prefix=/opt/apr-util --with-apr=/opt/apr make make install 3.安装sqlite 把文件夹sqlite-amalgamation复制到 subversion-1.6.2中 4.安装svn ./configure --with-apr-util=/opt/apr-util --prefix=/opt/svn --with-apr=/opt/a…

2015-06-01 13:42 · linux · 评论(0)

nginx tcp模块安装及配置

1.下载pcre wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz tar -xvf pcre-8.33.tar.gz 2.下载nginx upload插件 wget https://github.com/vkholodkov/nginx-upload-module/archive/2.2.zip unzip 2.2 解压出nginx-upload-module-2.2 3.下载tcp模块 wget https://github.com/yaoweibin/nginx_tcp_proxy_m…

2015-03-23 16:40 · 高可用性 · 评论(0) · nginx

linux crond定时任务

添加定时任务 a) 上传定时清理脚本 将clean.sh 拷贝至/usr/local/etc/ b) vi /etc/crontab 最后一行添加: 00 03 * * * root /usr/local/etc/clean.sh & 代表每天凌晨3点执行 c) 重启crontab service crond restart 日志/var/log/cron

2015-03-20 14:37 · linux · 评论(0)

XMPP介绍(一)

1.介绍 http://blog.tianya.cn/blogger/post_read.asp?BlogID=3362822&PostID=43905895 2.消息格式 message http://guangboo.org/2013/03/22/xmpp-message-stanza http://blog.csdn.net/robert8803/article/details/8153528 IQ http://iluoxuan.iteye.com/blog/1736252 presence 3.消息传递 http://hbiao68.iteye.com/blog/2028893

2015-01-19 11:12 · 移动互联网 · 评论(0)

关于TCP、UDP、及keep_alive属性的总结

【问题原由】: 进行长连接通信时(如移动应用开发中手机端与服务端要维持一个稳定的连接,进行实时消息传递),需要在应用层定义心跳机制。有人问,TCP本身就是可靠传输协议,为什么还需要应用层来实现心跳机制呢? 【明确定义】 TCP的可靠传输是相对于UDP而言, UDP在传输数据之前不需要先建立连接,远地主机的运输层在接收到UDP报文后,不需要确认。 TCP提供面向连接服务,传输数据前必须三次握手建立连接,接收方确认,四次挥手释放链接, TCP数据包中包括序号和确认,所以未按照顺序收到的包可以被排序,而损坏的包可以被重传。 【然而】在使用TCP建立连接后 很多防火墙等对于空闲socket自动关闭 …

2015-01-15 16:52 · Tech · 评论(0) · Socket

写给2015的自己

不知不觉2015已经到来,时间的流逝总是让人伤感。今天难得静下心来回顾一下去年的自己,如今毕业已经4年半了,身体和精神头被时间慢慢吞噬,犹叹当年壮志豪情。 回到家乡工作一年有余,不再北漂,再见了西二旗,再见了青春。 回顾2014,家庭方面:完成了终身大事;工作上表现一般,没有大的进展,我只能自我安慰的说2014重在家庭,随后快马加鞭,在工作方面做出一些成绩。 如今工作仍陷入在代码中,难以脱身,思考的时间少了,个人的机制灵活也少了,这个亟需解决,打起精神,项目组缺少有效的管理,希望自己能够通过努力脱引而出。 技术层面需要研究的东西很多,扩大技术面,往架构方向继续努力! **有的时候,真的觉得对…

2015-01-06 16:26 · Summary · 评论(0) · 工作

bitnami linux redmine 安装

https://bitnami.com/stack/redmine/installer http://down.51cto.com/data/1032776 访问http://ip/redmine 安装完成后有可能登录报错 --解决办法-- vi apps\redmine\htdocs\db\migrate\001_setup.rb文件,在靠近末尾处: create default administrator account .... :firstname => "xxx", 这里可能有乱码 ,修改一下, mysqld --user=root 再运行apps\redmine\scripts\…

2014-08-06 16:40 · Summary · 评论(0)

mysql yum

wget http://dev.mysql.com/get/mysql-community-release-el5-5.noarch.rpm rpm -ivh mysql-community-release-el5-5.noarch.rpm yum install mysql-community-server http://blog.shiren.info/?p=39

2014-08-06 10:27 · linux · 评论(0)

lvs

站位,houxu

2014-05-30 14:26 · 高可用性 · 评论(0) · lvs

keepalived + nginx双机热备

-安装-- wget http://www.keepalived.org/software/keepalived-1.2.13.tar.gz ./configure --prefix=/usr/local/keepalived make make install 错误: configure: error: !!! OpenSSL is not properly installed on your system. !!! !!! Can not include OpenSSL headers files. !!! 解决办法: yum install openssl -y yum install…

2014-05-30 14:22 · 高可用性 · 评论(0)