代码改变世界

ant 合并 jar

2012-08-05 15:49 by o-lijin-o, 282 阅读, 0 推荐, 收藏, 编辑
摘要:<?xml version="1.0"?><project default="jar"> <target name="jar"> <unzip dest="./xlib"> <fileset dir="./lib"> <include name="**/*.jar"/> </fileset> </unzip> <jar destfile="test.jar" 阅读全文

jni c++调用java

2012-08-03 19:45 by o-lijin-o, 245 阅读, 0 推荐, 收藏, 编辑
摘要:1. jvm.dll要在环境变量PATH,例如 ...;D:\java\sdk6\jre\bin\client2. 需要的jar要合并为一个 B=byte C=char D=double F=float I=int J=long S=short V=void Z=boolean Lfully-qualified-class=fully qualified class [type=array of type> (argument types)return type=method type. If no arguments, ... 阅读全文

检查是否ie6

2012-07-26 16:23 by o-lijin-o, 116 阅读, 0 推荐, 收藏, 编辑
摘要:最简单的判断IE6的方法 function isIE6() { if ( (!!window.ActiveXObject && !window.XMLHttpRequest) ) return true; return false; }另外if (window.XMLHttpRequest) { //Firefox, Opera, IE7, and other browsers will use the native object var request = new XMLHt... 阅读全文

2个免费的nas

2012-07-19 13:38 by o-lijin-o, 99 阅读, 0 推荐, 收藏, 编辑
摘要:freenasopenfiler先记录一下 阅读全文

iptables 打开端口

2012-07-18 21:34 by o-lijin-o, 441 阅读, 0 推荐, 收藏, 编辑
摘要:打开5060 udp 端口iptables -A INPUT -p udp --dport 5060 -j ACCEPTiptables -A OUTPUT -p udp --sport 5060 -j ACCEPT-p 协议 tcp udp icmp--dport 目的端口--sport 源端口如果打开端口区间可以用 5060:5070/etc/init.d/iptables save 保存/etc/init.d/iptables status 查看状态参考http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-iptables 阅读全文

awk 笔记

2012-07-16 14:05 by o-lijin-o, 153 阅读, 0 推荐, 收藏, 编辑
摘要:1 最简单,默认空格分割echo 'aa bb cc' | awk '{ print $2}'输出bb2 指定分割字符echo 'aa,bb,cc' | awk -F, '{print $2}'输出bb3 从文件筛选awk -F, '$2="bb"' test.txtaa,bb,ccff,gg,dd输出aa,bb,cc 阅读全文