锘??xml version="1.0" encoding="utf-8" standalone="yes"?> GCC -O 浼樺寲閫夐」璇存槑 緙栬瘧鑰楁椂 緙栬瘧緇撴灉澶у皬(BYTES) 榪愯鑰楁椂 涓嶈緗甇閫夐」 real 0m20.079s user 0m18.943s sys 0m1.030s 1590048 real 0m13.143s user 0m12.996s sys 0m0.124s -O0錛氳繖涓瓑綰э紙瀛楁瘝“O”鍚庨潰璺熶釜闆訛級鍏抽棴鎵鏈変紭鍖栭夐」錛屼篃鏄疌FLAGS鎴朇XXFLAGS涓病鏈夎緗?O絳夌駭鏃剁殑榛樿絳夌駭銆傝繖鏍峰氨涓嶄細浼樺寲浠g爜錛岃繖閫氬父涓嶆槸鎴戜滑鎯寵鐨勩?/span> real 0m19.957s user 0m18.521s sys 0m1.406s 1590048 real 0m12.816s user 0m12.661s sys 0m0.138s -O1錛氳繖鏄渶鍩烘湰鐨勪紭鍖栫瓑綰с傜紪璇戝櫒浼氬湪涓嶈姳璐瑰お澶氱紪璇戞椂闂寸殑鍚屾椂璇曞浘鐢熸垚鏇村揩鏇村皬鐨勪唬鐮併傝繖浜涗紭鍖栨槸闈炲父鍩虹鐨勶紝浣嗕竴鑸繖浜涗換鍔¤偗瀹氳兘欏哄埄瀹屾垚銆?/span> real 0m22.782s user 0m21.750s sys 0m0.978s 599306 real 0m5.074s user 0m4.951s sys 0m0.115s -O2錛?O1鐨勮繘闃躲傝繖鏄帹鑽愮殑浼樺寲絳夌駭錛岄櫎闈炰綘鏈夌壒孌婄殑闇姹傘?O2浼氭瘮-O1鍚敤澶氫竴浜涙爣璁般傝緗簡-O2鍚庯紝緙栬瘧鍣ㄤ細璇曞浘鎻愰珮浠g爜鎬ц兘鑰屼笉浼氬澶т綋縐拰澶ч噺鍗犵敤鐨勭紪璇戞椂闂淬?/span> real 0m26.258s user 0m25.313s sys 0m0.887s 594456 real 0m4.621s user 0m4.491s sys 0m0.123s -O3錛氳繖鏄渶楂樻渶鍗遍櫓鐨勪紭鍖栫瓑綰с傜敤榪欎釜閫夐」浼氬歡闀跨紪璇戜唬鐮佺殑鏃墮棿錛屽茍涓斿湪浣跨敤gcc4.x鐨勭郴緇熼噷涓嶅簲鍏ㄥ眬鍚敤銆傝嚜浠?.x鐗堟湰浠ユ潵gcc鐨勮涓哄凡緇忔湁浜嗘瀬澶у湴鏀瑰彉銆傚湪3.x錛?O3鐢熸垚鐨勪唬鐮佷篃鍙槸姣?O2蹇竴鐐圭偣鑰屽凡錛岃実cc4.x涓繕鏈繀鏇村揩銆傜敤-O3鏉ョ紪璇戞墍鏈夌殑杞歡鍖呭皢浜х敓鏇村ぇ浣撶Н鏇磋楀唴瀛樼殑浜岃繘鍒舵枃浠訛紝澶уぇ澧炲姞緙栬瘧澶辮觸鐨勬満浼氭垨涓嶅彲棰勭煡鐨勭▼搴忚涓猴紙鍖呮嫭閿欒錛夈傝繖鏍峰仛灝嗗緱涓嶅伩澶憋紝璁頒綇榪囩姽涓嶅強銆傚湪gcc 4.x.涓嬌鐢?O3鏄笉鎺ㄨ崘鐨勩?/span> real 0m29.642s user 0m28.671s sys 0m0.852s 659664 real 0m4.669s user 0m4.521s sys 0m0.141s -O4 絳変環浜?/span>-O3 -O5 絳変環浜?/span>-O3 .... real 0m30.264s user 0m29.236s sys 0m0.969s 659664 real 0m4.481s user 0m4.331s sys 0m0.144s -Os錛氳繖涓瓑綰х敤鏉ヤ紭鍖栦唬鐮佸昂瀵搞傚叾涓惎鐢ㄤ簡-O2涓笉浼氬鍔犵鐩樼┖闂村崰鐢ㄧ殑浠g爜鐢熸垚閫夐」銆傝繖瀵逛簬紓佺洏絀洪棿鏋佸叾绱у紶鎴栬匔PU緙撳瓨杈冨皬鐨勬満鍣?/span>闈炲父鏈夌敤銆備絾涔熷彲鑳戒駭鐢熶簺璁擱棶棰橈紝鍥犳杞歡鏍戜腑鐨勫ぇ閮ㄥ垎ebuild閮借繃婊ゆ帀榪欎釜絳夌駭鐨勪紭鍖栥備嬌鐢?Os鏄笉鎺ㄨ崘鐨勩?/span> real 0m24.206s user 0m23.285s sys 0m0.855s 519903 real 0m5.188s user 0m5.050s sys 0m0.132s Thread t = threadFactory.newThread(new Runnable() { @SuppressWarnings("InfiniteLoopStatement") byte[] bytes = new byte[EXPECTED_SIZE]; int command = bytes[0] & 0xFF; int id = Utilities.parseBytes(bytes[2], bytes[3], bytes[4], bytes[5]); logger.debug("Closed connection cause={}; id={}", e, id); Queue<ApnsNotification> tempCache = new LinkedList<ApnsNotification>(); while (!cachedNotifications.isEmpty()) { if (notification.getIdentifier() == id) { if (foundNotification) { int resendSize = 0; while (!cachedNotifications.isEmpty()) { resendSize++; drainBuffer(); } catch (IOException e) {
]]>
]]>
]]>import sys
from _winreg import *
# tweak as necessary
version = sys.version[:3]
installpath = sys.prefix
regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
installpath, installpath, installpath
)
def RegisterPy():
print "begin RegisterPy "
try:
print "open key : %s"%regpath
reg = OpenKey(HKEY_CURRENT_USER, regpath)
except EnvironmentError as e:
try:
reg = CreateKey(HKEY_CURRENT_USER, regpath)
SetValue(reg, installkey, REG_SZ, installpath)
SetValue(reg, pythonkey, REG_SZ, pythonpath)
CloseKey(reg)
except:
print "*** EXCEPT: Unable to register!"
return
print "--- Python", version, "is now registered!"
return
if (QueryValue(reg, installkey) == installpath and
QueryValue(reg, pythonkey) == pythonpath):
CloseKey(reg)
print "=== Python", version, "is already registered!"
return CloseKey(reg)
print "*** ERROR:Unable to register!"
print "*** REASON:You probably have another Python installation!"
def UnRegisterPy():
#print "begin UnRegisterPy "
try:
print "open HKEY_CURRENT_USER key=%s"%(regpath)
reg = OpenKey(HKEY_CURRENT_USER, regpath)
#reg = OpenKey(HKEY_LOCAL_MACHINE, regpath)
except EnvironmentError:
print "*** Python not registered?!"
return
try:
DeleteKey(reg, installkey)
DeleteKey(reg, pythonkey)
DeleteKey(HKEY_LOCAL_MACHINE, regpath)
except:
print "*** Unable to un-register!"
else:
print "--- Python", version, "is no longer registered!"
if __name__ == "__main__":
RegisterPy()
鍏跺疄鎵嬪姩鍦ㄦ敞鍐岃〃閲?鎿嶄綔灝卞彲浠ヤ簡銆?br />
]]>
https://github.com/notnoop/java-apns
private void monitorSocket(final Socket socket) {
logger.debug("Launching Monitoring Thread for socket {}", socket);
final static int EXPECTED_SIZE = 6;
@Override
public void run() {
logger.debug("Started monitoring thread");
try {
InputStream in;
try {
in = socket.getInputStream();
} catch (IOException ioe) {
in = null;
}
while (in != null && readPacket(in, bytes)) {
logger.debug("Error-response packet {}", Utilities.encodeHex(bytes));
// Quickly close socket, so we won't ever try to send push notifications
// using the defective socket.
Utilities.close(socket);
if (command != 8) {
throw new IOException("Unexpected command byte " + command);
}
int statusCode = bytes[1] & 0xFF;
DeliveryError e = DeliveryError.ofCode(statusCode);
delegate.connectionClosed(e, id);
ApnsNotification notification = null;
boolean foundNotification = false;
notification = cachedNotifications.poll();
logger.debug("Candidate for removal, message id {}", notification.getIdentifier());
logger.debug("Bad message found {}", notification.getIdentifier());
foundNotification = true;
break;
}
tempCache.add(notification);
}
logger.debug("delegate.messageSendFailed, message id {}", notification.getIdentifier());
delegate.messageSendFailed(notification, new ApnsDeliveryErrorException(e));
} else {
cachedNotifications.addAll(tempCache);
int resendSize = tempCache.size();
logger.warn("Received error for message that wasn't in the cache...");
if (autoAdjustCacheLength) {
cacheLength = cacheLength + (resendSize / 2);
delegate.cacheLengthExceeded(cacheLength);
}
logger.debug("delegate.messageSendFailed, unknown id");
delegate.messageSendFailed(null, new ApnsDeliveryErrorException(e));
}
final ApnsNotification resendNotification = cachedNotifications.poll();
logger.debug("Queuing for resend {}", resendNotification.getIdentifier());
notificationsBuffer.add(resendNotification);
}
logger.debug("resending {} notifications", resendSize);
delegate.notificationsResent(resendSize);
}
logger.debug("Monitoring input stream closed by EOF");
// An exception when reading the error code is non-critical, it will cause another retry
// sending the message. Other than providing a more stable network connection to the APNS
// server we can't do much about it - so let's not spam the application's error log.
logger.info("Exception while waiting for error code", e);
delegate.connectionClosed(DeliveryError.UNKNOWN, -1);
} finally {
close();
}
}
ftp鍛戒護琛屽熀鏈搷浣?/span> |
ftp鍛戒護琛屽熀鏈搷浣? Ftp 灝嗘枃浠朵紶閫佸埌姝e湪榪愯 FTP 鏈嶅姟鐨勮繙紼嬭綆楁満鎴栦粠姝e湪榪愯 FTP 鏈嶅姟鐨勮繙紼嬭綆楁満浼犻佹枃 浠訛紙鏈夋椂縐頒綔 daemon錛夈?span lang=EN-US>Ftp 鍙互 浜や簰浣跨敤銆傚崟鍑?span lang=EN-US>“鐩稿叧涓婚”鍒楄〃涓殑“ftp 鍛戒護”浠ヨ幏寰楀彲鐢ㄧ殑“ftp”瀛愬懡浠ゆ弿榪般傝 鍛戒護鍙湁鍦ㄥ畨瑁呬簡 TCP/IP 鍗忚涔嬪悗鎵嶅彲鐢ㄣ?Ftp 鏄竴縐嶆湇鍔★紝涓鏃﹀惎鍔紝灝嗗垱寤哄湪鍏朵腑鍙互浣跨敤 ftp 鍛戒護鐨勫瓙鐜錛岄氳繃閿叆 quit 瀛愬懡浠ゅ彲浠ヤ粠瀛愮幆澧冭繑鍥炲埌Windows 2000 鍛戒護鎻愮ず絎︺傚綋 ftp 瀛愮幆澧冭繍琛屾椂錛屽畠鐢?span lang=EN-US> ftp 鍛戒護鎻愮ず絎︿唬琛ㄣ?span lang=EN-US> -n 紱佹鑷姩鐧誨綍鍒板垵濮嬭繛鎺ャ?span lang=EN-US> 紱佺敤鏂囦歡鍚嶇粍錛屽畠鍏佽鍦ㄦ湰鍦版枃浠跺拰璺緞鍚嶄腑浣跨敤閫氶厤絎﹀瓧絎︼紙* 鍜?span lang=EN-US> ?錛夈傦紙璇峰弬闃呰仈鏈?“鍛戒護鍙傝?span lang=EN-US>”涓殑 glob 鍛戒護銆傦級 鎸囧畾鍖呭惈 ftp 鍛戒護鐨勬枃鏈枃浠訛紱褰?span lang=EN-US> ftp 鍚姩鍚庯紝榪欎簺鍛戒護灝嗚嚜鍔ㄨ繍琛屻傝鍙傛暟涓笉鍏佽鏈夌┖鏍箋備嬌鐢ㄨ寮鍏寵屼笉鏄噸瀹氬悜 (>)銆?span lang=EN-US>
WIN2000閲屽崟鍑?span lang=EN-US>“寮濮?span lang=EN-US>“銆?span lang=EN-US>”榪愯“,寮瑰嚭”榪愯瀵硅瘽妗?span lang=EN-US>“,杈撳叆CMD,鍑虹幇NT鐨勫懡浠よ妯″紡瀵?span lang=EN-US> |
|