<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CanleiSky Blog &#187; CanleiSky</title>
	<atom:link href="http://www.oioq.com/weblog/author/canleisky/feed" rel="self" type="application/rss+xml" />
	<link>http://www.oioq.com</link>
	<description>生活的理想是为了理想的生活.</description>
	<lastBuildDate>Sun, 30 May 2010 09:14:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Java版Discuz! AuthCode</title>
		<link>http://www.oioq.com/weblog/20100309/java%e7%89%88discuz-authcode</link>
		<comments>http://www.oioq.com/weblog/20100309/java%e7%89%88discuz-authcode#comments</comments>
		<pubDate>Mon, 08 Mar 2010 16:31:20 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=70</guid>
		<description><![CDATA[package discuz;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Calendar;
import java.util.Random;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
public class AuthCode {
    static BASE64Encoder encoder = new BASE64Encoder();
    static BASE64Decoder decoder = new BASE64Decoder();
    public enum DiscuzAuthcodeMode {
        Encode, Decode
    };
    public static void main(String[] args){
        System.out.print(&#8221;["+authcodeDecode("672d+9y5HQ0zqsONrBpSv5HwfTBASYjqVPyQ4O3RMN7xQcg", "soonyo")+"]&#8220;);
    }
    public static String CutString(String str, int startIndex, int length){
        if (startIndex &#62;= 0) {
            if (length &#60; [...]]]></description>
			<content:encoded><![CDATA[<p>package discuz;</p>
<p>import java.security.MessageDigest;<br />
import java.security.NoSuchAlgorithmException;<br />
import java.util.Calendar;<br />
import java.util.Random;<br />
import sun.misc.BASE64Decoder;<br />
import sun.misc.BASE64Encoder;</p>
<p>public class AuthCode {<br />
    static BASE64Encoder encoder = new BASE64Encoder();<br />
    static BASE64Decoder decoder = new BASE64Decoder();<br />
    public enum DiscuzAuthcodeMode {<br />
        Encode, Decode<br />
    };</p>
<p>    public static void main(String[] args){<br />
        System.out.print(&#8221;["+authcodeDecode("672d+9y5HQ0zqsONrBpSv5HwfTBASYjqVPyQ4O3RMN7xQcg", "soonyo")+"]&#8220;);<br />
    }</p>
<p>    public static String CutString(String str, int startIndex, int length){<br />
        if (startIndex &gt;= 0) {<br />
            if (length &lt; 0) {<br />
                length = length * -1;<br />
                if(startIndex &#8211; length &lt; 0) {<br />
                    length = startIndex;<br />
                    startIndex = 0;<br />
                } else {<br />
                    startIndex = startIndex &#8211; length;<br />
                }<br />
            }</p>
<p>            if (startIndex &gt; str.length()) {<br />
                return &#8220;&#8221;;<br />
            }</p>
<p>        } else {<br />
            if (length &lt; 0) {<br />
                return &#8220;&#8221;;<br />
            } else {<br />
                if (length + startIndex &gt; 0) {<br />
                    length = length + startIndex;<br />
                    startIndex = 0;<br />
                } else {<br />
                    return &#8220;&#8221;;<br />
                }<br />
            }<br />
        }</p>
<p>        if (str.length() &#8211; startIndex &lt; length) {</p>
<p>            length = str.length() &#8211; startIndex;<br />
        }</p>
<p>        return str.substring(startIndex, startIndex + length);<br />
    }</p>
<p>    public static String CutString(String str, int startIndex) {<br />
        return CutString(str, startIndex, str.length());<br />
    }</p>
<p>    public static String MD5(String pass) {<br />
        byte[] defaultBytes = pass.getBytes();<br />
        try{<br />
             MessageDigest algorithm = MessageDigest.getInstance(&#8221;MD5&#8243;);<br />
             algorithm.reset();<br />
             algorithm.update(defaultBytes);<br />
             byte messageDigest[] = algorithm.digest();</p>
<p>             StringBuffer hexString = new StringBuffer();<br />
             for (int i=0;i&lt;messageDigest.length;i++) {<br />
            String hex = Integer.toHexString(0xFF &amp; messageDigest[i]);<br />
            if(hex.length()==1)<br />
            hexString.append(&#8221;0&#8243; );</p>
<p>            hexString.append(hex);<br />
             }<br />
             return hexString.toString();<br />
        }<br />
        catch(NoSuchAlgorithmException nsae){<br />
        }</p>
<p>        return &#8220;&#8221;;<br />
    }</p>
<p>    public static boolean StrIsNullOrEmpty(String str) {<br />
        //#if NET1<br />
        if (str == null || str.trim().equals(&#8221;")) {<br />
            return true;<br />
        }</p>
<p>        return false;<br />
    }</p>
<p>    static private byte[] GetKey(byte[] pass, int kLen) {<br />
        byte[] mBox = new byte[kLen];</p>
<p>        for (int i = 0; i &lt; kLen; i++) {<br />
            mBox[i] = (byte) i;<br />
        }</p>
<p>        int j = 0;<br />
        for (int i = 0; i &lt; kLen; i++) {</p>
<p>            j = (j + (int) ((mBox[i] + 256) % 256) + pass[i % pass.length])<br />
                    % kLen;</p>
<p>            byte temp = mBox[i];<br />
            mBox[i] = mBox[j];<br />
            mBox[j] = temp;<br />
        }</p>
<p>        return mBox;<br />
    }</p>
<p>    public static String RandomString(int lens) {<br />
        String[] CharArray = {&#8221;a&#8221;, &#8220;b&#8221;, &#8220;c&#8221;, &#8220;d&#8221;, &#8220;e&#8221;, &#8220;f&#8221;, &#8220;g&#8221;, &#8220;h&#8221;, &#8220;j&#8221;, &#8220;k&#8221;, &#8220;l&#8221;, &#8220;m&#8221;, &#8220;n&#8221;, &#8220;o&#8221;, &#8220;p&#8221;, &#8220;q&#8221;, &#8220;r&#8221;, &#8220;s&#8221;, &#8220;t&#8221;, &#8220;u&#8221;, &#8220;v&#8221;, &#8220;w&#8221;, &#8220;x&#8221;, &#8220;y&#8221;, &#8220;z&#8221;, &#8220;0&#8243; , &#8220;1&#8243; , &#8220;2&#8243; , &#8220;3&#8243; , &#8220;4&#8243; , &#8220;5&#8243; , &#8220;6&#8243; , &#8220;7&#8243; , &#8220;8&#8243; , &#8220;9&#8243; };<br />
        int clens = CharArray.length;<br />
        String sCode = &#8220;&#8221;;<br />
        Random random = new Random();<br />
        for (int i = 0; i &lt; lens; i++) {<br />
            sCode += CharArray[Math.abs(random.nextInt(clens))];<br />
        }<br />
        return sCode;<br />
    }</p>
<p>    public static String authcodeEncode(String source, String key, int expiry) {<br />
        return authcode(source, key, DiscuzAuthcodeMode.Encode, expiry);</p>
<p>    }</p>
<p>    public static String authcodeEncode(String source, String key) {<br />
        return authcode(source, key, DiscuzAuthcodeMode.Encode, 0);</p>
<p>    }</p>
<p>    public static String authcodeDecode(String source, String key) {<br />
        return authcode(source, key, DiscuzAuthcodeMode.Decode, 0);</p>
<p>    }</p>
<p>    private static String authcode(String source, String key,<br />
            DiscuzAuthcodeMode operation, int expiry) {<br />
        try {<br />
            if (source == null || key == null) {<br />
                return &#8220;&#8221;;<br />
            }</p>
<p>            int ckey_length = 4;<br />
            String keya, keyb, keyc, cryptkey, result;</p>
<p>            key = MD5(key);</p>
<p>            keya = MD5(CutString(key, 0, 16));</p>
<p>            keyb = MD5(CutString(key, 16, 16));</p>
<p>            keyc = ckey_length &gt; 0 ? (operation == DiscuzAuthcodeMode.Decode ? CutString(<br />
                    source, 0, ckey_length)<br />
                    : RandomString(ckey_length))<br />
                    : &#8220;&#8221;;</p>
<p>            cryptkey = keya + MD5(keya + keyc);</p>
<p>            if (operation == DiscuzAuthcodeMode.Decode) {<br />
                byte[] temp;<br />
                temp = decoder.decodeBuffer(CutString(source, ckey_length));<br />
                result = new String(RC4(temp, cryptkey));<br />
                if (CutString(result, 10, 16).equals(CutString(MD5(CutString(result, 26) + keyb), 0, 16))) {<br />
                    return CutString(result, 26);<br />
                } else {<br />
                    temp = decoder.decodeBuffer(CutString(source+&#8221;=&#8221;, ckey_length));<br />
                    result = new String(RC4(temp, cryptkey));<br />
                    if (CutString(result, 10, 16).equals(CutString(MD5(CutString(result, 26) + keyb), 0, 16))) {<br />
                        return CutString(result, 26);<br />
                    } else {<br />
                        temp = decoder.decodeBuffer(CutString(source+&#8221;==&#8221;, ckey_length));<br />
                        result = new String(RC4(temp, cryptkey));<br />
                        if (CutString(result, 10, 16).equals(CutString(MD5(CutString(result, 26) + keyb), 0, 16))) {<br />
                            return CutString(result, 26);<br />
                        }else{<br />
                            return &#8220;&#8221;;<br />
                        }<br />
                    }<br />
                }<br />
            } else {<br />
                source = &#8220;0000000000&#8243; + CutString(MD5(source + keyb), 0, 16)<br />
                        + source;</p>
<p>                byte[] temp = RC4(source.getBytes(&#8221;GBK&#8221;), cryptkey);</p>
<p>                return keyc + encoder.encodeBuffer(temp);</p>
<p>            }<br />
        } catch (Exception e) {<br />
            return &#8220;&#8221;;<br />
        }</p>
<p>    }</p>
<p>    private static byte[] RC4(byte[] input, String pass) {<br />
        if (input == null || pass == null)<br />
            return null;</p>
<p>        byte[] output = new byte[input.length];<br />
        byte[] mBox = GetKey(pass.getBytes(), 256);</p>
<p>        int i = 0;<br />
        int j = 0;</p>
<p>        for (int offset = 0; offset &lt; input.length; offset++) {<br />
            i = (i + 1) % mBox.length;<br />
            j = (j + (int) ((mBox[i] + 256) % 256)) % mBox.length;</p>
<p>            byte temp = mBox[i];<br />
            mBox[i] = mBox[j];<br />
            mBox[j] = temp;<br />
            byte a = input[offset];</p>
<p>            byte b = mBox[(toInt(mBox[i]) + toInt(mBox[j])) % mBox.length];</p>
<p>            output[offset] = (byte) ((int) a ^ (int) toInt(b));<br />
        }</p>
<p>        return output;<br />
    }</p>
<p>    public static int toInt(byte b) {<br />
        return (int) ((b + 256) % 256);<br />
    }</p>
<p>    public long getUnixTimestamp() {<br />
        Calendar cal = Calendar.getInstance();<br />
        return cal.getTimeInMillis() / 1000;<br />
    }</p>
<p>}</p>
<p>记录一下，挺实有的函数，加解密从方式上看貌似与PHP版不同，但结果出来是一样滴~</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20100309/java%e7%89%88discuz-authcode/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ORACLE事务机制，附PHP+ORACLE操作实例</title>
		<link>http://www.oioq.com/weblog/20091223/oracle%e4%ba%8b%e5%8a%a1%e6%9c%ba%e5%88%b6%ef%bc%8c%e9%99%84phporacle%e6%93%8d%e4%bd%9c%e5%ae%9e%e4%be%8b</link>
		<comments>http://www.oioq.com/weblog/20091223/oracle%e4%ba%8b%e5%8a%a1%e6%9c%ba%e5%88%b6%ef%bc%8c%e9%99%84phporacle%e6%93%8d%e4%bd%9c%e5%ae%9e%e4%be%8b#comments</comments>
		<pubDate>Wed, 23 Dec 2009 14:56:19 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=55</guid>
		<description><![CDATA[        熟悉SQL SERVER的话，肯定常用到BEGIN TRAN和COMMIT TRAN语句。但在ORACLE中并没有这种类似的事务控制语句，ORACLE当然有事务，不然也不会是最牛X的数据库服务器软件了。下面简单的介绍下ORACLE的事务机制。
        在ORACLE中采用隐式事务，既然是隐式事务，显然是不需要COMMIT TRAN语句了，但COMMIT还是要的。
        在默认情况下，ORACLE对每次查询中对表的修改都是有隐式事务的，直到执行到COMMIT;或ROLLBACK;时提交或回滚事务。
        下面附上一段在PHP中一条语句操作多个表的解决办法。OCI_DEFAULT模式将默认为每次查询产生一个事务。
$sql = &#8216;BEGIN
UPDATE TEST_A SET COLUMN_A = 1 WHERE ROWNUM = 1;
UPDATE TEST_B SET COLUMN_B = 2 WHERE ROWNUM =1;
 END;&#8217;;
 $conn = oci_connect(&#8217;scott&#8217;, &#8216;tiger&#8217;, &#8216;orcl&#8217;);
$stmt = oci_parse($conn, $sql);
oci_execute($stmt, OCI_DEFAULT);
// 回滚事务，返回boolean值
$rollbacked = oci_rollback($conn);
// 提交事务，返回boolean值
$commited = oci_commit($conn);
实例完毕，谢谢收看CCTV。
]]></description>
			<content:encoded><![CDATA[<p>        熟悉SQL SERVER的话，肯定常用到BEGIN TRAN和COMMIT TRAN语句。但在ORACLE中并没有这种类似的事务控制语句，ORACLE当然有事务，不然也不会是最牛X的数据库服务器软件了。下面简单的介绍下ORACLE的事务机制。</p>
<p>        在ORACLE中采用隐式事务，既然是隐式事务，显然是不需要COMMIT TRAN语句了，但COMMIT还是要的。</p>
<p>        在默认情况下，ORACLE对每次查询中对表的修改都是有隐式事务的，直到执行到COMMIT;或ROLLBACK;时提交或回滚事务。</p>
<p>        下面附上一段在PHP中一条语句操作多个表的解决办法。<tt><span style="color: #ff0000;">OCI_DEFAULT模式将默认为每次查询产生一个事务。</span></tt></p>
<p>$sql = &#8216;BEGIN</p>
<p>UPDATE TEST_A SET COLUMN_A = 1 WHERE ROWNUM = 1;</p>
<p>UPDATE TEST_B SET COLUMN_B = 2 WHERE ROWNUM =1;</p>
<p> END;&#8217;;</p>
<p> $conn = oci_connect(&#8217;scott&#8217;, &#8216;tiger&#8217;, &#8216;orcl&#8217;);</p>
<p>$stmt = oci_parse($conn, $sql);</p>
<p>oci_execute($stmt, <tt><strong>OCI_DEFAULT</strong></tt>);</p>
<p>// 回滚事务，返回boolean值</p>
<p>$rollbacked = oci_rollback($conn);</p>
<p>// 提交事务，返回boolean值</p>
<p>$commited = oci_commit($conn);</p>
<p>实例完毕，谢谢收看CCTV。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20091223/oracle%e4%ba%8b%e5%8a%a1%e6%9c%ba%e5%88%b6%ef%bc%8c%e9%99%84phporacle%e6%93%8d%e4%bd%9c%e5%ae%9e%e4%be%8b/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP最牛B的开发工具 &#8211; NetBeans</title>
		<link>http://www.oioq.com/weblog/20091205/php%e6%9c%80%e7%89%9bb%e7%9a%84%e5%bc%80%e5%8f%91%e5%b7%a5%e5%85%b7-netbeans</link>
		<comments>http://www.oioq.com/weblog/20091205/php%e6%9c%80%e7%89%9bb%e7%9a%84%e5%bc%80%e5%8f%91%e5%b7%a5%e5%85%b7-netbeans#comments</comments>
		<pubDate>Sat, 05 Dec 2009 04:52:39 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[开发工具]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=51</guid>
		<description><![CDATA[无论是界面、运行效率、易用性、都比eclipse强多了。
1.运行效率高，eclipse太慢了
2.设置可以保存下来，公司可以通过保存下来的设置文件统一设置开发工具
3.提供HTML控件，虽然不是常用，但必竟有时用起来还是挺爽的
4.代码提示更完善，被支持的提示有HTML, PHP,JAVA,CSS,JAVASCRIPT,JQUERY等一些框架的提示，非常不错
]]></description>
			<content:encoded><![CDATA[<p>无论是界面、运行效率、易用性、都比eclipse强多了。</p>
<p>1.运行效率高，eclipse太慢了</p>
<p>2.设置可以保存下来，公司可以通过保存下来的设置文件统一设置开发工具</p>
<p>3.提供HTML控件，虽然不是常用，但必竟有时用起来还是挺爽的</p>
<p>4.<span style="color: #ff0000;">代码提示更完善，被支持的提示有HTML, PHP,JAVA,CSS,JAVASCRIPT,JQUERY等一些框架的提示，非常不错</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20091205/php%e6%9c%80%e7%89%9bb%e7%9a%84%e5%bc%80%e5%8f%91%e5%b7%a5%e5%85%b7-netbeans/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>jquery UI dialog 挡住浮动层或iframe</title>
		<link>http://www.oioq.com/weblog/20091205/jquery-ui-dialog-%e6%8c%a1%e4%bd%8f%e6%b5%ae%e5%8a%a8%e5%b1%82%e6%88%96iframe</link>
		<comments>http://www.oioq.com/weblog/20091205/jquery-ui-dialog-%e6%8c%a1%e4%bd%8f%e6%b5%ae%e5%8a%a8%e5%b1%82%e6%88%96iframe#comments</comments>
		<pubDate>Sat, 05 Dec 2009 04:39:54 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=49</guid>
		<description><![CDATA[jquery UI dialog 老是挡住浮动的层，导致dialog弹出后浮动元素消失，这种情况只会在ie6下出现，解决办法是在浮动层的CSS样式里设置一下高度就可以了。
]]></description>
			<content:encoded><![CDATA[<p>jquery UI dialog 老是挡住浮动的层，导致dialog弹出后浮动元素消失，这种情况只会在ie6下出现，解决办法是在浮动层的CSS样式里设置一下高度就可以了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20091205/jquery-ui-dialog-%e6%8c%a1%e4%bd%8f%e6%b5%ae%e5%8a%a8%e5%b1%82%e6%88%96iframe/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS安装wine 1.1.33日记</title>
		<link>http://www.oioq.com/weblog/20091122/centos-install-wine-1-1-33</link>
		<comments>http://www.oioq.com/weblog/20091122/centos-install-wine-1-1-33#comments</comments>
		<pubDate>Sun, 22 Nov 2009 06:31:13 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=46</guid>
		<description><![CDATA[1.去官网下载wine 1.1.33，下载后解压到/opt/download/wine-1.1.33
下载地址：http://www.winehq.org/announce/1.1.33
2.cd /opt/downloa/wine-1.1.33
3.执行安装前环境检查
[root@localhost wine-1.1.33]# ./configure
如果如现checking error &#8230; please install xxx 字样表示执行这项检查报错，再执行yum install xxx，这里如果报Xlib/Xfree86错误的话要执行
[root@localhost wine-1.1.33]# yum -y groupinstall &#8220;X Software Development&#8221;
或者：
[root@localhost wine-1.1.33]# yum install libxorg-x11-devel
[root@localhost wine-1.1.33]# yum install libxorg-x11-static-devel
执行安装后再次运行
[root@localhost wine-1.1.33]# ./configure
直到完全检查成功为止
4.进行编译安装，这个过程非常长，耐心等待编译完成：
[root@localhost wine-1.1.33]# make depend &#38;&#38; make
]]></description>
			<content:encoded><![CDATA[<p>1.去官网下载wine 1.1.33，下载后解压到/opt/download/wine-1.1.33</p>
<p>下载地址：http://www.winehq.org/announce/1.1.33</p>
<p>2.cd /opt/downloa/wine-1.1.33</p>
<p>3.执行安装前环境检查</p>
<p>[root@localhost wine-1.1.33]# ./configure</p>
<p>如果如现checking error &#8230; please install xxx 字样表示执行这项检查报错，再执行yum install xxx，这里如果报Xlib/Xfree86错误的话要执行</p>
<p>[root@localhost wine-1.1.33]# yum -y groupinstall &#8220;X Software Development&#8221;</p>
<p>或者：</p>
<p>[root@localhost wine-1.1.33]# yum install libxorg-x11-devel<br />
[root@localhost wine-1.1.33]# yum install libxorg-x11-static-devel</p>
<p>执行安装后再次运行</p>
<p>[root@localhost wine-1.1.33]# ./configure</p>
<p>直到完全检查成功为止</p>
<p>4.进行编译安装，这个过程非常长，耐心等待编译完成：</p>
<p>[root@localhost wine-1.1.33]# make depend &amp;&amp; make</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20091122/centos-install-wine-1-1-33/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>设置Oracle Instant Client(windows 版)</title>
		<link>http://www.oioq.com/weblog/20091122/oracle-instant-client-windows</link>
		<comments>http://www.oioq.com/weblog/20091122/oracle-instant-client-windows#comments</comments>
		<pubDate>Sat, 21 Nov 2009 16:41:30 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=39</guid>
		<description><![CDATA[第一步，下载Instant Client for Microsoft Windows (32-bit)
        下载地址：http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
        下载和数据库版本一至的Instant Client，本机是10g r2所以选择Version 10.2.0.4
安装：
        1.直接解压到一个目录，本机是：D:\WareSoft\instantclient_10_2
        2.设置环境变量
            在PATH变量后追回D:\WareSoft\instantclient_10_2
            新建TNS_ADMIN变量，值为：D:\WareSoft\instantclient_10_2
            新建LD_LIBRARY_PATH变量，值为：D:\WareSoft\instantclient_10_2
           新建NLS_LANG变量(连接字符集，本机是UTF-8)，值为：SIMPLIFIED CHINESE_CHINA.AL32UTF8
3.创建链接配置文件
           新建文件，命名为：tnsnames.ora，放到D:\WareSoft\instantclient_10_2下，内容示例：
192.168.1.105 =
    (DESCRIPTION =
        (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.105)(PORT = 1521))
    )
    (CONNECT_DATA =
        (SERVICE_NAME = XE)
)
)
内容说明：
192.168.1.105(链接别名) =
    (DESCRIPTION =
        (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.105(服务器IP))(PORT = 1521(服务端口)))
    )
    (CONNECT_DATA =
        [...]]]></description>
			<content:encoded><![CDATA[<p>第一步，下载Instant Client for Microsoft Windows (32-bit)<br />
        下载地址：<a href="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html">http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html</a><br />
        下载和数据库版本一至的Instant Client，本机是10g r2所以选择Version 10.2.0.4</p>
<p>安装：<br />
        1.直接解压到一个目录，本机是：D:\WareSoft\instantclient_10_2<br />
        2.设置环境变量<br />
            在PATH变量后追回D:\WareSoft\instantclient_10_2<br />
            新建TNS_ADMIN变量，值为：D:\WareSoft\instantclient_10_2<br />
            新建LD_LIBRARY_PATH变量，值为：D:\WareSoft\instantclient_10_2<br />
           新建NLS_LANG变量(连接字符集，本机是UTF-8)，值为：SIMPLIFIED CHINESE_CHINA.AL32UTF8<br />
3.创建链接配置文件<br />
           新建文件，命名为：tnsnames.ora，放到D:\WareSoft\instantclient_10_2下，内容示例：<br />
192.168.1.105 =<br />
    (DESCRIPTION =<br />
        (ADDRESS_LIST =<br />
            (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.105)(PORT = 1521))<br />
    )<br />
    (CONNECT_DATA =<br />
        (SERVICE_NAME = XE)<br />
)<br />
)<br />
内容说明：<br />
192.168.1.105(链接别名) =<br />
    (DESCRIPTION =<br />
        (ADDRESS_LIST =<br />
            (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.105(服务器IP))(PORT = 1521(服务端口)))<br />
    )<br />
    (CONNECT_DATA =<br />
        (SERVICE_NAME = XE(服务端口，rpm版的为XE，tar版的是ORCL)<br />
    )<br />
)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20091122/oracle-instant-client-windows/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CentOS安装Oracle 10G R2日记</title>
		<link>http://www.oioq.com/weblog/20091121/centos%e5%ae%89%e8%a3%85oracle-10g-r2%e6%97%a5%e8%ae%b0</link>
		<comments>http://www.oioq.com/weblog/20091121/centos%e5%ae%89%e8%a3%85oracle-10g-r2%e6%97%a5%e8%ae%b0#comments</comments>
		<pubDate>Sat, 21 Nov 2009 10:55:18 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=35</guid>
		<description><![CDATA[Oracle可以免费使用
Oracle 10G R2下载地址：
http://www.oracle.com/technology/global/cn/software/products/database/xe/htdocs/102xelinsoft.html
下载通用版(含语言包的) ：	oracle-xe-univ-10.2.0.1-1.0.i386.rpm
rpm包无法设置安装路径，如果一定要设置选译tar.gz的
下载后打开命令行：
[root@localhost ~]# cd /opt/download/
[root@localhost download]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
一直回车，输入SYSTEM密码，安装成功。
默认数据库端口是1521，默认HTTP管理端口是8080，HTTP管理地址：http://127.0.0.1:8080/apex
安装完成，现在可以去http://127.0.0.1:8080/apex爽一把了
]]></description>
			<content:encoded><![CDATA[<p>Oracle可以免费使用<br />
Oracle 10G R2下载地址：<br />
http://www.oracle.com/technology/global/cn/software/products/database/xe/htdocs/102xelinsoft.html<br />
下载通用版(含语言包的) ：	oracle-xe-univ-10.2.0.1-1.0.i386.rpm<br />
rpm包无法设置安装路径，如果一定要设置选译tar.gz的<br />
下载后打开命令行：<br />
[root@localhost ~]# cd /opt/download/<br />
[root@localhost download]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm<br />
一直回车，输入SYSTEM密码，安装成功。<br />
默认数据库端口是1521，默认HTTP管理端口是8080，HTTP管理地址：http://127.0.0.1:8080/apex</p>
<p>安装完成，现在可以去http://127.0.0.1:8080/apex爽一把了</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20091121/centos%e5%ae%89%e8%a3%85oracle-10g-r2%e6%97%a5%e8%ae%b0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>为系统增加右键菜单</title>
		<link>http://www.oioq.com/weblog/20091023/%e4%b8%ba%e7%b3%bb%e7%bb%9f%e5%a2%9e%e5%8a%a0%e5%8f%b3%e9%94%ae%e8%8f%9c%e5%8d%95</link>
		<comments>http://www.oioq.com/weblog/20091023/%e4%b8%ba%e7%b3%bb%e7%bb%9f%e5%a2%9e%e5%8a%a0%e5%8f%b3%e9%94%ae%e8%8f%9c%e5%8d%95#comments</comments>
		<pubDate>Fri, 23 Oct 2009 15:41:38 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.oioq.com/weblog/20091023/%e4%b8%ba%e7%b3%bb%e7%bb%9f%e5%a2%9e%e5%8a%a0%e5%8f%b3%e9%94%ae%e8%8f%9c%e5%8d%95</guid>
		<description><![CDATA[实例：通过编辑注册表新建一个菜单叫“用EditPlus 编辑”
开始、运行、regedit
找到HKEY_CLASSES_ROOT，下面是系统所有扩展名列表，我们选择*，在下面shell目录里新建一个项，命名叫“用EditPlus 编辑”，然后在里面新建项 command ,选中command，在右边选中默认击右键->修改值为D:\WareSoft\EditPlus33.1\EditPlus 3\EditPlus.exe &#8220;%1&#8243;  这是EditPlus的路径，后面的&#8221;%1&#8243;是把触发这个事件的对象传递给EditPlus吧，偶是这么理解的
]]></description>
			<content:encoded><![CDATA[<p>实例：通过编辑注册表新建一个菜单叫“用EditPlus 编辑”</p>
<p>开始、运行、regedit</p>
<p>找到HKEY_CLASSES_ROOT，下面是系统所有扩展名列表，我们选择*，在下面shell目录里新建一个项，命名叫“用EditPlus 编辑”，然后在里面新建项 command ,选中command，在右边选中默认击右键->修改值为D:\WareSoft\EditPlus33.1\EditPlus 3\EditPlus.exe &#8220;%1&#8243;  这是EditPlus的路径，后面的&#8221;%1&#8243;是把触发这个事件的对象传递给EditPlus吧，偶是这么理解的</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20091023/%e4%b8%ba%e7%b3%bb%e7%bb%9f%e5%a2%9e%e5%8a%a0%e5%8f%b3%e9%94%ae%e8%8f%9c%e5%8d%95/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript stringToTime(字符转时间),dateDiff(时间相减)</title>
		<link>http://www.oioq.com/weblog/20090923/javascript-stringtotime%e5%ad%97%e7%ac%a6%e8%bd%ac%e6%97%b6%e9%97%b4datediff%e6%97%b6%e9%97%b4%e7%9b%b8%e5%87%8f</link>
		<comments>http://www.oioq.com/weblog/20090923/javascript-stringtotime%e5%ad%97%e7%ac%a6%e8%bd%ac%e6%97%b6%e9%97%b4datediff%e6%97%b6%e9%97%b4%e7%9b%b8%e5%87%8f#comments</comments>
		<pubDate>Wed, 23 Sep 2009 12:55:44 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=30</guid>
		<description><![CDATA[
function stringToTime(string){
	var f = string.split(' ', 2);
	var d = (f[0] ? f[0] : '').split('-', 3);
	var t = (f[1] ? f[1] : '').split(':', 3);
	return (new Date(
		parseInt(d[0], 10) &#124;&#124; null,
		(parseInt(d[1], 10) &#124;&#124; 1)-1,
		parseInt(d[2], 10) &#124;&#124; null,
		parseInt(t[0], 10) &#124;&#124; null,
		parseInt(t[1], 10) &#124;&#124; null,
		parseInt(t[2], 10) &#124;&#124; null
	)).getTime();
}
function dateDiff(date1, date2){
	var type1 = typeof date1, type2 = typeof date2;
	if(type1 == 'string')
		date1 [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
function stringToTime(string){<br />
	var f = string.split(' ', 2);<br />
	var d = (f[0] ? f[0] : '').split('-', 3);<br />
	var t = (f[1] ? f[1] : '').split(':', 3);</p>
<p>	return (new Date(<br />
		parseInt(d[0], 10) || null,<br />
		(parseInt(d[1], 10) || 1)-1,<br />
		parseInt(d[2], 10) || null,<br />
		parseInt(t[0], 10) || null,<br />
		parseInt(t[1], 10) || null,<br />
		parseInt(t[2], 10) || null<br />
	)).getTime();</p>
<p>}</p>
<p>function dateDiff(date1, date2){<br />
	var type1 = typeof date1, type2 = typeof date2;</p>
<p>	if(type1 == 'string')<br />
		date1 = stringToTime(date1);<br />
	else if(date1.getTime)<br />
		date1 = date1.getTime();</p>
<p>	if(type2 == 'string')<br />
		date2 = stringToTime(date2);<br />
	else if(date2.getTime)<br />
		date2 = date2.getTime();</p>
<p>	return (date1 - date2) / 1000;//结果是毫秒<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20090923/javascript-stringtotime%e5%ad%97%e7%ac%a6%e8%bd%ac%e6%97%b6%e9%97%b4datediff%e6%97%b6%e9%97%b4%e7%9b%b8%e5%87%8f/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL SERVER设置自增字段值</title>
		<link>http://www.oioq.com/weblog/20090922/sql-server%e8%ae%be%e7%bd%ae%e8%87%aa%e5%a2%9e%e5%ad%97%e6%ae%b5%e5%80%bc</link>
		<comments>http://www.oioq.com/weblog/20090922/sql-server%e8%ae%be%e7%bd%ae%e8%87%aa%e5%a2%9e%e5%ad%97%e6%ae%b5%e5%80%bc#comments</comments>
		<pubDate>Tue, 22 Sep 2009 13:48:07 +0000</pubDate>
		<dc:creator>CanleiSky</dc:creator>
				<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://www.oioq.com/?p=28</guid>
		<description><![CDATA[把下面的TableName改成自己的表名，0是设置自增值是多少
DBCC CHECKIDENT(TableName, RESEED, 0)
]]></description>
			<content:encoded><![CDATA[<p>把下面的TableName改成自己的表名，0是设置自增值是多少</p>
<p>DBCC CHECKIDENT(TableName, RESEED, 0)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oioq.com/weblog/20090922/sql-server%e8%ae%be%e7%bd%ae%e8%87%aa%e5%a2%9e%e5%ad%97%e6%ae%b5%e5%80%bc/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
