<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" processed="0.141" queries="1" focusMarkup="" xslt=""><channel><title><![CDATA[Alvin's Blog]]></title><link>http://www.linjunhai.com/blog/</link><description>超级大菜鸟，每天要自强</description><language>zh-cn</language><copyright><![CDATA[Copyright©2008 linjunhai.com]]></copyright><webMaster><![CDATA[78423497@qq.com(林俊海)]]></webMaster><generator><![CDATA[ABlog v1.0]]></generator><image><title>Alvin's Blog</title><url>http://www.linjunhai.com/blog/images/logos.gif</url><link>http://www.linjunhai.com/blog/</link><description>超级大菜鸟，每天要自强</description></image><item><link>http://www.linjunhai.com/blog/article-185.xml</link><title><![CDATA[关于[vscode-remote-ssh]Connection error: Unauthorized client refused: auth mismatch]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2023-05-11 17:30:59</pubDate><guid>http://www.linjunhai.com/blog/article-185.xml</guid><description><![CDATA[&#22312; windows &#19979;&#20351;&#29992; vscode &#20986;&#29616;&#20102;&#36830;&#25509;&#20986;&#38169;　Connection error: Unauthorized client refused: auth mismatch<br /><br />&#36825;&#20010;&#38382;&#39064;&#22256;&#25200;&#22909;&#20960;&#20010;&#26376;&#20102;&#65292; &#26377;&#26102;&#20505;&#22909;&#65292;&#26377;&#26102;&#20505;&#22351;<br /><br />&#36935;&#21040;&#35201;&#25171;&#24320;&#39033;&#30446;&#26102;&#65292;&#19968;&#30452;&#36830;&#19981;&#19978;&#65292;&#26159;&#30495;&#30340;&#24700;&#28779;<br /><br />&#22312;&#32593;&#19978;&#25628;&#32034;&#20102;&#21040;&#19968;&#20123;&#21035;&#20154;&#30340;&#35299;&#20915;&#26041;&#26696;&#65292;&#35797;&#20102;&#27809;&#26377;&#20316;&#29992;<br /><br /><br /><br />&#26368;&#36817;&#32456;&#20110;&#25214;&#21040;&#20102;&#35299;&#20915;&#26041;&#26696;<br /><br />&#38382;&#39064;&#21407;&#22240;&#26159;&#24314;&#31435; ssh &#36830;&#25509;&#26102;&#65292; install &#36807;&#31243;&#30340; terminal &#31383;&#21475;&#22826;&#23567;&#65292;<br /><br />&#21482;&#35201;&#22312;&#24314;&#31435;&#36830;&#25509;&#30340;&#26102;&#20505;&#65292;&#36805;&#36895;&#25226; vscode &#26368;&#22823;&#21270;&#65292;<br /><br />&#25110;&#32773;&#32553;&#23567;&#24038;&#20391;&#31383;&#21475;&#65292;&#35753; terminal &#31383;&#21475;&#21464;&#22823;<br /><br />&#23601;&#33021;&#36830;&#25509;&#25104;&#21151;<br /><br />]]></description></item><item><link>http://www.linjunhai.com/blog/article-184.xml</link><title><![CDATA[VBS 如何发送文件上传请求， multipart/form-data]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2022-09-06 22:25:28</pubDate><guid>http://www.linjunhai.com/blog/article-184.xml</guid><description><![CDATA[&#22810;&#24180;&#21069; csdn &#22238;&#31572;&#38382;&#39064;&#20889;&#30340;&#20195;&#30721;&#20102;&#65292;&#26368;&#36817;&#21448;&#32763;&#21040;&#65292;&#35760;&#24405;&#19968;&#19979;<br /><br /><textarea name='code' class='vb' cols='50'>
Function GetFileData(path)
    With CreateObject(&quot;ADODB.Stream&quot;)
        .Type = 1
        .Mode = 3
        .Open
        .LoadFromFile path
        .Position = 0
        GetFileData = .Read(-1)
        .Close
    End With
End Function
 
Function GetBytes(str, cSet, bomLength)
    With CreateObject(&quot;ADODB.Stream&quot;)
        .Type = 2
        .Mode = 3
        .Charset = cSet
        .Open
        .Position = 0
        .WriteText str
        .Position = 0
        .Type = 1
        .Position = bomLength
        GetBytes = .Read(-1)
        .Close
    End With
End Function
 
Class Multipart
    Dim charset, bomLength, stream, boundary
 
    Private Sub Class_Initialize()
        Me.charset = &quot;UTF-8&quot;
        Me.bomLength = 3
        Set Me.stream = CreateObject(&quot;ADODB.Stream&quot;)
        Me.stream.Mode = 3
        Me.stream.Type = 1
        Me.stream.Open
        Me.boundary = &quot;----WebKitFormBoundaryomATwYZzgiwmJSgy&quot; ' &#38543;&#20415;&#20889;&#19968;&#20010;,&#22815;&#22797;&#26434;&#23601;&#34892;
    End Sub
    
    Sub WriteText(value)
        Me.stream.Write GetBytes(value, Me.charset, Me.bomLength)
    End Sub
    
    Public Function Size()
        Size = Me.stream.Size + Len(Me.boundary) + 4
    End Function
    
    Public Function GetData()
        Me.stream.Position = 0
        With CreateObject(&quot;ADODB.Stream&quot;)
            .Type = 1
            .Mode = 3
            .Open
            .Position = 0
            .Write Me.stream.Read(-1)
            .Write GetBytes(&quot;--&quot; &amp; Me.boundary &amp; &quot;--&quot;, Me.charset, Me.bomLength)
            .Position = 0
            GetData = .Read(-1)
            .Close
        End With
        Me.stream.Position = Me.stream.Size
    End Function
    
    Public Sub AddTextEntity(name, value)
        Me.WriteText &quot;--&quot; &amp; Me.boundary &amp; vbCrLf &amp; &quot;Content-Disposition: form-data; name=&quot;&quot;&quot; &amp; name &amp; &quot;&quot;&quot;&quot; &amp; vbCrLf &amp; vbCrLf &amp; value &amp; vbCrLf        
    End Sub
    
    Public Sub AddFileEntity(name, filePath, mime)
        Me.WriteText &quot;--&quot; &amp; Me.boundary &amp; vbCrLf
        Me.WriteText &quot;Content-Disposition: form-data; name=&quot;&quot;&quot; &amp; name &amp; &quot;&quot;&quot;; filename=&quot;&quot;&quot; &amp; filePath &amp; &quot;&quot;&quot;&quot; &amp; vbCrLf
        Me.WriteText &quot;Content-Type: &quot; &amp; mime &amp; vbCrLf &amp; vbCrLf
        Me.stream.Write GetFileData(filePath)
        Me.WriteText vbCrLf        
    End Sub
    
    Private Sub Class_Terminate()
        Me.stream.Close
        Set Me.Stream = Nothing
    End Sub
End Class
 
 
 
 
 
Dim filePath, POST_URL, multidata, xhr
 
POST_URL =&quot;http://127.0.0.1:8080/kdxf&quot;
 
 
Set multidata = New Multipart
multidata.AddFileEntity &quot;picFile&quot;, &quot;E:\40x40.jpg&quot;, &quot;image/jpeg&quot;
multidata.AddTextEntity &quot;ksp_name&quot;, &quot;1&quot;
multidata.AddTextEntity &quot;ksp_courtName&quot;, &quot;1&quot;
multidata.AddTextEntity &quot;ksp_courtCode&quot;, &quot;1&quot;
multidata.AddTextEntity &quot;ksp_serviceid&quot;, &quot;63&quot;
 
 
Set xhr = CreateObject(&quot;WinHttp.WinHttpRequest.5.1&quot;)
xhr.Open &quot;POST&quot;, POST_URL, False
xhr.SetRequestHeader &quot;X-KSP-Token&quot;, &quot;123456&quot;
xhr.SetRequestHeader &quot;Content-Length&quot;, multidata.Size()
xhr.SetRequestHeader &quot;Content-Type&quot;, &quot;multipart/form-data; boundary=&quot; &amp; multidata.boundary
xhr.Send multidata.GetData()
 
WScript.Echo xhr.ResponseText
</textarea><br /><br />csdn &#38142;&#25509;&#65306;<a href='https://bbs.csdn.net/topics/392385254' target='_blank'>https://bbs.csdn.net/topics/392385254</a>]]></description></item><item><link>http://www.linjunhai.com/blog/article-183.xml</link><title><![CDATA[javascript 相对路径转绝对路径]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[网络开发]]></category><pubDate>2017-03-17 01:36:14</pubDate><guid>http://www.linjunhai.com/blog/article-183.xml</guid><description><![CDATA[&#23450;&#20041;&#65306;<br /><textarea name='code' class='js' cols='50'>var resolve = function() {
	var iframe = document.createElement('iframe');
	iframe.style.cssText = 'position:absolute; left:-1000px; top:-1000px;';
	document.body.appendChild(iframe);
	return function(path1, path2) {
		iframe.contentWindow.document.write(&quot;&lt;html&gt;&lt;head&gt;&lt;base href='&quot;+path1+&quot;'/&gt;&lt;/head&gt;&lt;body&gt;&lt;a href='&quot;+path2+&quot;'&gt;a&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&quot;);
		return iframe.contentWindow.document.body.firstChild.href;
	};
};</textarea><br /><br />&#20351;&#29992;&#65306;<br /><textarea name='code' class='js' cols='50'>
// http://www.linjunhai.com/a/b/c.html
resolve('http://www.linjunhai.com/blog/article.asp?id=183', '../a/b/c.html');
</textarea>]]></description></item><item><link>http://www.linjunhai.com/blog/article-182.xml</link><title><![CDATA[ASP 怎样把数据库查询结果保存到 excel 文件中]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[网络开发]]></category><pubDate>2011-06-03 02:14:56</pubDate><guid>http://www.linjunhai.com/blog/article-182.xml</guid><description><![CDATA[<textarea name='code' class='vb' cols='50'>Set rs = conn.Execute(&quot;SELECT * FROM ....&quot;)

Set converter = GetObject(&quot;script:&quot; &amp; Server.MapPath(&quot;/sct/org/iscripts/common/sql/RecordsetConverter.sct&quot;))
With Server.CreateObject(&quot;MSXML2.DOMDocument&quot;);
        .loadXML converter.toXLS(rs)
        .save Server.MapPath(&quot;/rs.xls&quot;)
End With
Set converter = Nothing

rs.Close</textarea><br /><br />&#21670;&#65292; &#37324;&#22836;&#20986;&#29616;&#20102;&#20010;　&quot;/sct/org/iscripts/common/sql/RecordsetConverter.sct&quot;　&#26159;&#20160;&#20040;&#19996;&#19996;<br /><br />&#21621;&#21621;&#65292;<a href='http://www.iscripts.org/sct/org/iscripts/common/sql/RecordsetConverter.sct' target='_blank'>http://www.iscripts.org/sct/org/iscripts/common/sql/RecordsetConverter.sct</a> &#36825;&#37324;&#19979;&#36733;&#23601;&#26159;&#20102;...]]></description></item><item><link>http://www.linjunhai.com/blog/article-181.xml</link><title><![CDATA[[JavaScript]网页中音乐LRC歌词同步显示]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2011-05-13 17:08:26</pubDate><guid>http://www.linjunhai.com/blog/article-181.xml</guid><description><![CDATA[<img src='http://www.iscripts.org/data/attachment/forum/month_1104/11041323240bab7833cf35aaf1.jpg' border='0' /><br /><br /><textarea name='code' class='js' cols='50'>function LRCPlayer(wmp, strLRC, container, width, height, color1, color2) {
    this.wmp = wmp;
    this.height = height;
    
    this.checkInterval = 0;
    this.transInterVal = 0;
    this.currentFocus  = -1;
    
    var ls = this.ls = this.parseLRC(strLRC);
    var div = document.createElement('div');
    div.style.cssText = &quot;display:block;width:&quot;+width+&quot;px; height:&quot; + height + &quot;px; overflow:hidden; background:#000;&quot;;
    var lrcPanel = this.lrcPanel = document.createElement('div');
    div.appendChild(lrcPanel);
    container.appendChild(div);
    this.colorTrans = this.colorCal(color1, color2);
    this.color1 = color1;
    var span = document.createElement('div');
    span.style.cssText = &quot;height:&quot; + (height/2) + &quot;px;&quot;;
    lrcPanel.appendChild(span);
    for (var i=0; i&lt;ls.length; i++) {
        span = document.createElement('div');
        span.style.cssText = 'font-size:12px; height:16px; line-height:16px; text-align:center; overflow: hidden; white-space: nowrap; color:#' + color1;
        span.appendChild(document.createTextNode(ls<i>.text));
        lrcPanel.appendChild(span);
    }
    span = document.createElement('div');
    span.style.cssText = &quot;height:&quot; + (height/2) + &quot;px;&quot;;
    lrcPanel.appendChild(span);
    this.start();
}

$.extend(LRCPlayer.prototype, {
    start: function() {
        var me = this;
        !function() {
            setTimeout(arguments.callee, 128);
            me.checkPos();
        }();
    }
    , stop: function() {
        if (this.checkInterval)
            clearTimeout(this.checkInterval);
    }
    , checkPos: function() {
        try {
            var cPos = this.wmp.controls.currentPosition;
            if (isNaN(cPos)) return;
            if (this.currentFocus&lt;this.ls.length-1 &amp;&amp; cPos &gt; this.ls[this.currentFocus+1].pos) {
                this.focusThis(this.currentFocus+1);
            } else if (this.currentFocus&gt;-1 &amp;&amp; cPos&lt;this.ls[this.currentFocus].pos) {
                this.focusThis(this.currentFocus-1);
            }
            if (this.currentFocus &gt;= this.ls.length-1) return;
            var pos = this.ls[this.currentFocus].pos;
            var nPos = this.ls[this.currentFocus+1].pos;
            var lrct = (cPos - pos)/(nPos - pos);
            lrct = Math.max(Math.min(lrct, 1), 0);
            this.lrcPanel.parentNode.scrollTop = (this.currentFocus+lrct) * 16;
        } catch(e) { }
    }
    , focusThis: function(index) {
        if (this.transInterVal) {
            clearTimeout(this.transInterVal);
        }
        if (this.currentFocus &gt; -1) {
            this.lrcPanel.childNodes[this.currentFocus+1].style.color = '#'+this.color1;
        }
        this.currentFocus = index;
        var me = this;
        var i = 0;
        !function() {
            if (i&gt;=8) return;
            me.lrcPanel.childNodes[me.currentFocus+1].style.color = '#' + me.colorTrans[i++];
            me.transInterVal = setTimeout(arguments.callee, 128);
        }();
    }

    , colorCal: function(c1, c2) {
        var oC2 = c2;
        c1 = parseInt(c1, 16); c2 = parseInt(c2, 16);
        var r1 = c1 &gt;&gt; 16, g1 = (c1 &gt;&gt; 8) &amp; 0xff; b1 = c1 &amp; 0xff;
        var r2 = c2 &gt;&gt; 16, g2 = (c2 &gt;&gt; 8) &amp; 0xff; b2 = c2 &amp; 0xff;
        var cs = [], d1 = r2 - r1, d2 = g2 - g1, d3 = b2 - b1, r, g, b;
        for (var i=1; i&lt;8; i++) {
            r = r1+parseInt(Math.round(d1*i*0.125, 0));
            g = g1+parseInt(Math.round(d2*i*0.125, 0));
            b = b1+parseInt(Math.round(d3*i*0.125, 0));
            cs.push( (&quot;00000&quot;+((r&lt;&lt;16)|(g&lt;&lt;8)|b).toString(16)).slice(-6) );
        }
        return cs.concat(oC2);
    }
    
    , parseLRC: function(str) {
        var map = {'ti':'&#26631;&#39064;&#65306;', 'ar':'&#33402;&#26415;&#23478;&#65306;', 'al':'&#19987;&#36753;&#65306;', 'by':'&#27468;&#35789;&#21046;&#20316;&#65306;'};
        str = str.replace(/\[(ti|ar|al|by):([^[\]]*)\]/ig, function($, $1, $2) {
            return '[00:00.00]' + (map[$1.toLowerCase()]||'') + $2;
        });
        var offset = 0;
        str = str.replace(/\[offset:(-?\d+)\]/gi, function($, $1) {
            offset = parseInt($1, 10) * 0.001;
        });
        var regex1 = /(\[[^[\]]+\])(\[[^[\]]+\])([^[\]]*?)$/m;
        var regex2 = /(\[[^[\]]+\])(\[[^[\]]+\])([^[\]]*?)$/mg;
        while (regex1.test(str)) {
            str = str.replace(regex2, &quot;$1$3\n$2$3&quot;);
        }
        var ls = [];
        str.replace(/\[(\d+):([\d.]+)\](.*)/g, function($, $1, $2, $3) {
            ls.push({ pos:parseInt($1,10)*60+parseFloat($2,10)*1+offset, text:$3 });
        });
        ls.sort(function(a, b) {
            return a.pos-b.pos;
        });
        return ls;
    }
});

</textarea><br /><br />&#19978;&#38754;&#26159;&#19981;&#23436;&#25972;&#20195;&#30721;<br />&#20855;&#20307;&#20351;&#29992;&#20363;&#23376;&#19979;&#36733;&#35265;:<br /><a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=49' target='_blank'>http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=49</a><br /><br />&#38468;&#65306;<br />ASP/jscript &#20174;&#21315;&#21315;&#38745;&#21548;&#30340;&#27468;&#35789;&#26381;&#21153;&#22120;&#26597;&#35810;&#38899;&#20048;&#30340; LRC &#27468;&#35789;<br /><a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=86' target='_blank'>http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=86</a><br /><br />[Java] &#20174;&#21315;&#21315;&#38745;&#21548;&#30340;&#27468;&#35789;&#26381;&#21153;&#22120;&#26597;&#35810;&#38899;&#20048;&#30340; LRC &#27468;&#35789;<br /><a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=85' target='_blank'>http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=85</a>]]></description></item><item><link>http://www.linjunhai.com/blog/article-180.xml</link><title><![CDATA[从千千静听的歌词服务器查询音乐的 LRC 歌词 [Java]]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2011-05-03 00:42:25</pubDate><guid>http://www.linjunhai.com/blog/article-180.xml</guid><description><![CDATA[&#26368;&#36817;&#35201;&#25630;&#36825;&#20010;&#65292;&#30334;&#24230;&#19968;&#19979;&#65292;&#21457;&#29616;&#26377; php &#29256;&#26412;&#30340;&#20195;&#30721;&#65292;&#25630;&#26469;&#32763;&#35793;&#19968;&#19979;&#12290; <br /><br /><textarea name='code' class='js' cols='50'>package org.iscripts.services;

import java.io.IOException;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
import org.iscripts.common.net.HttpGet;

/**
* @author &#28151;&#28151;(&lt;b&gt;ialvin.cn&lt;/b&gt;) &#24191;&#19996;&#183;&#26222;&#23425;&#183;&#37324;&#28246;
*/
public class LrcGet {
  public static void main(String[] args) throws Exception {
    System.out.println(query(&quot;&#20320;&#25226;&#29233;&#24773;&#32473;&#20102;&#35841;&quot;, &quot;&#29579;&#24378;&quot;));
  }

  public static String query(String title, String artist)
      throws DocumentException, NumberFormatException, IOException {
    String URL = &quot;http://ttlrcct.qianqian.com/dll/lyricsvr.dll?sh?Artist={ar}&amp;Title={ti}&amp;Flags=0&quot;;
    URL = URL.replace(&quot;{ar}&quot;, encode(artist))
        .replace(&quot;{ti}&quot;, encode(title));
    String result = &quot;&quot;;
    try {
      result = HttpGet.get(URL);
    } catch (Exception e) {
      e.printStackTrace();
    }
    // &#38656;&#35201; dom4j-1.6.1.jar , &#20351;&#29992;&#21487;&#21442;&#32771; dom4j &#25163;&#20876;
    Document doc = new SAXReader().read(new StringReader(result));
    // XML&#20013;&#21487;&#33021;&#21253;&#21547;&#22810;&#20010;&#21305;&#37197;&#32467;&#26524;&#65292;&#25105;&#20204;&#21482;&#21462;&#19968;&#20010;
    Node n = doc.selectSingleNode(&quot;/result/lrc&quot;);
    if (n == null)
      return null;
    Element e = (Element) n;
    result = e.attributeValue(&quot;id&quot;);
    artist = e.attributeValue(&quot;artist&quot;);
    title = e.attributeValue(&quot;title&quot;);

    URL = &quot;http://ttlrcct2.qianqian.com/dll/lyricsvr.dll?dl?Id={id}&amp;Code={code}&quot;;
    URL = URL.replace(&quot;{id}&quot;, result).replace(&quot;{code}&quot;,
        verifyCode(artist, title, Integer.parseInt(result, 10)));
    return HttpGet.get(URL);
  }

  public static String verifyCode(String artist, String title, int lrcId)
      throws UnsupportedEncodingException {
    byte[] bytes = (artist + title).getBytes(&quot;UTF-8&quot;);
    int[] song = new int[bytes.length];
    for (int x = 0; x &lt; bytes.length; x++)
      song[x] = bytes[x] &amp; 0xff;
    int intVal1 = 0, intVal2 = 0, intVal3 = 0;
    intVal1 = (lrcId &amp; 0xFF00) &gt;&gt; 8;
    if ((lrcId &amp; 0xFF0000) == 0) {
      intVal3 = 0xFF &amp; ~intVal1;
    } else {
      intVal3 = 0xFF &amp; ((lrcId &amp; 0x00FF0000) &gt;&gt; 16);
    }
    intVal3 = intVal3 | ((0xFF &amp; lrcId) &lt;&lt; 8);
    intVal3 = intVal3 &lt;&lt; 8;
    intVal3 = intVal3 | (0xFF &amp; intVal1);
    intVal3 = intVal3 &lt;&lt; 8;
    if ((lrcId &amp; 0xFF000000) == 0) {
      intVal3 = intVal3 | (0xFF &amp; (~lrcId));
    } else {
      intVal3 = intVal3 | (0xFF &amp; (lrcId &gt;&gt; 24));
    }
    int uBound = bytes.length - 1;
    while (uBound &gt;= 0) {
      int c = song[uBound];
      if (c &gt;= 0x80)
        c = c - 0x100;
      intVal1 = c + intVal2;
      intVal2 = intVal2 &lt;&lt; (uBound % 2 + 4);
      intVal2 = intVal1 + intVal2;
      uBound -= 1;
    }
    uBound = 0;
    intVal1 = 0;
    while (uBound &lt;= bytes.length - 1) {
      int c = song[uBound];
      if (c &gt;= 128)
        c = c - 256;
      int intVal4 = c + intVal1;
      intVal1 = intVal1 &lt;&lt; (uBound % 2 + 3);
      intVal1 = intVal1 + intVal4;
      uBound += 1;
    }
    int intVal5 = intVal2 ^ intVal3;
    intVal5 = intVal5 + (intVal1 | lrcId);
    intVal5 = intVal5 * (intVal1 | intVal3);
    intVal5 = intVal5 * (intVal2 ^ lrcId);
    return String.valueOf(intVal5);
  }

  private static String encode(String value) {
    if (value == null)
      value = &quot;&quot;;
    value = value.replace(&quot; &quot;, &quot;&quot;).replace(&quot;'&quot;, &quot;&quot;).toLowerCase();
    byte[] bytes = null;
    try {
      bytes = value.getBytes(&quot;UTF-16LE&quot;);
    } catch (UnsupportedEncodingException e) {
      e.printStackTrace();
      bytes = value.getBytes();
    }
    return stringify(bytes);
  }

  final private static char[] digit = { '0', '1', '2', '3', '4', '5', '6',
      '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };

  private static String stringify(byte[] bytes) {
    char[] str = new char[2];
    StringBuilder builder = new StringBuilder();
    for (byte byteValue : bytes) {
      str[0] = digit[(byteValue &gt;&gt;&gt; 4) &amp; 0X0F];
      str[1] = digit[byteValue &amp; 0X0F];
      builder.append(str);
    }
    return builder.toString();
  }
}</textarea><br /><br />&#20854;&#20013; HttpGet.get(.....)　&#26041;&#27861;&#26159; HTTP &#25235;&#21462;&#30340;&#21151;&#33021;&#65292;&#21442;&#32771;&#65306;<br /><a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=84' target='_blank'>http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=84</a><br /><br /><a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=86' target='_blank'>ASP &#29256;&#30340;&#21315;&#21315;&#38745;&#21548; LRC &#27468;&#35789;&#26597;&#35810; &#35831;&#28857;&#36825;&#37324;</a><br /><br />&#21407;&#25991;&#38142;&#25509;&#65306;<a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=85' target='_blank'>http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=85</a>]]></description></item><item><link>http://www.linjunhai.com/blog/article-179.xml</link><title><![CDATA[ASP 版的千千静听 LRC 歌词查询 [jscript]]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2011-05-03 00:36:05</pubDate><guid>http://www.linjunhai.com/blog/article-179.xml</guid><description><![CDATA[&#22312;&#32593;&#19978;&#27809;&#26377;&#30475;&#21040;&#26377; ASP &#29256;&#26412;&#30340;&#20195;&#30721;&#65292;&#20063;&#32763;&#35793;&#19968;&#20221;&#25918;&#19978;&#26469;&#65292;&#22240;&#20026;&#22270;&#26041;&#20415;&#65292;&#20415;&#29992; jscript &#20889;<br /><br />&#30465;&#19979;&#35768;&#22810;&#21151;&#22827;&#12290; <br /><br /><textarea name='code' class='js' cols='50'>
&lt;%@ codepage=&quot;65001&quot; %&gt;&lt;script runat=&quot;server&quot; language=&quot;jscript&quot;&gt;

/**
* @author &#26519;&#20426;&#28023;(ialvin.cn) &#24191;&#19996;&#183;&#26222;&#23425;&#183;&#37324;&#28246;
*/

String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g, '');
};

function httpGet(strURL) {
    with (Server.CreateObject(&quot;MSXML2.XMLHTTP&quot;)) {
        open(&quot;GET&quot;, strURL, false);
        send(null);
        return responseText;
    }
}

function encode(str) {   
    str = (str||&quot;&quot;).replace(/[ ']/g, &quot;&quot;).toLowerCase();  
    return escape(str).replace(/%u(..)(..)|%(..)|(.)/g, function($, $1, $2, $3, $4) {  
        if ($1) return $2 + $1;  
        if ($3) return $3 + &quot;00&quot;;  
        return (&quot;0&quot;+$4.charCodeAt(0).toString(16)).slice(-2) + '00';  
    });  
}  

function loadXML(strXML) {
    var x = Server.CreateObject(&quot;MSXML2.DOMDocument&quot;);
    x.loadXML(strXML);
    return x;
}


function conv(i) {
    var r = i % 4294967296;
    if (i &gt;= 0 &amp;&amp; r &gt; 2147483648)
        r = r - 4294967296;
    if (i &lt; 0 &amp;&amp; r &lt; 2147483648)
        r = r + 4294967296;
    return r;
}

function mConv(ia, ib) {
    var o = (ia&gt;0 &amp;&amp; ib&gt;0) ? 1 : (ia&lt;0 &amp;&amp; ib&lt;0) ? 1 : -1;
    var a = ia.toString(2).replace(/\D/g,'').split(&quot;&quot;).reverse();
    var b = ib.toString(2).replace(/\D/g,'').split(&quot;&quot;).reverse();
    var c = []; c.length = 34; c = c.join(&quot;0&quot;).split(&quot;&quot;);
    for (var i=0; i&lt;b.length; i++) {
        if (b[i ]=='1') {
            for (var j=0; j&lt;a.length &amp;&amp; j+i&lt;33; j++)
                c[j+i] = c[j+i]-(-a[j]);
        }
    }
    for (var i=0; i&lt;32; i++) {
        c[i+1] += parseInt(c[i ]/2);
        c[i ] = c[i ] % 2;
    }
    c = parseInt(c.slice(0, 32).reverse().join(&quot;&quot;), 2)*o;
    if (o == 1 &amp;&amp; c &gt; 2147483648)
        c = c - 4294967296;
    if (o == -1 &amp;&amp; c &lt; 2147483648)
        c = c + 4294967296;
    return c;
}


function verifyCode(artist, title, lrcId) {
    var song = [];
    encodeURIComponent(artist+title).replace(/%(..)|(.)/g, function($, $1, $2) {
        if ($1)
            song.push(parseInt($1, 16));
        else
            song.push($2.charCodeAt(0));
    });
    var intVal2 = 0, intVal3 = 0;
    var intVal1 = (lrcId &amp; 0xFF00) &gt;&gt; 8;
    if ((lrcId &amp; 0xFF0000) == 0) {
        intVal3 = 0xFF &amp; ~intVal1;
    } else {
        intVal3 = 0xFF &amp; ((lrcId &amp; 0xFF0000) &gt;&gt; 16);
    }
    intVal3 = intVal3 | ((0xFF &amp; lrcId) &lt;&lt; 8);
    intVal3 = intVal3 &lt;&lt; 8;
    intVal3 = intVal3 | (0xFF &amp; intVal1);
    intVal3 = intVal3 &lt;&lt; 8;
    if ((lrcId &amp; 0xFF000000) == 0) {
        intVal3 = intVal3 | (0xFF &amp; (~lrcId));
    } else {
        intVal3 = intVal3 | (0xFF &amp; (lrcId &gt;&gt; 24));
    }
    var uBound = song.length - 1;
    while (uBound &gt;= 0) {
        var c = song[uBound];
        if (c &gt;= 0x80)
            c = c - 0x100;
        intVal1 = (c + intVal2) &amp; 0xFFFFFFFF;
        intVal2 = (intVal2 &lt;&lt; (uBound % 2 + 4)) &amp; 0xFFFFFFFF;
        intVal2 = (intVal1 + intVal2) &amp; 0xFFFFFFFF;
        uBound -= 1;
    }
    uBound = 0;
    intVal1 = 0;
    while (uBound &lt;= song.length - 1) {
        var c = song[uBound];
        if (c &gt;= 128)
            c = c - 256;
        var intVal4 = (c + intVal1) &amp; 0xFFFFFFFF;
        intVal1 = (intVal1 &lt;&lt; (uBound % 2 + 3)) &amp; 0xFFFFFFFF;
        intVal1 = (intVal1 + intVal4) &amp; 0xFFFFFFFF;
        uBound += 1;
    }
    var intVal5 = conv(intVal2 ^ intVal3) &amp; 0xFFFFFFFF;
    intVal5 = conv(intVal5 + (intVal1 | lrcId)) &amp; 0xFFFFFFFF;
    intVal5 = mConv(intVal5 , intVal1 | intVal3);
    intVal5 = mConv(intVal5 , intVal2 ^ lrcId);
    var longVal6 = intVal5;
    if (intVal5 &gt; 2147483648)
        intVal5 = (intVal5 - 4294967296) &amp; 0xFFFFFFFF;
    return intVal5.toString();
}


function query(artist, title) {
    var url = &quot;http://ttlrcct.qianqian.com/dll/lyricsvr.dll?sh?Artist=&quot; + encode(artist) + &quot;&amp;Title=&quot; + encode(title)+&quot;&amp;Flags=0&quot;;
    // &#36825;&#37324;&#21487;&#33021;&#26377;&#22810;&#20010;&#21305;&#37197;&#30340;&#32467;&#26524;&#65292;&#36825;&#37324;&#21482;&#36873;&#21462;&#31532;&#19968;&#20010;
    var lrc = loadXML(httpGet(url)).selectSingleNode(&quot;/result/lrc&quot;);
    if  (lrc == null)
        throw new Error(&quot;&#22312;&#26381;&#21153;&#22120;&#19978;&#25214;&#19981;&#21040;&#21305;&#37197;&#30340;&#27468;&#35789;&#12290;&quot;);
    var lrcId = lrc.getAttribute(&quot;id&quot;);
    artist = lrc.getAttribute(&quot;artist&quot;);
    title = lrc.getAttribute(&quot;title&quot;);
    url = &quot;http://ttlrcct2.qianqian.com/dll/lyricsvr.dll?dl?Id=&quot; + lrcId + &quot;&amp;Code=&quot; + verifyCode(artist, title, lrcId);
    return {ar:artist, ti:title, lrc:httpGet(url)};
}

Response.ContentType = &quot;text/html; charset=utf-8&quot;;
try {
    var artist = (Request.QueryString(&quot;artist&quot;).Item || '').trim();
    var title = (Request.QueryString(&quot;title&quot;).Item || '').trim();
    if (title == '')
        throw new Error(&quot;&#35831;&#20256;&#20837;&#38899;&#20048;&#21517;&#31216;!&quot;);
    
    var result = query(artist, title);
    var fileName = result.ar + &quot; - &quot; + result.ti + &quot;.lrc&quot;;
    Response.ContentType = &quot;text/plain; charset=utf-8&quot;;
    Response.AddHeader(&quot;Content-Disposition&quot;, &quot;inline; filename=\&quot;&quot; + encodeURIComponent(fileName) + &quot;\&quot;&quot;);
    Response.Write(result.lrc);
} catch(e) {
    Response.Write(&quot;&#26597;&#35810;&#38169;&#35823;&#65306;&quot; + e.message);
}
&lt;/script&gt;
</textarea><br /><br />Java &#29256;&#30340;&#21487;&#20197;&#21442;&#32771;: <a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=85' target='_blank'>http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=85</a><br /><br />&#24403;&#28982;&#65292;&#36825;&#37324;&#24314;&#35758;&#22312;&#27599;&#26597;&#35810;&#33719;&#24471;&#19968;&#20010;&#38899;&#20048;&#30340; LRC &#27468;&#35789;&#30340;&#26102;&#20505;&#65292;&#25226;&#27468;&#35789;&#20869;&#23481;&#23384;&#20837;&#26412;&#22320;&#25991;&#20214;&#25110;&#32773;&#25968;&#25454;&#24211;&#20013;&#65292;<br />&#36825;&#26679;&#20877;&#19979;&#27425;&#26597;&#35810;&#26102;&#65292;&#21487;&#20197;&#20808;&#20174;&#26412;&#22320;&#26597;&#35810;&#65292;&#26597;&#19981;&#21040;&#20102;&#20877;&#20174;&#21315;&#21315;&#38745;&#21548;&#30340;&#27468;&#35789;&#26381;&#21153;&#22120;&#26597;&#35810;&#65292;&#36825;&#26679;&#23376;&#24179;&#22343;&#19978;&#24456;&#22823;&#31243;&#24230;&#30340;&#25552;&#39640; WEB &#24212;&#29992;&#30340;&#30340;&#21709;&#24212;&#36895;&#24230;&#12290;<br /><br />&#21407;&#25991;&#38142;&#25509;&#65306;<a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=86' target='_blank'>http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=86</a>]]></description></item><item><link>http://www.linjunhai.com/blog/article-178.xml</link><title><![CDATA[原创自录正则表达式基础入门教程]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2011-04-19 08:58:17</pubDate><guid>http://www.linjunhai.com/blog/article-178.xml</guid><description><![CDATA[&#36825;&#26159;&#19968;&#20010;&#20934;&#22791;&#19981;&#20805;&#20998;&#30340;&#35838;&#31243;&#65292;&#19982;&#32593;&#21451;&#20132;&#27969;&#26102;&#30340;&#23581;&#35797;&#24405;&#21046;&#12290;&#12290; &#32593;&#21451;&#26222;&#36941;&#21453;&#26144;&#65306;<b>&#22826;&#21872;&#21990;</b><br /><br />&#19979;&#36733;&#22320;&#22336;&#35265;&#65306;<a href='http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=3' target='_blank'>http://www.iscripts.org/forum.php?mod=viewthread&amp;tid=3</a><br /><br />---------------------------&#27491;&#21017;&#30340;&#29992;&#22788;----------------------------<br />1. &#26597;&#25214;&#25991;&#26412;<br />2. &#20998;&#21106;&#25991;&#26412;<br />3. &#26367;&#25442;&#25991;&#26412;<br /><br />&#27491;&#21017;&#22914;&#26524;&#32467;&#21512;&#31243;&#24207;&#35821;&#35328;&#19968;&#36215;&#20351;&#29992;&#65292;&#36824;&#21487;&#20197;&#23454;&#29616;&#26356;&#22810;&#30340;&#21151;&#33021;&#25928;&#26524;<br /><br />----------------------------&#23383;&#31526;&#38598;&#21512;&#30340;&#24212;&#29992;-----------------------------------<br /><br />[exp]　&#21305;&#37197;[...]&#26041;&#25324;&#21495;&#20013;,&#25152;&#26377;&#21015;&#20030;&#20986;&#26469;&#30340;&#23383;&#31526;&#20803;&#32032;<br />[a-z]　&#21305;&#37197;&#20174;a&#24320;&#22987;,&#21040;z&#32467;&#26463;&#30340;&#19968;&#20010;&#36830;&#32493;&#30340;&#23383;&#31526;&#21306;&#38388;, &#21253;&#25324; a, &#21253;&#25324;z<br />[a-zA-Z0-9] &#22810;&#20010;&#21305;&#38388;&#20063;&#21487;&#20197;&#20889;&#22312;&#19968;&#36215;<br /><br />&#38656;&#35201;&#36716;&#20041;&#30340;&#23383;&#31526;:　],-,\,^<br />&#23427;&#20204;&#20998;&#21035;&#30340;&#36716;&#20041;&#24418;&#24335;&#23601;&#26159;: \], \-, \\, \^<br /><br />[^exp]　&#21305;&#37197;&#38500;&#20102; &#21015;&#20030;&#20986;&#26469;&#30340;&#23383;&#31526; &#20197;&#22806;&#30340;&#25152;&#26377;&#23383;&#31526;<br />[^]　　　　&#25490;&#38500;&#25481;&#20102;0&#20010;&#23383;&#31526;,&#20063;&#23601;&#26159;&#35828;&#21305;&#37197;&#20219;&#24847;&#23383;&#31526;<br /><br />----------------------------&#20960;&#20010;&#24120;&#29992;&#23383;&#31526;&#30340;&#36716;&#20041;&#24418;&#24335;-----------------------------------<br />\t&#31561;&#20215;&#20110;&#21046;&#34920;&#31526;(tab)　　　　<br />\n&#31561;&#20215;&#20110;&#25442;&#34892;&#31526;<br />\r&#31561;&#20215;&#20110;&#22238;&#36710;&#31526;<br />\a&#21709;&#38083;,　\f&#25442;&#39029;&#31526;(&#22312;word&#25991;&#26723;&#20013;&#65292;&#24403;&#25353;&#19979;Ctrl+Enter&#30340;&#26102;&#20505;&#65292;&#23601;&#21487;&#20197;&#25554;&#20837;&#19968;&#20010;&#25442;&#39029;&#31526;)<br />\xHH&#34920;&#31034;&#65292;&#19968;&#20010;Ascii&#23383;&#31526;&#65292;&#36825;&#20010;&#23383;&#31526;&#30340;ascii&#32534;&#30721;&#29992;&#20004;&#20301;&#21313;&#20845;&#36827;&#21046;&#25968;&#23383;&#34920;&#31034;&#12288;&#65288;HH &#26159;&#20004;&#20301;&#21313;&#20845;&#36827;&#21046;&#25968;&#23383;&#65289;<br />\uHHHH &#34920;&#31034;&#65292;&#19968;&#20010;Unicode&#23383;&#31526;&#65292;&#36825;&#20010;&#23383;&#31526;&#30340;Unicode&#32534;&#30721;&#29992;&#22235;&#20301;&#21313;&#20845;&#25552;&#21046;&#25968;&#23383;&#34920;&#31034; <br /><br />----------------------------&#20960;&#20010;&#24120;&#29992;&#23383;&#31526;&#30340;&#23383;&#31526;&#38598;&#21512;-----------------------------------<br />\s&#31561;&#20215;&#20110;[ \r\n\t], &#21305;&#37197;&#31354;&#30333;&#23383;&#31526;,&#33021;&#21305;&#37197;&#31354;&#26684;&#65292;&#22238;&#36710;&#65292;&#25442;&#34892;&#65292;&#21046;&#34920;&#31526;<br />\S&#31561;&#20215;&#20110;[^ \r\n\t], &#21305;&#37197;&#38750;&#31354;&#30333;&#23383;&#31526;<br />\s&#19982;\S&#20114;&#34917;&#65292;&#26159;&#20114;&#34917;&#38598;<br />[\s\S] &#21305;&#37197;&#20219;&#24847;&#23383;&#31526;<br /><br />\d&#31561;&#20215;&#20110;[0-9]&#12288;&#21305;&#37197;&#25968;&#23383;<br />\D&#31561;&#20215;&#20110;[^0-9]<br /><br />\w&#31561;&#20215;&#20110;[a-zA-Z\d_]<br />\W&#31561;&#20215;&#20110;[^a-zA-Z\d_]<br />\w&#19982;\W&#20114;&#34917;&#65292;&#26159;&#20114;&#34917;&#38598;　 \w&#31561;&#20215;&#20110;[^\W]<br />[\w\W] &#21305;&#37197;&#20219;&#24847;&#23383;&#31526;<br /><br />.　 &#21305;&#37197;&#65306;&#38500;&#20102;&#22238;&#36710;&#31526;&#21644;&#25442;&#34892;&#31526;&#20197;&#22806;&#30340;&#12288;&#20854;&#23427;&#25152;&#26377;&#23383;&#31526;<br />.&#31561;&#20215;&#20110;[^\r\n]<br /><br />&#24120;&#29992;&#30340;&#23383;&#31526;&#38598;&#21512;&#65306;\d \D \s \S \w \W .<br /><br />-----------------------------&#38480;&#23450;&#31526;----------------------------------<br /><br />e{n}　　　　&#38480;&#23450;&#31526;{n}: &#38480;&#23450;&#24038;&#36793;&#32039;&#36319;&#30528;&#30340;&#21305;&#37197;&#35268;&#21017;e&#65292;e&#37325;&#22797;&#21305;&#37197;N&#27425;　 (n&#20026;&#25968;&#23383;)<br />e{3}&#31561;&#20215;&#20110;eee<br /><br />ab{3}&#31561;&#20215;&#20110;abbb&#31561;&#20215;&#20110;a{1}b{3}　&#33021;&#22815;&#21305;&#37197;&#21040;&#12288;&quot;abbb&quot; , 1&#20010; a &#32039;&#36319;&#30528;3&#20010; b<br />ab{3}&#8800;ababab<br /><br />e{m,n}　(m,n &#30342;&#20026;&#25968;&#23383;)　　　　&#38480;&#23450;&#31526;{m,n}: &#38480;&#23450;&#24038;&#36793;&#32039;&#36319;&#30528;&#30340;&#21305;&#37197;&#35268;&#21017;e&#65292;e&#37325;&#22797;&#21305;&#37197; &#33267;&#23569;m&#27425;&#65292;&#33267;&#22810;n&#27425;<br />\d{6,9}&#12288;　&#21305;&#37197;&#36830;&#32493;&#30340;6&#21040;9&#20010;&#25968;&#23383;<br /><br />e{m,}　　　　&#38480;&#23450;&#31526;{m,}: &#38480;&#23450;&#24038;&#36793;&#32039;&#36319;&#30528;&#30340;&#21305;&#37197;&#35268;&#21017;e, e&#37325;&#22797;&#21305;&#37197; m &#27425;&#25110;&#32773; m &#27425;&#20197;&#19978;<br /><br />e+　　　　&#38480;&#23450;&#31526;+: &#38480;&#23450;&#24038;&#36793;&#32039;&#36319;&#30528;&#30340;&#21305;&#37197;&#35268;&#21017;e, e&#37325;&#22797;&#21305;&#37197; 1 &#27425;&#25110;&#32773; 1 &#27425;&#20197;&#19978;<br />e+&#31561;&#20215;&#20110;e{1,}<br /><br />e*　　　　&#38480;&#23450;&#31526;*: &#38480;&#23450;&#24038;&#36793;&#32039;&#36319;&#30528;&#30340;&#21305;&#37197;&#35268;&#21017;e, e&#37325;&#22797;&#21305;&#37197; 0 &#27425;&#25110;&#32773; 0 &#27425;&#20197;&#19978;<br />e*&#31561;&#20215;&#20110;e{0,}<br /><br />e?　　　　&#38480;&#23450;&#31526;?: &#38480;&#23450;&#24038;&#36793;&#32039;&#36319;&#30528;&#30340;&#21305;&#37197;&#35268;&#21017;e, e&#37325;&#22797;&#21305;&#37197; 0 &#27425;&#25110;&#32773; 1 &#27425;<br />e?&#31561;&#20215;&#20110;e{0,1}<br /><br /><br />&#36138;&#23146;&#27169;&#24335;&#30340;&#38480;&#23450;&#31526;(6&#20010;):　{n},　　　　{m,n},　　　　{m,},　　　　+,　　　　*,　　　　?<br /><br />&#25042;&#24816;&#27169;&#24335;&#30340;&#38480;&#23450;&#31526;(6&#20010;):　{n}?,　　　　{m,n}?,　　　　{m,}?,　　　　+?,　　　　*?,　　　　??<br /><br /><br />-------------------------------------------------<br />|　　　　&quot;&#25110;&#32773;&quot;&#30340;&#24847;&#24605;<br />exp1|exp2|exp3　　　　&#21305;&#37197;exp1&#25110;&#32773;exp2&#25110;&#32773;exp3, &#36825;&#37324;&#21602; exp1,exp2, exp3 &#22343;&#20026;&#29420;&#31435;&#30340;&#8220;&#23376;&#34920;&#36798;&#24335;&#8221;<br /><br /><br /><br />--------------------------------------------------<br /><br />(Sub exp)　　　　&#20998;&#32452;&#65306;&#25226;&#34920;&#36798;&#24335;&#30340;&#19968;&#37096;&#20998;&#25918;&#22312;(...)&#23567;&#25324;&#21495;&#20013;&#65292;&#36825;&#19968;&#37096;&#20998;&#31216;&#20043;&#20026;&#23376;&#34920;&#36798;&#24335;, &#23376;&#34920;&#36798;&#24335;&#30340;&#25429;&#33719;&#20869;&#23481;&#65292;&#20250;&#34987;&#21333;&#29420;&#23384;&#20648;&#36215;&#26469;&#65292;&#26041;&#20415;&#21518;&#32493;&#20351;&#29992;.<br />(....)　&#36824;&#24120;&#24120;&#29992;&#20110; &#32452;&#32455;&#34920;&#36798;&#24335;&#30340;&#32467;&#26500;<br /><br /><br /><br />&#27880;&#24847;&#65306;&#20998;&#32452;&#30340;&#26102;&#20505;&#65292;&#19981;&#33021;&#30772;&#22351;&#34920;&#36798;&#24335;&#30340;&#21305;&#37197;&#35268;&#21017;<br />　　　　&#20998;&#32452;&#19981;&#33021;&#20132;&#21449;<br /><br />-------------------------------------------------------<br /><br />^　　　　&#21305;&#37197;&#38646;&#38271;&#24230;&#23383;&#31526;&#20018;&#65292;&#21482;&#33021;&#21305;&#37197;&#23383;&#31526;&#20018;&#24320;&#22987;&#30340;&#20301;&#32622;<br />$　　　　&#21305;&#37197;&#38646;&#38271;&#24230;&#23383;&#31526;&#20018;&#65292;&#21482;&#33021;&#21305;&#37197;&#23383;&#31526;&#20018;&#32467;&#26463;&#30340;&#20301;&#32622;<br />\b　　　　&#21305;&#37197;&#38646;&#38271;&#24230;&#23383;&#31526;&#20018;&#65292;&#21482;&#33021;&#21305;&#37197;&#21333;&#35789;&#30340;&#36793;&#30028;<br /><br />---------------------------&#26029;&#35328;----------------------------<br /><br />(?=exp)　　　　　　　　&#21305;&#37197;&#38646;&#38271;&#24230;&#23383;&#31526;&#20018;, &#21305;&#37197;&#19968;&#20010;&#32541;&#38553;, &#35201;&#27714;&#36825;&#20010;&#32541;&#38553;&#21491;&#36793;&#20869;&#23481;&#12288;&#21487;&#20197;&#34987; exp &#21305;&#37197;<br />(?!exp)　　　　　　　　&#21305;&#37197;&#38646;&#38271;&#24230;&#23383;&#31526;&#20018;, &#21305;&#37197;&#19968;&#20010;&#32541;&#38553;, &#35201;&#27714;&#36825;&#20010;&#32541;&#38553;&#21491;&#36793;&#20869;&#23481;&#19981;&#21487;&#20197;&#34987; exp &#21305;&#37197;<br /><br /><br /><br /><br />---------------------------&#33258;&#24341;&#29992;----------------------------<br /><br />\n　　　　&#33258;&#24341;&#29992;&#12290;&#34920;&#31034;&#24341;&#29992;&#31532; n &#20010;&#25429;&#33719;&#32452;&#24049;&#32463;&#25429;&#33719;&#21040;&#30340;&#20869;&#23481;　(n &#20026;&#25968;&#23383;)<br /><br /><br /><br />---------------------------&#26367;&#25442;&#34920;&#36798;&#24335;----------------------------<br /><br />$n　　　　&#22312;&#26367;&#25442;&#34920;&#36798;&#24335;&#20013;&#65292;&#12288;$n &#29992;&#26469;&#24341;&#29992;&#31532; n&#20010;&#25429;&#33719;&#32452;&#22312;&#26412;&#27425;&#21305;&#37197;&#20013;&#25152;&#25429;&#33719;&#21040;&#30340;&#20869;&#23481;&#12290;<br />$&amp;　　　　&#24341;&#29992;&#25972;&#20010;&#34920;&#36798;&#24335;&#22312;&#26412;&#27425;&#21305;&#37197;&#20013;&#12288;&#25152;&#25429;&#33719;&#21040;&#30340;&#20869;&#23481;<br /><br />$'　　　　&#24341;&#29992;&#34920;&#36798;&#24335;&#22312;&#26412;&#27425;&#21305;&#37197;&#20013;&#12288;&#25429;&#33719;&#32467;&#26524;&#30340;&#21518;&#25991;<br />$`　　　　&#24341;&#29992;&#34920;&#36798;&#24335;&#22312;&#26412;&#27425;&#21305;&#37197;&#20013;&#12288;&#25429;&#33719;&#32467;&#26524;&#30340;&#21069;&#25991;　　　　　　　　 (` &#26159; tab &#19978;&#38754;&#37027;&#20010;&#23383;&#31526;)<br />$_　　　　&#24341;&#29992;&#24453;&#26597;&#25214;&#25991;&#26412;&#20840;&#25991;<br /><br />-------------------------------------------------------<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />----------------------------------------------------------<br />&#22914;&#26377;&#38169;&#35823;&#65292;&#35831;&#36319;&#24086;&#25351;&#27491;<br />&#22914;&#26377;&#35273;&#24471;&#65292;&#26576;&#37096;&#20998;&#20869;&#23481;&#26377;&#24517;&#35201;&#34917;&#20805;&#65292;&#20063;&#35831;&#36319;&#24086;&#25552;&#20986;<br /><br /><br /><br />]]></description></item><item><link>http://www.linjunhai.com/blog/article-177.xml</link><title><![CDATA[『Scripts 学盟』论坛开张咯!!!   -//  iScripts.org]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[心情日志]]></category><pubDate>2011-03-27 04:22:20</pubDate><guid>http://www.linjunhai.com/blog/article-177.xml</guid><description><![CDATA[&#35770;&#22363;&#24320;&#24352;&#21679;!!!　 -//　iScripts.org<br /><br />&#12302;<a href='http://www.iscripts.org/' target='_blank'><font color='Red'><b>Scripts &#23398;&#30431;</b></font></a>&#12303;<br />&#19981;&#20877;&#24754;&#20652;&#65292;&#20307;&#39564;&#32534;&#20889; Scripts &#30340;&#20048;&#36259;!<br /><br /><a href='http://www.iscripts.org/' target='_blank'>http://www.iscripts.org/</a><br /><br />--------------------------------------------------------<br /><br />&#25630;&#22909;&#20037;&#65292;&#22312; <a href='http://www.zmcv.com/' target='_blank'><font color='DarkGreen'>&#33457;&#33457;(http://www.zmcv.com/)</font></a> &#30340;&#24110;&#21161;&#19979;, &#32456;&#20110;&#25226;&#35770;&#22363;&#26550;&#36215;&#26469;&#20102;&#12290;&#12290;<br /><br />&#35770;&#22363;&#26032;&#24352;&#65292;&#29256;&#20027;&#28909;&#25307;&#20013;&#65292;&#26399;&#24453;&#20320;&#30340;&#21152;&#30431;&#65281;<br /><br />&#24069;&#21733;&#32654;&#22899;&#22810;&#22810;&#21734;...]]></description></item><item><link>http://www.linjunhai.com/blog/article-176.xml</link><title><![CDATA[基于 jscript 的 ASP 开发 1]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2010-12-12 07:36:37</pubDate><guid>http://www.linjunhai.com/blog/article-176.xml</guid><description><![CDATA[&#39318;&#20808;&#36824;&#26159;&#20808;&#24223;&#35805;&#19968;&#30058;&#21543;&#12290;&#12290;&#12290;<br /><br /><b>&#20026;&#20160;&#20040;&#20351;&#29992; jscript&#65311;</b><br />&#37117;&#30693;&#36947; asp &#30340;&#26381;&#21153;&#31471;&#31243;&#24207;&#21487;&#20197;&#29992; vbscript &#26469;&#20889;&#12290;&#22312;&#32593;&#19978;&#65292;&#22312;&#20070;&#19978;&#30475;&#21040;&#30340;&#20195;&#30721;&#20063;&#22810;&#26159;&#29992; vbscript &#32534;&#20889;&#12290;&#25630;<br /><br />&#24471;&#36824;&#26377;&#24456;&#22810;&#20154;&#20197;&#20026; asp &#26381;&#21153;&#31471;&#23601;&#24517;&#39035;&#29992; vbscript&#12290;&#23454;&#38469;&#19978;&#65292;&#21482;&#35201;&#31526;&#21512; activescript &#25509;&#21475;&#30340;&#33050;&#26412;&#35821;&#35328;&#65292;&#24182;&#19988;<br /><br />&#26426;&#19978;&#23433;&#35013;&#20102;&#30456;&#24212;&#35299;&#26512;&#36816;&#34892;&#24341;&#25806;&#65292;&#20415;&#21487;&#20197;&#29992;&#26469;&#20570; asp &#30340;&#26381;&#21153;&#31471;&#31243;&#24207;&#24320;&#21457;&#12290;<br />windows &#40664;&#35748;&#24102;&#26377; vbscript,jscript &#24341;&#25806;, &#21621;&#21621;&#65292;javascript &#20063;&#21487;&#20197;&#30340;&#65292;&#21482;&#19981;&#36807;&#21363;&#20351;&#20320;&#22768;&#26126;&#21629;&#21517;&#29992;&#30340;&#35821;&#35328;&#26159; javascript, &#31995;&#32479;&#20063;&#24403;&#20316;&#26159; jscript&#12290;<br /><br /><br /><br />&#22522;&#20110;&#19979;&#38754;&#30340;&#20960;&#20010;&#21407;&#22240;&#65292;&#20063;&#35768;&#33021;&#22815;&#25104;&#20026;&#20320;&#36873;&#25321; jscript &#30340;&#29702;&#30001;&#65306;<br />&#65297;&#12289;&#20248;&#38597;&#31616;&#27905;<br />&#65298;&#12289;&#31867;&#65315;&#30340;&#35821;&#27861;&#65292;&#21487;&#33021;&#26356;&#31526;&#21512;&#20320;&#24050;&#26377;&#30340;&#20195;&#30721;&#39118;&#26684;&#20064;&#24815;<br />&#65299;&#12289;&#25110;&#32773;&#24178;&#33030;&#23601;&#26159;&#20320;&#24050;&#25484;&#25569; jscript(javascript)<br />&#65300;&#12289;js &#20013;&#27491;&#21017;&#30340;&#20351;&#29992;&#35201;&#27604; vbscript &#26356;&#21152;&#26041;&#20415;&#21644;&#39640;&#25928;<br />&#65301;&#12289;&#20248;&#31168;&#30340;&#24322;&#24120;&#22788;&#29702;&#26426;&#21046;<br />&#65302;&#12289;&#20989;&#25968;&#24335;&#32534;&#31243;&#65292;&#26356;&#31361;&#20986;&#20102;&#21160;&#24577;&#35821;&#35328;&#28789;&#27963;&#30340;&#29305;&#28857;<br />&#65303;&#12289;Array&#65292;Object &#23601;&#21487;&#20805;&#24403;&#21508;&#31867;&#23481;&#22120;<br />&#65304;&#12289;&#26356;&#23481;&#26131;&#30340;&#21435;&#23450;&#20041;&#31867;<br />&#65304;&#12289;&#20570;&#21442;&#25968;&#21512;&#27861;&#24615;&#39564;&#35777;&#26102;&#65292;&#21487;&#20197;&#20599;&#25042;&#22320;&#25226;&#23458;&#25143;&#31471;&#34920;&#21333;&#39564;&#35777;&#30340;&#20195;&#30721;&#22797;&#21046;&#20102;&#65292;&#20316;&#23567;&#20462;&#25913;&#12290;<br />&#24819;&#19981;&#21040;&#20102;&#8230;&#8230;<br /><br /><br />&#21621;&#21621;&#65292;&#26159;&#19981;&#26159;&#24515;&#21160;&#20102;&#12290;^_^<br /><br />&#19981;&#36807;&#65292;&#20063;&#24471;&#25215;&#35748; vbscript &#23384;&#22312;&#30340;&#19968;&#20123;&#20248;&#21183;&#65292;&#27604;&#22914;&#65306;<br />&#65297;&#12289;&#20070;&#26412;&#19978;&#65292;&#32593;&#32476;&#19978;&#26377;&#26356;&#22823;&#37327;&#30340;&#20195;&#30721;&#36164;&#28304;&#65292;&#26356;&#23481;&#26131;&#30340;&#33719;&#24471;&#21442;&#32771;&#21644;&#24110;&#21161;<br />&#65298;&#12289;&#25903;&#25345;&#36755;&#20986;&#21442;&#25968; (ByRef param)&#65292;&#19968;&#20123;&#32452;&#20214;&#21487;&#33021;&#38656;&#35201;&#29992;&#21040;<br />&#65299;&#12289;&#21487;&#20197;&#35835;&#21462; byte &#25968;&#32452;&#20869;&#23481;<br />&#65300;&#12289;&#22240;&#20026;&#35821;&#27809;&#26377; js &#37027;&#20040;&#28789;&#27963;&#65292;&#25152;&#20197;&#24179;&#22343;&#26469;&#35828;&#65292;&#35299;&#26512;&#36816;&#34892;&#30340;&#24320;&#38144;&#35201;&#27604; js &#23567;<br /><br />http://you.video.sina.com.cn/a/4564058-1486735532.html]]></description></item><item><link>http://www.linjunhai.com/blog/article-175.xml</link><title><![CDATA[与腾讯擦身过]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[心情日志]]></category><pubDate>2010-09-16 16:47:21</pubDate><guid>http://www.linjunhai.com/blog/article-175.xml</guid><description><![CDATA[&#24515;&#23384;&#20389;&#24184;&#30340;&#25237;&#20102;&#31616;&#21382;&#65292;&#26412;&#26469;&#22312;&#28023;&#37327;&#30340;&#24212;&#32856;&#32773;&#20013;&#65292;&#31616;&#21382;&#34987;&#20851;&#27880;&#27010;&#29575;&#24182;&#19981;&#39640;&#65292;&#27809;&#24819;&#21040;&#36824;&#30495;&#30340;&#25442;&#26469;&#19968;&#27425;&#38754;&#35797;&#26426;&#20250;&#12290;<br /><br />&#22079;&#22079;&#65292;&#21448;&#26377;&#20010;&#23567;&#23567;&#29702;&#30001;&#21487;&#20197;&#35753;&#33258;&#24049;&#20599;&#20599;&#30340;&#65337;&#65337;&#19968;&#19979;&#12290;<br /><br />&#21482;&#19981;&#36807;&#65292;&#37027;&#20010;&#26159;&#20852;&#20914;&#20914;&#32780;&#21435;&#65292;&#21448;&#26159;&#37027;&#20010;&#28784;&#28316;&#28316;&#30340;&#22238;&#26469;<br /><br />&#24212;&#32856;&#23703;&#20301;&#26159; QZone &#21069;&#31471;&#24320;&#21457;&#65292;&#22823;&#27010;&#27969;&#31243;&#22914;&#19979;&#65306;<br /><br />&#65297;&#12289;&#21322;&#23567;&#26102; javascript &#39064;&#31508;&#35797;<br /><br />&#12288;&#12288;&#31572;&#21367;&#36807;&#31243;&#33258;&#25105;&#24863;&#35273;&#29978;&#22909;<br />&#12288;&#12288;&#20165;&#26377;&#30340;&#19968;&#20010;&#32416;&#32467;&#23601;&#26159; NaN * 4 = ? &#22312; 1.#INF &#21644; NaN &#20013;&#33945;&#19979; NaN<br /><br />&#12288;&#12288;&#24635;&#32467;&#65306;&#33258;&#25105;&#24863;&#35273;&#22826;&#22909;&#20102;<br /><br />&#65298;&#12289;&#19982;&#24037;&#31243;&#24072;&#30340;&#31532;&#19968;&#36718;&#38754;&#35848;<br /><br />&#12288;&#12288;&#38754;&#23448;&#22260;&#32469;&#31508;&#35797;&#20013;&#30340;&#39064;&#30446;&#23637;&#24320;&#35848;&#35805;&#65292;&#36827;&#19968;&#27493;&#35810;&#38382;&#20102;&#25105;&#19968;&#20123;&#39064;&#30446;&#30340;&#20316;&#31572;&#29702;&#30001;<br />&#12288;&#12288;&#36825;&#36807;&#31243;&#20013;&#34987;&#38754;&#23448;&#25351;&#20986;&#20102;&#20960;&#22788;&#38169;&#28431;&#65292;&#22312;&#34987;&#25351;&#20986;&#38169;&#35823;&#21518;&#65292;&#38754;&#23448;&#27809;&#26377;&#32473;&#20986;&#27491;&#30830;&#31572;&#26696;&#65292;&#32780;&#26159;&#21152;&#20197;&#25552;&#31034;&#65292;&#32487;&#32493;&#30001;&#25105;&#20316;&#31572;&#12290;&#36827;&#19968;&#27493;&#25720;&#28165;&#25105;&#30340; js &#21151;&#24213;&#12290;<br />&#12288;&#12288;&#36807;&#31243;&#20013;&#36824;&#31359;&#25554;&#35810;&#38382;&#20102;&#25216;&#26415;&#24320;&#21457;&#20013;&#65288;&#20559;&#21521;&#20110; Web&#65289;&#30340;&#19968;&#20123;&#38382;&#39064;&#65292;&#25026;&#30340;&#21644;&#19981;&#25026;&#30340;&#21508;&#21322;&#21543;<br /><br />&#12288;&#12288;&#24635;&#32467;&#65306;&#36807;&#31243;&#24212;&#35813;&#36824;&#31639;&#39034;&#21033;&#65292;&#20294;&#33258;&#20449;&#24515;&#34987;&#21066;&#24369;&#20102;&#20123;<br /><br />&#65299;&#12289;&#19982;&#24037;&#31243;&#24072;&#30340;&#31532;&#20108;&#36718;&#38754;&#35848;<br /><br />&#12288;&#12288;&#26159;&#19982;&#21478;&#22806;&#19968;&#20301;&#24037;&#31243;&#24072;&#38754;&#35848;&#65292;&#36825;&#19968;&#20851;&#21487;&#20197;&#35828;&#26159;&#24456;&#19981;&#39034;&#21033;&#12290;<br />&#12288;&#12288;&#38754;&#23448;&#30340;&#38382;&#39064;&#24320;&#22987;&#27867;&#21270;&#65292;&#19981;&#20877;&#20542;&#21521;&#20110; Web &#24320;&#21457;&#12290;&#21482;&#35760;&#20303;&#20960;&#20010;&#38382;&#39064;<br /><br />&#12288;&#12288;encodeURIComponent &#20855;&#20307;&#23545;&#21738;&#20123;&#23383;&#31526; &#36827;&#34892;&#36716;&#20041;&#65292;&#21738;&#20123;&#19981;&#36827;&#34892;&#36716;&#20041;<br />&#12288;&#12288;( &#22247;&#65292;&#27515;&#35760;&#30340;&#19996;&#19996;&#12290;&#20316;&#20102;&#19981;&#23436;&#25972;&#22238;&#31572;&#8230;&#8230; )<br /><br />&#12288;&#12288;&#35848;&#35848; MySQL &#30340;&#23384;&#20648;&#24341;&#25806;&#26377;&#21738;&#20123;&#19981;&#21516;&#65292;&#27604;&#22914;&#35828; innodb &#21644; isam&#12290;<br />&#12288;&#12288;&#65288;&#19981;&#25026;&#65289;<br /><br />&#12288;&#12288;&#35848;&#19968;&#19979;&#23545;&#25968;&#25454;&#32467;&#26500;&#20013;&#30340;&#12288;&#38431;&#21015;&#12288;&#21644;&#12288;&#26632;&#12288;&#30340;&#35748;&#35782;<br />&#12288;&#12288;&#65288;&#31616;&#21333;&#25551;&#36848;&#20102;&#38431;&#21015;&#21644;&#26632;&#30340;&#29305;&#24615;&#65292;&#20808;&#20837;&#20808;&#20986;&#21644;&#20808;&#20837;&#21518;&#20986;&#65289;<br /><br />&#12288;&#12288;&#35848;&#19968;&#19979;&#25968;&#25454;&#32467;&#26500;&#20013; &#21333;&#21521;&#38142;&#34920;&#12288;&#21644;&#12288;&#21452;&#21521;&#38142;&#34920;&#12288;&#30340;&#21306;&#21035;<br />&#12288;&#12288;&#65288;<br />&#12288;&#12288;&#12288;&#36825;&#19968;&#39064;&#65292;&#22826;&#26479;&#20855;&#20102;&#25105;&#65281;&#65281;&#65281;&#65281;&#12288;&#30001;&#20110;&#23545;&#27010;&#24565;&#21517;&#35789;&#30340;&#29983;&#30095;&#65292;&#31455;&#28982;&#21548;&#25104;&#12288;&#21333;&#32447;&#38142;&#34920;&#12288;&#21644;&#12288;&#21452;&#32447;&#38142;&#34920;&#12290;<br />&#12288;&#12288;&#12288;&#23601;&#36825;&#26679;&#25105;&#31232;&#37324;&#31946;&#28034;&#30340;&#21448;&#25187;&#20102;&#19981;&#30693;&#22810;&#23569;&#20998;&#8230;&#8230;<br />&#12288;&#12288;&#12288;&#26412;&#36718;&#38754;&#35848;&#22833;&#36133;&#30340;&#20851;&#38190;&#25152;&#22312;&#65281;<br />&#12288;&#12288;&#12288;&#25945;&#35757;&#21568;&#65292;&#22238;&#26469;&#36884;&#20013;&#22312;&#20844;&#36710;&#19978;&#25165;&#24653;&#36807;&#31070;&#26469;&#65292;&#38754;&#23448;&#35828;&#30340;&#24212;&#35813;&#26159; &#21333;&#21521;&#38142;&#34920;&#21644;&#21452;&#21521;&#38142;&#34920;<br />&#12288;&#12288;&#12288;&#20011;&#30340;&#65292;&#36825;&#20040;&#23481;&#26131;&#30340;&#39064;&#65292;&#23601;&#36825;&#20040;&#30333;&#30333;&#20002;&#25481;&#65292;&#20002;&#22833;&#20102;&#22909;&#22823;&#26426;&#20250;<br />&#12288;&#12288;&#65289;<br /><br />&#12288;&#12288;&#38754;&#23448;&#34920;&#31034;&#65306;&#36825;&#20123;&#25968;&#25454;&#32467;&#26500;&#30340;&#39064;&#30446;&#24456;&#22522;&#30784;&#65292;&#20316;&#20026;&#35745;&#31185;&#19987;&#19994;&#23398;&#29983;&#26159;&#24517;&#39035;&#30693;&#36947;&#30340;&#65292;&#21518;&#38754;&#30340;&#26641;&#21834;&#12289;&#22270;&#21834;&#30340;&#23601;&#19981;&#20316;&#25552;&#38382;&#20102;&#8230;&#8230; ~!@#$%^&amp;*()_+<br />&#12288;&#12288;&#65288;<br />&#12288;&#12288;&#12288;&#24443;&#24213;&#34987;&#25171;&#36133;<br />&#12288;&#12288;&#12288;&#26377;&#28857;&#26080;&#35821;&#65292;&#20854;&#23454;&#20474;&#23545;&#26641;&#21644;&#22270;&#36824;&#26159;&#20102;&#35299;&#30340;&#12290;&#29305;&#21035;&#21518;&#24724;&#65292;&#24403;&#26102;&#24212;&#35813;&#25250;&#35805;&#34920;&#26126;&#33258;&#24049;&#36824;&#26159;&#20102;&#35299;&#30340;<br />&#12288;&#12288;&#65289;<br /><br />&#12288;&#12288;&#24635;&#32467;&#65306;&#33258;&#20449;&#24515;&#20002;&#20809;&#20809;&#65292;&#31934;&#31070;&#21463;&#25171;&#20987;&#12290;&#26292;&#38706;&#20986;&#25105;&#22312;&#19968;&#20123;&#22522;&#30784;&#27010;&#24565;&#19978;&#30340;&#19981;&#36275;<br />]]></description></item><item><link>http://www.linjunhai.com/blog/article-174.xml</link><title><![CDATA[小小修改一下 CabMaker]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[我的习作]]></category><pubDate>2010-08-22 21:42:20</pubDate><guid>http://www.linjunhai.com/blog/article-174.xml</guid><description><![CDATA[&#20197;&#21069;&#26159; Delphi &#20570;&#65292;&#29616;&#22312;&#29992;&#20102; MFC &#25152;&#20197;&#20307;&#31215;&#21464;&#23567;&#20102;.<br /><br /><img src='http://www.ialvin.cn/blog/attachments/2010_08_22_21_41_42_29.jpg' border='0' /><br /><br />&#31243;&#24207;&#24456;&#31616;&#21333;,&#20351;&#29992;&#26041;&#27861;:<br />&#183;&#23558;&#35201;&#25171;&#21253;&#30340;&#25152;&#26377;&#25991;&#20214;&#25918;&#22312;&#19968;&#20010;&#25991;&#20214;&#22841;&#20013;<br />&#183;&#36816;&#34892;&#31243;&#24207;&#36873;&#25321;&#35201;&#25171;&#21253;&#30340;&#25991;&#20214;&#22841;<br />&#183;&#31243;&#24207;&#20415;&#33258;&#21160;&#23558;&#35813;&#25991;&#20214;&#22841;&#19979;&#30340;&#25152;&#26377;&#25991;&#20214;&#21387;&#32553;&#22312;&#19968;&#20010; cab &#21253;&#20013;<br />&#183;&#21487;&#25171;&#21253;&#22810;&#32423;&#30446;&#24405;&#32467;&#26500;&#30340; CAB &#21253;<br /><br />&#26412;&#26469;,&#36825;&#20010;&#31616;&#21333;&#30340;&#23567;&#29609;&#26131;&#26159;&#20889;&#26469;&#33258;&#24049;&#29992;&#30340;,&#22240;&#20026;&#33258;&#24049;&#29609;&#32593;&#39029;&#25511;&#20214;&#26102;&#32463;&#24120;&#38656;&#35201;&#25171;&#21253;&#21457;&#24067;,&#26368;&#36817;&#30475;&#21040;&#32593;&#19978;&#26377;&#24456;&#22810;&#20154;&#25214;,&#23601;&#25918;&#19978;&#26469;,&#22914;&#26524;&#26377;&#38656;&#35201;&#21487;&#20197;&#19979;&#36733;&#29992;&#29992;. <br /><br /><br /><br /><a href='http://www.blogjava.net/Files/alvin/CabMaker20100823.rar'><img src='editor/images/download.gif' style='margin:0px 2px -4px 0px' border='0' />点击下载</a>]]></description></item><item><link>http://www.linjunhai.com/blog/article-173.xml</link><title><![CDATA[以前用的一个 flash 留言本]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[心情日志]]></category><pubDate>2010-05-20 17:01:24</pubDate><guid>http://www.linjunhai.com/blog/article-173.xml</guid><description><![CDATA[&#32763;&#30475;&#19968;&#20123;&#26087;&#25991;&#20214;&#26102;, &#24573;&#28982;&#25214;&#21040;&#20197;&#21069;&#22312; x-woods &#30003;&#35831;&#30340; flash &#30041;&#35328;&#26495;&#38142;&#25509;.<br />&#24448;&#27983;&#35272;&#22120;&#19968;&#36148;, &#23621;&#28982;&#36824;&#21487;&#20197;&#25171;&#24320;.<br /><br />&#30041;&#35328;&#20449;&#24687;&#20063;&#36824;&#22312;<br /><br /><a href='http://www.x-woods.com/service/book/x.swf?bookId=10578' target='_blank'>http://www.x-woods.com/service/book/x.swf?bookId=10578</a><br /><br />^_^ &#24576;&#26087;&#19968;&#19979;]]></description></item><item><link>http://www.linjunhai.com/blog/article-172.xml</link><title><![CDATA[JavaScript 进行 URLEncode (使用 GBK)]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[网络开发]]></category><pubDate>2010-03-19 14:03:33</pubDate><guid>http://www.linjunhai.com/blog/article-172.xml</guid><description><![CDATA[&#36824;&#26159;&#32769;&#38382;&#39064;, &#24819;&#22312; javascript　&#20013;&#36827;&#34892; URLEncode, &#24076;&#26395;&#20351;&#29992; GBK &#38598;.<br />&#20294;&#26159; javascript &#24182;&#19981;&#25903;&#25345;.<br /><br />&#24819;&#21040;&#20102;&#19968;&#20010;&#19981;&#20351;&#29992;&#20307;&#31215;&#22823;&#22823;&#30340;&#23545;&#29031;&#34920;&#30340;&#27861;&#23376;.<br /><br />&#22312; Firefox, Chrome, Opera &#26368;&#26032;&#29256;&#26412;&#19979;,&#22343;&#27979;&#35797;&#36890;&#36807;:<br /><br /><textarea name='code' class='js' cols='50'>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=GBK&quot; /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function encodeURL(s) {   
    var a = document.createElement(&quot;a&quot;);   
    function escapeDBC(s) {   
        if (!s) return &quot;&quot;  
        if (window.ActiveXObject) {
	        execScript('SetLocale &quot;zh-CN&quot;', &quot;vbscript&quot;); 
        	return s.replace(/[\d\D]/g, function($0) {   
	            window.vbsval = &quot;&quot;;   
	            execScript('window.vbsval=Hex(Asc(&quot;' + $0 + '&quot;))', &quot;vbscript&quot;); 
	            return &quot;%&quot; + window.vbsval.slice(0,2) + &quot;%&quot; + window.vbsval.slice(-2);   
	        });
        }
        a.href = &quot;nothing.asp?key=&quot; + s;
        return a.href.split(&quot;key=&quot;).pop();
    }
    return s.replace(/([^\x00-\xff]{0,256})|([\x00-\xff]+)/g, function($0, $1, $2) {   
        return escapeDBC($1) + encodeURIComponent($2||'');   
    });   
}

alert(encodeURL(&quot;&#20013;&#25991;&quot;));
&lt;/script&gt;</textarea><br /><br />&#33267;&#27492;, &#22312;&#23458;&#25143;&#31471;&#20351;&#29992; GB &#38598;&#23545;&#25991;&#23383;&#36827;&#34892; URI &#30340;&#38382;&#39064;&#20284;&#20046;&#23601;&#35299;&#20915;&#20102;.]]></description></item><item><link>http://www.linjunhai.com/blog/article-171.xml</link><title><![CDATA[ASP( VBScript ) 解析 JSON]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[网络开发]]></category><pubDate>2009-11-04 12:57:54</pubDate><guid>http://www.linjunhai.com/blog/article-171.xml</guid><description><![CDATA[VBScript &#26159; ASP &#26381;&#21153;&#31471;&#31243;&#24207;&#30340;&#24120;&#29992;&#35821;&#35328;.<br />VBScript &#35299;&#26512; JSON&#26159;&#20010;&#38382;&#39064;. &#33258;&#24049;&#20889;&#35299;&#26512;&#31243;&#24207;,&#24403;&#28982;&#19981;&#23481;&#26131;.<br /><br />&#30896;&#21040;&#36825;&#38382;&#39064;, &#31532;&#19968;&#20010;&#24819;&#21040;&#30340;&#23601;&#26159; JScript &#20102;.<br /><textarea name='code' class='vb' cols='50'>&lt;script language=&quot;jscript&quot; runat=&quot;server&quot;&gt;
Array.prototype.get = function(x) { return this[x]; };
function parseJSON(strJSON) { return eval(&quot;(&quot; + strJSON + &quot;)&quot;); }
&lt;/script&gt;
&lt;%
Dim json, obj
json = &quot;{a:&quot;&quot;aaa&quot;&quot;, b:{ name:&quot;&quot;bb&quot;&quot;, value:&quot;&quot;text&quot;&quot; }, c:[&quot;&quot;item0&quot;&quot;, &quot;&quot;item1&quot;&quot;, &quot;&quot;item2&quot;&quot;]}&quot;
Set obj = parseJSON(json)

Response.Write obj.a &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.b.name &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.c.length &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.c.get(0) &amp; &quot;&lt;br /&gt;&quot;

Set obj = Nothing
%&gt;</textarea>&#36825;&#26159;&#30452;&#25509;&#22312; asp &#37324;&#28151;&#29992;&#33050;&#26412;.<br />&#36824;&#26377;&#19968;&#20010;&#26041;&#27861;&#23601;&#26159; &#20351;&#29992; MS &#30340; &#33050;&#26412;&#25511;&#20214;. <br />&#20063;&#19968;&#26679;&#26159;&#20351;&#29992;&#20102; JScript<br /><textarea name='code' class='vb' cols='50'>
Dim scriptCtrl
Function parseJSON(str)
	If Not IsObject(scriptCtrl) Then
		Set scriptCtrl = Server.CreateObject(&quot;MSScriptControl.ScriptControl&quot;)
		scriptCtrl.Language = &quot;JScript&quot;
		scriptCtrl.AddCode &quot;Array.prototype.get = function(x) { return this[x]; }; var result = null;&quot;
	End If
	scriptCtrl.ExecuteStatement &quot;result = &quot; &amp; str &amp; &quot;;&quot;
	Set parseJSON = scriptCtrl.CodeObject.result
End Function

Dim json
json = &quot;{a:&quot;&quot;aaa&quot;&quot;, b:{ name:&quot;&quot;bb&quot;&quot;, value:&quot;&quot;text&quot;&quot; }, c:[&quot;&quot;item0&quot;&quot;, &quot;&quot;item1&quot;&quot;, &quot;&quot;item2&quot;&quot;]}&quot;

Set obj = parseJSON(json)

Response.Write obj.a &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.b.name &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.c.length &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.c.get(0) &amp; &quot;&lt;br /&gt;&quot;

Set obj = Nothing

Set scriptCtrl = Nothing
</textarea><br /><br /><br />--------------- 2009.12.31 ---------------<br /><br />&#20043;&#21069;&#20889;&#36825;&#20010;&#26102;,&#36824;&#24573;&#30053;&#20102;&#19968;&#20010;&#38382;&#39064;.<br /><br />&#19978;&#38754;&#20108;&#20010;&#26041;&#27861;&#37117;&#20351;&#29992;&#20102; jscript &#25226; json &#20018;&#35299;&#26512;&#25104; js &#23545;&#35937;.<br /><br />&#19981;&#21516;&#20043;&#22788;&#26159;, &#31532;&#19968;&#20010;&#26041;&#27861;, eval &#26159;&#22312;&#24403;&#21069;&#23487;&#20027;&#29615;&#22659;&#20013;&#25191;&#34892;.<br />&#31532;&#20108;&#20010;&#26041;&#27861;&#26159;, &#22312;&#21478;&#22806;&#30340;&#23487;&#20027;&#29615;&#22659;&#20013;&#25191;&#34892;.<br /><br />&#36825;&#28041;&#21450;&#21040;&#20102;&#19968;&#20010;&#23433;&#20840;&#24615;&#38382;&#39064;. json &#22914;&#26524;&#26159;&#20174;&#23458;&#25143;&#31471;&#25552;&#20132;&#19978;&#26469;&#30340;&#35805;, &#38590;&#20197;&#20445;&#35777;&#27809;&#26377;&#24694;&#24847;&#29992;&#25143;&#25552;&#20132;&#38750;&#27861;&#20195;&#30721;...<br />&#36825;&#26679;,&#31532;&#19968;&#20010;&#26041;&#27861;,&#23601;&#20250;&#22312;&#24403;&#21069;&#29615;&#22659;&#20013; eval(...&#24694;&#24847;&#20195;&#30721;...)　&#21518;&#26524;&#19981;&#22570;&#35774;&#24819;!!!<br /><br />&#31532;&#20108;&#20010;&#26041;&#27861;,&#21019;&#24314;&#20102; ScriptControl &#25511;&#20214;, &#22312;&#37324;&#38754;&#25191;&#34892;&#20195;&#30721;&#21017;&#30456;&#23545;&#23433;&#20840;&#20102;, &#22240;&#20026;&#26159;&#22312;&#19968;&#20010;&#38548;&#31163;&#36215;&#26469;&#30340;&#29615;&#22659;&#20013;&#25191;&#34892;.<br />&#20294;&#36824;&#26377;&#20004;&#20010;&#19996;&#19996;&#35201;&#32473;&#20808;&#21345;&#25481;, &#22240;&#20026;&#20195;&#30721;&#22312; ScriptControl &#20013;&#25191;&#34892;,&#20063;&#21487;&#20197;&#22312;&#37324;&#38754;&#20351;&#29992; ActiveXObject &#25110; GetObject &#19982;&#22806;&#30028;&#25171;&#20132;&#36947;..<br />&#20173;&#28982;&#19981;&#23433;&#20840;.<br /><br />&#36825;&#26102;&#20505;,&#23601;&#26377;&#24517;&#35201;&#20877;&#35843;&#25972;&#19968;&#19979;&#20195;&#30721;:<br /><textarea name='code' class='vb' cols='50'>
Dim scriptCtrl
Function parseJSON(str)
	If Not IsObject(scriptCtrl) Then
		Set scriptCtrl = Server.CreateObject(&quot;MSScriptControl.ScriptControl&quot;)
		scriptCtrl.Language = &quot;JScript&quot;
		scriptCtrl.AddCode &quot;function ActiveXObject() {}&quot; ' &#35206;&#30422; ActiveXObject
		scriptCtrl.AddCode &quot;function GetObject() {}&quot; ' &#35206;&#30422; ActiveXObject
		scriptCtrl.AddCode &quot;Array.prototype.get = function(x) { return this[x]; }; var result = null;&quot;
	End If
  On Error Resume Next
	scriptCtrl.ExecuteStatement &quot;result = &quot; &amp; str &amp; &quot;;&quot;
	Set parseJSON = scriptCtrl.CodeObject.result
  If Err Then
	Err.Clear
	Set parseJSON = Nothing
  End If
End Function

Dim json
json = &quot;{a:&quot;&quot;aaa&quot;&quot;, b:{ name:&quot;&quot;bb&quot;&quot;, value:&quot;&quot;text&quot;&quot; }, c:[&quot;&quot;item0&quot;&quot;, &quot;&quot;item1&quot;&quot;, &quot;&quot;item2&quot;&quot;]}&quot;

Set obj = parseJSON(json)

Response.Write obj.a &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.b.name &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.c.length &amp; &quot;&lt;br /&gt;&quot;
Response.Write obj.c.get(0) &amp; &quot;&lt;br /&gt;&quot;

Set obj = Nothing


If IsObject(scriptCtrl) Then Set scriptCtrl = Nothing
</textarea>]]></description></item><item><link>http://www.linjunhai.com/blog/article-170.xml</link><title><![CDATA[ASP 中 Base64 的编解码]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2009-10-22 02:14:30</pubDate><guid>http://www.linjunhai.com/blog/article-170.xml</guid><description><![CDATA[Base64 &#32534;&#30721;&#23383;&#31526;&#20018; &#19982; byte &#25968;&#32452;&#38388;&#30340;&#20114;&#36716;<br /><br />VBScript &#29256;&#26412;<textarea name='code' class='vb' cols='50'>
Function DecodeBase64(str)
	With CreateObject(&quot;Microsoft.XMLDOM&quot;).createElement(&quot;TXT&quot;)
		.dataType = &quot;bin.base64&quot;
		.text = str
		DecodeBase64 = .nodeTypedValue
	End With
End Function

Function EncodeBase64(bytes)
	With CreateObject(&quot;Microsoft.XMLDOM&quot;).createElement(&quot;TXT&quot;)
		.dataType = &quot;bin.base64&quot;
		.nodeTypedValue = bytes
		EncodeBase64 = .text
	End With
End Function
</textarea><br /><br />JScript &#29256;&#26412;<textarea name='code' class='js' cols='50'>
var Base64Encoder = {
	encode : function(str) {
		with (Server.CreateObject(&quot;Microsoft.XMLDOM&quot;).createElement(&quot;TXT&quot;)) {
			dataType = &quot;bin.base64&quot;;
			text = str;
			return nodeTypedValue;
		}
	},
	decode : function(bts) {
		with (Server.CreateObject(&quot;Microsoft.XMLDOM&quot;).createElement(&quot;TXT&quot;)) {
			dataType = &quot;bin.base64&quot;;
			nodeTypedValue = bts;
			return text;
		}
	}
};
</textarea>]]></description></item><item><link>http://www.linjunhai.com/blog/article-169.xml</link><title><![CDATA[那些可爱人儿]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[心情日志]]></category><pubDate>2009-07-31 23:14:17</pubDate><guid>http://www.linjunhai.com/blog/article-169.xml</guid><description><![CDATA[&#12288;&#12288;&#27605;&#19994;&#21518;&#23601;&#25104;&#20102;&#22823;&#22478;&#24066;&#37324;&#30340;&#27665;&#24037;&#65292;&#31163;&#26657;&#23558;&#36817;&#19968;&#26376;&#12290;&#31245;&#24494;&#21152;&#24555;&#30340;&#29983;&#27963;&#33410;&#22863;&#21644;&#31245;&#24494;&#21152;&#37325;&#30340;&#29983;&#27963;&#21387;&#21147;&#65292;&#33258;&#24049;&#26377;&#28857;&#19981;&#36866;&#24212;&#65292;&#19968;&#30452;&#24819;&#30528;&#20986;&#26469;&#25171;&#25340;&#30340;&#25105;&#65292;&#29616;&#22312;&#21364;&#20284;&#20046;&#19981;&#24895;&#24847;&#25215;&#35748;&#33258;&#24049;&#24050;&#19981;&#26159;&#23398;&#29983;&#8230;&#8230;<br /><br />&#12288;&#12288;&#24819;&#30528;&#22235;&#24180;&#26469;&#19968;&#30452;&#26397;&#22805;&#30456;&#22788;&#30340;&#20154;&#20799;&#23601;&#20877;&#20063;&#27809;&#26377;&#20160;&#20040;&#26426;&#20250;&#32858;&#22312;&#19968;&#36215;&#20102;&#65292;&#36825;&#38453;&#23376;&#24635;&#26377;&#37027;&#20040;&#20123;&#20260;&#24863;&#12290;&#22823;&#22823;&#30007;&#29983;&#20063;&#20687;&#22899;&#29983;&#19968;&#26679;&#30340;&#22810;&#24833;&#21892;&#24863;&#20040;&#65311;&#20063;&#35768;&#21543;&#65292;&#25105;&#36824;&#26159;&#35748;&#20026;&#26159;&#22235;&#24180;&#26469;&#21516;&#31383;&#24050;&#32467;&#19979;&#19981;&#35299;&#30340;&#24773;&#35850;&#12290;&#25105;&#19968;&#30452;&#37117;&#36825;&#20040;&#35273;&#24471;&#65292;&#25105;&#36523;&#36793;&#30340;&#20154;&#19968;&#20010;&#20010;&#37117;&#26159;&#36825;&#20040;&#30340;&#21487;&#29233;&#12290;&#25105;&#19981;&#33021;&#32943;&#23450;&#36825;&#31181;&#24863;&#35273;&#20197;&#21518;&#26159;&#21542;&#20250;&#21464;&#30340;&#24456;&#28129;&#65292;&#29978;&#33267;&#23436;&#20840;&#22833;&#21435;&#12290;&#37117;&#35828;&#36367;&#20837;&#31038;&#20250;&#21518;&#65292;&#20154;&#20250;&#21464;&#24471;&#19981;&#30495;&#12290;&#36825;&#26102;&#20505;&#65292;&#25105;&#24819;&#25105;&#24471;&#35760;&#19979;&#28857;&#20160;&#20040;&#20102;&#12290;<br /><br /><a href='javascript:open(&quot;http://user.qzone.qq.com/78423497/blog/1248362180&quot;);void(0);'><font color='Blue'>2009.07.23&#8212;&#8212;&#23567;&#36125;&#31687;</font></a><br /><a href='javascript:open(&quot;http://user.qzone.qq.com/78423497/blog/1248549571&quot;);void(0);'><font color='Blue'>2009.07.26&#8212;&#8212;&#26999;&#21733;&#31687;</font></a><br /><a href='javascript:open(&quot;http://user.qzone.qq.com/78423497/blog/1248635040&quot;);void(0);'><font color='Blue'>2009.07.27&#8212;&#8212;&#22823;&#31098;&#31687;</font></a><br /><a href='javascript:open(&quot;http://user.qzone.qq.com/78423497/blog/1249056321&quot;);void(0);'><font color='Blue'>2009.08.01&#8212;&#8212;&#38463;&#31119;&#31687;</font></a><br /><a href='javascript:open(&quot;http://user.qzone.qq.com/78423497/blog/1249404246&quot;);void(0);'><font color='Blue'>2009.08.05&#8212;&#8212;&#65291;&#65291;&#31687;</font></a><br /><a href='javascript:open(&quot;http://user.qzone.qq.com/78423497/blog/1250093462&quot;);void(0);'><font color='Blue'>2009.08.05&#8212;&#8212;&#40657;&#40657;&#31687;</font></a><br /><a href='javascript:open(&quot;http://user.qzone.qq.com/78423497/blog/1251653499&quot;);void(0);'><font color='Blue'>2009.08.31&#8212;&#8212;&#21335;&#21733;&#31687;</font></a><br /><br />&#8230;&#8230;]]></description></item><item><link>http://www.linjunhai.com/blog/article-168.xml</link><title><![CDATA[[JAVA]大数开平方(模拟手算的方法)]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2009-05-21 03:55:16</pubDate><guid>http://www.linjunhai.com/blog/article-168.xml</guid><description><![CDATA[&#22312; CSDN &#30475;&#21040;&#30340;&#38382;&#39064;&#12290;&#12288;&#35201;&#27714;&#31639;&#20986;&#24320;&#24179;&#26041;&#32467;&#26524;&#30340;&#31934;&#30830;&#25972;&#25968;&#37096;&#20998;<br />&#24819;&#20102;&#24819;&#65292;&#24819;&#19981;&#21040;&#21035;&#30340;&#22909;&#30340;&#26041;&#27861;&#12288;&#23601;&#29992;&#20102;&#25720;&#25311;&#25163;&#31639;&#30340;&#26041;&#27861;<br /><textarea name='code' class='js' cols='50'>
public static void main(String[] args) {
        System.out.print(&quot;sqrt(1)=&quot; + sqrt(&quot;1&quot;));
        System.out.print(&quot;\tsqrt(25)=&quot; + sqrt(&quot;25&quot;));
        System.out.print(&quot;\tsqrt(26)=&quot; + sqrt(&quot;26&quot;));  // sqrt(26)==5 &#21621;&#21621;,&#22240;&#20026;&#21482;&#26377;&#25972;&#25968;&#37096;&#20998;
        System.out.print(&quot;\tsqrt(100)=&quot; + sqrt(&quot;100&quot;));
        System.out.println(&quot;\tsqrt(144)=&quot; + sqrt(&quot;144&quot;));
        
        // &#29983;&#25104;&#19968;&#20010; 5000 &#20301;&#20197;&#20869;&#30340;&#25968;
        StringBuffer sb = new StringBuffer(&quot;&quot;);
        Random rand = new Random();
        int length = rand.nextInt(5000)+1;
        for (int i=0; i&lt;length; i++)
            sb.append(rand.nextInt(10));
        String theNumber = sb.toString();

        System.out.println(&quot;n:&quot; + sb.toString());
        System.out.println(&quot;&#20301;&#25968;:&quot; + length);

        // &#24320;&#26041;
        long t = System.currentTimeMillis();
        BigInteger result = sqrt(theNumber);
        t = System.currentTimeMillis()-t;

        System.out.println(&quot;sqrt(n)=&quot; + result.toString());
        System.out.println(&quot;&#29992;&#26102;:&quot; + t + &quot;&#27627;&#31186;&quot;);
    }

    public static BigInteger sqrt(String theNumber) {
        int length = theNumber.length(), i;
        BigInteger res = BigInteger.ZERO;
        BigInteger twenty = BigInteger.valueOf(20);
        BigInteger t, x=BigInteger.ZERO, v, few=BigInteger.ZERO;
        BigInteger hg = BigInteger.valueOf(100);

        String tmpString = null;
        int pos = 2-length%2;
        tmpString = theNumber.substring(0, pos);
        while (true) {
            v = few.multiply(hg).add(BigInteger.valueOf(Integer.parseInt(tmpString)));
            if (res.compareTo(BigInteger.ZERO)==0) i=9;
            else i = v.divide(res.multiply(twenty)).intValue();
            for (; i&gt;=0; i--) {
                t = res.multiply(twenty).add(BigInteger.valueOf(i)).multiply(BigInteger.valueOf(i));
                if (t.compareTo(v)&lt;=0) {
                    x = t;
                    break;
                }
            }
            res = res.multiply(BigInteger.TEN).add(BigInteger.valueOf(i));
            few = v.subtract(x);
            pos++;
            if (pos&gt;length) break;
            tmpString = theNumber.substring(pos-1, ++pos);
        }
        return res;
    }
</textarea>]]></description></item><item><link>http://www.linjunhai.com/blog/article-167.xml</link><title><![CDATA[[JAVA]放个可以做简单数学四则运算的东东]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2009-05-03 22:29:23</pubDate><guid>http://www.linjunhai.com/blog/article-167.xml</guid><description><![CDATA[&#36935;&#21040;&#35201;&#27714;&#19968;&#20010;&#36816;&#31639;&#34920;&#36798;&#24335;&#30340;&#35745;&#31639;&#32467;&#26524;&#30340;&#38382;&#39064;<br />&#20256;&#36827;&#30340;&#26159;&#19968;&#20010;&#23383;&#31526;&#20018; (&#23383;&#20018;&#20869;&#23481;&#24403;&#28982;&#26159;&#34920;&#36798;&#24335;&#20102;)<br />&#26368;&#32456;&#35201;&#27714;&#20986;&#36816;&#31639;&#32467;&#26524;<br /><br />&#20043;&#21069;&#22312; JScript &#25110; VBScript &#37324;&#36890;&#24120;&#26159; eval &#26469;&#35299;&#20915;<br />&#19979;&#38754;&#32473;&#20010; Java &#30340;<br /><br />&#21482;&#33021;&#31639; +-*/ &#36824;&#26377;&#25324;&#21495;<br /><br /><textarea name='code' class='js' cols='50'>/**
 * (#)Calculator.java&#12288;&#12288;&#12288;&#12288;&#21019;&#24314;&#26102;&#38388;&#65306;Apr 30, 2009 6:14:03 PM&lt;br /&gt;
 */
package cn.ialvin.util;

import java.util.Stack;
import java.util.regex.Pattern;

/**
 * @author &#26519;&#24535;&#25996;(&lt;b&gt;ialvin.cn&lt;/b&gt;) &#24191;&#19996; &#26222;&#23425; &#37324;&#28246;
 */
public class Calculator {
    
    public static void main(String[] args) {
        String exp = &quot;-3.3 + 1.5 * (- 3 + -5)&quot;;
        Calculator calculator = new Calculator();
        System.out.println(calculator.cal(exp));
    }
    
    public double cal(String exp) {
        exp = adj(exp);
        exp = conver(exp);
        Stack&lt;Object&gt; stack = new Stack&lt;Object&gt;();
        String[] cs = exp.split(&quot;[^\\d.+\\-*/]+&quot;);
        int i = 0;
        while (i &lt; cs.length) {
            String c = cs<i>; i++;
            if (&quot;+&quot;.equals(c)) {
                stack.push((Double)stack.pop() + (Double)stack.pop());
            } else if (&quot;-&quot;.equals(c)) {
                stack.push(0 - (Double)stack.pop() + (Double)stack.pop());
            } else if (&quot;*&quot;.equals(c)) {
                stack.push((Double)stack.pop() * (Double)stack.pop());
            } else if (&quot;/&quot;.equals(c)) {
                stack.push(1 / (Double)stack.pop() * (Double)stack.pop());
            } else {
                stack.push(Double.parseDouble(c));
            }
        }
        return Double.parseDouble(stack.pop().toString());
    }

    private String adj(String exp) {
        exp = exp.replaceAll(&quot;[^\\d.+\\-*\\/()]+&quot;, &quot;&quot;);
        exp = exp.replaceAll(&quot;(^|[(+\\-*\\/])\\-([\\d.]+)&quot;, &quot;$1(0-$2)&quot;);
        return exp.replaceAll(&quot;[+\\-*\\/()]&quot;, &quot; $0 &quot;).trim();
    }
    
    private String conver(String exp) {
        String[] str = exp.split(&quot;\\s+&quot;);
        Stack&lt;String&gt; expStack = new Stack&lt;String&gt;();
        for(int i = str.length - 1 ; i &gt;= 0 ; i--)
            expStack.push(str<i>);
        Stack&lt;String&gt; outStack = new Stack&lt;String&gt;();
        Stack&lt;String&gt; operStack = new Stack&lt;String&gt;();
        operStack.push(&quot;#&quot;);
        while (expStack.size()&gt; 0) {
            String c = expStack.pop().toString();
            if (c.matches(&quot;^\\d+(?:\\.\\d*)?$&quot;)) {
                outStack.push(c);
            } else if (&quot;(&quot;.equals(c)) {
                operStack.push(c);
            } else if (&quot;)&quot;.equals(c)) {
                if (operStack.lastElement().equals(&quot;(&quot;)) {
                    operStack.pop();
                } else {
                    expStack.push(c);
                    outStack.push(operStack.pop());
                }
            } else {
                if (comparison(c, operStack.lastElement()))
                    outStack.push(operStack.pop());
                operStack.push(c);
            }
        }
        operStack.remove(operStack.firstElement());
        while(!operStack.empty())
            outStack.push(operStack.pop());
        return outStack.toString().replaceAll(&quot;\\[|\\]|\\,&quot;, &quot;&quot;);
    }
    
    private int getLevel(Object o) {
        if (&quot;(&quot;.equals(o)) return 1;
        if (&quot;+&quot;.equals(o)) return 2;
        if (&quot;-&quot;.equals(o)) return 2;
        if (&quot;*&quot;.equals(o)) return 3;
        if (&quot;/&quot;.equals(o)) return 3;
        return -1;
    }
    
    private boolean comparison(String c1 ,Object c2) {
        return getLevel(c2)-getLevel(c1) &gt;= 0;
    }
}</textarea>]]></description></item><item><link>http://www.linjunhai.com/blog/article-165.xml</link><title><![CDATA[写了个 JavaScript  烟花]]></title><author>78423497@qq.com(林俊海)</author><category><![CDATA[学习随笔]]></category><pubDate>2009-01-05 17:39:48</pubDate><guid>http://www.linjunhai.com/blog/article-165.xml</guid><description><![CDATA[&#22312; CSDN &#30475;&#21040;&#20010; &quot;&#12304;&#32534;&#31243;&#28216;&#25103;&#12305;&#36154;&#23681;&#25918;&#31036;&#33457;&quot; &#30340; JavaScript &#27963;&#21160;&#12290;<br /><a href='http://topic.csdn.net/u/20090104/17/db61e39c-7aed-46e0-8a0f-b571497f087c.html' target='_blank'>http://topic.csdn.net/u/20090104/17/db61e39c-7aed-46e0-8a0f-b571497f087c.html</a><br />&#30475;&#20102;&#20154;&#23478;&#22909;&#22810;&#20010;&#28418;&#20142;&#30340;&#20316;&#21697;&#65292;&#33258;&#24049;&#20063;&#24819;&#32451;&#32451;&#12290;<br /><br />&#32993;&#20081;&#20889;&#20102;&#19968;&#20010;&#31616;&#21333;&#28857;&#30340;&#65292;&#25237;&#19978;&#21435;&#12290;&#24403;&#26159;&#35760;&#24405;&#33258;&#24049;&#30340;&#23398;&#20064;&#21382;&#31243;&#12290;<br />&#8220;<a href='http://blog.csdn.net/zswang/archive/2009/01/05/3709929.aspx' target='_blank'><font color='Red'>&#12304;&#32534;&#31243;&#28216;&#25103;&#12305;&#36154;&#23681;&#25918;&#31036;&#33457;&#12290;&#65288;&#28857;&#29123;&#32493;&#24086;2-8&#27004;wcwtitxu&#30340;&#28976;&#28779;&#65289;</font></a>&#8221; &#23601;&#26159;&#25105;&#25237;&#30340;&#12290;<br />&#36816;&#34892;&#36215;&#26469;&#65292;&#25191;&#34892;&#25928;&#29575;&#36739;&#20302;&#12290;&#36824;&#24471;&#22810;&#23398;&#23398;...<br /><a href='http://www.linjunhai.com/Fireworks.htm' target='_blank'><u><font color='Blue'>&#25928;&#26524;&#39044;&#35272;</font></u></a><br />&#20195;&#30721;&#22914;&#19979;:<textarea name='code' class='js' cols='50'>&lt;html&gt;
&lt;head&gt;&lt;title&gt;&#26032;&#24180;&#24555;&#27138; &#33836;&#20107;&#22914;&#24847;&lt;/title&gt;
&lt;style&gt;
body{ background:#000; padding:0; margin:0; overflow:hidden; }
.ptr{ width:2px; height:2px; overflow:hidden; position: absolute; }
&lt;/style&gt;
&lt;script&gt;
function setColor(p) {
    p.r=Math.floor(p.r/2); p.g=Math.floor(p.g/2); p.b=Math.floor(p.b/2);
    if (p.r==0 &amp;&amp; p.g==0 &amp;&amp; p.b==0) return document.body.removeChild(p.ptr);
    p.ptr.style.background = &quot;rgb(&quot;+p.r+&quot;,&quot;+p.g+&quot;,&quot;+p.b+&quot;)&quot;;
    setTimeout(function(){setColor(p);}, 150);
}
function Point(x, y, r, g, b) {
    this.ptr = document.createElement(&quot;DIV&quot;);
    this.ptr.className = &quot;ptr&quot;;
    document.body.appendChild(this.ptr);
    this.ptr.style.left = x + &quot;px&quot;;
    this.ptr.style.top  = y + &quot;px&quot;;
    this.r = 2*r;
    this.g = 2*g;
    this.b = 2*b;
    var p = this;
    setTimeout(function(){setColor(p)}, Math.random()*200);
}
function Firework(mx, my) {
    this.mx = mx;
    this.my = my;
    this.cy=document.body.clientHeight||document.documentElement.clientHeight;
}
Firework.prototype.fire = function() {
    if (this.cy &lt;= this.my) return this.expansion();
    new Point(this.mx, this.cy, 0x40, 0x40, 0x40);
    this.cy -= 10;
    var self = this;
    setTimeout(function(){self.fire();}, 50);
};
Firework.prototype.init = function() {
    this.fs = [];
    var r1 = Math.random()*256;
    var g1 = Math.random()*256;
    var b1 = Math.random()*256;
    for (var x=0; x&lt;20; x++) {
        var o = {r:r1,g:g1,b:b1};
        var d = Math.random() * 6.283;
        var d1 = Math.random();
        o.vx = Math.sin(d) * d1 * 8;
        o.vy = Math.cos(d) * d1 * 8;
        o.l = Math.floor(Math.random() * 5) + 5;
        this.fs[x] = o;
        o.x = this.mx;
        o.y = this.my;
    }
};
Firework.prototype.expansion = function() {
    if (!this.fs) this.init();
    for (var x=0; x&lt;20; x++) {
        var o = this.fs[x];
        if (o===null) continue;
        if (o.l &lt; 0) {
            this.fs[x] = null;
            continue;
        }
        o.vy += 0.03;
        o.x += o.vx;
        o.y += o.vy;
        o.l -= 1;
        new Point(o.x, o.y, o.r, o.g, o.b);
    }
    var me = this;
    setTimeout(function() { me.expansion(); }, 100);
};
window.onload = function() {
    if (Math.random() &lt; 0.3) {
      var h=document.body.clientHeight||document.documentElement.clientHeight;
      var w=document.body.clientWidth||document.documentElement.clientWidth;
      new Firework(0.2*w+0.6*w*Math.random(),h/2+30-h/2*Math.random()).fire();
    }
    setTimeout(arguments.callee, 500);
};
&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;</textarea>]]></description></item></channel></rss>
