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

鍍金池/ 問答
萢萢糖 回答

先計算好一批偽隨機值放在Redis中,調(diào)用來了之后直接從Redis中返回?

黑與白 回答

let arr = [];
let arr2 = [];
for(let i = 0,j=0; i < arr.length; i++){

(j+1)*10 === i && j++
arr2[j].push(arr[i]);

}
瞎寫的

厭遇 回答

1.setAppends

在你需要的 controller 中,使用 Model 的 setAppends 方法,Laravel 源碼如下

/**
     * Set the accessors to append to model arrays.
     *
     * @param  array  $appends
     * @return $this
     */
    public function setAppends(array $appends)
    {
        $this->appends = $appends;

        return $this;
    }

2.使用 Eloquent: API 資源

綰青絲 回答

test列出的是你這樣,但你打印下test.obj看看發(fā)生了什么。

帥到炸 回答

個人感覺是關(guān)注點的問題
對于Set<String> set = new HashSet<>()這種,實際上Set是一個接口,對于接口來說是不關(guān)注這個對象到底是什么,無論是HashSet,TreeSet還是其他的。是面向接口編程思想的體現(xiàn)。
好處是,如果有一天你發(fā)現(xiàn)這個位置用HashSet不合適,需要修改為帶有排序功能的TreeSet,或者說需要改為線程安全的CopyOnWriteHashSet,只需要修改創(chuàng)建的方式就可以,不需要修改其他位置的代碼了。

枕頭人 回答

不好意思,寫完了才看清你的標(biāo)題是 保留最新時間的,你可以根據(jù)下面的思路改改

不太明白你所說的高效是指盡快完成需求呢還是從數(shù)據(jù)庫優(yōu)化的層面來說
如果盡快完成需求的話,試試這條sql
delete from table_name where id not in (select id from (select min(id) as id from table_name group by name, type) as t);

解釋:
① group by name, type 去重查詢
② select id from (select min(id) as id from table_name group by name, type) as t
這條sql中嵌套from子查詢是因為 mysql 不支持對同一個表查詢后做增刪改操作

假灑脫 回答

你訪問HTML頁面啊,訪問php有什么用

離殤 回答

http://tool.chinaz.com/Tools/...
在這里試試是否能解密

如果可以就使用上面那位兄弟的方法去弄,如果不行,證明encode有問題

使勁操 回答

你的make_pow返回的就是一個函數(shù),在JS中,函數(shù)也是對象,所以可以作為返回值。你要得到正確結(jié)果得這樣:

var pow2=make_pow(2);
console,log(pow2(3)); // 9

至于pow2為什么能夠保存n的值,則是涉及到閉包問題了。

命于你 回答

forEach會把你的函數(shù)多封裝一層,自然無法return

const findSelectedLabel = (items, name) => {
  for (let i = 0; i != items.length; ++i) {
    const item = items[i]
    if (item.name === name) {
      return item.label
    } else if (item.items && Array.isArray(item.items)) {
      const label = findSelectedLabel(item.items, name)
      if (label) {
        return label
      }
    }
  }
}

const label = findSelectedLabel(navItems, navName)
console.log(`find ${navName} -> ${label}`)
懶豬 回答

一串?dāng)?shù)字指什么?時間戳嗎?如果是時間戳的話要提前定義格式化函數(shù)formater,在寫入description={()=>this.formater(item.time)}

故人嘆 回答

最新的brew把php7.1的包名改了

php71 ? -> php@7.1 

試試用

brew install php@7.1
或
brew upgrade php@7.1
你好胸 回答

動態(tài)component <component :is="type"/>

安若晴 回答

1、正則匹配url后綴名,簡單,適用性差,答案樓上都是;
2、監(jiān)聽imgerror事件,不管后綴名什么樣,只要url放在imgsrc里能加載成功就算,適用性強;

let strArr = [
  "http://www.baidu.com",
  "https://static.segmentfault.com/v-5ab0701d/global/img/social-icons/icon-sn.svg",
  "https://sfault-avatar.b0.upaiyun.com/151/837/1518375183-54f135ef0d731_small"
];

function getPromises(src) {
  let img = document.createElement("img");
  img.src = src;
  return new Promise(function(resolve, reject) {
    img.onerror = () => {
      resolve(undefined);
    };
    img.onload = () => {
      resolve(src);
    };
  });
}

Promise.all(strArr.map(src => getPromises(src))).then(data => {
  console.log(data);
  //  [
  //   undefined,
  //   "https://static.segmentfault.com/v-5ab0701d/global/img/social-icons/icon-sn.svg",
  //   "https://sfault-avatar.b0.upaiyun.com/151/837/1518375183-54f135ef0d731_small"
  // ];
});

這里就把不能作為imgsrcurl置為undefined

愿如初 回答

clipboard.png

clipboard.png
文件---》首選項----》設(shè)置

當(dāng)你更改這里的信息發(fā)現(xiàn)字體沒有變時,很可能是你的文件里面已經(jīng)有了一個.vs文件,你需要刪除此文件,才能正確顯示想要的字體。

失心人 回答

可以使用比較 hacky 的方法:

def is_class_exists(class_name):

    if not class_name.isidentifier():
        return False

    try:
        return isinstance(eval(class_name), type)
    except NameError:
        return False
選擇 回答

https://caniuse.com/#feat=mpeg4

In Windows 7, the maximum supported resolution is 1920 × 1088 pixels for both software and DXVA decoding. MSDN).

在win7下,最大分辨率支持到1920x1088