锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品99久久99久久久,亚洲天堂久久久,国产69精品久久久久观看软件http://www.shnenglu.com/xmli/category/9139.html銇烽洩椋樼粵姊呮槧孌嬬孩 <br> &nbsp;&nbsp; 銇瘋姳鑸為湝椋炴槧鑻嶆澗<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----- Do more,suffer lesszh-cnThu, 04 Mar 2010 13:28:42 GMTThu, 04 Mar 2010 13:28:42 GMT60濡備綍閫氳繃紼嬪簭灞忚斀windows綺樻粸閿箣鐑敭http://www.shnenglu.com/xmli/archive/2010/03/04/108880.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Thu, 04 Mar 2010 05:36:00 GMThttp://www.shnenglu.com/xmli/archive/2010/03/04/108880.htmlhttp://www.shnenglu.com/xmli/comments/108880.htmlhttp://www.shnenglu.com/xmli/archive/2010/03/04/108880.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/108880.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/108880.html    澶у閮界煡閬擄紝鍦╳indows涓嬮粯璁よ繛鍑籹hift閿埌5嬈′細寮瑰嚭綺樻粸閿緗殑瀵硅瘽妗嗭紝濡備笅鍥炬墍紺恒?br>


    鍦ㄦ父鎴忎腑蹇呴』灞忚斀windows瀵圭矘婊為敭鐑敭鐨勫弽搴旓紝鍚﹀垯娓告垙浣撻獙灝嗕細闈炲父宸傚湪緗戜笂鏌ユ壘涓孌墊椂闂村悗鍙戠幇錛屽叧浜庡浣曢氳繃紼嬪簭灞忚斀綺樻粸閿儹閿殑涓枃璧勬枡闈炲父灝戯紝澶у鏁扮殑絳旀閮芥槸鎵撳紑“鎺у埗闈㈡澘”錛岀劧鍚庢壘鍒?#8220;杈呭姪鍔熻兘閫夐」”鏉$洰浜戜簯錛岃繖鏄劇ず涓嶆槸紼嬪簭鍛樻墍闇瑕佺殑瑙e喅鎵嬫硶銆?br>    緇忚繃澶氭柟鏌ユ壘錛岄棶棰樻渶緇堝緱浠ヨВ鍐熾備笅闈㈠垪琛ㄤ唬鐮侊紝浠ラ(鏈潵鑰咃紝紼嬪簭VC6.0+XP緋葷粺涓嬭繍琛岄氳繃銆?br>
    // activate or inactivate sticky keys hot key (pop up  a set up dialog after continually pressed shift 5 times)
    bool ActivateStickyHotkey(bool isActivate, bool* pIsPreviouslyActivate= NULL)
    {
        
// fetch current sticky keys state
        STICKYKEYS skf;
        
const DWORD datasize            = sizeof(STICKYKEYS);
        skf.cbSize                        
= datasize;
        
if (!SystemParametersInfo(SPI_GETSTICKYKEYS, datasize, (LPVOID)&skf, 0))
        {
            
return false;
        }
        
        
const bool isPreviouslyActivate    = (skf.dwFlags & SKF_HOTKEYACTIVE) != 0;
        
// store old sticky keys state
        if (NULL!= pIsPreviouslyActivate)
        {
            
*pIsPreviouslyActivate        = isPreviouslyActivate;
        }

        
// return true if no need to change state
        if (isActivate==isPreviouslyActivate)
        {
            
return true;
        }
        
        
// change sticky keys state
        skf.dwFlags                        = isActivate? (skf.dwFlags | SKF_HOTKEYACTIVE) : (skf.dwFlags & (~SKF_HOTKEYACTIVE));
        
const bool isSuccess            = TRUE==SystemParametersInfo(SPI_SETSTICKYKEYS, datasize, (LPVOID)&skf, 0);
        
return isSuccess;
    }


鍙傝冭祫鏂欙細
1, http://msdn.microsoft.com/en-us/library/aa925903.aspx 
2, http://stackoverflow.com/questions/734618/disabling-accessibility-shortcuts-in-net-application

]]>
2009騫寸粓濂栦釜紼庤綆楀櫒 pythonhttp://www.shnenglu.com/xmli/archive/2010/02/11/107713.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Thu, 11 Feb 2010 07:32:00 GMThttp://www.shnenglu.com/xmli/archive/2010/02/11/107713.htmlhttp://www.shnenglu.com/xmli/comments/107713.htmlhttp://www.shnenglu.com/xmli/archive/2010/02/11/107713.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/107713.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/107713.html


def getTaxRatio(taxSalary):

    ratiolist    
=(
            (
500,    0.05, 0),
            (
2000,   0.1025),
            (
5000,   0.15125),
            (
20000,  0.20375),
            (
40000,  0.251375),
            (
60000,  0.303375),
            (
80000,  0.356375),
            (
1000000.4010375),
            (
9999999,0.4515375)
            )

    
if taxSalary>= 0:        
        
for ratio in ratiolist:
            
if taxSalary<= ratio[0]:
                
return (ratio[1], ratio[2])
    
return (0, 0)

def calcYearAwardTax(yearAward):

    monthAward            
= yearAward / 12
    taxRatio, taxAdjust    
= getTaxRatio(monthAward)

    tax                    
= yearAward * taxRatio - taxAdjust
    resultAward            
= yearAward - tax
    
    retcode                
= (yearAward, resultAward, tax, taxRatio, taxAdjust)
    
#print('yearAward= %d, resultAward= %f, tax= %f, taxRatio= %f, taxAdjust= %d'%retcode)
    return retcode


################################################################################

import sys
import os

argNum    
= len(sys.argv)
if argNum == 1:
    scriptName    
= os.path.basename(__file__)
    
print('usage1:    %s awardUpperBound'%scriptName)
    
print('usage2:    %s awardLowerBound awardUpperBound'%scriptName)
    sys.exit()


print('-----------------------------------------------------------------------')

awardLowerBound, awardUpperBound        
= 0, 0
if argNum   == 2:
    awardUpperBound                        
= int(sys.argv[1])
elif argNum == 3:
    awardLowerBound, awardUpperBound    
= int(sys.argv[1]), int(sys.argv[2])

if awardLowerBound> awardUpperBound:
        swap(awardLowerBound, awardUpperBound)
    
perfectAward, perfectGain                
= 0, 0

for award in range(awardLowerBound, awardUpperBound + 1):
    retcode        
= calcYearAwardTax(award)    
    
if len(retcode) > 2:
        
if retcode[1]> perfectGain:
            perfectAward    
= retcode[0]
            perfectGain        
= retcode[1]
        
        
if award== awardUpperBound:
            
print('upperBoundAward= %d,\tgain= %f,\ttax= %f'%(retcode[0], retcode[1], retcode[0] - retcode[1]))    

print("perfectAward= %d,\tgain= %f,\ttax= %f"%(perfectAward, perfectGain, perfectAward - perfectGain))



淇濆瓨鎴愭枃浠?awardTax.py 鐒跺悗鍦ㄥ懡浠よ璋冪敤鍗沖彲銆?br>姣斿浣犲勾緇堝鍙戜簡25000錛屽垯錛?br>
ok, 閭d箞浣犱簭浜嗭紝浣犳瘮鎷?4000鐨勫悓蹇楀浜ょ◣3625-2375= 1250鍏冿紝鏈緇堟敹鐩婅繕姣斾粬灝?1625-21375= 250鍏冦?br>榪欎釜鏁板兼鏈浣崇殑騫寸粓濂栨暟棰濅負24000錛屽洜姝よ繕鏄悜鑰佹澘鐢寵灝戠粰浣犲彂鐐瑰勾緇堝鍚с?

]]>
鐩綍鏂囦歡姣旇緝宸ュ叿 pythonhttp://www.shnenglu.com/xmli/archive/2009/05/04/81844.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 04 May 2009 10:15:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/04/81844.htmlhttp://www.shnenglu.com/xmli/comments/81844.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/04/81844.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/81844.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/81844.html
import sys, os, shutil
import hashlib

class FileHash(object):
    
    
def __hash_file(self, filepath):
        
if os.path.exists(filepath):
            m
= hashlib.md5()
            with open(filepath, 
'rb') as fin:
                
while True:
                    data
= fin.read(8096)
                    
if not data:
                        
break
                    m.update(data)
                
return m.hexdigest()
    
    
def compare_file(self, srcfile, destfile):
        src_md5
= self.__hash_file(srcfile)
        dest_md5
= self.__hash_file(destfile)
        isOk
= (src_md5==dest_md5)
        
return isOk

if __name__ == '__main__':
    file_hash
= FileHash()
    srcdir  
=r'E:\game'
    destdir 
=r'C:\game'
    
for root, dirs, files in os.walk(srcdir):
        
for filename in files:
            src_file_path   
= os.path.join(root, filename)
            dest_file_path  
= os.path.join(destdir, src_file_path[len(srcdir)+1:])
            
            cur_dest_dir
= os.path.split(dest_file_path)[0]
            
if not os.path.exists(cur_dest_dir):
                shutil.copytree(root, cur_dest_dir)
                
print('created dir:     %s'%cur_dest_dir)
            
elif not os.path.exists(dest_file_path) or not file_hash.compare_file(src_file_path, dest_file_path):
                shutil.copyfile(src_file_path, dest_file_path)
                
print('created file:    %s'%dest_file_path)
        






]]>
緗戠粶鏍℃椂銆pythonhttp://www.shnenglu.com/xmli/archive/2008/12/16/69582.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Tue, 16 Dec 2008 08:53:00 GMThttp://www.shnenglu.com/xmli/archive/2008/12/16/69582.htmlhttp://www.shnenglu.com/xmli/comments/69582.htmlhttp://www.shnenglu.com/xmli/archive/2008/12/16/69582.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/69582.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/69582.html銆銆浠g爜浼間箮涔熶笉鏄緢澶嶆潅錛屽熀浜巔ython 3.0---
import time
import urllib.request
import urllib.parse
import ctypes


SetSystemTime 
= ctypes.windll.kernel32.SetSystemTime
GetSystemTime 
= ctypes.windll.kernel32.GetSystemTime

class SYSTEMTIME(ctypes.Structure):
    c_ushort
= ctypes.c_ushort
    _fields_ 
=  (
                (
'wYear', c_ushort), 
                (
'wMonth', c_ushort), 
                (
'wDayOfWeek', c_ushort), 
                (
'wDay', c_ushort), 
                (
'wHour', c_ushort), 
                (
'wMinute', c_ushort), 
                (
'wSecond', c_ushort), 
                (
'wMilliseconds', c_ushort), 
                )
    
def __str__(self):
        
return '%4d%02d%02d%02d%02d%02d.%03d' % (self.wYear,self.wMonth,self.wDay,self.wHour,self.wMinute,self.wSecond,self.wMilliseconds)

def updateSystemTime():
    url
= 'http://www.baidu.com'
    
try:
        response
= urllib.request.urlopen(url)
        header
= response.info()
        date
=header['Date']
        gmt
=time.strptime(date[5:25], "%d %b %Y %H:%M:%S")
        st
=SYSTEMTIME(gmt.tm_year,gmt.tm_mon,gmt.tm_wday,gmt.tm_mday,gmt.tm_hour,gmt.tm_min,gmt.tm_sec,0)
        SetSystemTime(ctypes.byref(st))
        
print('緗戠粶鏍℃椂鎴愬姛錛?/span>')
    
except Exception as ex:
        
print(ex)
        
print('緗戠粶鏍℃椂澶辮觸')
        
return False
    
return True
def printCurTime():
    now
= time.localtime(time.time())
    
print('褰撳墠緋葷粺鏃墮棿:', time.strftime("%Y-%m-%d %H:%M:%S", now))
    
if __name__=='__main__':
    printCurTime()
    
if updateSystemTime():
        printCurTime()
  淇濆瓨鏂囦歡鍚嶄負updateTime.py錛屾斁鍏ユ煇涓郴緇熺洰褰曪紝鍦ㄥ懡浠よ涓祴璇曞涓嬶細

C:\>updatetime
褰撳墠緋葷粺鏃墮棿: 2009-12-16 16:51:11
緗戠粶鏍℃椂鎴愬姛錛?br>褰撳墠緋葷粺鏃墮棿: 2008-12-16 16:51:12

C:\>

銆涔嬪墠錛屾垜鏁呮剰鎶婃椂闂磋皟鏁村埌浜?009騫淬?br>
銆銆



]]>
国产精品久久久久天天影视| 青春久久| 亚洲国产成人久久综合碰碰动漫3d| 久久精品国产亚洲AV大全| 国产精品久久久天天影视| 久久精品成人一区二区三区| 久久无码国产专区精品| 99精品久久久久中文字幕| 久久精品亚洲乱码伦伦中文| 国产69精品久久久久9999APGF| 久久这里只有精品久久| 久久久黄色大片| a级毛片无码兔费真人久久 | 久久婷婷五月综合97色| 亚洲精品高清久久| 欧美一区二区三区久久综| 久久这里有精品视频| 国产精品视频久久久| 久久九九兔免费精品6| 精品久久久久久久中文字幕| 久久久久女人精品毛片| 伊人伊成久久人综合网777| 国产成人精品久久综合 | 国内精品久久久久久中文字幕| 亚洲国产精品无码久久一线 | 欧美亚洲另类久久综合| 99久久国产宗和精品1上映 | 久久久久久伊人高潮影院| 久久99精品久久久久久噜噜| 99久久精品国内| 2020久久精品国产免费| 久久国产精品77777| 久久er99热精品一区二区| 伊人久久大香线蕉综合影院首页 | 久久免费视频1| 伊人久久大香线蕉综合5g| 久久亚洲精品无码播放| 久久久久一级精品亚洲国产成人综合AV区 | 青青国产成人久久91网| 青青草原综合久久| 久久综合久久伊人|