在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答
傻丟丟 回答

我換了種做法,

每種查詢類命令比如 ps/ss, 查詢后, 一般都是做grep 操作

我們限制用戶執(zhí)行的命令種類, 比如 ps/ss, 用戶post時(shí), 選擇執(zhí)行的命令類型,
并只能添加過濾關(guān)鍵字, 格式類似于

<cmd> key1 key2 key3

依次校驗(yàn) key1..., 限制key只能是單詞或包含有限的特殊字符, 拼接執(zhí)行時(shí)不會(huì)對(duì)系統(tǒng)產(chǎn)生影響的,
這類校驗(yàn)就比較簡單了, 一個(gè)正則就可以確定,

如下

word_re = re.compile(r'([a-zA-Z0-9\.]+)')

greps = []
for key in keys:
    matches = word_re.findall(key)
    # key 包含特殊字符
    if len(matches) == 0 or len(matches) > 1 or matches[0] != key:
        return send_msg(from_user, f'進(jìn)程關(guān)鍵字包含特殊字符: {key}')
    greps.append(f'grep -i {key}')

cmd = f'ps -ef | {"|".join(greps)}'

在拼接命令后, 最終的執(zhí)行格式如下

ps -ef | grep key1 | grep key2 | grep key3

這樣就達(dá)到了在用戶post關(guān)鍵字后校驗(yàn)命令僅會(huì)查詢, 不會(huì)對(duì)系統(tǒng)產(chǎn)生影響

款爺 回答

如果是在一個(gè)Form組件里面,可以使用this.props.form.resetFields()全部清空

裸橙 回答
onClickRow: function (row) {
    console.log(row);          
},

在你點(diǎn)擊的時(shí)候就知道了整行數(shù)據(jù) 至于你編輯后的那條數(shù)據(jù)需要你自己去寫blur事件獲取

冷咖啡 回答

wangEditor 不需要自動(dòng)聚焦到富文本
目前不支持這個(gè)配置,你先手動(dòng)刪掉這一行 https://github.com/wangfupeng...

this.selection.restoreSelection();這一行

巫婆 回答

一般像django和java的hibernate有些相似,它并不會(huì)走捷徑。而在真實(shí)情況下自己寫sql,就可以簡化sql。而是查詢他需要把對(duì)象轉(zhuǎn)sql,返回在把sql轉(zhuǎn)對(duì)象,其實(shí)就跟電腦一樣,它是一個(gè)好學(xué)生,但是它并不聰明,只是你教會(huì)它怎么做,它會(huì)重復(fù)做你教它的事,你沒教它就不會(huì)。
順便放兩組,查看執(zhí)行sql的方法,多讀讀官方的文檔,它會(huì)告訴你為什么的

print Province.objects.all().query
from core.models import Province
from django.db import connection
p = Province(name=u'河南', code='0371')
p.save()
舊顏 回答

return $this->hasOne('admin_group','admin_id','id');
忘了加上了

司令 回答

多看文檔:里面有一句話注意:series.tooltip 僅在 tooltip.trigger 為 'item' 時(shí)有效。

在這個(gè)官網(wǎng)的例子中,series.tooltip.trigger未設(shè)置,所以會(huì)以option.tooltip.trigger為準(zhǔn),option.tooltip.trigger 為 'axis',所以series.tooltip.formatter并沒有執(zhí)行,執(zhí)行的是option.tooltip.formatter,也就是默認(rèn)的格式。

所以這個(gè)例子中你需要為series.tooltip添加一個(gè)屬性trigger: 'item',就可以了

終相守 回答

由于不熟悉linux,
都是在windows下編輯文件在ssh 傳過去

這里我用的編輯器 回車鍵 不是單純的"0A"而是"0A0D"混入了"0D"導(dǎo)致linux 腳本識(shí)別錯(cuò)誤。

枕邊人 回答

在地圖上倒好做了,德高百度啥的直接有現(xiàn)成的接口,設(shè)定路徑就行了。

礙你眼 回答

區(qū)別很大,第一種創(chuàng)建一個(gè)myTest對(duì)象,第二種兩個(gè),第二種使用synchronized (this)無法鎖住同步代碼塊.

殘淚 回答

需要使用事務(wù)需要繼承AbstractTransactionalJUnit4SpringContextTests類,或者不繼承類
而不是繼承AbstractJUnit4SpringContextTests。

clipboard.png
nginx訪問靜態(tài)文件和uwsgi是沒啥關(guān)系的,都是一樣的配制方法.無論用gunicorn還是uwsgi都是這么配置.
這是我隨手截圖的寫法,用的是root,
按照alias寫法,就要在下邊的路徑加上/static/
你看看加上尾部的/行不行.

還有就是nginx是否有權(quán)限訪問你的文件目錄的問題.看一下nginx運(yùn)行的用戶是誰

耍太極 回答

因?yàn)閱栴}已經(jīng)更正,答案也更新一下:
借助grep和sed可以解決你的問題

echo 'AAA=<?=\${AAA}=?>' | grep -E '<[?%]=.*=[?%]>' | sed 's/\\\$/$/g' | sed 's/<[?%]=//g' | sed 's/=[?%]>//g'

以上,返回 AAA=${AAA}, 同樣,上述語句也適用于<%=[ "\${Alias}" == "" ]=%>的解析。

厭惡我 回答

和 nginx 沒關(guān)系也做不到,在 img 添加 onerror 事件即可
大概如下所示

function nofind(){ 
    var img=event.srcElement; 
    img.src="/images/default.png"; 
    img.onerror=null; 控制不要一直跳動(dòng) 
} 
<img src="https://www.baidu.com/files/vender_pic/24115.png" onerror="nofind();" />
純妹 回答

自問自答了....

final static int threadNum = 3; //線程數(shù)
static CountDownLatch countDownLatch = null;
@Override
public synchronized void staticizeIndexBySubsites(List<Integer> subsiteIds) throws Exception{
    if(CollectionUtils.isNotEmpty(subsiteIds)){
        countDownLatch = new CountDownLatch(threadNum);
        int length = subsiteIds.size();
        int tl = length % threadNum == 0 ? length / threadNum : (length/ threadNum + 1);
        for (int i = 0; i < threadNum; i++) {
            int end = (i + 1) * tl;
            HandleThread thread = new HandleThread(subsiteIds, i * tl, end > length ? length : end);
            thread.start();
        }
        countDownLatch.await();
    }
}

class HandleThread extends Thread {
    private List<Integer> data;
    private int start;
    private int end;
    public HandleThread(List<Integer> data, int start, int end) {
        this.data = data;
        this.start = start;
        this.end = end;
    }

    @Override
    public void run() {
        long startTime = System.currentTimeMillis();
        List<Integer> subList = data.subList(start, end);
        for(Integer item:subList){
            staticizeIndexBySubsite(item);
        }
        countDownLatch.countDown();
        System.out.println("線程:"+Thread.currentThread().getId()+"消費(fèi)了"+subList.size()+"個(gè)分站,耗時(shí):"+((System.currentTimeMillis() - startTime)/1000) + "s");
    }
}
傻叼 回答
  1. 后臺(tái)導(dǎo)出(不符合你的要求)
  2. 添加toolbox的數(shù)據(jù)視圖組件

clipboard.png

clipboard.png

    toolbox:{show:true,feature:{dataView:{show:true}}},

復(fù)制到excel即可

心夠野 回答

因?yàn)?better-scroll 計(jì)算高度是不包含 margin 的,你可以在 wrapper 層使用 margin。內(nèi)部建議用 padding。

萌吟 回答

swiper4的寫法已經(jīng)換成:

on:{
    slideChangeTransitionEnd: function(){
      alert(this.activeIndex);//切換結(jié)束時(shí),告訴我現(xiàn)在是第幾個(gè)slide
    },
    touchMove: function(event){
      //你的事件
    }
}

詳情看:Swiper4的API變化

胭脂淚 回答

我現(xiàn)在的做法是:
v-for 循環(huán) 、

v-for idex in number 
<component ref="xx"> </component>   

然后初始化這個(gè)number為1,添加按鈕動(dòng)態(tài)改變這個(gè)number的值
數(shù)據(jù)獲取用ref,js中用this.$refs獲取
this.$refs.xx[number-1].something