- 博客(66)
- 问答 (3)
- 收藏
- 关注
原创 spring 定时任务
1:job [code="java"]@Component("apiWorker") public class ApiWorker[/code] spring context 配置文件 [code="java"] ...
2013-01-04 23:38:06 130
原创 MySQL LAST_INSERT_ID
在看代码时,看到有这样的用法:插入一条记录,然后用 [code="java"]SELECT LAST_INSERT_ID() [/code] 取这条记录的id(此id是AUTO_INCREMENT) 当时第一反应会不会有线程安全的问题 查看MySQL文档 [url]http://dev.mysql.com/doc/refman/5.0/en/information-function...
2012-10-09 14:13:37 148
原创 linux 自动登录
[code="java"]#!/usr/bin/expect -f set timeout 60 spawn ssh -D 7070 host expect "password:" send "xiaobao001\r" interact[/code] 会报找不到expect ,是因用用sh执行,不会解释第一行,而应该把些脚本有执行...
2012-05-22 15:41:21 137
原创 ssh 防超时断开
ubuntu [code="java"]/etc/ssh/ssh_config |grep ServerAliveInterva[/code] ServerAliveInterval=60 //设置 这个,每分钟发一次 [url]http://linuxpoison.blogspot.com/2008/05/how-to-increase-ssh-connection-tim...
2012-05-22 14:24:54 190
原创 启动java项目 脚本
[code="java"]## yubaofu #### APP_HOME="..." FILE_NAME="..." MAIN_CLASS_NAME="..." PORT=8888 CLASSPATH=$APP_HOME/$FILE_NAME for i in $APP_HOME/lib/*.jar do CLASSPATH="$i:$CLASSPATH" d...
2011-12-31 14:11:49 206
原创 btrace demo
文档 http://kenai.com/projects/btrace/pages/UserGuide#btrace_anno 下载btrace http://kenai.com/projects/btrace/downloads/directory/releases/release-1.2.1 btrace-bin.tar.gz 文件 tar xvf btrace-b...
2011-12-15 20:43:42 129
原创 reids 好文章链接
[url]http://www.slideshare.net/tednaleid/redis-and-groovy-and-grails-gr8conf-2011[/url] [url]http://blog.mjrusso.com/2010/10/17/redis-from-the-ground-up.html#heading_toc_j_1[/url] [url]http://ti...
2011-09-15 23:51:02 99
原创 log4j
[quote]# This is the configuring for logging displayed in the Application Server # log4j.rootCategory=DEBUG, stdout # Replace the line above if you want to put a log file into the directory # you...
2011-09-08 17:21:40 109
原创 java visualVm 运程监控
我按照官网的说明 [url]http://download.oracle.com/javase/6/docs/technotes/tools/share/jstatd.html[/url] 配置,但最后没有成功 相关信息在附件里 配置信息 配置图:[url]http://www.yupoo.com/photos/fuyou001/82192935/[/url] 本地连拉...
2011-08-09 11:31:15 127
原创 netty
NioServerSocketPipelineSink NioWorker SocketReceiveBufferPool DefaultChannelPipeline
2011-06-22 20:14:28 98
原创 java tuning
top cpu分析 按shift+H 可按线程查看 查出us高的线程id ,用kill -3 javapid 或jstack方式 dump出线程信息,将线程id转为十六进制 jstack pid|grep nid=16进制pid jstack -l javapid dump出java线程信息 iostat 或iostat -x xvda 当iowait过高时,就...
2011-06-20 23:06:18 186
原创 断定域名哪出问题
[code="java"]G:\Documents and Settings\Administrator>nslookup Default Server: gjjline.bta.net.cn Address: 202.106.0.20 > server 8.8.8.8 //设定serverName Default Server: goo...
2011-04-12 09:45:59 128
原创 java并发copy对象
1 [code="java"] package com.fuyou.concurrency; import java.util.Collections; import java.util.HashMap; import java.util.Map; import net.jcip.annotations.GuardedBy; import net.jcip.annotatio...
2011-04-11 23:53:38 146
原创 java 双重检查模式
java 双重检查模式的演变 [url]http://www.ibm.com/developerworks/cn/java/j-dcl.html[/url]
2011-04-10 11:19:08 206
原创 关于泛型
stack1 [code="java"] // Generic stack using E[] - Pages 125-127 import java.util.Arrays; public class Stack < E > { private E[] elements; private int size = 0; private static final ...
2011-04-09 22:15:58 149
原创 document.write
一般情况下:document.write会直接输出里的内容 但一定文档已经下载完成,document.write会清空原有的东西,然后重新输出 Any document.write statement that runs after the page finishes loading will create a new page and overwrite all of the co...
2011-04-02 22:40:22 2055
原创 查看软件运行所依赖的软件包
比如查看apache [code="java"] bsd# whereis httpd httpd: /usr/local/sbin/httpd /usr/local/man/man8/httpd.8.gz /usr/ports/www/apache22/work/httpd-2.2.17/httpd bsd# cd /usr/local/sbin/ bsd# ldd htpd ...
2011-03-31 15:22:12 345
原创 window 常用简单语句
%userprofile% 打开当前用户目录 lusrmgr.msc 配置用户 perfmon 查看内核性能 dxdiag sndvol32.exe 调用出声音喇叭 C:\>netstat -aon|findstr "8080" TCP 127.0.0.1:80 0.0.0.0:0 LISTENIN...
2011-03-13 13:40:29 193
原创 uml 软件
[url]http://astah.change-vision.com/en/product/astah-uml.html[/url] [url]http://office.microsoft.com/en-us/visio/[/url]
2011-02-23 20:52:13 109
原创 set echo on/off
[code="java"] fuyou@ORCL> @test DU -- X fuyou@ORCL> set echo on fuyou@ORCL> @test fuyou@ORCL> select * from dual; DU -- X fuyou@ORCL> set echo off fuyou@ORCL> @test DU -- X ...
2011-01-22 01:03:41 171
原创 js get 传中文参数 后台乱码处理
[code="java"] var text = encodeURI(encodeURI('中国')); alert(decodeURI(decodeURI(text))); //js 解码 alert(text); var imgLog = new Image(); imgLog.src='comment.jsp...
2011-01-20 17:40:56 409
原创 枚 举
[code="java"]package com.fuyou.effect; // Enum type with data and behavior - Pages 149-150 public enum Planet { MERCURY(3.302e+23, 2.439e6), VENUS(4.869e+24, 6.052e6), EARTH(5.975e+24,6.37...
2011-01-19 23:38:38 141
原创 log4j 不包输出不同的日志文件
[code="java"]log4j.rootLogger=Error,rootLog log4j.logger.com.fuyou.log.test2=debug,test2log log4j.logger.com.fuyou.log.test=debug,testlog log4j.appender.A1=org.apache.log4j.ConsoleAppender ...
2011-01-15 20:50:34 97
原创 eclipse 不能启动
重新安装了下jdk ,eclipse居然不能启动了,也没有报错信息,一闪即过 重新解压仍然没有 最后在网上找到解决 办法 ,暂时先这么用吧 添加了-vm "E:\java\bin\javaw.exe" E:\helios\eclipse\eclipse.exe -vm "E:\java\bin\javaw.exe"...
2010-12-18 17:25:37 61
原创 linux 配置dns
[code="java"] [root@localhost ~]# echo "202.106.195.68">/etc/resolv.conf [root@localhost ~]# cat /etc/resolv.conf 202.106.195.68 [root@localhost ~]# echo "nameserver 202.106.195.68">/etc/resolv.co...
2010-11-26 23:00:21 88
原创 oralce 闪回
[code="java"] sys@ORCL> variable scn number; sys@ORCL> exec :scn :=dbms_flashback.get_system_change_number; PL/SQL procedure successfully completed. sys@ORCL> print scn; SCN -----...
2010-11-17 21:43:36 70
原创 查看apache 已加载模块
[code="java"] bsd# which httpd /usr/local/sbin/httpd bsd# httpd --help (48)Address already in use: make_sock: could not bind to address [::]:80 (48)Address already in use: make_sock: could not bi...
2010-11-09 23:23:13 506
原创 freebsd https
[code="java"]$ which openssl /usr/bin/openssl bsd# openssl genrsa -des3 -out server.key 1024 --产生私钥 要产生RSA密钥,RSA是所有主要的 浏览器都支持的一种的加密算法 Generating RSA private key, 1024 bit long modulus ..............
2010-11-08 23:24:47 187
原创 oralce 启动信息
[code="java"] SQL> startup nomout SP2-0714: invalid combination of STARTUP options SQL> startup nomount ORACLE instance started. Total System Global Area 209715200 bytes Fixed Size ...
2010-10-21 21:59:09 308
原创 跟踪sql 等待事件
[code="java"] stmt.execute( "begin dbms_monitor.session_trace_enable(waits=>TRUE); end;" ); [/code] 在做jdbc sql 操作前,先执行这个用于对等待事件的sql 跟踪(dbms_monitor 10g以上才行) 9i用[code="java"] alter session set ev...
2010-08-21 20:57:35 124
原创 设置sqlplus 的autotrace
[code="java"] SQL> conn as / sysdba SP2-0306: 无效选项。 用法: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] 其中 : : = [/][@] | / SQL> conn / as sysdba 已连接。 SQL> @E:\oracle\ora92\rdbms\admin\utlxplan.sql ...
2010-08-18 20:54:03 132
原创 connect by
例子: [code="java"] fuyou@ORCL> select deptno,ename,row_number() over(partition by deptno order by empno)rn 2 ,count(*)over(partition by deptno) cnt 3 from emp; DEPTNO ENAME ...
2010-08-07 00:21:39 112
原创 translate replace区别
数据: [code="java"]fuyou@ORCL> select ename||sal from emp; ENAME||SAL ------------------------------------------------------------ SMITH800 ALLEN1600 WARD1250 JONES2975 MARTIN1250 BLAKE2850 ...
2010-08-06 23:48:23 115
原创 order by 排序
[code="java"]fuyou@ORCL> select * from emp order by 1; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- -------------------- --------...
2010-08-04 23:56:01 93
原创 查看网络端口
在xp cmd下 查看帮助 [code="java"] D:\Documents and Settings\yubao>netstat -h 显示协议统计信息和当前 TCP/IP 网络连接。 NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval] -a ...
2010-08-03 23:27:28 127
原创 ie 6 分析事件
[code="java"] New Document Right click the above rectangle. [查看] var divObj = document.getElementById('divEvent'); var intObj = document.ge...
2010-08-03 14:37:41 102
原创 跟踪 oracle 监听
在cmd 里输入下面的命令 [code="java"]D:\Documents and Settings\yubao>lsnrctl trace 2 LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 01-8月 -2010 18:20:26 Copyright (c) 1991, 2005, Oracle. ...
2010-08-01 18:17:34 169
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人