
2011年7月5日
conn / as sysdba
alter user sys identified by "newsyspassword"
posted @
2011-07-05 15:52 jeanx 閱讀(199) |
評論 (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 閱讀(438) |
評論 (0) |
編輯 收藏

2010年7月28日
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 閱讀(1775) |
評論 (0) |
編輯 收藏

2010年5月15日
//記住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 閱讀(223) |
評論 (0) |
編輯 收藏

2010年5月14日
js:
data: {
'userName': encodeURI(userName.value)
},
action:
String userName = URLDecoder.decode(request.getParameter("userName"),"UTF-8");
posted @
2010-05-14 14:05 jeanx 閱讀(182) |
評論 (0) |
編輯 收藏

2010年5月10日
這就是問題產生的原因。因為系統變量里面原來的path的值被覆蓋了。
原來的path的值是什么呢,是c:\windows\system32
修改系統變量path值為:c:\windows\system32
問題解決。
posted @
2010-05-10 10:25 jeanx 閱讀(2049) |
評論 (1) |
編輯 收藏

2010年5月1日
運行,在控制臺敲入你的注冊名,回車,就會出來注冊碼
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(1, 3);
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(0, 1)).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 閱讀(3969) |
評論 (1) |
編輯 收藏

2010年4月30日
<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 閱讀(1382) |
評論 (1) |
編輯 收藏