鍍金池/ 問答/ Linux問答
浪婳 回答

pm2 start dev對應(yīng)的應(yīng)該是node dev
看看文檔PM2指令

情已空 回答

有一個建議哈,第一呢,可以用老版本的 vue-cli 來創(chuàng)建項目,它會自定給你分環(huán)境配置 webpack.config 文件,有 base production dev 等

然后再配置文件里面可以定義:(我猜你用的還不是 webpack4)

new webpack.DefinePlugin({
      'process.env.NODE_ENV': JSON.stringify('production')
    })

如果是 4 的話:配置 mode

module.exports = {
  mode: 'production'
}
莫小染 回答

有一個指令叫g(shù)it cherry-pick,就是合并指定你某次提交的內(nèi)容,但是只能替換你這里的merge,感覺也不能完全滿足你的需求。

所以,既然又要加入版本控制,又不希望合并,還是有點矛盾。

心癌 回答

clipboard.png
這里你要讓你的路由鏈繼續(xù)往下走

router.beforeEach((to, from, next) => {
    next()
})
墻頭草 回答

你是用循環(huán)來計算總價的嗎?你需要在每次循環(huán)的時候?qū)otal設(shè)置成0,這樣就沒問題了。

扯不斷 回答

你說不是就不是嘍

The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified crontab will be installed automatically. If neither of the environment variables is defined, then the default editor /usr/bin/editor is used.

在我的機器上的結(jié)果是

$ ls -al /usr/bin/editor

lrwxrwxrwx 1 root root 24 11月 25  2014 /usr/bin/editor -> /etc/alternatives/editor

$ ls -al /etc/alternatives/editor

lrwxrwxrwx 1 root root 16 1月  21  2016 /etc/alternatives/editor -> /usr/bin/emacs24

所以我機器上用的是emacs, 看看你的機器上是什么就知道了.


用`$ sudo update-alternatives --list editor` 查看本機器究竟有哪些editors,
/bin/ed
/bin/nano
/usr/bin/emacs24
/usr/bin/mcedit
/usr/bin/vim.basic
/usr/bin/vim.tiny

然后用sudo update-alternatives --set editor設(shè)置成你喜歡的.

入她眼 回答

刪除deployed,重新創(chuàng)建

夕顏 回答

http://blog.csdn.net/donggege...
這里是安裝的連接,有需要的自己去看下吧。

近義詞 回答

9點是會運行的,這個每隔3小時是從24小時中的0點算起的。 0,3,6,9,12,。。。這樣類推。
這里有例子:
linux的crontab中每隔一段時間是以什么為準(zhǔn)

短嘆 回答

clipboard.png

缺少fs-ext crypt3 這兩個模塊
install 上就不會報錯了

心悲涼 回答
responseClient(ctx,httpCode = 500, code = 3,message='服務(wù)端異常',data={}) {
        let responseData = {};
        responseData.code = code;
        responseData.message = message;
        responseData.data = data;
        ctx.status = httpCode;
        ctx.body = responseData;
    }

node.js用這個來封裝,不知道你用的是不是node.js

硬扛 回答

自己解決了,添加

module=EWP_OMS.wsgi:application

或者

wsgi-file = EWP_OMS/wsgi.py

另外把

pythonpath =/var/ EWP_OMS_ENV 這句

改成

virtualenv=/var/ EWP_OMS_ENV

就可以了

此外nginx可以設(shè)成

upstream oms {
        ip_hash;
        server 127.0.0.1:9000;
}
server {
    listen 80;
    server_name oms.ewp.com;
    location / {
        uwsgi_pass oms;
        include uwsgi_params;
        access_log /var/log/nginx/ewp_oms.access.log;
    }
    location /media  {
        alias /var/www/EWP_OMS/media;
    }
    location /static {
        alias /var/www/EWP_OMS/static;
}
}
冷咖啡 回答

先file_get_contents到網(wǎng)站html內(nèi)容,然后使用preg_match,preg_match_all匹配就可以了。為什么需要框架。
比如抓微信文章(我隨便敲的):

   $file = file_get_contents($url);
        $article = [];
        //文章標(biāo)題
        preg_match('/<title>(.*?)<\/title>/', $file, $title);
        $article[ 'title' ] = $title ? $title[ 1 ] : '';
        //文章正文
        preg_match('/<div class="rich_media_content " id="js_content">[\s\S]*?<\/div>/', $file, $content);
        
安于心 回答

mongoose還有updateOne()更新驗證器,在對數(shù)據(jù)庫數(shù)據(jù)進save行修改的時候會觸發(fā)的驗證

愿如初 回答

是的,源碼安裝步驟都是一樣的

久愛她 回答

2種情況:
1、還未push到遠程
此時可以先 git reset --HEAD CommitA
然后 git cherry-pick CommitC CommitD
PS:最好先將CommitC CommitD的ID copy 出來,方便操作。

2、已經(jīng)push到遠程
此時只能通過 git revert CommitB 處理了。