你想用的話,就在那個(gè)successCallback里面用因?yàn)橹挥欣锩娌拍鼙WC有這個(gè)值。因?yàn)槭?strong>異步的
幫你把sh下下來了,你存下來試試看,我就估計(jì)你git clone的時(shí)候也會(huì)卡住。哈哈,到時(shí)候再找我吧。
main() {
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
BLUE="$(tput setaf 4)"
BOLD="$(tput bold)"
NORMAL="$(tput sgr0)"
else
RED=""
GREEN=""
YELLOW=""
BLUE=""
BOLD=""
NORMAL=""
fi
# Only enable exit-on-error after the non-critical colorization stuff,
# which may fail on systems lacking tput or terminfo
set -e
CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n"
exit
fi
unset CHECK_ZSH_INSTALLED
if [ ! -n "$ZSH" ]; then
ZSH=~/.oh-my-zsh
fi
if [ -d "$ZSH" ]; then
printf "${YELLOW}You already have Oh My Zsh installed.${NORMAL}\n"
printf "You'll need to remove $ZSH if you want to re-install.\n"
exit
fi
# Prevent the cloned repository from having insecure permissions. Failing to do
# so causes compinit() calls to fail with "command not found: compdef" errors
# for users with insecure umasks (e.g., "002", allowing group writability). Note
# that this will be ignored under Cygwin by default, as Windows ACLs take
# precedence over umasks except for filesystems mounted with option "noacl".
umask g-w,o-w
printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n"
hash git >/dev/null 2>&1 || {
echo "Error: git is not installed"
exit 1
}
# The Windows (MSYS) Git is not compatible with normal use on cygwin
if [ "$OSTYPE" = cygwin ]; then
if git --version | grep msysgit > /dev/null; then
echo "Error: Windows/MSYS Git is not supported on Cygwin"
echo "Error: Make sure the Cygwin git package is installed and is first on the path"
exit 1
fi
fi
env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
printf "Error: git clone of oh-my-zsh repo failed\n"
exit 1
}
printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n"
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NORMAL}\n";
mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh;
fi
printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n"
cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
sed "/^export ZSH=/ c\\
export ZSH=$ZSH
" ~/.zshrc > ~/.zshrc-omztemp
mv -f ~/.zshrc-omztemp ~/.zshrc
# If this user's login shell is not already "zsh", attempt to switch.
TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then
# If this platform provides a "chsh" command (not Cygwin), do it, man!
if hash chsh >/dev/null 2>&1; then
printf "${BLUE}Time to change your default shell to zsh!${NORMAL}\n"
chsh -s $(grep /zsh$ /etc/shells | tail -1)
# Else, suggest the user do so manually.
else
printf "I can't change your shell automatically because this system does not have chsh.\n"
printf "${BLUE}Please manually change your default shell to zsh!${NORMAL}\n"
fi
fi
printf "${GREEN}"
echo ' __ __ '
echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ '
echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '
echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '
echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '
echo ' /____/ ....is now installed!'
echo ''
echo ''
echo 'Please look over the ~/.zshrc file to select plugins, themes, and options.'
echo ''
echo 'p.s. Follow us at https://twitter.com/ohmyzsh.'
echo ''
echo 'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.'
echo ''
printf "${NORMAL}"
env zsh
}
main
round( 1503.8700000000001, 2)
對你需要設(shè)精度的列遍歷就行了
你應(yīng)該把請求的Accept設(shè)置成application/octet-stream.
這其實(shí)有的奇怪, 因?yàn)橐话闱闆r下 Excel 文件的 Accept 是application/vnd.ms-excel.
但是由于 flasgger 是使用 swagger-ui 作為前端, 而 Swagger 發(fā)送文件類請求是使用 superagent, 使用的是 blob 技術(shù), 需要設(shè)置 xhr 的 ResponseType 為blob.
我們看flasgger_static/lib/http.js:
if(this.binaryRequest(accept)) {
r.on('request', function () {
if(this.xhr) {
this.xhr.responseType = 'blob';
}
});
}
SuperagentHttpClient.prototype. binaryRequest = function (accept) {
if(!accept) {
return false;
}
return (/^image/i).test(accept)
|| (/^application\/pdf/).test(accept)
|| (/^application\/octet-stream/).test(accept);
};
只在 Accept 匹配為image/i,/^application\/pdf/,/^application\/octet-stream/, 才將 responseType 設(shè)置成 blob
所以要么將/^application\/vnd.ms-excel/這個(gè)匹配加入http.js, 要么將發(fā)送的請求全部設(shè)置成application/octet-stream.
也就是這樣設(shè)置produces:app.py:
@app.route('/excel')
def excel():
"""
---
produces:
application/octet-stream
responses:
200:
description: description_text
schema:
type: file
"""
save_path = 'demo.xls'
response = make_response(send_file(save_path))
response.headers['Content-Disposition'] = 'attachment; filename=demo.xls'
return response
比如現(xiàn)在的目錄結(jié)構(gòu):
demo.py:
apidocs頁面:
這個(gè)input標(biāo)簽android端實(shí)現(xiàn)邏輯為瀏覽器自定義的,瀏覽器如果沒有實(shí)現(xiàn)無法兼容,很多瀏覽器沒有去實(shí)現(xiàn),不存在可以兼容的情況。
為什么要用16進(jìn)制呢,整數(shù)類型肯定是最適合用作主鍵的,還可以設(shè)為自增;
千萬別用varchar類型的主鍵,insert和一些select會(huì)變慢。
我也遇到同樣的問題,請問樓主解決了嗎,如何解決的?
雖然沒有在網(wǎng)上查到具體setup file具體作用,但是在github中通過下載一下別人的測試包會(huì)發(fā)現(xiàn),setup.js多是包含了執(zhí)行測試腳本前的準(zhǔn)備工作
例如: mocha --compilers js:babel-core/register --require ./test/setup.js
setup.js中的代碼為
`import jsdom from 'jsdom';
if (typeof document === 'undefined') {
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = document.defaultView;
global.navigator = global.window.navigator;
}
`
以上均是個(gè)人猜測,希望可以幫到你
你循環(huán)slide的時(shí)候應(yīng)該是從一個(gè)對象的屬性里面拿的,比如
data.xxx.classList
在你取數(shù)據(jù)的生活,data應(yīng)該是一個(gè)空對象,并沒有屬性'xxx',swiper循環(huán)的時(shí)候xxx是undefined,所以從undefined中取classList會(huì)報(bào)錯(cuò)
你需要在data里面直接定義一個(gè)classList
data(){
return {
classList:[]
}
}
之后將異步取回的關(guān)于swiper的字段單獨(dú)賦值給classList
之后從classList中循環(huán)即可
最后的解決辦法是調(diào)整swipe()里面的t取值為140左右可以滑倒比較后面。但是要滑到底部還是不夠
顯然要檢查你的canWriteStorage方法的實(shí)現(xiàn)
你數(shù)組里面別就存?zhèn)z名字了,你存一個(gè)對象{重慶:[]},{貴陽:[]},賦值的時(shí)候就找對應(yīng)的賦值,那就不會(huì)錯(cuò)了啊
在windows系統(tǒng)下,我更推薦打開ftp,然后通過FreeFileSync這類同步軟件操作。這個(gè)軟件比一些單純的FTP軟件更加可視及可控。
可以使用官方推薦的nextTick 函數(shù)來執(zhí)行拖曳后的回調(diào) 官方文檔:https://cn.vuejs.org/v2/api/#...
php掛了??纯词遣皇莾?nèi)存泄露。
node開發(fā)服務(wù)器端的話,不如用go或java,后者都有比較合適的分布式組件。而且穩(wěn)定和性能都是經(jīng)過考驗(yàn)的。
on:{
click:function(e){}
} 這里的函數(shù)需要把this傳參進(jìn)去 或者在外面 let _this = this 里面用_this
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國成功上市,融資1
北大課工場是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國家深化產(chǎn)教融合/校企合作的政策,積極推進(jìn)“中國制造2025”,實(shí)現(xiàn)中華民族偉大復(fù)興的升級(jí)產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。