锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久天堂电影网,久久久久久国产精品美女 ,免费精品久久天干天干http://www.shnenglu.com/cjz/蹇箰鐨勭敓媧?.....zh-cnThu, 08 May 2025 22:15:21 GMTThu, 08 May 2025 22:15:21 GMT60Red Hat 璁劇疆samba鏈嶅姟鍣ㄥ尶鍚嶈闂殑闂http://www.shnenglu.com/cjz/archive/2012/01/09/163871.html椋涘ぉ椋涘ぉMon, 09 Jan 2012 05:48:00 GMThttp://www.shnenglu.com/cjz/archive/2012/01/09/163871.htmlhttp://www.shnenglu.com/cjz/comments/163871.htmlhttp://www.shnenglu.com/cjz/archive/2012/01/09/163871.html#Feedback0http://www.shnenglu.com/cjz/comments/commentRss/163871.htmlhttp://www.shnenglu.com/cjz/services/trackbacks/163871.html
淇敼闃茬伀澧欒鍒?/etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
閲嶅惎闃茬伀澧?service iptables restart銆?img src ="http://www.shnenglu.com/cjz/aggbug/163871.html" width = "1" height = "1" />

椋涘ぉ 2012-01-09 13:48 鍙戣〃璇勮
]]>
Daemon鍑芥暟鐨勭敤娉?/title><link>http://www.shnenglu.com/cjz/archive/2011/12/29/163123.html</link><dc:creator>椋涘ぉ</dc:creator><author>椋涘ぉ</author><pubDate>Thu, 29 Dec 2011 09:27:00 GMT</pubDate><guid>http://www.shnenglu.com/cjz/archive/2011/12/29/163123.html</guid><wfw:comment>http://www.shnenglu.com/cjz/comments/163123.html</wfw:comment><comments>http://www.shnenglu.com/cjz/archive/2011/12/29/163123.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/cjz/comments/commentRss/163123.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/cjz/services/trackbacks/163123.html</trackback:ping><description><![CDATA[<span id="hpbblzz" class="Apple-style-span" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: medium; ">Daemon</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: medium; ">鍑芥暟鐨勭敤娉?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">璇存槑錛?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">璁╀竴涓▼搴忓悗鍙拌繍琛屻?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鍘熷瀷錛?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; "></span></span></p><div id="xv7j179" class="dp-highlighter bg_c-sharp" style="width: 687px; "><div id="77x1jdx" class="bar"><div id="7jd979z" class="tools"><a class="ViewSource" title="view plain" style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); border-width: initial; border-color: initial; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; display: inline-block; width: 16px; height: 16px; text-indent: -2000px; background-position: 0% 0%; background-repeat: no-repeat no-repeat; ">view plain</a></div></div><ol start="1" class="dp-c" style="border-width: initial; border-color: initial; "><li id="bthd79n" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; "><span id="vhf79nz" class="preprocessor" style="border-width: initial; border-color: initial; ">#include <unistd.h></span><span style="border-width: initial; border-color: initial; ">  </span></span></li><li id="971t79d" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">  </span></li><li id="d7tnr79" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; "><span id="xdxl7zj" class="keyword" style="border-width: initial; border-color: initial; ">int</span><span style="border-width: initial; border-color: initial; "> daemon(</span><span id="tjf7fjb" class="keyword" style="border-width: initial; border-color: initial; ">int</span><span style="border-width: initial; border-color: initial; "> nochdir, </span><span id="9dfvz19" class="keyword" style="border-width: initial; border-color: initial; ">int</span><span style="border-width: initial; border-color: initial; "> noclose);  </span></span></li></ol></div></span><p> </p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鍙傛暟錛?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">褰?nbsp;</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">nochdir</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">涓洪浂鏃訛紝褰撳墠鐩綍鍙樹負(fù)鏍圭洰褰曪紝鍚﹀垯涓嶅彉錛?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">褰?nbsp;</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">noclose</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">涓洪浂鏃訛紝鏍囧噯杈撳叆銆佹爣鍑嗚緭鍑哄拰閿欒杈撳嚭閲嶅鍚戜負(fù)</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">/dev/null</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">錛屼篃灝辨槸涓嶈緭鍑轟換浣曚俊</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; "> </span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鎭紝鍚﹀垯鐓ф牱杈撳嚭銆?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">榪斿洖鍊鹼細(xì)</span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">deamon()</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">璋冪敤浜?/span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">fork()</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">錛屽鏋?/span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">fork</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鎴愬姛錛岄偅涔堢埗榪涚▼灝辮皟鐢?/span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">_exit(2)</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">閫鍑猴紝鎵浠ョ湅鍒扮殑閿欒淇℃伅</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; "> </span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鍏ㄩ儴鏄瓙榪涚▼浜х敓鐨勩傚鏋滄垚鍔熷嚱鏁拌繑鍥?/span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">0</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">錛屽惁鍒欒繑鍥?/span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">-1</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">騫惰緗?/span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">errno</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">銆?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">紺轟緥錛?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "></p><div id="9fr7nvl" class="dp-highlighter bg_c-sharp" style="width: 687px; "><div id="b7tfrjz" class="bar"><div id="rdvj9zz" class="tools"><a class="ViewSource" title="view plain" style="background-image: url(http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/images/default/ico_plain.gif); border-width: initial; border-color: initial; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; display: inline-block; width: 16px; height: 16px; text-indent: -2000px; background-position: 0% 0%; background-repeat: no-repeat no-repeat; ">view plain</a></div></div><ol start="1" class="dp-c" style="border-width: initial; border-color: initial; "><li id="pzlx9nb" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; "><span id="l7tx9hp" class="preprocessor" style="border-width: initial; border-color: initial; ">#include <stdio.h></span><span style="border-width: initial; border-color: initial; ">  </span></span></li><li id="b7l79xp" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; "><span id="dhjdzt9" class="preprocessor" style="border-width: initial; border-color: initial; ">#include <stdlib.h></span><span style="border-width: initial; border-color: initial; ">  </span></span></li><li id="9j7lrph" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; "><span id="dv9rdbh" class="preprocessor" style="border-width: initial; border-color: initial; ">#include <unistd.h></span><span style="border-width: initial; border-color: initial; ">  </span></span></li><li id="9799nj9" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; "><span id="rd99hf9" class="preprocessor" style="border-width: initial; border-color: initial; ">#include <fcntl.h></span><span style="border-width: initial; border-color: initial; ">  </span></span></li><li id="9j9zv9z" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; "><span id="hbd79tl" class="preprocessor" style="border-width: initial; border-color: initial; ">#include <limits.h></span><span style="border-width: initial; border-color: initial; ">  </span></span></li><li id="ld999lj" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">  </span></li><li id="nzr9bh7" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; "><span id="zldxvlv" class="keyword" style="border-width: initial; border-color: initial; ">int</span><span style="border-width: initial; border-color: initial; "> main(</span><span id="7n79xtd" class="keyword" style="border-width: initial; border-color: initial; ">int</span><span style="border-width: initial; border-color: initial; "> argc, </span><span id="9v9p79h" class="keyword" style="border-width: initial; border-color: initial; ">char</span><span style="border-width: initial; border-color: initial; "> *argv[])  </span></span></li><li id="rrtnh7x" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">{  </span></li><li id="bdpr7zx" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    <span id="ldf7d79" class="keyword" style="border-width: initial; border-color: initial; ">char</span><span style="border-width: initial; border-color: initial; "> strCurPath[PATH_MAX];  </span></span></li><li id="tlhbdz7" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">  </span></li><li id="x9j9r79" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    <span id="bdpzd79" class="keyword" style="border-width: initial; border-color: initial; ">if</span><span style="border-width: initial; border-color: initial; ">(daemon(1, 1) < 0)  </span></span></li><li id="97t9d99" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    {  </span></li><li id="79zr9bz" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">        perror(<span id="rlnh7hx" class="string" style="border-width: initial; border-color: initial; ">"error daemon.../n"</span><span style="border-width: initial; border-color: initial; ">);  </span></span></li><li id="t97nhxt" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">        exit(1);  </span></li><li id="jld99nl" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    }  </span></li><li id="77997xv" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    sleep(10);  </span></li><li id="999prh9" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">  </span></li><li id="hrnxrrx" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    <span id="719vp79" class="keyword" style="border-width: initial; border-color: initial; ">if</span><span style="border-width: initial; border-color: initial; ">(getcwd(strCurPath, PATH_MAX) == NULL)  </span></span></li><li id="7dj9jtr" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    {  </span></li><li id="97t9r97" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">        perror(<span id="1ljbn9r" class="string" style="border-width: initial; border-color: initial; ">"error getcwd"</span><span style="border-width: initial; border-color: initial; ">);  </span></span></li><li id="1trp9h9" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">        exit(1);  </span></li><li id="1t9xz9t" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    }  </span></li><li id="9rnhhp7" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    printf(<span id="fph19rt" class="string" style="border-width: initial; border-color: initial; ">"%s/n"</span><span style="border-width: initial; border-color: initial; ">, strCurPath);  </span></span></li><li id="ffhj7zx" class="" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">    <span id="pxz7fp7" class="keyword" style="border-width: initial; border-color: initial; ">return</span><span style="border-width: initial; border-color: initial; "> 0;  </span></span></li><li id="h9rnr7t" class="alt" style="border-width: initial; border-color: initial; line-height: 18px; "><span style="border-width: initial; border-color: initial; ">}  </span></li></ol></div><p> </p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鍋囧榪愯鎴愬姛錛岀埗榪涚▼鍦?/span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">daemon</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鍑芥暟榪愯瀹屾瘯鍚庤嚜鏉錛屼互鍚庣殑浼戠湢鍜屾墦鍗板叏閮ㄦ槸瀛愯繘紼嬫潵榪愯銆?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鍙互淇敼</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">daemon</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鍑芥暟鐨勫弬鏁版潵鏌ョ湅鏁堟灉銆?/span></span></p><p lang="zh-CN" style="margin-bottom: 0cm; "><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鍙互鍘繪帀</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">daemon</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">涓鍙ワ紝鐢?/span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">./a.out&</span></span><span style="font-family: 寰蔣闆呴粦, sans-serif; "><span style="font-size: x-small; ">鏉ラ獙璇佹晥鏋溿?/span></span></p><img src ="http://www.shnenglu.com/cjz/aggbug/163123.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/cjz/" target="_blank">椋涘ぉ</a> 2011-12-29 17:27 <a href="http://www.shnenglu.com/cjz/archive/2011/12/29/163123.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>strdup鍑芥暟綆浠?/title><link>http://www.shnenglu.com/cjz/archive/2011/12/29/163113.html</link><dc:creator>椋涘ぉ</dc:creator><author>椋涘ぉ</author><pubDate>Thu, 29 Dec 2011 07:52:00 GMT</pubDate><guid>http://www.shnenglu.com/cjz/archive/2011/12/29/163113.html</guid><wfw:comment>http://www.shnenglu.com/cjz/comments/163113.html</wfw:comment><comments>http://www.shnenglu.com/cjz/archive/2011/12/29/163113.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/cjz/comments/commentRss/163113.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/cjz/services/trackbacks/163113.html</trackback:ping><description><![CDATA[<span id="lln77f9" class="Apple-style-span" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">鐢ㄦ硶錛?include <string.h><br /> 鍔熻兘錛氬鍒跺瓧絎︿覆s<br /> <br /> 璇存槑錛氳繑鍥炴寚鍚戣澶嶅埗鐨勫瓧絎︿覆鐨勬寚閽堬紝鎵闇絀洪棿鐢眒alloc()鍒嗛厤涓斿彲浠ョ敱free()閲婃斁銆?br /> <br /> 涓句緥錛?br /> <br /> <br />      // strdup.c<br />      <br />      #include <syslib.h><br />      #include <string.h><br /> <br />      main()<br />      {<br />        char *s="this is just f";<br />        char *d;<br />        <br />        d=strdup(s);<br />        printf("%s",d);<br /> <br />        getchar();<br />        return 0;<br />      }<br /><br />strdup()涓昏鏄嫹璐濆瓧絎︿覆s鐨勪竴涓壇鏈紝鐢卞嚱鏁拌繑鍥炲艱繑鍥烇紝榪欎釜鍓湰鏈夎嚜宸辯殑鍐呭瓨絀洪棿錛屽拰s涓嶇浉騫層?br /><br />char *strdup(const char *s)<br />{<br />        char *t = NULL;<br />        if (s && (t = (char*)malloc(strlen(s) + 1)))<br />        strcpy(t, s);<br />        return t;<br />}</span><img src ="http://www.shnenglu.com/cjz/aggbug/163113.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/cjz/" target="_blank">椋涘ぉ</a> 2011-12-29 15:52 <a href="http://www.shnenglu.com/cjz/archive/2011/12/29/163113.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>RedHat Enterprise Linux 鍩烘湰緗戠粶閰嶇疆http://www.shnenglu.com/cjz/archive/2011/12/25/162793.html椋涘ぉ椋涘ぉSun, 25 Dec 2011 12:32:00 GMThttp://www.shnenglu.com/cjz/archive/2011/12/25/162793.htmlhttp://www.shnenglu.com/cjz/comments/162793.htmlhttp://www.shnenglu.com/cjz/archive/2011/12/25/162793.html#Feedback0http://www.shnenglu.com/cjz/comments/commentRss/162793.htmlhttp://www.shnenglu.com/cjz/services/trackbacks/162793.html

涓銆両P閰嶇疆

1銆?#/sbin/ifconfig 
銆銆//鏄劇ずifconfig鍛戒護鏌ョ湅緗戠粶鎺ュ彛鐨勪俊鎭?br />銆
2銆?#ifconfig eth0 
銆銆//鏄劇ず鎸囧畾鎺ュ彛鐨勪俊鎭?br />銆
3銆?#ifconfig -a 
銆銆//鏄劇ず鎵鏈夋帴鍙g殑淇℃伅錛堟棤璁烘槸鍚︽椿璺冿級

4銆?#ifconfig eth0 192.168.0.2 netmask 255.255.255.0 
銆銆//涓存椂淇敼鎺ュ彛IP鍦板潃錛堟棤闇閲嶅惎鎺ュ彛錛?br />銆
浜屻佽礬鐢遍厤緗?/strong>

$/sbin/route 
銆銆//鏄劇ず褰撳墠Linux涓繪満涓殑璺敱琛ㄤ俊鎭?br />銆
1銆?route del default gw 192.168.0.1
銆銆//涓存椂鍒犻櫎榛樿緗戝叧192.168.0.1

2銆?route add default gw 192.168.0.1
銆銆//涓存椂娣誨姞榛樿緗戝叧192.168.0.1

3銆?route add -net 192.168.1.0/24 gw 192.168.0.254
銆銆//涓存椂娣誨姞涓鏉¢潤鎬佽礬鐢?br />銆銆/**鏈枃涓彁鍙婁復(fù)鏃舵搷浣滅殑鍦版柟錛屽嵆涓繪満閲嶅惎鍚庤鎿嶄綔灝嗗け鏁堬紝濡傛灉甯屾湜姣忔緋葷粺閲嶅惎鍚庤嚜鍔ㄦ坊鍔犻潤鎬佽礬鐢辨潯鐩紝鍒欏彲浠ュ皢璇ヨ鍙ュ啓鍏?etc/rc.d/rc.local涓?*/

涓夈丳ing

#ping //嫻嬭瘯涓庡叾浠栦富鏈虹殑緗戠粶榪炴帴

1銆?ping -c 4 192.168.0.1 
銆銆//鎸囧畾鍙戝嚭ICMP鍖呬釜鏁?br />銆
鍥涖乼raceroute

1銆?#traceroute 
銆銆//嫻嬭瘯褰撳墠涓繪満鍒扮洰鐨勭潃鎬ョ殑緗戠粶榪炴帴

浜斻乭ostname

1銆?#hostname 
銆銆//鏌ョ湅褰撳墠涓繪満鐨勪富鏈哄悕

2銆?hostname linsrv 
銆銆//涓存椂淇敼褰撳墠涓繪満鍚?br />銆
鍏丏NS鍩熷悕瑙f瀽

1銆?#nslookup 
銆銆//嫻嬭瘯DNS鍩熷悕瑙f瀽

2銆?>server
銆銆//鏄劇ず褰撳墠DNS鏈嶅姟鍣?/p>

3銆?>server 192.168.0.1 
銆銆//涓存椂鎸囧畾DNS鏈嶅姟鍣ㄥ湴鍧

涓冦?dhclient

//涓哄綋鍓嶄富鏈虹敵璇風(fēng)綉緇滈厤緗俊鎭?br />銆 
鍏?netconfig

//閫氳繃鍚戝鍦ㄥ瓧絎︾晫闈笅淇敼緗戠粶閰嶇疆淇℃伅

涔?jié)銆?/etc/init.d/network restart

//閲嶅惎緗戠粶鏈嶅姟

1銆?#/etc/init.d/network stop 
銆銆//鍋滄緗戠粶鏈嶅姟

2銆?#/etc/init.d/network start 
銆銆//鍚姩緗戠粶鏈嶅姟
銆銆/**鏃犺鏄氳繃netconfig錛岃繕鏄氳繃淇敼閰嶇疆鏂囦歡鐨勬柟寮忎慨鏀逛簡緗戠粶閰嶇疆淇℃伅錛岄兘闇瑕侀噸鍚痭etwork鏈嶅姟鎵嶈兘鐢熸晥**/

鍗併?service network start

//鍚姩緗戠粶鏈嶅姟

1銆?#service network stop 
銆銆//鍋滄緗戠粶鏈嶅姟

2銆?#service network restart 
銆銆//閲嶅惎緗戠粶鏈嶅姟

3銆?#service network status 
銆銆//鏌ョ湅緗戠粶鏈嶅姟鐘舵?br />銆銆/**鍦≧HEL4涓彲浠ラ氳繃service鍛戒護鏉ョ鐞嗗ぇ澶氭暟鏈嶅姟鐨勫惎鍔ㄣ佸仠姝€侀噸鍚互鍙婃煡鐪嬪叾宸ヤ綔鐘舵佺瓑**/

鍗佷竴銆?chkconfig ——list | grep network

//鏌ョ湅鏌愭湇鍔$殑鑷姩鍚姩綰у埆

1銆?#chkconfig ——level 35 network off 
銆銆//璁劇疆鍦ㄧ駭鍒?5涓嶈嚜鍔ㄥ惎鍔ㄦ煇鏈嶅姟

2銆?chkconfig ——level 3 network on 
銆銆//璁劇疆鍦ㄧ駭鍒?鑷姩鍚姩鏌愭湇鍔?br />銆
鍗佷簩銆乶tsysv

//閫氳繃鍚戝鍦ㄥ瓧絎︾晫闈笅淇敼鏈嶅姟鐨勮嚜鍚姩閫夐」

鍗佷笁銆?vi /etc/sysconfig/network-scripts/eth0

//緙栬緫鎸囧畾緗戠粶鎺ュ彛閰嶇疆鏂囦歡

1銆?DEVICE=eth0 
銆銆//鎸囧畾鎺ュ彛鍚嶇О

2銆?ONBOOT=yes 
銆銆//緋葷粺鍚姩鏃跺姞杞?br />銆
3銆?BOOTPROTO=static 
銆銆//IP鍦板潃闈欐侀厤緗紝鑻ヨ鍊間負(fù)“dhcp”鍒欎負(fù)鍔ㄦ佽幏寰?br />銆
4銆?IPADDR=192.168.0.1 
銆銆//璁劇疆IP鍦板潃

5銆?NETMASK=255.255.255.0 
銆銆//璁劇疆瀛愮綉鎺╃爜

6銆?GATEWAY=192.168.0.254 
銆銆//璁劇疆榛樿緗戝叧
銆銆/**娉ㄦ剰錛氳緗箣鍚庡繀欏昏閲嶅惎network鏈嶅姟鎴栬呴噸鍚帴鍙o紙#ifdown eth0錛沬fup eth0錛夛紝鎵嶈兘鐢熸晥銆?*/

鍗佸洓銆?vi /etc/sysconfig/network

//閫氳繃閰嶇疆鏂囦歡淇敼涓繪満鍚?br />銆
1銆?NETWORKING=yes

2銆?HOSTNAME=localhost.localdomain 
銆銆//淇敼璇ュ間綔涓轟富鏈哄悕錛屽錛歳hel.lpwr.net

銆銆//璇ラ厤緗慨鏀瑰悗錛岃閲嶅惎緋葷粺鏂硅兘鐢熸晥

鍗佷簲銆?vi /etc/hosts

//璁劇疆鏈湴DNS瑙f瀽鏂囦歡

1銆?127.0.0.1 localhost.localdomain localhost 
銆銆//璇ヨ寮虹儓寤鴻淇濈暀

2銆?192.168.0.1 rhel.lpwr.net rhel 
銆銆//蹇呴』鏈変笁涓瓧孌碉細(xì)IP銆丗QDN銆丠OSTNAME

鍗佸叚銆?vi /etc/resolv.conf

//鎸囧畾褰撳墠涓繪満鐨凞NS鏈嶅姟鍣紝鏈澶氬彲鎸囧畾涓変釜

1銆?search lpwr.net 
銆銆//璁劇疆褰撳墠涓繪満鐨勯粯璁ゆ煡鎵懼煙

2銆?nameserver 192.168.0.100 
銆銆//鎸囧畾棣栭塂NS鏈嶅姟鍣?br />銆
3銆?nameserver 172.16.254.2

4銆?nameserver 202.106.0.20



椋涘ぉ 2011-12-25 20:32 鍙戣〃璇勮
]]>
SharedPreferences 綆鍗曠敤娉?/title><link>http://www.shnenglu.com/cjz/archive/2011/11/17/160339.html</link><dc:creator>椋涘ぉ</dc:creator><author>椋涘ぉ</author><pubDate>Thu, 17 Nov 2011 06:01:00 GMT</pubDate><guid>http://www.shnenglu.com/cjz/archive/2011/11/17/160339.html</guid><wfw:comment>http://www.shnenglu.com/cjz/comments/160339.html</wfw:comment><comments>http://www.shnenglu.com/cjz/archive/2011/11/17/160339.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/cjz/comments/commentRss/160339.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/cjz/services/trackbacks/160339.html</trackback:ping><description><![CDATA[<div>SharedPreferences 鐩稿綋浜嶪ni鏂囦歡鍔熻兘銆傛槸浠ml鏂囦歡褰㈠紡淇濆瓨銆?br /> <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --> SharedPreferences android.content.ContextWrapper.getSharedPreferences(String name, <span style="color: #0000FF; ">int</span> mode)<br /> <br /> <br /> <br /> <span style="color: #0000FF; ">public</span> SharedPreferences getSharedPreferences (String name, <span style="color: #0000FF; ">int</span> mode) <br /> Since: API Level 1 <br /> Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values. Only one instance of the SharedPreferences object is returned to any callers <span style="color: #0000FF; ">for</span> the same name, meaning they will see each other's edits as soon as they are made.<br /> <br /> Parameters<br /> name  Desired preferences file. If a preferences file by <span style="color: #0000FF; ">this</span> name does not exist, it will be created when you retrieve an editor (SharedPreferences.edit()) and then commit changes (Editor.commit()). <br /> mode  Operating mode. Use 0 or MODE_PRIVATE <span style="color: #0000FF; ">for</span> the <span style="color: #0000FF; ">default</span> operation, MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE to control permissions. The bit MODE_MULTI_PROCESS can also be used <span style="color: #0000FF; ">if</span> multiple processes are mutating the same SharedPreferences file. MODE_MULTI_PROCESS is always on in apps targetting Gingerbread (Android 2.3) and below, and off by <span style="color: #0000FF; ">default</span> in later versions. <br /> <br /> Returns<br /> Returns the single SharedPreferences instance that can be used to retrieve and modify the preference values.</div> <br /> 涓銆佽鍙栧唴瀹?br /> <br />    <span id="jvx79fv" class="Apple-style-span" style="font-size: 13px; background-color: #eeeeee; ">SharedPreferences preferences </span><span id="lxh9v1j" class="Apple-style-span" style="font-size: 13px; background-color: #eeeeee; ">=</span><span id="7j7bd7v" class="Apple-style-span" style="font-size: 13px; background-color: #eeeeee; "> getSharedPreferences(</span><span id="nhjn79b" class="Apple-style-span" style="font-size: 13px; background-color: #eeeeee; ">"</span><span id="d7999jf" class="Apple-style-span" style="font-size: 13px; background-color: #eeeeee; ">PCINFO</span><span id="xhl7nh7" class="Apple-style-span" style="font-size: 13px; background-color: #eeeeee; ">"</span><span id="77bh9p9" class="Apple-style-span" style="font-size: 13px; background-color: #eeeeee; ">, MODE_APPEND);</span></div> <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all">String strAddr = preferences.getString("PCADDR", "10.0.2.2");<br /> String strPort =  preferences.getString("PCPORT","6699");<br /> </div><br />浜屻佸啓鍏ユ暟鎹?br /><br /><div style="font-size: 13px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%; word-break: break-all; background-color: #eeeeee; "><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->SharedPreferences preference = getSharedPreferences("PCINFO", MODE_APPEND ) ;<br />Editor editor = preference.edit();<br />editor.putString("PCADDR", strAddr);<br />editor.putString("PCPORT", strPort);<br />editor.commit();</div><img src ="http://www.shnenglu.com/cjz/aggbug/160339.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/cjz/" target="_blank">椋涘ぉ</a> 2011-11-17 14:01 <a href="http://www.shnenglu.com/cjz/archive/2011/11/17/160339.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>PC涓奀++緙栧啓鐨勬湇鍔$ Android紼嬪簭瀹㈡埛绔繛鎺ヤ腑鏂囦貢鐮佺殑闂錛?/title><link>http://www.shnenglu.com/cjz/archive/2011/11/05/159656.html</link><dc:creator>椋涘ぉ</dc:creator><author>椋涘ぉ</author><pubDate>Sat, 05 Nov 2011 02:31:00 GMT</pubDate><guid>http://www.shnenglu.com/cjz/archive/2011/11/05/159656.html</guid><wfw:comment>http://www.shnenglu.com/cjz/comments/159656.html</wfw:comment><comments>http://www.shnenglu.com/cjz/archive/2011/11/05/159656.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/cjz/comments/commentRss/159656.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/cjz/services/trackbacks/159656.html</trackback:ping><description><![CDATA[<dt>c++鍙戦佺殑娑堟伅榛樿緙栫爜鏄疓BK,鑰宩ava娑堟伅鐨勯粯璁ょ紪鐮佹槸UTF-8,濡傛灉浜岃呯洿鎺ユ敹鍙戞秷鎭殑涓嶈繘琛岃漿鎹㈢殑璇濓紝鏄劇ず鐨勪腑鏂囧瓧絎﹂兘鏄貢鐮併傛墍浠ndroid瀹㈡埛绔湪鏀跺彂娑堟伅鐨勬椂鍊欒鎺ヨ緙栫爜杞崲銆?br /> <div style="font-size: 13px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%; word-break: break-all; background-color: #eeeeee; "><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->Socket client = <span style="color: #0000FF; ">new</span> Socket("10.0.2.2",4960);<br /> <br />                     <br />                     DataInputStream in = <span style="color: #0000FF; ">new</span> DataInputStream(client.getInputStream());<br />                     BufferedWriter out = <span style="color: #0000FF; ">new</span> BufferedWriter(<span style="color: #0000FF; ">new</span> OutputStreamWriter(client.getOutputStream(),"GBK"));<br />                     <br />                     <span style="color: #008000; ">//</span><span style="color: #008000; ">PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(client.getOutputStream(),"GBK")),true);</span><span style="color: #008000; "><br /> </span>                    out.write("Hello,I'm Android,鎴戞槸瀹夊崜!\0");<br />                     out.flush();<br />                     <br />                     <span style="color: #0000FF; ">byte</span> buffer[] = <span style="color: #0000FF; ">new</span> <span style="color: #0000FF; ">byte</span>[1024];<br />                     <br />                     in.read(buffer);<br />                     String msg = <span style="color: #0000FF; ">new</span> String(buffer,"GB2312").trim();<br />                     edtResult.setText(msg);<br />                     <br />                     in.close();<br />                     out.close();<br />                     client.close();</div> </dt><img src ="http://www.shnenglu.com/cjz/aggbug/159656.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/cjz/" target="_blank">椋涘ぉ</a> 2011-11-05 10:31 <a href="http://www.shnenglu.com/cjz/archive/2011/11/05/159656.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Android妯℃嫙鍣ㄤ笌鏈湴鏈哄櫒鐨勭浉浜掕闂?/title><link>http://www.shnenglu.com/cjz/archive/2011/11/04/159624.html</link><dc:creator>椋涘ぉ</dc:creator><author>椋涘ぉ</author><pubDate>Fri, 04 Nov 2011 07:45:00 GMT</pubDate><guid>http://www.shnenglu.com/cjz/archive/2011/11/04/159624.html</guid><wfw:comment>http://www.shnenglu.com/cjz/comments/159624.html</wfw:comment><comments>http://www.shnenglu.com/cjz/archive/2011/11/04/159624.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/cjz/comments/commentRss/159624.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/cjz/services/trackbacks/159624.html</trackback:ping><description><![CDATA[<h4>1.Android妯℃嫙鍣ㄨ繛鍒癙C<br /> </h4> <blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"> <h4> <p><span id="7fbp99r" class="Apple-style-span" style="font-weight: normal; ">android 鏈湴鍦板潃 127.0.0.1,PC鍦板潃涓?0.0.2.2</span></p> </h4> </blockquote> <h3>2.PC榪炲埌Android妯℃嫙鍣?/h3> <blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"> <p><span id="77rfzbn" class="Apple-style-span" style="font-weight: normal; ">   闇瑕佽繘琛岀鍙f槧灝勶細(xì)</span></p> <span id="97h7v99" class="Apple-style-span" style="font-weight: normal;">濡?/span>錛?span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: normal; line-height: 26px; text-align: left; background-color: #ffffff; font-family: 瀹嬩綋; "><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; ">adb forward tcp</span></code><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; color: #0000cc; ">:</span></code><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; ">6100 tcp</span></code><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; color: #0000cc; ">:</span></code><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; ">7100</span></code></span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-family: Arial; font-weight: normal; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; "> </span></span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: normal; line-height: 26px; text-align: left; background-color: #ffffff; font-family: 瀹嬩綋; "><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; color: #ff9900; ">// PC</span></code><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; color: #ff9900; ">涓婃墍鏈?span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; ">6100</span>绔彛閫氫俊鏁版嵁灝嗚閲嶅畾鍚戝埌鎵嬫満绔?span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; ">7100</span>绔彛<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; ">server</span>涓?br /> </span></code></span> <p><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: normal; line-height: 26px; text-align: left; background-color: #ffffff; font-family: 瀹嬩綋; "><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13.5pt; ">鎵浠ヨ闂甈C鏈湴鐨?100绔彛灝辯浉褰撲簬璁塊棶a(chǎn)ndroid涓婄殑7100绔彛</span></code></span></p> </blockquote> <p> </p> <img src ="http://www.shnenglu.com/cjz/aggbug/159624.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/cjz/" target="_blank">椋涘ぉ</a> 2011-11-04 15:45 <a href="http://www.shnenglu.com/cjz/archive/2011/11/04/159624.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Hello Androidhttp://www.shnenglu.com/cjz/archive/2011/11/04/159608.html椋涘ぉ椋涘ぉFri, 04 Nov 2011 06:00:00 GMThttp://www.shnenglu.com/cjz/archive/2011/11/04/159608.htmlhttp://www.shnenglu.com/cjz/comments/159608.htmlhttp://www.shnenglu.com/cjz/archive/2011/11/04/159608.html#Feedback0http://www.shnenglu.com/cjz/comments/commentRss/159608.htmlhttp://www.shnenglu.com/cjz/services/trackbacks/159608.htmlHello Android

椋涘ぉ 2011-11-04 14:00 鍙戣〃璇勮
]]>
Web涓殑鎵撳嵃鎺у埗http://www.shnenglu.com/cjz/archive/2008/07/23/56920.html椋涘ぉ椋涘ぉWed, 23 Jul 2008 03:22:00 GMThttp://www.shnenglu.com/cjz/archive/2008/07/23/56920.htmlhttp://www.shnenglu.com/cjz/comments/56920.htmlhttp://www.shnenglu.com/cjz/archive/2008/07/23/56920.html#Feedback1http://www.shnenglu.com/cjz/comments/commentRss/56920.htmlhttp://www.shnenglu.com/cjz/services/trackbacks/56920.html      閫欓噷瑕佷粙绱圭殑鏄敤鎺т歡渚嗘墦鍗般?br>     1.鍦ㄩ爜闈笂鍔犱笂鎺т歡
      <object   id="factory"   style="display:none"   viewastext    
      classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"    
      codebase="/smsx.cab#Version=5,60,0,360"    
  ></object>
      codebase="/smsx.cab#Version=5,60,0,360" 鏄帶浠剁殑璺緫錛屽鏋滅敤鎴舵矑鏈夊畨瑁濈殑瑭辨渻鑷嫊鍒拌┎鍦板潃鍘諱笅杓夛紙鐎忚鍣ㄨ鏀寔ActiveX鎵嶈錛?nbsp; 
       2.鎵撳嵃鐨勪唬紕?br>
<script type="text/javascript">
function PrintPage()
{
 
if(!factory.object)
 
{
   alert(
"鎺т歡娌掓湁瀹夎鎴愬姛");
   
return;
 }

 
var header=factory.printing.header;
 
var footer=factory.printing.footer;
 
var leftmar=factory.printing.leftMargin;
 
var topmar=factory.printing.topMargin;
 
var rightmar=factory.printing.rightMargin;
 
var bottommar=factory.printing.bottomMargin;
  
 
 factory.printing.header   
=   "";
 factory.printing.footer   
=   "";
 factory.printing.portrait   
=   true;
 factory.printing.leftMargin   
=   0.3;
 factory.printing.topMargin   
=   0 ;
 factory.printing.rightMargin   
=   0.3;
 factory.printing.bottomMargin   
=   0.1;

 factory.printing.Print(
false);

 factory.printing.header
=header;
 factory.printing.footer
=footer;
 factory.printing.leftMargin
=leftmar;
 factory.printing.topMargin
=topmar;
 factory.printing.rightMargin
=rightmar;
 factory.printing.bottomMargin
=bottommar;
}

</script>

      闇瑕佽ɑ鎰忕殑鏄倞璺濈殑鍠綅,濡傛灉浣犳槸浠m鐐哄柈浣嶈ō緗殑閭婅窛鐨勮┍錛屽湪鑻辨枃緋葷當(dāng)涓槸浣跨敤鑻卞(in)鐐哄柈浣嶏紝鎵撳嵃鐨勭祼鏋滃氨鏈冩湁鍟忛銆?nbsp;
     smsx.cab涓嬭級

椋涘ぉ 2008-07-23 11:22 鍙戣〃璇勮
]]>
AjaxPro2鍦ˋsp.net涓殑鍩烘湰鐢ㄦ硶http://www.shnenglu.com/cjz/archive/2008/05/29/51516.html椋涘ぉ椋涘ぉThu, 29 May 2008 12:37:00 GMThttp://www.shnenglu.com/cjz/archive/2008/05/29/51516.htmlhttp://www.shnenglu.com/cjz/comments/51516.htmlhttp://www.shnenglu.com/cjz/archive/2008/05/29/51516.html#Feedback0http://www.shnenglu.com/cjz/comments/commentRss/51516.htmlhttp://www.shnenglu.com/cjz/services/trackbacks/51516.html1.      寮曠敤ajaxPro2.dll鍒頒綘鐨勫伐紼嬩腑銆?/span>

2.      鍦?/span>Web.config涓坊鍔犻厤緗?/span>

<httpHandlers>
       
<add path="ajaxpro/*.ashx" verb="POST,GET" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2" />
   
</httpHandlers>

3.      鍦ㄧ▼搴忎腑娉ㄥ唺Ajax

protected void Page_Load(object sender, EventArgs e)
    
{
        AjaxPro.Utility.RegisterTypeForAjax(
typeof(filejob_DCFCS01));
    }

……
[AjaxPro.AjaxMethod]
    
public string[] GetOldInfo(string No)
    
{
            String [] strret
=new string[5];
            ……
            Return strret;
        }

4.      鍦ㄥ鎴剁鐨勮鐢?/span>

<asp:TextBox ID="tbxODANo" runat="server" CssClass="Input" MaxLength="7" Width="134px" onchange=”getInfo(this);”></asp:TextBox>
<script type=”text/javascript”>
Function getInfo(oda)
{
        Var no
=oda.value;
        filejob_DCFCS01. GetOldInfo(no,callback);
//鐣版鏂規(guī)硶
}

Function callback(res)
{
     If(res.error)
        Alert(“閷”);
     Else
    
{
    Alert(Res.value[
0]);
}

}

 

    鍙互鎶?/span>Ajax瑕佹搷浣滅殑鏂規(guī)硶鏀懼埌涓鍊?/span>Ajax鎿嶄綔欏為噷

 

Public class AjaxMethod

{

  [Ajax.AjaxMethod]
  
public static string[] GetOldInfo(string No)
    
{
                  String [] strret
=new string[5];
                  ……
                  Return strret;
          }

}


鍦ㄨ鐢ㄦ檪瑕佹敞鍐?/span>Ajax:

 AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxMethod));

 5.   AjaxPro鏂規(guī)硶榪斿洖DataSet

鍙兘鍦ㄥ悓姝?/span>ajax鏅傛墠鑳借繑鍥?/span>DataSet 欏炲瀷

 

Public class AjaxMethod
{
[Ajax.AjaxMethod]
 
public static DataSet GetOldInfo(string No)
{
     ……
   Return ds;
}

}

 

鍦ㄥ鎴剁鍙?/span>DataSet鏁告摎:

 

Function getInfo()
{
 Var res
= AjaxMethod. GetOldInfo(oda.value).value; //鍚屾瑾跨敤
 If(ds!=null)
{
  Var dt
=ds.Tables[0];
Var rows
=dt.Rows.length;
For(var i
=0;i<rows;i++)
{
 Document.write(dt.Rows[i][dt.Columns[
0].name]);
}

}

}

 

 



椋涘ぉ 2008-05-29 20:37 鍙戣〃璇勮
]]>
AV无码久久久久不卡蜜桃| 精品久久无码中文字幕| 91精品国产91久久| 久久成人国产精品一区二区| 伊人久久大香线蕉AV一区二区| 人妻无码αv中文字幕久久琪琪布 人妻无码精品久久亚瑟影视 | 中文字幕亚洲综合久久| 欧美麻豆久久久久久中文| 亚洲va久久久噜噜噜久久 | 欧美激情一区二区久久久| 久久久免费精品re6| 久久久久国产亚洲AV麻豆| 中文字幕热久久久久久久| 九九久久精品无码专区| 久久精品国产亚洲AV高清热| 久久久久亚洲av成人无码电影| 99久久国产宗和精品1上映| 国内精品久久久久久久影视麻豆| 99精品国产99久久久久久97 | 国产亚洲美女精品久久久2020| 久久亚洲国产欧洲精品一| 久久久久精品国产亚洲AV无码| 久久国产成人精品麻豆| 久久66热人妻偷产精品9| 久久婷婷国产剧情内射白浆| 精品无码人妻久久久久久| 伊人热人久久中文字幕| 久久久91精品国产一区二区三区 | 久久久精品人妻一区二区三区蜜桃| 久久精品无码一区二区三区免费 | 久久国产热精品波多野结衣AV | AV狠狠色丁香婷婷综合久久 | 久久精品国产精品亚洲毛片| 久久精品国产亚洲AV蜜臀色欲| 久久久久99精品成人片牛牛影视| 99久久中文字幕| 精品久久久久久综合日本| 久久久久人妻一区精品性色av| 欧美精品久久久久久久自慰| 久久婷婷五月综合97色一本一本 | 亚洲精品美女久久久久99小说|