自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(114)
  • 收藏
  • 关注

原创 nginx 简单配置

如何用nginx 发表一个文件 ? 1.修改nginx.conf 增加: 66 server { 67 listen 80; 68 server_name iece.jd.com; 69 70 location / { 71 ...

2013-10-29 15:49:29 125

原创 hot code inplace, maven+tomcat

http://dingming168.iteye.com/blog/857809 , 备忘, 又开始 web 项目 终于可以实行hot code replace了,就是修改了一个文件不用重新部署了,就可以使用debug了。 试验环境: eclipse+ tomcat+ tomcatPlugin+maven3 关于怎么安装,就得大家自己找文章了 我们用petclinic项...

2011-06-14 11:07:44 152

原创 bash script programming

复习: 所有内容按字符处理,除非 expr 字符串连接,不用操作符 test ,[ ] = 要注意空格 空格 if test 2 -gt 1 ; then echo "aa" ; fi; if [ 2 -gt 1 ]; then echo "aa" ; fi; 这里, ; 表示了换行 一个例子: 例: 计算1到5的平方 #!/bin/sh # #Filena...

2011-05-04 14:47:02 152

原创 eclipse 快捷

用惯了 vim , 发现 需要用 eclipse 快捷,找了一个。 Ctrl+D:删除当前行。 依稀记得VIM里连按两下d就能删除一行,相当方便啊~Eclipse也有类似的功能哦,你还傻傻地选中一行再delete?out啦~ Ctrl+Alt+↑(↓):复制当前行到上(下)一行。不用多解释了吧,省去很多步骤。 yyp Alt+↑(↓):移动当前行到上(下)一行。实际上...

2011-04-27 15:41:43 117

原创 mount, mkfs 备忘

//查看 fdisk -l //mount mount -t ext3 /dev/sdb1 /home // 出现这个错误 //Disk /dev/sdb doesn't contain a valid partition table //分区 fdisk /dev/sdb n p 1 // 格式化 mkfs -t ext3 /dev/sdb1 ...

2011-04-25 15:12:32 100

数据集成的设计

今天作了一个数据集成的设计。 设计的技巧愈来愈熟练。 正在看 protocol buffer 的源码。

2011-03-29 13:08:34 195

原创 今天设计了hadoop job tracker fault tolerant

1. 以前,不会设计的时候。觉得设计挺难。现在不这么想。 其实,无论设计,编码,知道的多了。 对新的场景,选择一个设计,算法,组合就好了。 那种创新,就是选择和组合,会组合就行。 2. 把设计,映射成代码,也不难, 多用接口,抽象程度高的话,把底层实现得不好的地方,可以随时替换就好了。 代码只要好维护,不发愁。 3. 分布式系统,一致性是关键问题 http://doc...

2011-03-09 17:01:05 69

hadoop map reduce 源码阅读

今天完成了hadoop map reduce 部分的源码阅读。 接下来完成hdfs, monitor& debuging. 文档,放到 doc.baidu. http://doc.baidu.com/view/a59f4a25ccbff121dd36833e.html http://doc.baidu.com/view/1c58400b79563c1ec5da71e0.html ht...

2011-02-27 20:45:46 76

原创 我明白了云商业

中国的情况 一. hadoop , 70% 三. 其他, VM 是另外一个相关领域, 没有算进来。

2010-08-11 17:27:01 85

原创 又一个膨胀的项目,即将被肢解

又一个膨胀的项目,即将被肢解。 小的好。

2010-08-05 22:20:06 83

原创 c++ 中宏备忘

来自: http://blog.csdn.net/szlanny/archive/2009/06/12/4264663.aspx 1.宏不要用来定义常量,因为宏变量是没有类型安全的,也没有名字空间约束,会造成名字的污染。 2.宏的展开是一行,所以宏中的注释不能使用//,只能使用/* */。宏的代码也不能gdb跟踪,宏中代码逻辑要尽量简单。 3.宏的参数一般情况下使用时...

2010-07-09 17:54:23 106

原创 用yum 安装 gnuplot-py

1. 如果 python 升级了, yum 不能用, 会报 No module named yum . 把 /usr/bin/yum 脚本第一行 #! /usr/bin/python 改到旧版本 2. 运行 yum search gnuplot 报错 no access to //var/log/yumcache yum 需要 sudo 运行 3. 如果某个 rep...

2010-07-09 15:35:37 292

原创 mount disk

su /sbin/fdisk -l fdisk /dev/sdb n, p,1, , 保存完成后重启服务器 /dev/sdb1 mkfs -t ext3 -c /dev/sdb1 手工 mount mount /dev/sdb1 /e/ 自动挂载 vi /etc/fstab /dev/sdb1 /e ext3 default...

2010-06-30 14:27:18 159

原创 hadoop tut

download tar -xzf vi conf/hadooop-evn.sh: java_home= bin/hadoop mkdir -p temp/input cp conf/*.xml temp/input bin/hadoop jar hadoop-*-examples.jar grep temp/input temp/output 'dfs[a-z.]+' cat ...

2010-06-03 11:19:16 94

原创 what job capable of

web architeture. 70% . where ? growing web site . cloud architecture 30% . where ? big player .

2010-05-20 17:42:27 74

原创 distributed computing infrastructure

最近的要点是。 设计 distributed computing infrastructure. 有时间,也看看 stl source code.

2010-05-19 17:50:24 83

iterator trait

struct input_iterator_tag {}; template struct Iterator { typedef T Tag; }; template class InputIterator:public Iterator { }; template void Advance(Iterator& i, Distance di, ...

2010-04-14 16:15:16 88

function object adapter

自己输入一遍代码,总是胜过仅仅阅读。 template InputIterator Find_if(InputIterator& first, InputIterator& end, Predicate pred) { while( first != end && !pred (*first)) ++ first; return first; ...

2010-04-14 16:14:02 109

trait and policy

Trait : type as first class value, great. template struct AverageTrait { typedef T TAverage; }; template struct AverageTrait { typedef float TAverage; }; template typename Av...

2010-04-13 17:33:58 134

vim regular expression

对于 regular expression 的summary; 1.quantifier greedy, 尽可能多的匹配 * relunctant ,尽可能短的匹配 ? 与 option 没有关系 possisive , 唯一的可能 + 2.alternation (ab|cd) 与 group 没有关系...

2010-02-26 11:23:05 128

原创 问题是

我想,我的问题是: 1. 如何提高自己工作的抽象级别 2. 如何让自己的工作,有尽可能大的企业效益 这应该得到恰当的解决。

2010-02-24 10:47:25 64

原创 linux performance tuning

学习了以下工具。 top, load vmstat 2 3 , iostat, mpstat, ps. pidstat -d 2 , pidstat -r , lsof strace sar, sar -o sart 10 5000 >/dev/null 2>&1 & oprofile . ps -el |awk '{ if ( $6 > (0)) { pr...

2010-01-19 15:23:09 170

原创 saas architecture

finally I finish saas architecture. mainly ref : facebook, salesforce ,google appengine. scalablility : service layer ,sharding extensibility : extended table api flexibility : protocol buffer o...

2010-01-15 19:16:06 83

原创 multi tenant database

sass technical feature extensibile ,scalable. multi tenant database: extensible table , tenant security. salesforce architecture ,base on heap database . hive , SerDe . I'd like to work on...

2010-01-13 16:58:57 119

原创 shard tech decision

We recommend HiveDB plus Dual Master for most installations Hibernate shard. local cache with ehcache. distributed cache with memcached.   15、使用索引的缺点   1)减慢增删改数据的速度;   2)占用磁盘空间;   3)增加查询优化...

2009-12-17 15:56:34 76

原创 sth about python

summary sth about python. 1. prefer intrinic loop to explicit loop 2. run expensive instruction through c 3. not use global viariable 4. donot repeat you self 5. donot write long method (function...

2009-11-16 11:51:28 84

原创 mysql 自动启动,和 best practice

/etc/init.d/mysql restart http://drupalsh.cn/Linux-apache-mysql-autostart * 确保/etc/rc.d/init.d/mysqld 存在,用service mysqld start能够正常启动 * 运行命令:chkconfig --add mysqld * 运行命令: chkconfig...

2009-11-11 10:58:43 78

原创 太极拳的三个观点

太极拳 宁循理以求精,莫越理以争胜。 需无我以从人,莫舍近而求远。 拟善心以布道,莫执著于两端。 揣摩以悟空,莫妄动而伤神。 不要被感觉蒙蔽更高的追求。 寻求哲学意义上的纯粹。(吾患有吾身) 宁愿饿饭,不愿饿拳。(林默根) 人刚我柔谓之走,我顺人背谓之粘. 仰之则弥高,俯之则弥深,进之则愈长,退之则愈促 有力打无力,手慢让手快,是皆先天自然之能,非关...

2009-11-09 12:03:58 128

原创 scons 的注意点

mail scons --silent 总结一下 scons 的注意点。 1. target , source scons 缺省认为是 [file,file] list. 如果是dir 需要 [Dir(dd),Dir(ee)) ] , 这个 Dir(ddd) 的类型是 SCons.Node.FS.Dir ,可以用 str( ) 转为str 否...

2009-11-06 15:37:49 174

原创 python logging note

Attribute Error: 'function' object has no attribute 'rfind' bounded, unbounded 和没有使用 () 有关 class SomeTest( unittest.TestCase ): def testSomething( self ): log= logging.getLogger( "...

2009-11-04 14:07:10 62

原创 scons 问题解决

今天遇到scons 问题,解决,庆贺。 python 调试 http://blog.csdn.net/magicbreaker/archive/2009/01/11/3754733.aspx _DEBUG=True if _DEBUG == True: import pdb pdb.set_trace() scons 的两个问题 1。 so...

2009-11-04 11:49:13 122

原创 screen note

http://www.cyberciti.biz/tips/linux-screen-command-howto.html http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html creen command Task Ctrl+a c Create new window Ctrl+a k Kill the cur...

2009-11-04 10:05:03 106

原创 c++ study

1。template typedef 可以在 class 内完成。 2。 一路 const

2009-10-30 19:33:11 56

原创 gcc linker

gcc link lib 的时候,只向后找, 如果循环依赖, lib 可以重复 l . passing const as this argument of discards qualifiers. const 函数只能调用 const 函数,即使某个函数本质上没有修改任何数据,但没有声明为const,也是不能被const函数调用的。...

2009-10-28 10:05:02 86

原创 scons implicit dependency

报: Implicit dependency `dist/sdk' not found, needed by target `package/ss_debug_64'. scons: building terminated because of errors. 是因为 cache 解决: SetOption('implicit_cache', 0) scons -Q...

2009-10-22 13:46:44 395

原创 jni performance

guideline 1.buffer size :>128k is prefered 2. decrease invocation call 3. use directbytebuffer 4. prefer primitive parameter 5. decrease interaction between other side 6. decrease ...

2009-10-16 10:12:52 51

原创 some good python page

http://www.python.org/doc/essays/list2str.html http://www.python.org/dev/peps/pep-3119/ http://www.ibm.com/developerworks/cn/linux/l-python3-1/ http://docs.python.org/library/abc.html http://w...

2009-10-13 11:55:12 49

原创 setup samba

setup samba 。 1.确认samba 已经安装 rpm -qa|grep samba samba-client-3.0.28-0.el4.9 samba-common-3.0.28-0.el4.9 samba-3.0.28-0.el4.9 system-config-samba-1.2.21-1.el4.1 2. vi /etc/samba/smb.conf...

2009-10-09 17:30:22 86

原创 python idiom

一个很好的资源: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html http://jaynes.colorado.edu/PythonIdioms.html * "Python Objects", Fredrik Lundh, http://www.effbot.org/zone/p...

2009-09-28 14:03:43 158

原创 learning c++

C++ idiom --especially for java programmer 一. Four program paradigms Procedure, Object oriented , generic, stl . 二. Resource management RAII , Resource acquisition is initialization ...

2009-09-22 18:54:07 88

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除