posts - 15,  comments - 4,  trackbacks - 0
  2010年4月30日
1.查询ADSL的ip地址,
http://ip.chinaz.com/
2.访问路由器设置端口映射。

posted @ 2011-07-20 10:02 jeanx 阅读(289) | 评论 (1)编辑 收藏
conn / as sysdba

alter user sys identified by "newsyspassword"
posted @ 2011-07-05 15:52 jeanx 阅读(187) | 评论 (0)编辑 收藏

netstat -ano

  我们可以知道某一端口被那个进程(对应PID)占用;
  然后我们可以打开任务管理器;查看某一PID对应的进程名;
  如果PID没有显示,菜单》查看》选择列》选中PID即可;
  得知进程后,我们可以将进程杀掉;修改其使用的端口。

 


假如我们需要确定谁占用了我们的9050端口

1、Windows平台
在windows命令行窗口下执行:
C:\>netstat -aon|findstr "9050"
TCP    127.0.0.1:9050         0.0.0.0:0              LISTENING       2016


看到了吗,端口被进程号为2016的进程占用,继续执行下面命令:

C:\>tasklist|findstr "2016"
tor.exe                     2016 Console                 0     16,064 K

很清楚吧,tor占用了你的端口

 

2、AIX
$netstat -Aan|grep 30542
f10000f303321b58 tcp4 0 0 *.30542 *.* LISTEN
$rmsock f10000f303321b58 tcpcb
The socket 0x3321800 is being held by proccess 692476 (db2sysc).

这个我就不解释了

 

3、Linux
$netstat -pan|grep 2809
tcp    0   0 0.0.0.0:2809   0.0.0.0:*   LISTEN   9493/java
del.icio.us Tags: aix,windows,tips

 

 

 


NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval]

-a            显示所有连接和监听端口。

-b            显示包含于创建每个连接或监听端口的可执行组件。在某些情况下已知可执行组件
                拥有多个独立组件,并且在这些情况下
                包含于创建连接或监听端口的组件序列被显示。这种情况下,可执行组件名
                在底部的 [] 中,顶部是其调用的组件,等等,直到 TCP/IP 部分。注意此选项
                可能需要很长时间,如果没有足够权限可能失败。
               
-e            显示以太网统计信息。此选项可以与 -s选项组合使用。
               
-n            以数字形式显示地址和端口号。

-o            显示与每个连接相关的所属进程 ID。

-p proto      显示 proto 指定的协议的连接;proto 可以是
                下列协议之一: TCP、UDP、TCPv6 或 UDPv6。
                如果与 -s 选项一起使用以显示按协议统计信息,proto 可以是下列协议之一:
                IP、IPv6、ICMP、ICMPv6、TCP、TCPv6、UDP 或 UDPv6。
               
-r            显示路由表。

-s            显示按协议统计信息。默认地,显示 IP、
                IPv6、ICMP、ICMPv6、TCP、TCPv6、UDP 和 UDPv6 的统计信息;
                -p 选项用于指定默认情况的子集。
               
-v            与 -b 选项一起使用时将显示包含于
                为所有可执行组件创建连接或监听端口的组件。
               
interval      重新显示选定统计信息,每次显示之间
                暂停时间间隔(以秒计)。按 CTRL+C 停止重新
                显示统计信息。如果省略,netstat 显示当前
                配置信息(只显示一次)

posted @ 2011-07-05 11:51 jeanx 阅读(422) | 评论 (0)编辑 收藏
Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

在MySql的安装目录下,有个my.ini文件,打开它:
将下面的值改为utf8如下:
default-character-set=utf8

把mysql服务重新启动


posted @ 2010-07-28 15:01 jeanx 阅读(1759) | 评论 (0)编辑 收藏
//记住URL
UserVO user = (UserVO) session.getAttribute(Constants.SESSION_USER);
if (user == null) {
    String str 
= request.getRequestURL().toString();
    String quryStr 
= request.getQueryString();
    String url 
= str + "?" + quryStr;
    session.setAttribute(
"url", url);
}

//获取URL
String redrectUrl  = request.getParameter("redUrl");
//检查是否存在有最后URL
if (redrectUrl != null&&!redrectUrl.equals("")) {
    forward.setRedirect(
true);
    forward.setPath(redrectUrl);
    
return forward;           
}
else{               
    forward.setPath(
"/index/home/index.do?oper=gotoHome");
}

posted @ 2010-05-15 14:52 jeanx 阅读(205) | 评论 (0)编辑 收藏
js:
data: {
                'userName': encodeURI(userName.value)
 },

action:
String userName = URLDecoder.decode(request.getParameter("userName"),"UTF-8");   



posted @ 2010-05-14 14:05 jeanx 阅读(167) | 评论 (0)编辑 收藏
这就是问题产生的原因。因为系统变量里面原来的path的值被覆盖了。

原来的path的值是什么呢,是c:\windows\system32

修改系统变量path值为:c:\windows\system32

问题解决。
posted @ 2010-05-10 10:25 jeanx 阅读(2036) | 评论 (1)编辑 收藏
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>三种弹出对话框的用法实例</title>
<script language="javascript">
function ale()
{//这个基本没有什么说的,就是弹出一个提醒的对话框
    alert("我敢保证,你现在用的是演示一");
}

function firm()
{//利用对话框返回的值 (true 或者 false)
    if(confirm("你确信要转去 天轰穿的博客?"))
    
{//如果是true ,那么就把页面转向thcjp.cnblogs.com
        location.href="http://thcjp.cnblogs.com";
    }

    
else
    
{//否则说明下了,赫赫
        alert("你按了取消,那就是返回false");
    }

}

function prom()
{
    
var name=prompt("请输入您的名字","");//将输入的内容赋给变量 name ,
    //这里需要注意的是,prompt有两个参 数,前面是提示的话,后面是当对话框出来后,在对话框里的默认值
    if(name)//如果返回的有内容
    {
        alert(
"欢迎您:"+ name)
    }

}

</script>
</head>

<body>
<p>对话框有三种</p>
<p>1:只是提醒,不能对脚本产生任何改变;</p>
<p>2:一般用于确认,返回 true 或者 false ,所 以可以轻松用于 ifelse判断 </p>
<p>3: 一个带输入的对话框,可以返回用户填入的字符串,常见 于某些留言本或者论坛输入内容那里的 插入UBB格式图片 </p>
<p>下面我们分别演示:</p>
<p>演示一:提醒 对话框</p>
<p>
  
<input type="submit" name="Submit" value="提交" onclick="ale()" />
</p>
<p>演示二 :确认对话框 </p>
<p>
  
<input type="submit" name="Submit2" value="提交" onclick="firm()" />
</p>
<p>演示三 :要求用户输入,然后给个结果</p>
<p>
  
<input type="submit" name="Submit3" value="提交" onclick="prom()" />
</p>
</body>
</html>

原文:http://www.cnblogs.com/thcjp/archive/2006/08/04/468047.html
posted @ 2010-05-04 10:27 jeanx 阅读(220) | 评论 (0)编辑 收藏
运行,在控制台敲入你的注册名,回车,就会出来注册码
 1 package com.xpow.hodo.util;
 2 
 3 import java.io.BufferedReader;
 4 import java.io.IOException;
 5 import java.io.InputStreamReader;
 6 
 7 public class MyEclipseGen {
 8     private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself.";
 9 
10     public String getSerial(String userId, String licenseNum) {
11         java.util.Calendar cal = java.util.Calendar.getInstance();
12         cal.add(13);
13         cal.add(6-1);
14         java.text.NumberFormat nf = new java.text.DecimalFormat("000");
15         licenseNum = nf.format(Integer.valueOf(licenseNum));
16         String verTime = new StringBuilder("-").append(
17                 new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))
18                 .append("0").toString();
19         String type = "YE3MP-";
20         String need = new StringBuilder(userId.substring(01)).append(type)
21                 .append("300").append(licenseNum).append(verTime).toString();
22         String dx = new StringBuilder(need).append(LL).append(userId)
23                 .toString();
24         int suf = this.decode(dx);
25         String code = new StringBuilder(need).append(String.valueOf(suf))
26                 .toString();
27         return this.change(code);
28     }
29 
30     private int decode(String s) {
31         int i;
32         char[] ac;
33         int j;
34         int k;
35         i = 0;
36         ac = s.toCharArray();
37         j = 0;
38         k = ac.length;
39         while (j < k) {
40             i = (31 * i) + ac[j];
41             j++;
42         }
43         return Math.abs(i);
44     }
45 
46     private String change(String s) {
47         byte[] abyte0;
48         char[] ac;
49         int i;
50         int k;
51         int j;
52         abyte0 = s.getBytes();
53         ac = new char[s.length()];
54         i = 0;
55         k = abyte0.length;
56         while (i < k) {
57             j = abyte0[i];
58             if ((j >= 48&& (j <= 57)) {
59                 j = (((j - 48+ 5% 10+ 48;
60             } else if ((j >= 65&& (j <= 90)) {
61                 j = (((j - 65+ 13% 26+ 65;
62             } else if ((j >= 97&& (j <= 122)) {
63                 j = (((j - 97+ 13% 26+ 97;
64             }
65             ac[i] = (char) j;
66             i++;
67         }
68         return String.valueOf(ac);
69     }
70 
71     public MyEclipseGen() {
72         super();
73     }
74 
75     public static void main(String[] args) {
76         try {
77             System.out.println("please input register name:");
78             BufferedReader reader = new BufferedReader(new InputStreamReader(
79                     System.in));
80             String userId = null;
81             userId = reader.readLine();
82             MyEclipseGen myeclipsegen = new MyEclipseGen();
83             String res = myeclipsegen.getSerial(userId, "5");
84             System.out.println("Serial:" + res);
85             reader.readLine();
86         } catch (IOException ex) {
87         }
88     }
89 }


posted @ 2010-05-01 17:31 jeanx 阅读(3957) | 评论 (1)编辑 收藏
<c:if test="${fn:length(activityVO.activityName)>12}">
    ${fn:substring(activityVO.activityName,
0,10)}..
</c:if>
<c:if test="${fn:length(activityVO.activityName)<12}">
    ${activityVO.activityName }
</c:if>



posted @ 2010-04-30 17:12 jeanx 阅读(1362) | 评论 (1)编辑 收藏
表单只有一个文本框,测试人员说,按回车键自动提交了,自己试了试,果然如此。

解决办法:
为输入框增加一个onkeydown属性, onkeydown="if(event.keyCode==13){return false;}" ,问题解决.
posted @ 2010-04-30 10:12 jeanx 阅读(521) | 评论 (0)编辑 收藏