2013年12月21日
摘要: 转载自:http://www.cnblogs.com/stephen-liu74/archive/2011/11/01/2202027.html零、shell中的内部变量:1. $?: 表示上一条shell命令的返回值.2. $$: 表示当前shell的pid.3. $!: 最后一个放入后台作业的PID值.4. $0: 表示脚本的名字.5. $1--$9,${10}: 表示脚本的第一到九个参数,和第十个参数.6. $#: 表示参数的个数.7. $*,$@: 表示所有的参数. 两者的区别如下: //都是双引号惹的祸^-^ /> set 'apple pie' pears p 阅读全文
posted @ 2013-12-21 17:48 lpthread 阅读(276) 评论(0) 推荐(0) 编辑
  2013年12月19日
摘要: Based on reading your answer and seeing how you likely came up with it, I believe you think an "exception-in-progress" has "precedence". Keep in mind:When an new exception is thrown in acatch block or finally block, the current exception is aborted (and forgotten) and the new exc 阅读全文
posted @ 2013-12-19 21:27 lpthread 阅读(437) 评论(0) 推荐(0) 编辑
摘要: Disadvantage of forklinux环境下, JBoss中调用curl下载文件, 发现curl占用的内存和JBoss一样多。Historical Background and Problem DescriptionTraditionally, Unix has had only one way to create a new process: using a fork() system call, often followed by an exec() system call. The fork() call makes a copy of the entire parent p 阅读全文
posted @ 2013-12-19 21:15 lpthread 阅读(850) 评论(0) 推荐(0) 编辑
  2013年12月18日
摘要: 1) 到http://mirrors.163.com的 centos帮助文档 中下载CentOS6-Base-163.repo文件,存放到/etc/yum.repo.d中 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo 注意yum只... 阅读全文
posted @ 2013-12-18 23:09 lpthread 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 在java code中获取本机IP的程序如下:import java.net.InetAddress;public class Test{ public static void main(String[] paramArrayOfString) throws Exception { InetAddress localInetAddress = InetAddress.getLocalHost(); System.out.println(localInetAddress.getHostAddress()); }}如果/etc/hosts 配置了127.0.0.1 上述c... 阅读全文
posted @ 2013-12-18 17:45 lpthread 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 如何用sed直接操作文件并备份# cat a.txtonetwothree# sed -i.bak '/two/d' a.txt // .bak is the suffix of backup file.# lsa.txt a.txt.bak# cat a.txtonethree# cat a.txt.bak onetwothree如果-i后没有指定suffix, 则不备份文件 阅读全文
posted @ 2013-12-18 09:24 lpthread 阅读(171) 评论(0) 推荐(0) 编辑
  2013年12月17日
摘要: 前言源码之前,了无秘密algorithm的重要性效率的重要性采用Cygnus C++ 2.91 for windows cygwin-b20.1-full2.exe 下载地址:http://download.csdn.net/detail/ljljlj/3658798安装后, 源码默认在:C:\cygnus\cygwin-b20\include\g++第一章 STL概论stl_config.h: 定义各个厂家编译器对C++特性的支持程度__GNUC__ : 2__GNUC_MINOR__ : 91GNUC 2.91的能力// (3) Defines __STL_STATIC_TEMPLAT.. 阅读全文
posted @ 2013-12-17 23:21 lpthread 阅读(3340) 评论(0) 推荐(0) 编辑
摘要: 转载:http://www.cnblogs.com/stephen-liu74/category/326653.html 阅读全文
posted @ 2013-12-17 13:30 lpthread 阅读(142) 评论(0) 推荐(0) 编辑
  2013年12月11日
摘要: java full gc 经常带来延迟, 导致性能问题如下命令使java虚拟机记录gc的log到文件, 帮助分析定位问题。 java -Xloggc:./a.log -jar a.jar // -Xloggc: 阅读全文
posted @ 2013-12-11 09:31 lpthread 阅读(336) 评论(0) 推荐(0) 编辑
  2013年12月9日
摘要: 转载:http://blog.chinaunix.net/uid-20726927-id-2455485.html 在革命战争影片中,经常会看到英勇的解放军战士背着步话机在喊“长江长江,我是黄河,听到请回答。”很明显,这是呼号为黄河的一方想找呼号为长江的另一方说事,为了保证影片的节奏,导演往往把后面的联络过程省略了,其实后面还有两步,长江听到黄河的呼叫后要回答“黄河黄河,我是长江,我听到了你,请回答。”这叫做第二次握手。黄河听到长江的呼叫后还要回答“长江长江,我是黄河,我听到了你,现在请你收报”,这是第三次握手,三次握手成功后,才能在电台里传送工作报文。为什么必须三次握手后才能工作呢?听我慢慢 阅读全文
posted @ 2013-12-09 21:05 lpthread 阅读(272) 评论(0) 推荐(0) 编辑