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

鍍金池/ 問答/ 網(wǎng)絡(luò)安全問答
逗婦惱 回答

找到相關(guān)的源碼了,雖然看不懂:

static PyObject *
gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing)
{
    PyThreadState *tstate = PyThreadState_GET();
    PyFrameObject *f = gen->gi_frame;
    PyObject *result;

    if (gen->gi_running) {
        const char *msg = "generator already executing";
        if (PyCoro_CheckExact(gen)) {
            msg = "coroutine already executing";
        }
        else if (PyAsyncGen_CheckExact(gen)) {
            msg = "async generator already executing";
        }
        PyErr_SetString(PyExc_ValueError, msg);
        return NULL;
    }
    if (f == NULL || f->f_stacktop == NULL) {
        if (PyCoro_CheckExact(gen) && !closing) {
            /* `gen` is an exhausted coroutine: raise an error,
               except when called from gen_close(), which should
               always be a silent method. */
            PyErr_SetString(
                PyExc_RuntimeError,
                "cannot reuse already awaited coroutine");
        }
        else if (arg && !exc) {
            /* `gen` is an exhausted generator:
               only set exception if called from send(). */
            if (PyAsyncGen_CheckExact(gen)) {
                PyErr_SetNone(PyExc_StopAsyncIteration);
            }
            else {
                PyErr_SetNone(PyExc_StopIteration);
            }
        }
        return NULL;
    }

    if (f->f_lasti == -1) {
        if (arg && arg != Py_None) {
            const char *msg = "can't send non-None value to a "
                              "just-started generator";
            if (PyCoro_CheckExact(gen)) {
                msg = NON_INIT_CORO_MSG;
            }
            else if (PyAsyncGen_CheckExact(gen)) {
                msg = "can't send non-None value to a "
                      "just-started async generator";
            }
            PyErr_SetString(PyExc_TypeError, msg);
            return NULL;
        }
    } else {
        /* Push arg onto the frame's value stack */
        result = arg ? arg : Py_None;
        Py_INCREF(result);
        *(f->f_stacktop++) = result;
    }

    /* Generators always return to their most recent caller, not
     * necessarily their creator. */
    Py_XINCREF(tstate->frame);
    assert(f->f_back == NULL);
    f->f_back = tstate->frame;

    gen->gi_running = 1;
    gen->gi_exc_state.previous_item = tstate->exc_info;
    tstate->exc_info = &gen->gi_exc_state;
    result = PyEval_EvalFrameEx(f, exc);
    tstate->exc_info = gen->gi_exc_state.previous_item;
    gen->gi_exc_state.previous_item = NULL;
    gen->gi_running = 0;

    /* Don't keep the reference to f_back any longer than necessary.  It
     * may keep a chain of frames alive or it could create a reference
     * cycle. */
    assert(f->f_back == tstate->frame);
    Py_CLEAR(f->f_back);

    /* If the generator just returned (as opposed to yielding), signal
     * that the generator is exhausted. */
    if (result && f->f_stacktop == NULL) {
        if (result == Py_None) {
            /* Delay exception instantiation if we can */
            if (PyAsyncGen_CheckExact(gen)) {
                PyErr_SetNone(PyExc_StopAsyncIteration);
            }
            else {
                PyErr_SetNone(PyExc_StopIteration);
            }
        }
        else {
            /* Async generators cannot return anything but None */
            assert(!PyAsyncGen_CheckExact(gen));
            _PyGen_SetStopIterationValue(result);
        }
        Py_CLEAR(result);
    }
    else if (!result && PyErr_ExceptionMatches(PyExc_StopIteration)) {
        const char *msg = "generator raised StopIteration";
        if (PyCoro_CheckExact(gen)) {
            msg = "coroutine raised StopIteration";
        }
        else if PyAsyncGen_CheckExact(gen) {
            msg = "async generator raised StopIteration";
        }
        _PyErr_FormatFromCause(PyExc_RuntimeError, "%s", msg);

    }
    else if (!result && PyAsyncGen_CheckExact(gen) &&
             PyErr_ExceptionMatches(PyExc_StopAsyncIteration))
    {
        /* code in `gen` raised a StopAsyncIteration error:
           raise a RuntimeError.
        */
        const char *msg = "async generator raised StopAsyncIteration";
        _PyErr_FormatFromCause(PyExc_RuntimeError, "%s", msg);
    }

    if (!result || f->f_stacktop == NULL) {
        /* generator can't be rerun, so release the frame */
        /* first clean reference cycle through stored exception traceback */
        exc_state_clear(&gen->gi_exc_state);
        gen->gi_frame->f_gen = NULL;
        gen->gi_frame = NULL;
        Py_DECREF(f);
    }

    return result;
}
淚染裳 回答

o本來就是實(shí)例化后的對象,你每執(zhí)行一次Cat,就會有一個(gè)新的o生成。o的實(shí)例化在執(zhí)行完var o = ...后就完成了。

試運(yùn)行以下代碼:

var Cat = function() {
    var o = {
        say: function() {
            console.log('say something');
        }
    }
    let say = o.say;
    setInterval(function(){
        say();
    }, 1000)
    return o
}

var cat = Cat()

cat.say = function() {
    console.log('Hello');
}

這時(shí)輸出就是

Say something

這個(gè)問題其實(shí)和setInterval無關(guān),你提供的代碼中的setInterval的回調(diào)函數(shù)持有的是對o這個(gè)實(shí)例的引用,而不是對o.say的引用,因此一秒后這個(gè)回調(diào)執(zhí)行的時(shí)候,就會先找到o,然后再去找o.say;而我提供的代碼中的setInterval的回調(diào)函數(shù)持有的是對o.say這個(gè)函數(shù)的引用,并且是對舊的o.say的引用,因此一秒后這個(gè)回調(diào)執(zhí)行的時(shí)候,就會直接找到舊的o.say

不知這樣你是否清楚了。

刮刮樂 回答

請問題主找到解決方案了嗎,我也遇到這個(gè)問題了

心悲涼 回答

說明

Note: nvm does not support Windows (see #284). Two alternatives exist, which are neither supported nor developed by us:
傻丟丟 回答

看一下http請求里面refer,根據(jù)這個(gè)來判斷是從哪一個(gè)域名跳轉(zhuǎn)回來的。

背叛者 回答

left是塊級元素站一行 right怎么上去
right這個(gè)元素放到left前面 right浮動之后脫離布局left就上去了

<div class="ct">
  <div class="right">right</div>
  <div class="left">left</div>
</div>
瘋浪 回答

j的回溯只會影響搜索主循環(huán)次數(shù)的上下界([m, 2m]),而不會像你說的使其變成m*n的關(guān)系。

你可以這樣理解,由于m是只增不減的,所以最壞的情況是這樣的:

  1. 每次匹配都會失?。╩保持不變)
  2. 再次匹配也失敗(m+1)

在這種情況下,對于M中的每個(gè)字符,實(shí)際上都比較了2次,所以一共執(zhí)行了2m次循環(huán)。這是循環(huán)次數(shù)的上限。其他任何情況,都至少有若干次循環(huán)是m直接+1的。

我不懂 回答

直接為每個(gè)用戶設(shè)置一個(gè)事件鎖不就成了,發(fā)了直接設(shè)置當(dāng)前用戶的事件鎖并且失效時(shí)間30天,每次發(fā)送check一下鎖存不存在。

爛人 回答

呃,后行斷言是新特性,需要瀏覽器支持才可以,按規(guī)范是ES2018才引入的,所以babel編譯時(shí),目標(biāo)es版本需要正確。
接自阮一峰e(cuò)s6一書

JavaScript 語言的正則表達(dá)式,只支持先行斷言(lookahead)和先行否定斷言(negative lookahead),不支持后行斷言(lookbehind)和后行否定斷言(negative lookbehind)。ES2018 引入后行斷言,V8 引擎 4.9 版(Chrome 62)已經(jīng)支持。
不二心 回答

超時(shí)問題解決~ 看了這段話,我就豁然開朗了~
4 個(gè)主要的生命周期函數(shù):

afterAll(fn, timeout): 當(dāng)前文件中的所有測試執(zhí)行完成后執(zhí)行 fn, 如果 fn 是 promise,jest 會等待 timeout 毫秒,默認(rèn) 5000
afterEach(fn, timeout): 每個(gè) test 執(zhí)行完后執(zhí)行 fn,timeout 含義同上
beforeAll(fn, timeout): 同 afterAll,不同之處在于在所有測試開始前執(zhí)行
beforeEach(fn, timeout): 同 afterEach,不同之處在于在每個(gè)測試開始前執(zhí)行

因此我就在想,是不是 每次test后面也是可以設(shè)置timeout呢
圖片描述

然后就pass了~

網(wǎng)妓 回答

奇怪的問題.用 wireshark 看看...

兔囡囡 回答

**助手,iTunes 之類都是可以的

奧特蛋 回答

如果瓶頸在于IO,多少線程都一樣啊, 除非的分表存在不同的物理磁盤上.
你需要統(tǒng)一下IO情況才行.

你可以用top或iostat查看一下sql執(zhí)行時(shí)的wa, IO-wait參數(shù), 比例是多少.

IO資源方面瓶頸
出現(xiàn) IO 資源方面瓶頸的時(shí)候,主要表現(xiàn)在服務(wù)器 iowait 很高,usr 占比較少,系統(tǒng)響應(yīng)較慢,數(shù)據(jù)庫中經(jīng)常會存在大量執(zhí)行狀態(tài)的 session。
遇到 IO 資源方面的瓶頸,我們可以使用的硬件層面優(yōu)化方案主要就是:
增加內(nèi)存加大可緩存的數(shù)據(jù)量:這個(gè)方案能否達(dá)到效果取決于系統(tǒng)熱點(diǎn)數(shù)據(jù)的總量,畢竟內(nèi)存的成本也是比較高的,而且單臺設(shè)備所能管理的內(nèi)存量也是有限的
改善底層存儲設(shè)備的 IO 能力:如本文前面所述,底層存儲能力的改善同時(shí)取決于多個(gè)方面,既有單個(gè)磁盤本身的能力問題,也包括磁盤數(shù)目方面的策略,同時(shí)還受到存儲自身以及存儲和主機(jī)之間的帶寬限制。所以在優(yōu)化底層存儲能力的同時(shí)需要同時(shí)考慮到這3方面的因素,做好總體分析和局部的平衡

失魂人 回答

可以的,在 Forge Viewer 里頭有很多方法可以做到這點(diǎn),這邊我會以 AutoCam.goToView() 來示范,以下樣例假設(shè)相機(jī)的新位置是 ( x1, y1, z1 ):

// 獲取當(dāng)前相機(jī)信息
const currentView = viewer.autocam.getCurrentView();
cosnt eye = viewer.navigation.getEyeVector();
const eyeDir = viewVec.normalize();
const distance = eye.length();                         //!<<< 相機(jī)與焦點(diǎn)的距離

const newPosition = new THREE.Vector3( x1, y1, z1 );   //!<<< 相機(jī)的新位置
const target = eye.add( newPosition );                 //!<<< 計(jì)算新焦點(diǎn)位置

// 產(chǎn)生新相機(jī)信息
const newView = {
    position: newPosition.clone(),                     //!<<< 相機(jī)的新位置
    up: currentView.up.clone(),
    center: target.clone(),                            //!<<< 相機(jī)的新焦點(diǎn)
    pivot: target.clone(),                             //!<<< 相機(jī)的新環(huán)繞(Orbit)中心
    fov: currentView.fov,
    worldUp: currentView.worldUp.clone(),
    isOrtho: (currentView.isOrtho === false)
};

// 將信息更新到相機(jī)上
viewer.autocam.goToView( newView );

以上希望對你幫助~

赱丅呿 回答

既然這樣,為什么不使用Framework7-vue呢?

嫑吢丕 回答
  1. 你需要會寫cookie
  2. 你需要在服務(wù)器段獲取到cookie值,然后根據(jù)這個(gè)cookie值進(jìn)行特定返回(這是后端判斷處理),也可以前端處理,通過一個(gè)跳轉(zhuǎn)頁面進(jìn)行自動跳轉(zhuǎn)對應(yīng)頁面。
黑與白 回答

這我就不用了。

話寡 回答

未找到指定文件的虛擬磁盤支持提供程序

哚蕾咪 回答

git-bash里沒有環(huán)境變量吧

熊出沒 回答

雖然沒有在網(wǎng)上查到具體setup file具體作用,但是在github中通過下載一下別人的測試包會發(fā)現(xiàn),setup.js多是包含了執(zhí)行測試腳本前的準(zhǔn)備工作

例如: mocha --compilers js:babel-core/register --require ./test/setup.js
setup.js中的代碼為
`import jsdom from 'jsdom';

if (typeof document === 'undefined') {
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = document.defaultView;
global.navigator = global.window.navigator;
}
`
以上均是個(gè)人猜測,希望可以幫到你