锘??xml version="1.0" encoding="utf-8" standalone="yes"?>色8激情欧美成人久久综合电,久久国产亚洲精品,国产欧美久久久精品影院http://www.shnenglu.com/lzr/zh-cnThu, 08 May 2025 17:45:47 GMTThu, 08 May 2025 17:45:47 GMT60灝嗕簩榪涘埗IP鍦板潃杞崲鎴愬崄榪涘埗http://www.shnenglu.com/lzr/archive/2008/12/31/70876.htmllzrlzrWed, 31 Dec 2008 13:44:00 GMThttp://www.shnenglu.com/lzr/archive/2008/12/31/70876.htmlhttp://www.shnenglu.com/lzr/comments/70876.htmlhttp://www.shnenglu.com/lzr/archive/2008/12/31/70876.html#Feedback1http://www.shnenglu.com/lzr/comments/commentRss/70876.htmlhttp://www.shnenglu.com/lzr/services/trackbacks/70876.html/*
 * Name: IP Address
 * Funcion: To convert binary numbers to decimal numbers
 * Input: 00000011100000001111111111111111
 * Output: 3.128.255.255
 
*/


#include 
<stdio.h>

void main()
{
 
char input[32];
 
int output[4];
 
int count = -1;
 
int i;

 
for(i = 0; i < 4; i++ )
  output[i] 
= 0;

 gets( input );

 
for( i = 0; i < 32; i++ )
 
{
  
if( i % 8 == 0 )
   count
++;

  
if( input[i] == '1' )
  
{
   
switch( i % 8 )
   
{
    
case 0:
     output[count] 
+= 128;
     
break;
    
case 1:
     output[count] 
+= 64;
     
break;
    
case 2:
     output[count] 
+= 32;
     
break;
    
case 3:
     output[count] 
+= 16;
     
break;
    
case 4:
     output[count] 
+= 8;
     
break;
    
case 5:
     output[count] 
+= 4;
     
break;
    
case 6:
     output[count] 
+= 2;
     
break;
    
case 7:
     output[count] 
+= 1;
     
break;
    
default:
     
break;
   }

  }

 }

 printf( 
"%d.%d.%d.%d\n", output[0], output[1], output[2], output[3] );
}


lzr 2008-12-31 21:44 鍙戣〃璇勮
]]>
string 銆乮nt 銆丆String 銆乧har *涔嬮棿杞崲http://www.shnenglu.com/lzr/archive/2008/12/24/70271.htmllzrlzrWed, 24 Dec 2008 12:52:00 GMThttp://www.shnenglu.com/lzr/archive/2008/12/24/70271.htmlhttp://www.shnenglu.com/lzr/comments/70271.htmlhttp://www.shnenglu.com/lzr/archive/2008/12/24/70271.html#Feedback0http://www.shnenglu.com/lzr/comments/commentRss/70271.htmlhttp://www.shnenglu.com/lzr/services/trackbacks/70271.htmlstring 鍜?int 涔嬮棿鐨勮漿鎹㈠ぇ姒傛鎷嚑縐嶆柟娉曪細

鏂規硶涓錛氫嬌鐢╛itoa鍑芥暟
 1#include "stdio.h"
 2#include "stdlib.h"
 3
 4void int2str(int , char *);
 5
 6int main() 
 7 {
 8int i = 123;
 9char s[64];
10int2str(i, s);
11puts(s);
12}

13
14void int2str(int i, char *s)
15 {
16_itoa(i, s, 10);
17}



lzr 2008-12-24 20:52 鍙戣〃璇勮
]]>
Socket緙栫▼錛氬緱鍒版湰鍦癝erver涓繪満IP鍜屽鏂笴lient涓繪満IPhttp://www.shnenglu.com/lzr/archive/2008/12/22/70087.htmllzrlzrMon, 22 Dec 2008 12:14:00 GMThttp://www.shnenglu.com/lzr/archive/2008/12/22/70087.htmlhttp://www.shnenglu.com/lzr/comments/70087.htmlhttp://www.shnenglu.com/lzr/archive/2008/12/22/70087.html#Feedback0http://www.shnenglu.com/lzr/comments/commentRss/70087.htmlhttp://www.shnenglu.com/lzr/services/trackbacks/70087.html棣栧厛璁蹭竴涓嬬敤鍒扮殑涓や釜鍑芥暟---------getsockname()鍜実etpeername():

1銆乬etsockname()

  鑾峰彇涓涓鎺ュ彛鐨勬湰鍦板悕瀛椼?br>
  #include <winsock.h>;

  int PASCAL FAR getsockname( SOCKET s, struct sockaddr FAR* name,int FAR* namelen);

  s錛氭爣璇嗕竴涓凡鎹嗙粦濂楁帴鍙g殑鎻忚堪瀛椼?br>  name錛氭帴鏀跺鎺ュ彛鐨勫湴鍧錛堝悕瀛楋級銆?br>  namelen錛氬悕瀛楃紦鍐插尯闀垮害銆?br>
 getsockname()鍑芥暟鐢ㄤ簬鑾峰彇涓涓鎺ュ彛鐨勫悕瀛椼傚畠鐢ㄤ簬涓涓凡鎹嗙粦鎴栧凡榪炴帴濂楁帴鍙錛屾湰鍦板湴鍧灝嗚榪斿洖銆傛湰璋冪敤鐗瑰埆閫傜敤浜庡涓嬫儏鍐碉細鏈皟鐢╞ind()灝辮皟鐢ㄤ簡connect()錛岃繖鏃跺敮鏈塯etsockname()璋冪敤鍙互鑾風煡緋葷粺鍐呭畾鐨勬湰鍦板湴鍧銆傚湪榪斿洖鏃訛紝namelen鍙傛暟鍖呭惈浜嗗悕瀛楃殑瀹為檯瀛楄妭鏁般?br>鑻ヤ竴涓鎺ュ彛涓嶪NADDR_ANY鎹嗙粦錛屼篃灝辨槸璇磋濂楁帴鍙e彲浠ョ敤浠繪剰涓繪満鐨勫湴鍧錛屾鏃墮櫎闈炶皟鐢╟onnect()鎴朼ccept()鏉ヨ繛鎺ワ紝鍚﹀垯getsockname()灝嗕笉浼氳繑鍥炰富鏈篒P鍦板潃鐨勪換浣曚俊鎭傞櫎闈炲鎺ュ彛琚繛鎺ワ紝WINDOWS濂楁帴鍙e簲鐢ㄧ▼搴忎笉搴斿亣璁綢P鍦板潃浼氫粠INADDR_ANY鍙樻垚鍏朵粬鍦板潃銆傝繖鏄洜涓哄浜庡涓富鏈虹幆澧冧笅錛岄櫎闈炲鎺ュ彛琚繛鎺ワ紝鍚﹀垯璇ュ鎺ュ彛鎵鐢ㄧ殑IP鍦板潃鏄笉鍙煡鐨勩?br>
榪斿洖鍊鹼細
 鑻ユ棤閿欒鍙戠敓錛実etsockname()榪斿洖0銆傚惁鍒欑殑璇濓紝榪斿洖SOCKET_ERROR閿欒錛屽簲鐢ㄧ▼搴忓彲閫氳繃WSAGetLastError()鑾峰彇鐩稿簲閿欒浠g爜銆?br>

閿欒浠g爜錛?br>  WSANOTINITIALISED錛氬湪浣跨敤姝PI涔嬪墠搴旈鍏堟垚鍔熷湴璋冪敤WSAStartup()銆?br>  WSAENETDOWN錛歐INDOWS濂楁帴鍙e疄鐜版嫻嬪埌緗戠粶瀛愮郴緇熷け鏁堛?br>  WSAEFAULT錛歯amelen鍙傛暟涓嶅澶с?br>  WSAEINPROGRESS錛氫竴涓樆濉炵殑WINDOWS濂楁帴鍙h皟鐢ㄦ鍦ㄨ繍琛屼腑銆?br>  WSAENOTSOCK錛氭弿榪板瓧涓嶆槸涓涓鎺ュ彛銆?br>  WSAEINVAL錛氬鎺ュ彛鏈敤bind()鎹嗙粦銆?br>
2銆?-----getpeername()

 鑾峰彇涓庡鎺ュ彛鐩歌繛鐨勭鍦板潃銆?br>
  #include <winsock.h>

  int PASCAL FAR getpeername( SOCKET s, struct sockaddr FAR* name,
  int FAR* namelen);

  s錛氭爣璇嗕竴宸茶繛鎺ュ鎺ュ彛鐨勬弿榪板瓧銆?br>  name錛氭帴鏀剁鍦板潃鐨勫悕瀛楃粨鏋勩?br>  namelen錛氫竴涓寚鍚戝悕瀛楃粨鏋勭殑鎸囬拡銆?br>
 getpeername()鍑芥暟鐢ㄤ簬浠庣鍙涓幏鍙栦笌瀹冩崋緇戠殑绔彛鍚嶏紝騫舵妸瀹冨瓨鏀懼湪sockaddr綾誨瀷鐨刵ame緇撴瀯涓傚畠閫傜敤浜庢暟鎹姤鎴栨祦綾誨鎺ュ彛銆?br>
榪斿洖鍊鹼細
  鑻ユ棤閿欒鍙戠敓錛実etpeername()榪斿洖0銆傚惁鍒欑殑璇濓紝榪斿洖SOCKET_ERROR錛屽簲鐢ㄧ▼搴忓彲閫氳繃WSAGetLastError()鏉ヨ幏鍙栫浉搴旂殑閿欒浠g爜銆?br>
閿欒浠g爜錛?br>  WSANOTINITIALISED錛氬湪浣跨敤姝PI涔嬪墠搴旈鍏堟垚鍔熷湴璋冪敤WSAStartup()銆?br>  WSAENETDOWN錛歐INDOWS濂楁帴鍙e疄鐜版嫻嬪埌緗戠粶瀛愮郴緇熷け鏁堛?br>  WSAEFAULT錛歯amelen鍙傛暟涓嶅澶с?br>  WSAEINPROGRESS錛氫竴涓樆濉炵殑WINDOWS濂楁帴鍙h皟鐢ㄦ鍦ㄨ繍琛屼腑銆?br>  WSAENOTCONN 濂楁帴鍙f湭榪炴帴銆?br>  WSAENOTSOCK錛氭弿榪板瓧涓嶆槸涓涓鎺ュ彛銆?/font>



lzr 2008-12-22 20:14 鍙戣〃璇勮
]]>
鏍¢獙鍜岀畻娉?/title><link>http://www.shnenglu.com/lzr/archive/2008/12/20/69914.html</link><dc:creator>lzr</dc:creator><author>lzr</author><pubDate>Sat, 20 Dec 2008 08:52:00 GMT</pubDate><guid>http://www.shnenglu.com/lzr/archive/2008/12/20/69914.html</guid><wfw:comment>http://www.shnenglu.com/lzr/comments/69914.html</wfw:comment><comments>http://www.shnenglu.com/lzr/archive/2008/12/20/69914.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lzr/comments/commentRss/69914.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lzr/services/trackbacks/69914.html</trackback:ping><description><![CDATA[<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080"> 1</span><img id=Codehighlighter1_0_270_Open_Image onclick="this.style.display='none'; Codehighlighter1_0_270_Open_Text.style.display='none'; Codehighlighter1_0_270_Closed_Image.style.display='inline'; Codehighlighter1_0_270_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_0_270_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_0_270_Closed_Text.style.display='none'; Codehighlighter1_0_270_Open_Image.style.display='inline'; Codehighlighter1_0_270_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top><span id=Codehighlighter1_0_270_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id=Codehighlighter1_0_270_Open_Text><span style="COLOR: #008000">/*</span><span style="COLOR: #008000">*************************************************************************<br></span><span style="COLOR: #008080"> 2</span><span style="COLOR: #008000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>鍔熻兘     錛?nbsp;CRC鏍¢獙璁$畻          <br></span><span style="COLOR: #008080"> 3</span><span style="COLOR: #008000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>杈撳叆鍙傛暟 錛?nbsp;unsigned char *ptr--闇瑕佹牎楠岀殑鏁版嵁</span><span style="COLOR: #008000">        <br></span><span style="COLOR: #008080"> 5</span><span style="COLOR: #008000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>杈撳嚭鍙傛暟 錛?nbsp;unsigned char len--鏍¢獙鏁版嵁闀垮害</span><span style="COLOR: #008000"><br></span><span style="COLOR: #008080"> 7</span><span style="COLOR: #008000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>榪斿洖鍊?nbsp;  錛氭牎楠屽?br></span><span style="COLOR: #008080"> 8</span><span style="COLOR: #008000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>*************************************************************************</span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 9</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>unsigned </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> CGlobalData::Cal_CRC(unsigned </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">ptr, unsigned </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000"> len)<br></span><span style="COLOR: #008080">10</span><span style="COLOR: #000000"><img id=Codehighlighter1_345_625_Open_Image onclick="this.style.display='none'; Codehighlighter1_345_625_Open_Text.style.display='none'; Codehighlighter1_345_625_Closed_Image.style.display='inline'; Codehighlighter1_345_625_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_345_625_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_345_625_Closed_Text.style.display='none'; Codehighlighter1_345_625_Open_Image.style.display='inline'; Codehighlighter1_345_625_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_345_625_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_345_625_Open_Text><span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">11</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top> unsigned </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000"> i;<br></span><span style="COLOR: #008080">12</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top> unsigned </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> crc</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br></span><span style="COLOR: #008080">13</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top> </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(len</span><span style="COLOR: #000000">--!=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br></span><span style="COLOR: #008080">14</span><span style="COLOR: #000000"><img id=Codehighlighter1_404_594_Open_Image onclick="this.style.display='none'; Codehighlighter1_404_594_Open_Text.style.display='none'; Codehighlighter1_404_594_Closed_Image.style.display='inline'; Codehighlighter1_404_594_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_404_594_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_404_594_Closed_Text.style.display='none'; Codehighlighter1_404_594_Open_Image.style.display='inline'; Codehighlighter1_404_594_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top> </span><span id=Codehighlighter1_404_594_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_404_594_Open_Text><span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">15</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>  </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0x80</span><span style="COLOR: #000000">; i</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">; i</span><span style="COLOR: #000000">/=</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">) <br></span><span style="COLOR: #008080">16</span><span style="COLOR: #000000"><img id=Codehighlighter1_435_582_Open_Image onclick="this.style.display='none'; Codehighlighter1_435_582_Open_Text.style.display='none'; Codehighlighter1_435_582_Closed_Image.style.display='inline'; Codehighlighter1_435_582_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_435_582_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_435_582_Closed_Text.style.display='none'; Codehighlighter1_435_582_Open_Image.style.display='inline'; Codehighlighter1_435_582_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>  </span><span id=Codehighlighter1_435_582_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_435_582_Open_Text><span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">17</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">((crc</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">0x8000</span><span style="COLOR: #000000">)</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)<br></span><span style="COLOR: #008080">18</span><span style="COLOR: #000000"><img id=Codehighlighter1_463_499_Open_Image onclick="this.style.display='none'; Codehighlighter1_463_499_Open_Text.style.display='none'; Codehighlighter1_463_499_Closed_Image.style.display='inline'; Codehighlighter1_463_499_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_463_499_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_463_499_Closed_Text.style.display='none'; Codehighlighter1_463_499_Open_Image.style.display='inline'; Codehighlighter1_463_499_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>   </span><span id=Codehighlighter1_463_499_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_463_499_Open_Text><span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">19</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    crc</span><span style="COLOR: #000000">*=</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">; <br></span><span style="COLOR: #008080">20</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    crc</span><span style="COLOR: #000000">^=</span><span style="COLOR: #000000">0x18005</span><span style="COLOR: #000000">;<br></span><span style="COLOR: #008080">21</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>   }</span></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">22</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   </span><span style="COLOR: #0000ff">else</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">23</span><span style="COLOR: #000000"><img id=Codehighlighter1_512_529_Open_Image onclick="this.style.display='none'; Codehighlighter1_512_529_Open_Text.style.display='none'; Codehighlighter1_512_529_Closed_Image.style.display='inline'; Codehighlighter1_512_529_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_512_529_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_512_529_Closed_Text.style.display='none'; Codehighlighter1_512_529_Open_Image.style.display='inline'; Codehighlighter1_512_529_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>   </span><span id=Codehighlighter1_512_529_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_512_529_Open_Text><span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">24</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    crc</span><span style="COLOR: #000000">*=</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">;<br></span><span style="COLOR: #008080">25</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>   }</span></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">26</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top><br></span><span style="COLOR: #008080">27</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">((</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">ptr</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">i)</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">) <br></span><span style="COLOR: #008080">28</span><span style="COLOR: #000000"><img id=Codehighlighter1_555_578_Open_Image onclick="this.style.display='none'; Codehighlighter1_555_578_Open_Text.style.display='none'; Codehighlighter1_555_578_Closed_Image.style.display='inline'; Codehighlighter1_555_578_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_555_578_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_555_578_Closed_Text.style.display='none'; Codehighlighter1_555_578_Open_Image.style.display='inline'; Codehighlighter1_555_578_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>   </span><span id=Codehighlighter1_555_578_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_555_578_Open_Text><span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">29</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    crc</span><span style="COLOR: #000000">^=</span><span style="COLOR: #000000">0x18005</span><span style="COLOR: #000000">;<br></span><span style="COLOR: #008080">30</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>   }</span></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">31</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</span></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">32</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>  ptr</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">;<br></span><span style="COLOR: #008080">33</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top> }</span></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">34</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top> </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">(crc);  </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">榪斿洖鍊煎悗鍗佸叚浣嶄負鏍¢獙鍊?/span><span style="COLOR: #008000"><br></span><span style="COLOR: #008080">35</span><span style="COLOR: #008000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top></span><span style="COLOR: #000000">}</span></span></div> <img src ="http://www.shnenglu.com/lzr/aggbug/69914.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lzr/" target="_blank">lzr</a> 2008-12-20 16:52 <a href="http://www.shnenglu.com/lzr/archive/2008/12/20/69914.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍥涗釜瀛楄妭杞崲鎴恑nt鏁村艦http://www.shnenglu.com/lzr/archive/2008/12/20/69913.htmllzrlzrSat, 20 Dec 2008 08:41:00 GMThttp://www.shnenglu.com/lzr/archive/2008/12/20/69913.htmlhttp://www.shnenglu.com/lzr/comments/69913.htmlhttp://www.shnenglu.com/lzr/archive/2008/12/20/69913.html#Feedback0http://www.shnenglu.com/lzr/comments/commentRss/69913.htmlhttp://www.shnenglu.com/lzr/services/trackbacks/69913.html   鏈榪戝湪鍋氶」鐩腑娑夊強鍒扮綉緇滀紶杈撳瓧鑺傛祦鐨勯棶棰橈紱client绔垎鎴愬瓧鑺傝繘琛屼紶杈擄紝server绔帴鏀跺悗闇瑕?br>灝嗗叾緇勬垚鏁村艦榪涜鏁版嵁搴撳瓨鍌紝鏂規硶濡備笅錛?br>

 1#include <stdio.h>
 2
 3int main(void)
 4{
 5      unsigned char array[4= {"0x0","0x0","0x02","0xe7"};
 6      unsigned long num;
 7      num = 0;
 8      for(int i=0; i<sizeof(array); i++)
 9   {
10      num<<=8;
11      num |= array[i];
12   }

13   printf("num = %d",num);
14   return 0;
15   
16}


lzr 2008-12-20 16:41 鍙戣〃璇勮
]]>
oracle鏁版嵁搴撳簭鍒楀拰瑙﹀彂鍣ㄧ殑鍒涘緩http://www.shnenglu.com/lzr/archive/2008/12/20/69909.htmllzrlzrSat, 20 Dec 2008 08:06:00 GMThttp://www.shnenglu.com/lzr/archive/2008/12/20/69909.htmlhttp://www.shnenglu.com/lzr/comments/69909.htmlhttp://www.shnenglu.com/lzr/archive/2008/12/20/69909.html#Feedback0http://www.shnenglu.com/lzr/comments/commentRss/69909.htmlhttp://www.shnenglu.com/lzr/services/trackbacks/69909.html1銆佸簭鍒楃殑寤虹珛錛?br>create sequence "TEST_SEQUENCE" increment by 1 start with 1 nomaxvalue nocycle nocache;
璇存槑錛氭渶鍚庝笁涓兼槸鍙互鑷璁懼畾鐨?br>
2銆佽Е鍙戝櫒鐨勫緩绔嬶細
create trigger "test_trigger" before
insert on test_table for each row when(new.id is null)
begin
select TEST_SEQUENCE.nextval into:new.id from dual;
end;

娉ㄦ剰浜嬮」錛氬綋寤虹珛搴忓垪鐨勬椂鍊欙紝搴忓垪鐨勫悕瀛楁渶濂芥槸鍐欐垚澶у啓錛岃櫧鐒秓racle浼氳嚜鍔ㄨ繘琛岃漿鎹紝浣嗘槸鏈榪戝湪
鐢ㄧ殑鏃跺欏嵈娌℃湁娉ㄦ剰錛屽啓鎴愮殑灝忓啓搴忓垪鍚嶅瓧騫舵病鏈夎漿鎴愬ぇ鍐欙紝濡傛閫犳垚閿欒錛佹儏鍐靛涓嬶細
褰撴椂搴忓垪鍚嶅瓧鍐欐垚灝忓啓錛岀郴緇熷茍娌℃湁杞崲澶у啓錛岃繖鏍風殑璇濆湪鎺ヤ笅鏉ュ緩绔嬭Е鍙戝櫒鐨勬椂鍊欎細鍑虹幇錛氳Е鍙戝櫒
寤虹珛鎴愬姛錛屼絾鏄彁紺?緙栬瘧鏃舵湁warning"錛屾渶緇堝鑷磋Е鍙戝櫒涓嶈兘姝e父浣跨敤,瑙e喅鍔炴硶灝辨槸灝嗗簭鍒楃殑鍚嶅瓧
鏀規垚澶у啓銆?br> 



lzr 2008-12-20 16:06 鍙戣〃璇勮
]]>
瀛楃涓蹭腑鏌ユ壘瀛楃涓茬殑綆楁硶http://www.shnenglu.com/lzr/archive/2008/12/13/69325.htmllzrlzrSat, 13 Dec 2008 03:10:00 GMThttp://www.shnenglu.com/lzr/archive/2008/12/13/69325.htmlhttp://www.shnenglu.com/lzr/comments/69325.htmlhttp://www.shnenglu.com/lzr/archive/2008/12/13/69325.html#Feedback4http://www.shnenglu.com/lzr/comments/commentRss/69325.htmlhttp://www.shnenglu.com/lzr/services/trackbacks/69325.html#include <stdio.h>
int strlen2(char *str)
{
    for(i=0; str[i]!='\0'; i++) //浣跨敤寰幆鏉ヨ綆楅暱搴?br>    return i;
}

//鍦ㄥ瓧絎︿覆涓鎵懼瓙瀛楃

int strindex(char *str,char *substr)
{
    int end,i,j;
    end = strlen2(str)-strlen2(substr);
    if (end>0)
    {
        for(i=0;i<=end;i++)
            /*浣跨敤寰幆姣旇緝*/
            for(j=i; str[j]==substr[j-i];j++)
                if (substr[j-i+1]=='\0')
                    return i+1;
   }
    return -1;  
}

//涓葷▼寮忥細鍦ㄥ瓧絎︿覆涓鎵懼瓙瀛楃涓插嚭鐜扮殑浣嶇疆

void main()
{
    char string[100];
    char substring[100];
    int result;
    printf("璇瘋緭鍏ュ瓧絎︿覆");
    gets(string);
    printf("璇瘋緭鍏ヨ鎼滅儲鐨勫瓙瀛楃涓?);
    gets(substring);
    result = strindex(string,substring);
    if (result > 0)
        printf("瀛愬瓧絎︿覆浣嶇疆鍦?d",result);
    else
        printf("娌℃湁鎵懼埌");
    getchar();
}



lzr 2008-12-13 11:10 鍙戣〃璇勮
]]>
久久精品国产精品亚洲人人| 久久这里只精品国产99热| 欧美久久亚洲精品| 久久一本综合| 7777久久亚洲中文字幕| 狠狠人妻久久久久久综合蜜桃| 久久夜色撩人精品国产| 久久精品中文字幕一区| 亚洲国产精品久久久久| 国产精品久久久久蜜芽| 免费精品99久久国产综合精品| 香蕉久久夜色精品国产尤物| 久久99国产精一区二区三区 | 精品多毛少妇人妻AV免费久久 | 久久精品国产色蜜蜜麻豆| 久久婷婷五月综合成人D啪| 久久久久中文字幕| 精品国产99久久久久久麻豆| 丁香五月综合久久激情| 久久精品国产亚洲AV无码偷窥| 亚洲а∨天堂久久精品9966| 欧美激情精品久久久久| 久久无码人妻一区二区三区| 亚洲另类欧美综合久久图片区| 狠狠色丁香久久婷婷综| 国产亚洲精品自在久久| 亚洲国产精品无码成人片久久| 武侠古典久久婷婷狼人伊人| 精品久久久久中文字幕一区| 久久精品免费一区二区三区| 国产精品久久久久jk制服| 欧美噜噜久久久XXX| 国产毛片欧美毛片久久久| 亚洲人成无码久久电影网站| 日韩影院久久| 中文字幕久久精品 | 久久综合偷偷噜噜噜色| 偷偷做久久久久网站| 97精品伊人久久大香线蕉| 大香伊人久久精品一区二区| 97精品依人久久久大香线蕉97|