2014年3月17日

摘要: 例如有如下一段话: Another whale sighting occurred on , . AK and HI 要匹配每一个,如果用匹配,则匹配到的目标是, ,也就是尽量大的匹配范围,要将匹配模式改为尽量小(即懒惰模式),需要用{-}代替,即写成,就可以达到目标了。 阅读全文
posted @ 2014-03-17 18:21 leechau 阅读(712) 评论(0) 推荐(0)
摘要: 比较软件列表 Toucan: GNU/GPL, 绿色; Allway Sync免费版: ASF; GoodSync: GS, proprietary ware;TotalCommander: TC, proprietary ware;Microsoft SyncToy: ST;Super Flexible File Synchronizer Pro v5.54a: SFFS,proprietar... 阅读全文
posted @ 2014-03-17 18:21 leechau 阅读(672) 评论(0) 推荐(0)
摘要: InstallationFollowing haskell-mode.Use MELPA repository: add the following into ~/.emacs(require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (pa... 阅读全文
posted @ 2014-03-17 18:21 leechau 阅读(289) 评论(0) 推荐(0)
摘要: $ cat Hello.java package test;public class Hello {public int myadd(int x, int y) { return 10 * x + y;}}$ cat myapp.groovy import test.Hellodef hello = new Hello()println hello.myadd(13, 5)$ javac Hel... 阅读全文
posted @ 2014-03-17 18:20 leechau 阅读(250) 评论(0) 推荐(0)
摘要: Eclipse中不同的文件都有自己专门的编辑器配色设置,下面分别说明。文本编辑器的背景色: Window->Preferences-> General->Editors->Text Editors->Appearance color options->Background color; java文件:Window->Preferences->Java->Editor->Syntax Colorin... 阅读全文
posted @ 2014-03-17 18:20 leechau 阅读(394) 评论(0) 推荐(0)
摘要: Choose color theme interactively: M-x customize-themes, or M-x color-theme-select (use key "q" to quit);Theme "manoj-dark" is a good dark theme;Customize default color theme: add "(load-theme 'manoj-d... 阅读全文
posted @ 2014-03-17 18:20 leechau 阅读(165) 评论(0) 推荐(0)
摘要: 投资活动主要涉及3个账户:资产(Asset)下的子账户记录投资金额,收入(Income)下的子账户记录投资收入,支出(Expense)下的子账户记录投资费用支出(例如银行手续费,证券交易费等)。以购买A银行的货币基金为例,4月2日用储蓄账户B买入2000元基金,在【资产->投资】下建立子账户【A银行货币基金】,从 B 账户transfer 2000元到 【A银行货币基金】账户,(待续) 总结: 买... 阅读全文
posted @ 2014-03-17 18:20 leechau 阅读(439) 评论(0) 推荐(0)
摘要: (...): function literals, p40, 64;'(...): suppress evaluation, p24;_(...): comments, p18;"...": regular expression, p17;(def x y): bind x to y;(fn [parameters] (function-body)): define a function;(def... 阅读全文
posted @ 2014-03-17 18:20 leechau 阅读(115) 评论(0) 推荐(0)
摘要: Installation: apt-get install w3m.use "a" to input text, "tab" to jump between hyper-links, "enter" to click the hyper-link. 阅读全文
posted @ 2014-03-17 18:19 leechau 阅读(159) 评论(0) 推荐(0)
摘要: System-wide File Descriptor LimitGet current value: sysctl fs.file-maxmodify max fd limit: sysctl -w fs.file-max=10000User File Descriptor LimitGet current value: ulimit -nmodify max fd limit: ulimit ... 阅读全文
posted @ 2014-03-17 18:19 leechau 阅读(326) 评论(0) 推荐(0)
摘要: 按照Building Your First App,详细过程如下:安装SDK(如果网速慢,需要用离线安装的方法,见笔记 离线安装Android SDK的方法 );采用命令行开发方法(不用装Eclipse插件ADT);$SDK_HOME/tools下运行android list targets($SDK_HOME=C:\Program Files\Android\android-sdk);$SDK_... 阅读全文
posted @ 2014-03-17 18:19 leechau 阅读(244) 评论(0) 推荐(0)
摘要: 例如下面一段代码: 现在要统一缩进6个tab,在UltraEdit里首先要选中文本,然后按6次tab,VIM中的操作是:首先按V(shift+v)进入行visual模式,然后按7次j选中这段文本(或者7j也行),然后按“6>”(shift+.),如果不确定几个tab,可先>一次,这时自动退出了visual模式,再次缩进不需要重复上述操作,只要按点号(“.”,重复前次命令)即可。 20... 阅读全文
posted @ 2014-03-17 18:19 leechau 阅读(1512) 评论(0) 推荐(0)
摘要: 需要的插件列表:TaglistConque ShellFuzzyFinderNERDTreejavaComplete其他选项:JavaKitexVimwinmanager (Deprecated) 阅读全文
posted @ 2014-03-17 18:18 leechau 阅读(437) 评论(0) 推荐(0)
摘要: Today I installed iTunes (Windows installer) via wine. But after installation it didn't work.Then I installed iTunes (Windows installer, too) in Windows 7 in virtualbox. But it can't read the iPod via... 阅读全文
posted @ 2014-03-17 18:18 leechau 阅读(229) 评论(0) 推荐(0)
摘要: 有时srt字幕文件与视频文件的时间不完全吻合,有一个时间差,这就需要对srt文件的时间轴进行平移,具备这个功能的软件很多,比如:Subtitle Tool, subresync, sabbu, Sub Station Alpha等;但最方便的还是在线处理,下面这两个网站都是专门做字幕文件的时间轴处理的:http://subshifter.bitsnbites.eu/http://subtitle.... 阅读全文
posted @ 2014-03-17 18:18 leechau 阅读(3515) 评论(0) 推荐(0)
摘要: Auto complete tagsxmleditinstallation: git clone https://github.com/sukima/xmledit.git, then make (unnecessary?) when you write "", it will be converted to ""; if you write ">", it will be converted t... 阅读全文
posted @ 2014-03-17 18:18 leechau 阅读(219) 评论(0) 推荐(0)
摘要: Installationdownload setup.exe from its official website;run setup.exe, select "download without installing" option;when asking for download website, select the first 163.com and three .cn sites, thus... 阅读全文
posted @ 2014-03-17 18:18 leechau 阅读(273) 评论(0) 推荐(0)
摘要: 如何为Eclipse安装插件?尤其是SVN?放入$ECLIPSE_HOME/dropins文件夹比较好;从SVN中更新代码在Project名称上右键->Team->更新;调整Eclipse Editor的字体和字号Window->Preferences->General->Appearance->Colors and Fonts->Basic->Text Font->Edit.断点管理IDE下端的... 阅读全文
posted @ 2014-03-17 18:17 leechau 阅读(374) 评论(0) 推荐(0)
摘要: 安装Ubuntu Server上: sudo apt-get install erlang 如果安装时下载 太慢,可手工下载deb包( esl-erlang_16.a-rc1_ubuntu_precise_i386.deb ),下完deb文件后,ftp到虚拟机上,用dpkg -i 安装(需要首先安装JRE);Ubuntu Server不能更改屏幕大小,也不能copy/paste文本,所以用kitt... 阅读全文
posted @ 2014-03-17 18:17 leechau 阅读(367) 评论(0) 推荐(0)
摘要: Eclipse for Java Developers (Juno)本身有一个eGit组件,通过它可以直接从Git源码库中下载源代码,以下载 CRaSH 为例说明:从主页上的"Develop: GitHub"找到 源码页 ,得到此项目的GitHub地址是:https://github.com/vietj/crash.git;Eclipse -> Import -> Git -> Projects ... 阅读全文
posted @ 2014-03-17 18:17 leechau 阅读(192) 评论(0) 推荐(0)
摘要: 参考:Bandwidth Monitoring Tools For Linux实时流量监控:pvOS: Ubuntu Server 12.04.netcat & pvapt-get install pv监控端口5555上的实时网络流量:nc -l 5555 | pv > /dev/null向服务器113上发送数据:nc 10.31.1.113 5555ifstatHomepage: http://... 阅读全文
posted @ 2014-03-17 18:17 leechau 阅读(503) 评论(0) 推荐(0)
摘要: 下面的程序验证了Map的putAll方法的行为特性,代码如下:import java.util.HashMap; public class Map_putAllTest { public static void main(String[] args){ //两个map具有不同的key HashMap map1=new HashMap(); map1.put("1", "A"); HashMap m... 阅读全文
posted @ 2014-03-17 18:17 leechau 阅读(969) 评论(0) 推荐(0)
摘要: 在Windows脚本中,%i类似于shell脚本中的$i,%0表示脚本本身,%1表示脚本的第一个参数,以此类推到%9,在%和i之间可以有“修饰符”(完整列表可通过"for /?"指令查看),表示对%i进行各种处理,其中d表示盘符,p表示除盘符外的路径,n表示文件名,x表示扩展名,f表示全路径(路径+文件名),s表示8.3格式的全路径,修饰符可以组合,所以%~dp0的意思是:脚本本身(%0)的路径(... 阅读全文
posted @ 2014-03-17 18:16 leechau 阅读(2960) 评论(0) 推荐(1)
摘要: 之前一直用EverCD+,考虑到鸡蛋不能放在一个篮子里,又找了几款功能类似的进行了比较,主要考察一下几个功能:多个镜像:一个数据文件可以包含多个目录的镜像,便于数据管理和搜索; 目录更新:目录内容发生变化后,更新其在管理软件中的镜像(对于一次性写光盘不存在更新问题); 多种搜索类型:除了按名称搜索,还能按大小、日期等搜索; 导出、导入为通用数据文件:如csv、xml文件等; 备选软件 WhereI... 阅读全文
posted @ 2014-03-17 18:16 leechau 阅读(249) 评论(0) 推荐(0)
摘要: 用Mint自带的banshee可以把CD转换为ogg文件,[Media -> Import Media],然后选择Audio CD,但只能转换为ogg格式,好像不能自动获取ID3标签;比较好的方法是使用RipperX,它可以把CD转换为wav, ogg, mp3, flac等格式,Ubuntu自带了ogg编码器,需要转为MP3的话需要手工下载编码器:sudo apt-get install lam... 阅读全文
posted @ 2014-03-17 18:16 leechau 阅读(74) 评论(0) 推荐(0)
摘要: 时间戳在项目自动构建中广泛使用,例如在jar文件的manifest文件中,以及最后zip包的文件名里等,时间戳对应的Ant命令是,这个标签既可以用在一个内部,也可以放在外部用作“全局”变量,全局变量的好处在于“一次定义,多处可用”,下面分别是内部和外部使用的两个例子,注意 "build.date"在 中赋值后就可以在其他地方使用了 :内部: ...... ... 阅读全文
posted @ 2014-03-17 18:16 leechau 阅读(294) 评论(0) 推荐(0)
摘要: 见 PEP 8 - Style Guide for Python Code 。 命名约定 Prescriptive: Naming Conventions 中指明:package, module, function, method命名采用lower_case_with_underscores风格,其中包名尽量不要用下划线(因此package和module最好只有一个单词),class采用CapW... 阅读全文
posted @ 2014-03-17 18:15 leechau 阅读(186) 评论(0) 推荐(0)
摘要: Ubuntu上如果从脚本启动图形界面程序,会有一个终端窗口始终开启,如果在脚本里用nohup启动,就可以关闭这个窗口了,例如下面的脚本演示了启动eclipse程序:export PATH=$PATH:/opt/jre1.6.0_14/binnohup /opt/eclipse/eclipse 1>/dev/null 2>/dev/null参考: http://askubuntu.com/quest... 阅读全文
posted @ 2014-03-17 18:15 leechau 阅读(152) 评论(0) 推荐(0)
摘要: Clipman-pluginsudo apt-get install xfce4-clipman-pluginNo config function. No hotkey. Very basic function. But it support 1-step-paste.Parcellite (1.0.2rc5)Installation with apt-get is different with ... 阅读全文
posted @ 2014-03-17 18:15 leechau 阅读(163) 评论(0) 推荐(0)
摘要: Brief installation steps:Install git and zsh via yum;'git clone' autojump and oh-my-zsh from an internet-connected host;Install autojump and oh-my-zsh manually according to the instructions on their w... 阅读全文
posted @ 2014-03-17 18:15 leechau 阅读(257) 评论(0) 推荐(0)
摘要: Integrating CMMI and Agile Development: Case Studies and Proven Techniques for Faster Performance Improvement http://www.sei.cmu.edu/library/abstracts/books/9780321714107.cfm CMMI Survival Guide: Just... 阅读全文
posted @ 2014-03-17 18:14 leechau 阅读(158) 评论(0) 推荐(0)
摘要: 跨行用\n表示,例如 用4\n56可以匹配到: 4 56 中,查询一段文本中pattern出现的次数,类似于UltraEdit中的“Count All”功能,用:%s/pattern//gn, 例如统计文档中有多少空格分隔的单词可以使用::%s/[^ ]+//gn( []中^开头后跟一个字符表示该字符的补集,例如[^a]表示除a外的所有字符),实际上是利用了s命令的n参数。 阅读全文
posted @ 2014-03-17 18:14 leechau 阅读(1316) 评论(0) 推荐(0)
摘要: 要把汉字转换为搜的形式,也就是在汉字的Unicode Big Endian编码前面加“&#x”,后面加分号。例如“”字转换后为“搜”(英文字符无需转换)。前置条件:native2ascii.exe文件,autohotkey。算法流程:输入要转换的汉字; 生成临时文件; 用native2ascii处理该文件; 获取native2ascii的输出放入字符串res中; 以“\u”分割res,以“ꪪ”形式... 阅读全文
posted @ 2014-03-17 18:14 leechau 阅读(1382) 评论(0) 推荐(1)
摘要: WindowPadX乃一Autohotkey脚本,具有强大的单/多显示器窗口排布能力且易于配置。有了它,那些Pro版收费的、需要安装的DisplayFusion, MultiMon TaskBar, Actual Multiple Monitors...就都可以回家了。将当前窗口移动到另一个显示器中:Caps + Space; Space = WPXA_MoveWindowToMonitor, N... 阅读全文
posted @ 2014-03-17 18:14 leechau 阅读(8030) 评论(0) 推荐(0)
摘要: 项目PORJ_TEST是项目PROJ的测试项目。在它的ivy中引用了PROJ的jar包。由于PROJ正处于开发阶段,源代码更改频繁, 在运行PROJ_TEST中的测试时,需要进入PROJ的jar包内部设置断点、调试源代码。传统的方法是在PROJ_TEST的Build Path中添加PROJ项目,但这样显然与ivy中定义的引用发生了冲突,且容易在打包时出现问题,怎样让ivy引用的jar包也能提高源代... 阅读全文
posted @ 2014-03-17 18:14 leechau 阅读(499) 评论(0) 推荐(0)
摘要: 本实例是GODU动态脚本的一个技术简化版,演示了java调groovy,groovy又调java的运行过程。 测试用例: package com.boco.godu.integration; import java.util.HashMap; import java.util.Map; import org.apache.log4j.Logger; import org.junit.A... 阅读全文
posted @ 2014-03-17 18:13 leechau 阅读(860) 评论(0) 推荐(0)
摘要: Switch user command (su) has the following forms:su Switch to , without loading environment variables. If is omitted (only "su"), it equals to "su root";su - Switch to , and loading environment varia... 阅读全文
posted @ 2014-03-17 18:13 leechau 阅读(398) 评论(0) 推荐(0)
摘要: 云南现场GODU服务器型号为 SunOS 5.10,即solaris 10,用ps -ef不能显示全部的线程名,只能显示第一行,要显示完整线程名需要用下面的命令:/usr/ucb/ps -auwwx|grep java godu 7729 0.1 3.523351362257000 ? S 8ÔÂ 19 860:07 /usr/jdk/instances/jdk1.5.0/bin/java -... 阅读全文
posted @ 2014-03-17 18:13 leechau 阅读(575) 评论(0) 推荐(0)
摘要: 下文绝大部分译自维基百科Solaris词条的“历史”部分:http://en.wikipedia.org/wiki/Solaris_(operating_system)#History 1987年,AT&T与Sun公司宣布合作开发当时市场上最流行的类Unix操作系统(BSD, System V, Xenix)的融合版:Unix System V Release 4,即SVR4。1991年9月4日,... 阅读全文
posted @ 2014-03-17 18:13 leechau 阅读(1317) 评论(0) 推荐(0)
摘要: 下面的脚本实现Win+K键激活一个输入框,给出了kitty命令行常用的几种格式,基本可分为两种:连接保存好的模板(session)和完全手工连接,前者用-load加Session名称,后者需要在命令行中写上详细的连接参数。#k:: ; telnet/ssh client: console style InputBox, myInp, Connect, ( Input Connect P... 阅读全文
posted @ 2014-03-17 18:13 leechau 阅读(315) 评论(0) 推荐(0)
摘要: Calibre has stand-alone ebook viewer "ebook-viewer", start it in terminal:$ ebook-viewer The only downside of this app is the long startup time.I also tried view mobi file with okular on Linux Mint 14... 阅读全文
posted @ 2014-03-17 18:12 leechau 阅读(388) 评论(0) 推荐(0)
摘要: 安装方便:只要配好JAVA_HOME,用java -jar drjava-stable-20120818-r5686.jar即可启动,算是绿色软件;特色功能:交互式命令行,可以在调试程序时改变变量值,很方便;编辑功能比较弱:Ctrl+k删除行;有工程的概念;定制功能比较强;没有"."之后自动列出对象的方法、属性列表的功能,比较不方便;没有自动编译功能,不能自动标出编译错误,需要compile的时候... 阅读全文
posted @ 2014-03-17 18:12 leechau 阅读(1356) 评论(0) 推荐(0)
摘要: FreeBSD: mainly for web server;OpenBSD: mainly for security concerned server; 阅读全文
posted @ 2014-03-17 18:12 leechau 阅读(83) 评论(0) 推荐(0)
摘要: Initialize VM:chad@typcserver ~/docs/vagrant-prj $ vagrant --versionVagrant 1.4.3chad@typcserver ~/docs/vagrant-prj $ vagrant initchad@typcserver ~/docs/vagrant-prj $ cat VagrantfileVAGRANTFILE_API_VE... 阅读全文
posted @ 2014-03-17 18:12 leechau 阅读(272) 评论(0) 推荐(0)
摘要: Install EvernoteInstall Evernote in Wine: wine Evernote_xxx.exe;Backup Evernote Database File LocallyDatabase file location is: ~/.wine/drive_c/users/chad/Local Settings/Application Data/Evernote/Ever... 阅读全文
posted @ 2014-03-17 18:11 leechau 阅读(350) 评论(0) 推荐(0)
摘要: 以下是一台Solaris 10服务器的配置信息, bash-3.00$ uname -a SunOS NOP2-HWXX 5.10 Generic_138888-03 sun4u sparc SUNW,Sun-Fire-15000 bash-3.00$ uname -i SUNW,Sun-Fire-15000 bash-3.00$ uname -m sun4u bash-3.00$ uname ... 阅读全文
posted @ 2014-03-17 18:11 leechau 阅读(346) 评论(0) 推荐(0)
摘要: "Algorithms" by Robert Sedgewick, p256, SortCompare.time():public static double time(String alg, Double[] a) throws SecurityException, NoSuchMethodException, ClassNotFoundException, IllegalArgum... 阅读全文
posted @ 2014-03-17 18:11 leechau 阅读(118) 评论(0) 推荐(0)
摘要: Create a virtual machine "ubs1" with ubuntu server 12.04, set its network as Host-only;Start this vm, configure the network manually: IP Address: 192.168.56.11, netmask, gateway and name server addres... 阅读全文
posted @ 2014-03-17 18:11 leechau 阅读(183) 评论(0) 推荐(0)
摘要: CatalogMaker 与 DiskDir Extended 是两个用于生成文件夹目录的totalCmd插件。 将指定目录下所有文件、文件夹以指定格式存储在一个文本文件中,可作为EverCD+的轻量级替代品。 安装: 在TotalCmd中双击zip文件,tc会提示是否安装插件,确认后一路按默认安装即可。 使用: 选中要生成目录结构的文件夹,按alt+F5,【压缩格式】中在下拉框里选lst,然后点... 阅读全文
posted @ 2014-03-17 18:10 leechau 阅读(2069) 评论(0) 推荐(0)
摘要: Brief installation steps:Install git and zsh via yum;'git clone' autojump and oh-my-zsh from an internet-connected host;Install autojump and oh-my-zsh manually according to the instructions on their w... 阅读全文
posted @ 2014-03-17 17:50 leechau 阅读(572) 评论(0) 推荐(0)
摘要: Create a public repo on github, you can add README or License files on the master branch, suppose the url is:https://github.com/leetschau/don4.gitGet the private repo:$ git clone https://leechau@bitbu... 阅读全文
posted @ 2014-03-17 17:50 leechau 阅读(163) 评论(0) 推荐(0)
摘要: Check the current sshd status:service sshd statusStart sshd service:service sshd startSet sshd autostart on system startupchkconfig sshd onList the current autostart statuschkconfig --list |grep sshdO... 阅读全文
posted @ 2014-03-17 17:50 leechau 阅读(143) 评论(0) 推荐(0)
摘要: RedHat今天晚上发现服务器上vi的界面提示变成了乱码,只能将XShell的编码改为GBK才能正常显示,导致consolas字体无法使用,GBK编码下的字体丑陋无比,无法忍受,一轮google之后终于发现有人改了/etc/sysconfig/i18n文件,解决方法就是把GB18030改回到UTF-8:root用户下修改/etc/sysconfig/i18n文件,将LANG=zh_CN.GB180... 阅读全文
posted @ 2014-03-17 17:50 leechau 阅读(636) 评论(0) 推荐(0)
摘要: 翻译环境包括两个部分,写作部分和电子书,Windows上,前者用gVim,后者用SumatraPDF,二者都是绿色软件,都可以定义成暗色系风格。gVim全屏需要使用一个叫做gvimfullscreen_win32的工具,下载安装包,把gvimfullscreen.dll解压到gvim.exe所在目录下(d:\Apps\Vim\vim72\),然后在_vimrc中加一行:map :call lib... 阅读全文
posted @ 2014-03-17 17:50 leechau 阅读(242) 评论(0) 推荐(0)
摘要: subprocess.callThis is the recommended way to run shell commands in Python compared with old-fashioned os module.This is a "real-time" method, which means you can get the shell output on the fly, comp... 阅读全文
posted @ 2014-03-17 17:50 leechau 阅读(247) 评论(0) 推荐(0)
摘要: Find命令格式:find 其中搜索范围是一个目录名,指定条件包括文件名、文件属性(修改时间所属用户等)、所在位置特点(如目录深度等)等;指定动作包括打印(-print)等; 例如:find $HOME -name "*.sh",查找用户根目录下所有以.sh结尾的文件,除了按文件名查找,find还可以按文件大小、类型、所属用户、用户组、修改时间、是否为空等,还可以指定找到文件后要执行的动作,... 阅读全文
posted @ 2014-03-17 17:50 leechau 阅读(467) 评论(0) 推荐(0)
摘要: Selection Criteriadouble line;provide username, hostname, current directory;provide information of git branch and commit status;provide command exit code;prompt is easy to distinguished from command r... 阅读全文
posted @ 2014-03-17 17:50 leechau 阅读(922) 评论(0) 推荐(0)
摘要: Host Machine[root@bocoty49 ~]# lsb_release -aLSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarc... 阅读全文
posted @ 2014-03-17 17:47 leechau 阅读(229) 评论(0) 推荐(0)

导航