`
文章列表
Problem: Right click on an image and select "Set as desktop background", it pops up a window and complains that "This image can't be set as wallpaper. An internal error occurred".   Solution: Incorrect permission on below file or the file is occupied by some other application ...
A very good document about optimistic locking in oracle
1. Patch jboss.jar (Can be optional as I tested out)         -- refer to https://issues.jboss.org/i#browse/JBAS-8786 2. Add jboss-scanning.xml to WEB-INF of your application         -- refer to https://issues.jboss.org/i#browse/JBAS-7035 Content of jboss-scanning.xml <scanning xmlns="u ...
原创文章,转载请注明: 转载自系统技术非业余研究 本文链接地址: Linux Used内存到底哪里去了?   前几天 纯上 同学问了一个问题:   我ps aux看到的RSS内存只有不到30M,但是free看到内存却已经使用了7,8G了,已经开始swap了,请问ps aux的实际物理内存统计是不是漏了哪些内存没算?我有什么办法确定free中used的内存都去哪儿了呢?   这个问题不止一个同学遇到过了,之前子嘉同学也遇到这个问题,内存的计算总是一个迷糊账。 我们今天来把它算个清楚下!   通常我们是这样看内存的剩余情况的:   view sour ...
转载自:http://www.cnblogs.com/zhguang/p/3154584.html   目录 类加载器 动态加载 链接 初始化 示例 类加载器 在了解Java的机制之前,需要先了解类在JVM(Java虚拟机)中是如何加载的,这对后面理解java其它机制将有重要作用。 每 ...
#!/bin/sh #Check input parameterif [ $# -ne 2 ]then        echo "Usage: `basename $0` {KEY_WORD} {PORT-NUMBER}"        exit -1else          echo "Key word of the process: $1"        RET=`expr match $2 "[0-9]*$"`        if [ "$RET" -gt 0 ]; then                ...
  Modify install.ps1 like below (Adding proxy):   # ============================================================================== #  # Fervent Coder Copyright 2011 - Present - Released under the Apache 2.0 License #  # Copyright 2007-2008 The Apache Software Foundation. #   # Licensed unde ...
  @echo off ping -n 100 127.0.0.1>nul if not exist H: net use H: \\Shared_Driver /Persistent:Yes del "C:\ie\Favorites\Links\Web Slice Gallery.url" /q /f /a rd "C:\ie\Favorites\Microsoft Websites" /s /q rd "C:\ie\Favorites\Windows Live" /s /q rd "C:\ie\Fa ...
1. Empty log files in batch find . -name "*.log" -exec bash -c ">{}" \;   2. Copy files in batch find . -maxdepth 1 -type f -exec grep -q "pattern" '{}' ';' -exec cp '{}' /path/to/destination ';'   3. Rename file in batch for i in `find . -maxdepth 1 -name &q ...
A great feature introduced with the JDK 6 is the improved classpath syntax for including Jars of a specific directory. This allows you to do this javac -cp "lib\*" MyClass.java java -cp "lib\*" MyClass from the command line without using a build system like Maven or Ant. But ...

Shell操作数组

#pids=(123 345 678)pids=$(ps -ef | grep key_word | grep -v grep | grep -v $$ | grep -v `basename $0` | awk '{print $2}')pid_array=($pids) #ESplit into a array by " "echo "array is:${pid_array[@]}"  #Print the whole arrayecho "array length is:${#pid_array[*]}"  #Print the ...
$# 传给脚本的参数个数$0 脚本本身的名字$1 传递给该shell脚本的第1个参数$2 传递给该shell脚本的第2个参数$@ 传给脚本的所有参数的列表$* 以一个单字符串显示所有向脚本传递的参数,与位置变量不同,参数可超过9个$$ 脚本运行的当前进程ID号$? 命令执行结果反馈,0表示执行成功,其余数字表示执行不成功 $_ NTc平坦软件保存之前执行的命令的最后一个参数   使用$@传递所有参数给另外一个脚本时使用引号括起来可以防止某个参数里的空格被拆成多个参数 使用$n传递单个参数时类似处理
 Sample 1: if [ $# -ne 1 ] then         echo "Usage: `basename $0` {INTG|UA}"         exit -1 else         INPUT=`echo $1 | tr '[:lower:]' '[:upper:]'`         if [ "$INPUT" = "UA" ]; then                 DBCONNECT_STRING=$DBCONNECT_STRING_CORP_POS_UAT         ...
(1)判断一个字符串是不是全为数字 01 02 03 04 05 06 07 08 09 10 11 #!/bin/sh    # 该变量就是要判断的变量 VAR="1234908"    RET=`expr match $VAR "[0-9]*$"` if [ ${RET} -gt 0 ]; then   echo
Q: When is a Standard MBean not a Standard MBean? A: When it's a StandardMBean. A few month ago, we have added an Advanced JMX Example to JDK 6. This example builds up on the JMX Best Practices and discusses some usual JMX patterns and pitfalls to avoid when designing a Management Interface with JM ...
Global site tag (gtag.js) - Google Analytics