鍍金池/ 問答
莫小染 回答

ele.addEventListener('touchmove', this.onTouchMove.bind(this))

帥到炸 回答

通過該規(guī)則的數據包和字節(jié)總數
http://bbs.chinaunix.net/thre...

兔寶寶 回答

不推薦使用cnpm,推薦用npm,npm config set registry http://registry.npm.taobao.org/這樣改完就不會很慢了。

離人歸 回答

你每次點擊顏色的屬性給后端發(fā)請求吧,彈框里面的數據肯定要從新賦值啊

孤星 回答

v-for后面的saleOrder里面的entrys是個數組嗎

尤禮 回答
為什么標題上有兩個DATE(1)
最終在/usr/share/groff/1.22.3/tmac/an-old.tmac層層定義的宏里找到了這行:
259 .de1 PT
260 .  tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
261 ..

編輯保存成

.  tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]' [Eureka!] \\*[an-title](\\*[an-section])'

再執(zhí)行

$ man date    

截圖留念

man date

參見文章:
為什么man page標題上有兩個 DATE(1)的追蹤過程

舊螢火 回答

reducers.js 處理后的數據無法返回

不二心 回答

沒寫過ng, 你看一下這么處理對嗎 ?
你寫的那個是返回一個promise 而不是函數結果
var myapp = angular.module("myapp", []);
myapp.controller("imgControl", ["$http", function ($http) {

var self = this;
    $http({
        method: "GET",
        url: "/api/avatar/"
    }).then(function (value) {
    this.src = value.data
    }, function (reason) {
        console.log(reason);
    })

}]);
<div ng-controller="srcControl as src">
<img ng-src="{{src.src}}">
</div>

歆久 回答

.then() 里面返回的值會經由 Promise.resovle 處理,然后決定其行為。

所以你每次都只是創(chuàng)建了 Promise 實例,但并沒有返回給 Promise 處理,相當于直接執(zhí)行下一個 .then(),不等待 Promise 的狀態(tài)改變。

所以你需要在 .then() 里面改成:return new Promise(....) 這樣。

關于 Promise 我之前做過一次講堂,講得非常詳細,推薦你看下:Promise 的 N 種用法。

執(zhí)念 回答
  1. 使用DBRef可以達到外鍵效果,但是你也可以通過設置關系字段來實現(xiàn)。
  2. MongoDB的_id是自增的——但不是整數自增。這里的自增只指MongoDB的_id原理確實與先后順序有關,但是由于類型是獨有的ObjectId,因此無法通過常規(guī)思路去處理。事實上ObjectId你可以當作是一個索引中的一個key,其對應的是一個timestamp。但是有個小小問題,在我的記憶里看過一篇文章,當文檔更新時,若文檔增長數據量超出原來的空間準備,那么這條數據會被刪除,而重新在集尾插入。但是我想,對于ObjectId而言是沒有什么影響的。實現(xiàn)整數自增,依然需要代碼邏輯實現(xiàn)。

    • 創(chuàng)建一個集合,專門記錄各集合的整數id高度,每次插入數據時使用記錄高度。
    • 新建字段作為自增id,插入前查詢最近數據的id,然后+1插入
  3. 自增用戶時增加一條訂單,MongoDB的事務實現(xiàn)我還沒有更好的頭緒,一般通過代碼邏輯去做。
舊螢火 回答

已經解決,在app.module.ts的imports里面刪除進行懶加載的模塊

// 懶加載
{
  path: 'set',
  loadChildren: 'app/setting/setting.module#SettingModule'
},
// app.module.ts
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    FormsModule,
    // 非懶加載模塊
    PopupModule,
    CoreModule,
    PipeModule,
    RoutesModule,
    CashRegisterModule,
    // 懶加載模塊
    // SettingModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

同時,在setting.route.module.ts里面path寫空:

// setting.route.module.t
@NgModule({
  imports:
    [
      RouterModule.forChild([
        {
          // path: 'set',
          path: '',
          component: SettingComponent
        }
      ])
    ],

  exports:
    [
      RouterModule
    ],

  providers:
    []
})
export class SettingRouteModule
{
}

原來的寫法其實并沒有實現(xiàn)懶加載,但是angular4不是出錯,但是在angular5就會提示懶加載的錯誤

放開她 回答
  1. 事件回調函數的this指向觸發(fā)事件的DOM節(jié)點;
  2. 普通函數的this與調用方式有關,一共有四種;
  3. fun()屬于普通函數調用,this指向window。
深記你 回答

問題解決了,iframe設置允許就可以了

To continue to use permissions from iframes on your website...
This deprecation is expected to ship in Chrome M64 (around January 2018). At that time, if a cross-origin iframe attempts to use permission without the feature being explicitly allowed, a console warning will be logged and the feature will fail in a similar way as it would if a user had denied a permission prompt.

If you are a developer of a website which uses cross-origin iframes and you want those iframes to continue to be able to request/use one of the above features, the page that embeds the iframe will need to be changed. The simplest way to do that is to modify the <iframe> tag to include an allow attribute which specifies the name of the permission. For example, to enable geolocation and mic/camera for an iframe, the following would be specified:

<iframe src="https://example.com" allow="geolocation; microphone; camera"></iframe>

Valid values for allow include:
geolocation
microphone
camera
midi
encrypted-media
Note that if the iframe which is using the permission has the same origin as the top level page, then no changes have to be made.

參考:https://sites.google.com/a/ch...

獨白 回答

可以嘗試下 pip install --no-dependencies jupyterthemes==0.18.2 更新到0.18.2版本
然后再換個主題試試 jt -t oceans16

亮瞎她 回答

你這個描述無法確認問題.

登陸后返回到登陸頁面 你這個數據是如何獲取到的? 還有你登陸時候你調試一下 文本框是否有值 等等

如果頁面顯示對應的手機還有密碼 但是登陸不成功 可能存在請求與數據存取先后的問題