新聞中心
這篇文章主要介紹“如何實現(xiàn)基于最新構(gòu)建工具鏈以一個頁面路由框架發(fā)布為主線”,在日常操作中,相信很多人在如何實現(xiàn)基于最新構(gòu)建工具鏈以一個頁面路由框架發(fā)布為主線問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”如何實現(xiàn)基于最新構(gòu)建工具鏈以一個頁面路由框架發(fā)布為主線”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!
成都創(chuàng)新互聯(lián)公司堅持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:網(wǎng)站設(shè)計、網(wǎng)站制作、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時代的普寧網(wǎng)站設(shè)計、移動媒體設(shè)計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
技術(shù)要求
Android基礎(chǔ)知識
Android Studio等開發(fā)工具的基本使用
環(huán)境參數(shù)
技術(shù)語言:Groovy/Java/Kotlin
Android: 10.0+開發(fā)平臺:Mac
IDE:Android Studio 4.0+Gradle:6.0+
Android Gradle Plugin: 4.1.0+
coding=UTF-8
XingHe Studio File to MD5 and SHA1
銀河創(chuàng)作室(XingHeStudio.com)
Create by Stream.Wang 2012-04-10
Modify by Stream.Wang 2012-04-10
def fil_changefileext(filename,extname=''):
FIL ChangeFileExt 改動文件擴展名
filename 輸入的文件途徑名
extname='' 要更改分?jǐn)U展名,如 .txt
import os
try:
if extname[0]<>'.':
extname='.'+extname
except:
extname=''
if os.path.splitext(filename)[1]=='':
uouttxt=filename+'.'+extname
elif os.path.splitext(filename)[1]=='.':
uouttxt=filename+extname
else:
uouttxt=filename[:0-len(os.path.splitext(filename)[1])]+extname
return uouttxt
def fil_str2file(fstr,filename):
FIL STR2File 把字符串保管到文件
try: outfile=open(filename,'w') outfile.writelines(fstr) outfile.close() return True except: return False
係統(tǒng)主程序開端
if name == 'main':
import os,sys,math
if len(sys.argv)==1:sys.argv.append(r'c:\FreeNAS-8.0.4-RELEASE-x64.iso')
if len(sys.argv)>1:
filepathname=sys.argv[1]
if os.path.isfile(filepathname) :
fmaxs = os.path.getsize(filepathname)+0.00
fpos = 0.00
ppos=0
pmax=50
pjy=0
fmd5=fil_changefileext(filepathname,'.md5')
fsha1=fil_changefileext(filepathname,'.sha')
ffm=os.path.basename(filepathname)
開端處置
print 'Program Runing "'+filepathname+'" ...'
import hashlib
try:
umd5str = hashlib.md5()
usha1str = hashlib.sha1()
xfilepathname=unicode(filepathname,'utf8')
需求運用二進製格式讀取文件內(nèi)容
ufile = file(xfilepathname,'rb')
while True:
datas = ufile.read(1024512)
if not datas: break
umd5str.update( datas )
usha1str.update( datas )
fpos=fpos+1024512
ppos=int(math.floor(fpos / fmaxs 50))
pposbfh=int(math.floor(fpos / fmaxs 100))
打印進度條
if pjy<>ppos: print '['+''ppos +'='(pmax-ppos)+'] '+str(pposbfh) +'%'
打印進度問題未處理,不曉得print函數(shù)怎樣退回到行首掩蓋輸出,不換行我倒是曉得,加個“,”
pjy=ppos
uoutstrmd5=str(umd5str.hexdigest())
uoutstrsha1=str(usha1str.hexdigest())
ufile.close()
print ''
fil_str2file(uoutstrmd5+' '+ffm+'\n',fmd5)
fil_str2file(uoutstrsha1+' *'+ffm+'\n',fsha1)
print 'Task is completed !' + r' [ XingHe Studio File to MD5 and SHA1 ]'
except:
print 'Error !' + r' [ XingHe Studio File to MD5 and SHA1 ]'
else:
print 'File "'+filepathname+'" not exist!'+ r' [ XingHe Studio File to MD5 and SHA1 ]'
else:
print r' [ XingHe Studio File to MD5 and SHA1 ]'http://www.0398hfyy.com
到此,關(guān)于“如何實現(xiàn)基于最新構(gòu)建工具鏈以一個頁面路由框架發(fā)布為主線”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
當(dāng)前標(biāo)題:如何實現(xiàn)基于最新構(gòu)建工具鏈以一個頁面路由框架發(fā)布為主線
文章分享:http://www.ef60e0e.cn/article/pjohjo.html