你這curl調(diào)用接口返回得是json數(shù)據(jù)吧?
你要先把這個(gè)json數(shù)據(jù)轉(zhuǎn)換成數(shù)組或者對(duì)象才能循環(huán)呀
json_decode
對(duì)json格式得字符串進(jìn)行解碼。
$_SERVER['REMOTE_ADDR']
1.啥叫浪費(fèi)了呢?可以給dialog加v-if指令來(lái)控制要不要繪制dialog啊
2.也可以只寫(xiě)一個(gè)dialog,dialog里的內(nèi)容根據(jù)邏輯來(lái)判斷顯示哪個(gè),但是這樣的話邏輯會(huì)比較復(fù)雜
你可以在cli 模式下,沒(méi)有限制超時(shí)鏈接
但我把mounted改成created的時(shí)候會(huì)報(bào)Cannot read property 'appendChild' of null"
這是因?yàn)閏reated的時(shí)候,Dom節(jié)點(diǎn)還沒(méi)有渲染出來(lái)到頁(yè)面上,這個(gè)時(shí)候是找不到id=wave的DIV的。
改成Vue的插件
import wavePng from './wave.png'
export default {
install(Vue){
Vue.directive('wave', {
inserted: function(el){
start(el)
}
})
}
}
var ctx;
var waveImage;
var canvasWidth;
var canvasHeight;
var needAnimate = false;
function init (callback, wave) {
// var wave = document.getElementById('wave');
var canvas = document.createElement('canvas');
if (!canvas.getContext) return;
ctx = canvas.getContext('2d');
canvasWidth = wave.offsetWidth;
canvasHeight = wave.offsetHeight;
canvas.setAttribute('width', canvasWidth);
canvas.setAttribute('height', canvasHeight);
wave.appendChild(canvas);
waveImage = new Image();
waveImage.onload = function () {
console.log('000')
waveImage.onload = null;
callback(wave);
}
waveImage.src = wavePng;
}
function animate () {
var waveX = 0;
var waveY = 0;
var waveX_min = -203;
var waveY_max = canvasHeight * 0.7;
var requestAnimationFrame =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (callback) { window.setTimeout(callback, 1000 / 60); };
function loop () {
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
if (!needAnimate) return;
if (waveY < waveY_max) waveY += 1.5;
if (waveX < waveX_min) waveX = 0; else waveX -= 3;
ctx.globalCompositeOperation = 'source-over';
ctx.beginPath();
ctx.arc(canvasWidth/2, canvasHeight/2, canvasHeight/2, 0, Math.PI*2, true);
ctx.closePath();
ctx.fill();
ctx.globalCompositeOperation = 'source-in';
ctx.drawImage(waveImage, waveX, canvasHeight - waveY);
requestAnimationFrame(loop);
}
loop();
}
function start (el) {
console.log(1)
if (!ctx) return init(start, el);
needAnimate = true;
setTimeout(function () {
if (needAnimate) animate();
}, 500);
}
function stop () {
needAnimate = false;
}
上述的代碼,把原先插件的閉包去掉了,因?yàn)檫@個(gè)改成vue的插件webpack打包完本身就是一個(gè)閉包了。
然后使用的話,就用指令的形式
<template>
<div id="wave" class="wave" v-wave><span>60%</span></div>
</template>
<script>
import wave from './a'
export default {
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.wave{width:200px;height:200px;overflow:hidden;border-radius:50%;background:rgba(255,203,103,.6);margin:100px auto;position:relative;text-align:center;display:table-cell;vertical-align:middle;}
.wave span{display:inline-block;color:#fff;font-size:20px;position:relative;z-index:2;}
.wave canvas{position:absolute;left:0;top:0;z-index:1;}
</style>
main.js
import Vue from 'vue'
import App from './App'
import router from './router'
import wave from './components/a'
Vue.config.productionTip = false
Vue.use(wave)
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})
這樣就可以了。
你不想添加的文件可以在項(xiàng)目文件下創(chuàng)建.gitignore文件,然后在里面添加你不需要add的文件名。
git add . 添加不在.gitignore文件里面的所有修改文件
在windows系統(tǒng)下,我更推薦打開(kāi)ftp,然后通過(guò)FreeFileSync這類(lèi)同步軟件操作。這個(gè)軟件比一些單純的FTP軟件更加可視及可控。
不如去網(wǎng)吧。。
我嘗試寫(xiě)了一下,你看一下對(duì)不對(duì)
ip=$1
mask=$2
out=''
for index in {1..4}; do
si=$(echo $ip | cut -d "." -f $index)
sm=$(echo $mask | cut -d "." -f $index)
if [ $index -ne 1 ]
then
out="$out."
fi
out="$out$[$si&$sm]"
done
echo $out
可以看看 github page官方文檔,挺詳細(xì)的
大致意思就是你 添加一條CNAME記錄,到你的 domain
# 栗子:
blog.flxxyz.com 3592 IN CNAME flxxyz.github.io.
希望能幫到你(?????????)?
類(lèi)似下面這樣的
label.el-radio {
.el-radio__label {
display: none;
}
}
label.el-radio.is-checked {
.el-radio__label {
display: inline;
}
}
我也實(shí)在不知道怎么處理,卸載了從新安裝好了,提供給后來(lái)人參考
檢查代碼,看看是哪個(gè)數(shù)組使用有問(wèn)題,比如一直在push但沒(méi)有清空之前的數(shù)據(jù)這種。
url encode
import.json文件有多大?一些建議:
1.數(shù)據(jù)庫(kù)參數(shù)需要優(yōu)化
shared_buffers, max_connections, maintenance_work_mem, effective_cache_size, sync, commit_delay , commit_siblings ,checkpoint_segments, wal_buffers, wal_writer_delay,
2. 是不是可以先處理下文件,按照COPY的文件格式格式化好,再用cppy命令導(dǎo)入,或者外部表,但處理文件也會(huì)稍微麻煩些
ln -s /root/xxxx/pm2 /usr/local/bin
創(chuàng)建個(gè)軟鏈接就好了
更新下內(nèi)核試試
node的環(huán)境變量配一下
北大青鳥(niǎo)APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專(zhuān)業(yè)的國(guó)家
北大青鳥(niǎo)中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開(kāi)發(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ū)ο箝_(kāi)發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開(kāi)發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開(kāi)發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開(kāi)發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。