06 2011 档案

摘要:为什么有这个提示“Escape character is '^]'.”?在UNIX的shell下执行telnet命令时,连接到远端机后使用“escape”字符可进入telnet命令模式,此模式下用户可以输入telnet能够解释的命令,来控制telnet或设定与telnet相关的参数。默认的“escape”字符为“Ctrl+]”。用户可以使用set命令修改“escape”字符的默认值。现在应该清楚了吧! 阅读全文
posted @ 2011-06-30 15:47 规格严格-功夫到家 阅读(1524) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/elimago/archive/2009/02/26/3938842.aspx 阅读全文
posted @ 2011-06-30 10:54 规格严格-功夫到家 阅读(655) 评论(0) 推荐(0) 编辑
摘要:http://techbbs.zol.com.cn/1/60_868.html 阅读全文
posted @ 2011-06-29 16:32 规格严格-功夫到家 阅读(168) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/insect27/archive/2010/05/04/5554985.aspxhttp://www.cublog.cn/u2/86696/showart_2332654.html这两篇文章基本就可以了,但是里面存在一部分笔误,估计是抄别人的。因此自己写demo的时候,注意对比,多man一下。 阅读全文
posted @ 2011-06-28 16:40 规格严格-功夫到家 阅读(252) 评论(0) 推荐(0) 编辑
摘要:I am trying to debug something at work, and I must admit, I'm no UNIXexpert. I'm stumped and I thought I'd see if anyone in the communityhas an idea. It's a pretty simple operation that does simple commandslike cksum, scp, and chmod with a pipe. The code uses popen to open apipe and 阅读全文
posted @ 2011-06-28 16:38 规格严格-功夫到家 阅读(1353) 评论(0) 推荐(0) 编辑
摘要:http://297020555.blog.51cto.com/1396304/475836http://blogold.chinaunix.net/u/27337/showart_378378.htmlhttp://bbs.linuxpk.com/forum.php?mod=forumdisplay&fid=118&page=1http://opkeep.com/system/linux/linux-log-tools.html 阅读全文
posted @ 2011-06-24 10:50 规格严格-功夫到家 阅读(227) 评论(0) 推荐(0) 编辑
摘要:http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch05_:_Troubleshooting_Linux_with_sysloghttp://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html国人写的固然有精品,可我还是看这两个国外的非常不错,一个介绍概念,一个有实践。 阅读全文
posted @ 2011-06-24 10:33 规格严格-功夫到家 阅读(315) 评论(0) 推荐(0) 编辑
摘要:我就不自己转载了,想看就来这个网址看吧,这位仁兄分析的很透彻http://jarfield.iteye.com/blog/604198 阅读全文
posted @ 2011-06-23 16:23 规格严格-功夫到家 阅读(235) 评论(0) 推荐(0) 编辑
摘要:这是一堂关于UML基础知识的补习课;现在我们做项目时间都太紧了,基本上都没有做过真正的class级别的详细设计,更别提使用UML来实现规范建模了;本篇主要就以前自己一直感觉很迷糊的几种class之间的关系进行整理,让我们在真正用UML进行比如类图设计时能够更加清晰明了;以下就分别介绍这几种关系:继承指的是一个类(称为子类、子接口)继承另外的一个类(称为父类、父接口)的功能,并可以增加它自己的新功能的能力,继承是类与类或者接口与接口之间最常见的关系;在Java中此类关系通过关键字extends明确标识,在设计时一般没有争议性;实现指的是一个class类实现interface接口(可以是多个)的功 阅读全文
posted @ 2011-06-17 09:37 规格严格-功夫到家 阅读(299) 评论(0) 推荐(0) 编辑
摘要:1、CPATH或C_INCLUDE_PATH //存放自动加载头文件的位置 用逗号分隔的目录列表,以提供头文件的搜索位置。 相当于在使用gcc或g++是,-Idirectory。(头文件所在的位置)!2、COMPILER_PATH //gcc和g++子程序的位置 用逗号隔开的目录列表,以提供gcc或g++子程序的搜索位置。3、GCC_EXEC_PERFIX ....4、LIBRARY_PATH //自动搜索库的路径 用逗号隔开的目录列表,以提供链接器寻找连接库(动态连接库,静态连接库)的位置。 相当于在命令里使用-Ldirectory5、LD_LIBRARY_PATH //动态搜索加载动态库的 阅读全文
posted @ 2011-06-16 21:32 规格严格-功夫到家 阅读(305) 评论(0) 推荐(0) 编辑
摘要:今天,一个同事编译静态库,我也趁此机会在温习一下,先google一下,然后在自己实验。首先,在网上抄个例子,内容如下:1:建静态库/*hellos.h*/#ifndef_HELLO_S_H#define_HELLO_S_HvoidprintS(char*str);#endif/*hellos.c*/#include"hellos.h"voidprintS(char*str){printf("printinstaticway:%s",str);}输入命令:gcc-c-ohellos.ohellos.carcqslibhellos.ahellos.o于是得到 阅读全文
posted @ 2011-06-16 21:24 规格严格-功夫到家 阅读(3111) 评论(0) 推荐(1) 编辑
摘要:今天编程遇到了SIGSEGV错误,比较困惑,所以找了些资料,总结一下:(1)官方说法是: SIGSEGV --- Segment Fault. The possible cases of your encountering this error are: 1.buffer overflow --- usually caused by a pointer reference out of range. 2.stack overflow --- please keep in mind that the default stack size is 8192K. 3.illegal file acce 阅读全文
posted @ 2011-06-15 11:15 规格严格-功夫到家 阅读(1014) 评论(0) 推荐(1) 编辑
摘要:Scp: 本地到远程 scp fileuser@host:/home/user 远程传到本地 scp user@host:/home/user/file /home/user2ln ln -s target symbol_name readlink -f symbol_name 阅读全文
posted @ 2011-06-13 22:17 规格严格-功夫到家 阅读(211) 评论(0) 推荐(0) 编辑
摘要:/***截获Thread.stop引起的ThreadDeath异常。<br>*我们理论上可以处理引起的stop异常信息。<br>*但是,异常可以发生在线程运行的任意一个点<br>*所有的同步方法和代码块都需要进行仔细的处理。<br>*而且线程在处理第一个ThreadDeath的时候可能再次发生ThradDeath<br>*所以清理工作必须一直做到成为为止,相关的处理代码将是异常的复杂。**@author老紫竹JAVA世纪网(java2000.net)**/publicclassThreadStopTestCatch{privatest 阅读全文
posted @ 2011-06-11 12:40 规格严格-功夫到家 阅读(1298) 评论(0) 推荐(0) 编辑
摘要:作者博客:http://windychan.cublog.cn/ 欢迎转载,但务必在转载时注明出处.[/align] ********************************************************** 第一部分, 在一台服务器构建多mysql服务. ********************************************************** 一,绪言 在Mysql中有一mysqld_multi命令,可用于在一台物理服务器运行多个Mysql服务,今天参考一些文档,亲自测试并通过,真高兴,现将操作过程共享给大家! 操作系统:Linux2.6 阅读全文
posted @ 2011-06-10 10:49 规格严格-功夫到家 阅读(485) 评论(0) 推荐(0) 编辑
摘要:1、命令 C\Documents and Settings\Zianed>ls ‘%JAVA_HOME%’/binHtmlConverter.exe javap.exe jstatd.exe rmid.exeappletviewer.exe javaw.exe jvisualvm.exe rmiregistry.exeapt.exe javaws.exe keytool.exe schemagen.exebeanreg.dll jconsole.exe kinit.exe serialver.exeextcheck.exe jdb.exe klist.exe servertool.exe 阅读全文
posted @ 2011-06-10 10:41 规格严格-功夫到家 阅读(1484) 评论(0) 推荐(0) 编辑
摘要:核心提示:原因有很多种,比如: 1.数据量过于庞大;死循环 ;静态变量和静态方法过多;递归;无法确定是否被引用的对象; 2.虚拟机不回收内存(内存泄漏); 说白了就是程序运行要用到的内存大于虚拟机能提供的最大内存就发生内存溢出了。 内存溢出的问题要看业务和系 原因有很多种,比如:1.数据量过于庞大;死循环 ;静态变量和静态方法过多;递归;无法确定是否被引用的对象;2.虚拟机不回收内存(内存泄漏); 说白了就是程序运行要用到的内存大于虚拟机能提供的最大内存就发生内存溢出了。 内存溢出的问题要看业务和系统大小而定,对于某些系统可能内存溢出不常见,但某些系统还是很常见的解决的方法,一个是优化程序代码 阅读全文
posted @ 2011-06-10 10:31 规格严格-功夫到家 阅读(2429) 评论(1) 推荐(1) 编辑
摘要:一、框架代码的实现使用Socket是最完美的的远程连接超时设置技术,下面是创建Socket对象的代码: 建立连接一般的写法是:Socket s = new Socket(host, port); 而要定制超时的写法则为:SocketAddress addr = new InetSocketAddress(host, port);Socket s = new Socket();s.connect(addr, timeoutInMilliSeconds);这种写法使用了底层的socket技术。如果使用JMX远程管理API, 通常不能访问socket。如果一定要使用这种技术的话,需颇费一番周折。其工 阅读全文
posted @ 2011-06-09 16:47 规格严格-功夫到家 阅读(1914) 评论(0) 推荐(0) 编辑
摘要:ManagementFactory.getPlatformMBeanServer() returns a reference to the existing MBean server within the JVM. JConsole looks at the beans on that server.If you use createMBeanServer(), that will create an entirely new server. JConsole has no knowledge of it, and so will not see the beans registered wi 阅读全文
posted @ 2011-06-09 14:42 规格严格-功夫到家 阅读(1913) 评论(0) 推荐(0) 编辑
摘要:http://lindows.iteye.com/blog/456641 http://code.google.com/p/javasimon/downloads/list 阅读全文
posted @ 2011-06-09 10:50 规格严格-功夫到家 阅读(175) 评论(0) 推荐(0) 编辑
摘要:publicclassSort{publiclong[]array;//冒泡排序publicvoidbublingSort(long[]array){intlength=array.length;longtemp;for(inti=length;i>0;i--){for(intj=0;j<i-1;j++){if(array[j]>array[j+1]){temp=array[j+1];array[j+1]=array[j];array[j]=temp;}}}}//选择排序publicvoidselectSort(long[]array){intlength=array.len 阅读全文
posted @ 2011-06-09 10:36 规格严格-功夫到家 阅读(243) 评论(0) 推荐(0) 编辑
摘要:http://extjs2.iteye.com/blog/394128http://www.walkerwen.com/?p=313http://blog.csdn.net/closewbq/archive/2010/06/30/5704158.aspx 阅读全文
posted @ 2011-06-08 15:05 规格严格-功夫到家 阅读(134) 评论(0) 推荐(0) 编辑
摘要:log4j.rootLogger=DEBUG,CONSOLE,DATABASE,FILElog4j.addivity.org.apache=true# 应用于控制台log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppenderlog4j.appender.CONSOLE.Threshold=INFOlog4j.appender.CONSOLE.Target=System.outlog4j.appender.CONSOLE.Encoding=GBKlog4j.appender.CONSOLE.layout=org.apache.log4j.Patt 阅读全文
posted @ 2011-06-08 13:58 规格严格-功夫到家 阅读(219) 评论(0) 推荐(0) 编辑
摘要:具体方法如下:以ls的man为例man ls |col -b >ls.txt将info变成文本,以make为例info make -o make.txt -s 阅读全文
posted @ 2011-06-08 13:57 规格严格-功夫到家 阅读(194) 评论(0) 推荐(0) 编辑
摘要:锁机制(lock) 是多线程编程中最常用的同步机制,用来对多线程间共享的临界区(Critical Section) 进行保护。Pthreads提供了多种锁机制,常见的有:1) Mutex(互斥量):pthread_mutex_***2) Spin lock(自旋锁):pthread_spin_***3) Condition Variable(条件变量):pthread_con_***4) Read/Write lock(读写锁):pthread_rwlock_***在多线程编中,根据应用场合的不同,选择合适的锁来进行同步,对多线程程序的性能影响非常大. 本文主要对 pthread_mutex 阅读全文
posted @ 2011-06-07 09:45 规格严格-功夫到家 阅读(10956) 评论(1) 推荐(1) 编辑
摘要:1、利用System.getProperty()函数获取当前路径:System.out.println(System.getProperty("user.dir"));//user.dir指定了当前的路径2、使用File提供的函数获取当前路径:File directory = new File("");//设定为当前文件夹try{ System.out.println(directory.getCanonicalPath());//获取标准的路径 System.out.println(directory.getAbsolutePath());//获取绝对 阅读全文
posted @ 2011-06-06 11:42 规格严格-功夫到家 阅读(136560) 评论(3) 推荐(3) 编辑
摘要:==================================================Advanced Configuration - Multiple Tomcat Instances==================================================In many circumstances, it is desirable to have a single copy of a Tomcatbinary distribution shared among multiple users on the same server. To makethi 阅读全文
posted @ 2011-06-06 10:59 规格严格-功夫到家 阅读(344) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>usingnamespacestd;//mytest.cppintmain(intargc,char*argv[]){//line120constintN=10;//#ofelementsinarrayconstintg_nLargeRange=500*1024*1024;cout<<"Startoftests"<<endl;int*p1=newint(1);//usetocauseleakint*p2=newint[N];//allocateanintarrayint*p3=newint(2);//u 阅读全文
posted @ 2011-06-03 13:49 规格严格-功夫到家 阅读(1613) 评论(0) 推荐(0) 编辑
摘要:Serialization is a handy and powerful aspect of Java. Being able to persist objects onto disk and read them later is one of the most under-used features of Java I think. In the base cases, serialization can 'just work'. However, as more complicated object formats and design patterns are adop 阅读全文
posted @ 2011-06-03 09:37 规格严格-功夫到家 阅读(433) 评论(0) 推荐(0) 编辑
摘要:今天用来测试Mysql和PostgreSQl的性能,遇到一个Mysql的Bug,而且很神奇的事情,这个Bug还不是每次都重现,网上找了好久,才发现官网上已经有人提了Bug.在windows下面,文件时my.ini,在Linux下面是my.cnf.解决方案是在mysqld下面加上skip-name-resolvehttp://bugs.mysql.com/bug.php?id=52923 阅读全文
posted @ 2011-06-01 16:39 规格严格-功夫到家 阅读(505) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示