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

鍍金池/ 問答
薔薇花 回答

看看這個provider最后解析出來的是什么,RedisServiceProvider最后解析出來的是RedisManager,所有和redis交互的方法都在這個manager里面

別傷我 回答

PC端不會嗎?試過z-index了嗎?不行的話放到iframe里再設(shè)置z-index試試。也可以嘗試更換瀏覽器,可能有的手機瀏覽器會對<video>做特殊處理。

墨染殤 回答

你的代碼省略掉了關(guān)鍵部分,這個刪除應(yīng)該有網(wǎng)絡(luò)異步請求。頁面卸載了,執(zhí)行setState當然報錯

朕略傻 回答
var fetch = require('node-fetch');

async function gen () {
  let url = 'https://api.github.com/users/github';
  let result = await fetch(url);
  let json = await result.json();
  console.log(json);
}

gen()
  .then(json => console.log(json));

非要用 generator 的話,根據(jù)它的原理,必須修改 gen 函數(shù):

function* gen () {
  let url = 'https://api.github.com/users/github';
  let result = yield fetch(url);
  console.log(result);
}

const gened = gen();
let result = gened.next();
result.value.then(fetch => fetch.json())
  .then(json => {
    gened.next(json);
  });

此段代碼可以在阮一峰的 ES 異步任務(wù)的封裝 中找到。

淺時光 回答

用flex布局可以解決這個問題

跟你一樣的div結(jié)構(gòu),為了便于看清和區(qū)分,里面寫了字母。樣式里每個div都加了背景色。完整代碼如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Title</title>
</head>
<style>
    body {
        margin: 0;
    }

    .contain {
        background: gray;
        height: 400px;
        display: flex;
        flex-direction: column;
    }
    .A {
        background: red;
    }
    .B {
        background: yellow;
        flex-grow: 1;
    }
    .C {
        background: blue;
    }
</style>
<body>
<div class="contain">
    <div class="A">a</div>
    <div class="B">b</div>
    <div class="C">c</div>
</div>
</body>
</html>

運行效果如下:

image-20180605144241659

下面白色的部分是網(wǎng)頁的空白部分。可以看出,已經(jīng)實現(xiàn)了你要的效果。A B C我都沒有給高度,B的高度是自動填滿contain的,所以壓根看不到contain的灰色。

你可以復(fù)制代碼自己運行一下,在瀏覽器里隨意的改contain、A、C的高度,不管怎么改,B都會自動填充。

如果解決了你的問題,給我個采納吧!

安淺陌 回答

要自定義一個消息協(xié)議,里面有消息類型,例如這樣:

{
  type: "message_type",
  data: "message_data"
}

然后根據(jù)type分發(fā)。

呆萌傻 回答

事件委托,判斷當前點擊的對象e.target的值...或者你給標簽綁定個標識符的屬性,class或者attribute,通過這個來判斷。暫時想到這么多。li放到ul里會合適點吧?

尋仙 回答

問題出在合并scss文件的過程,我想把所有scss文件合并,只能在js入口文件里import么?
不是只能在入口文件import,可以在所有會打包進去的文件中進行import,scss文件中也可以import
只要保證scss文件有使用到,一條鏈下來都會打包進去的

青檸 回答

為啥不用一個表搞定 user_id(用戶id),msg(消息)....(其他字段),is_read(是否已讀)。
全部消息:user_id = XXX
未讀:user_id=XXX and is_read = 0
已讀:user_id=XXX and is_read = 1
一鍵忽略: update is_read = 1 where user_id=XXX and is_read = 0

扯不斷 回答

SELECT emp.name,test.desc FROM emp ,test ORDER BY name

澐染 回答

宿主機的防火墻忘記關(guān)了,導(dǎo)致虛擬機ping不通宿主機...

爆扎 回答

既然你了解了引用折疊, 我相信你也應(yīng)該知道了forward就是一簡單的static_cast<T&&>t.

此函數(shù)void process(T&& t)是有問題的, 它依舊是一個universal reference/forwarding reference , 只有void process(int&& t)這樣明確是右值引用你才能稱作rv, 對吧. 所以先改下函數(shù)并簡化代碼:

template <typename T> void process(const T& t) { cout << "const T&" << endl; }
template <typename T> void process(T&& t)      { cout << "T&&" << endl; }
void test(...) { process(...) ;}

因為forward只是一個轉(zhuǎn)發(fā)(從上面的實現(xiàn)配合引用折疊也是很好理解的), 并且能保留原有的ref-qualifier和const-qualifier, 所以被稱作完美轉(zhuǎn)發(fā), 因此你可以把test里面的process繼續(xù)簡化掉:

int non_const_a = 1;
int const const_a = 1; 
template <typename T> void process(const T& t) { cout << "const T&" << endl; }
template <typename T> void process(T&& t)      { cout << "T&&" << endl; }
test(1); // T&&
test(non_const_a); // T&&
test(const_a); // const T&

有沒有發(fā)現(xiàn)什么? 整個過程其實就是簡化成左值, 右值, 加上const-qualifier對process的函數(shù)重載決議了.

無論T&&還是const T&都和標題中的forward, 右值引用沒什么關(guān)系了

這下應(yīng)該明白了吧? 只有const的左值才會匹配const T&, 其他都會匹配T&&. 很明了的一個重載決議.


繼續(xù), 可能OP會想, 如果我這么重載呢?

template <typename T> void process(const T& t) { cout << "const T&" << endl; }
template <typename T> void process(const T&& t)      { cout << "T&&" << endl; }

都有const呀, 此時該怎么辦呢? 編譯器是不是就gg了?

clipboard.png

簡單的說, 此時const T&&不再是人見人愛花見花開的, forwarding reference, 因為有了const-qualifier, 所以退化成了rvalue-reference了. g(i)妄想傳個左值進去不是作么. 比如這樣的例子:

void f(int&& a) {} 
int main()
{
    int a = 1;
    f(a);
}

prog.cc:5:12: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'

 f(a);

有了以上鋪墊, OP是不是能想出之前提的問題:

#include <utility>
#include <iostream>

using std::cout;
using std::endl;

template
<typename T>
void process(const T& t)
{
    cout << "const T&" << endl;
}

template
<typename T>
void process(const T&& t)
{
    cout << "const T&&" << endl;
}

template
<typename T>
void test(T&& t)
{
    process(std::forward<T>(t));
}

int main()
{
    int a = 1;
    const int const_a = 1;
    test(1);
    test(a);
    test(const_a);
}
const T&&
const T&
const T&

可見只有右值1匹配了const T&&, 畢竟人家只能匹配右值嘛, 也是應(yīng)該的.

若相惜 回答

你的CDplayer類在容器里注冊了嗎?在XML里聲明或者利用componentscan注解。

憶往昔 回答

首先,你的線程要用線程池來進行管理
其次,就可以協(xié)議個守護進程,用來監(jiān)控這個進程池的線程數(shù)和每一個線程是否存活(應(yīng)該是isAlive屬性)。
如果掛起了,就記錄在隊列中,可以把一些線程的參數(shù)都記錄進去,放棄重啟。
最后,按照記錄的死掉進程重新在線程池中建立。

ps.隨便寫點,抱歉沒有代碼提供。

青裙 回答

angularJS會對html頁面進行重構(gòu),對他認為不安全的鏈接會在其前加前綴“unsafe:”,用下這個可以對其屏蔽,注意函數(shù)頭引入$compileProvider

$compileProvider.aHrefSanitizationWhitelist(/^s*(https?|ftp|mailto|tel|file|sms):/);

生性 回答

baseurl可以被覆蓋,在你需要改寫的頁面里調(diào)用axios的時候傳個config對象

青黛色 回答

把history模式去掉