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

鍍金池/ 問答
嘟尛嘴 回答

mysql默認(rèn)語句最大長度是1m,2000條問題不大。但是你可以選擇用熟悉的語言來拼sql語句,從文件讀userid,這樣支持更多的userid,效率更高

雨萌萌 回答

1w+.. 不能分頁嗎 或者不展開的先不渲染 展開的時候再調(diào)接口

雅痞 回答

pycharm里 看下 配的是哪個 python環(huán)境,感覺是 pip3的環(huán)境,不是你pycharm配的

情已空 回答

pfx后綴證書(私鑰+公鑰)、cer證書(僅有公鑰)
openssl_pkcs12_read(file_get_contents('./private.pfx'), $certs, "sft12#");

print_r([
$certs['cert'],
$certs['pkey']
]);

尐潴豬 回答

此需求已解決。在ie9下想要監(jiān)控瀏覽器的后退行為并沒有更好的辦法。只有onhashchange這個原生的函數(shù)能勉強做到。但是這玩意不僅會監(jiān)控后退行為,還會監(jiān)控前進和跳轉(zhuǎn)行為。所以我想出的解決辦法如下:
location.hash="fobidback";
location.hash="forbidbackagain";
window.onhashchange = function(){

   location.hash = "fobidback ";

}
自此可以做到再ie9下禁止瀏覽器后退。那么如何允許它正常的跳轉(zhuǎn)呢?很簡單,走ajax就行了。

痞性 回答

new is not an operator!

In c++, new and operator are both keywords. new int(x) is a(n) (new-)expression. operator new is a function. new operator in your title is new-expression indeed. new-expression will invoke oeprator new function.

placement new的作用就是在operator new分配好的內(nèi)存上執(zhí)行對象的構(gòu)造,
Yes, that's true. To help you understand, here is a sample:
char* ptr = new char[sizeof(T)]; // ptr use a new-expression(newchar [sizeof(T)] to allocate memory, char is guaranteed to be sizeof 1
T* tptr = new(ptr) T;            // Here is placement new

In a nutshell, placement new will use already allocated memory to construct the object. Where is the already allocated memory from? Either from new expression(free store) or allocated from activation record like int buffer[10], both ok.

那么new operator使用了operator new來申請內(nèi)存之后是使用了placement new嗎?如果沒有話是怎么構(gòu)造的呢?和placement new有關(guān)系嗎?

Above is my answer to your questions

BTW, from the case int buffer[10], we can see pre-new-expression is not a must for placement new(however, note that placement new itself is a new-expression, which will invoke operator new function because all it does is just construct here). If your question is "will placement new always be after operator new/new-expression", it will be a good question.

Update

One year ago, I was confused about how to combine operator new with the constructor then asked a question, FrankHB answered my question: https://tieba.baidu.com/p/508... Now, look back to this question, it is a X-Y question, what really confused me was how does new expression invoke constructor, so it is not related to placement new. Hope it will also inspire you.

Update again

所以我認(rèn)為或許自己和您一年前的疑問相似,內(nèi)存申請和構(gòu)造函數(shù)這兩個過程是如何結(jié)合的呢?
the word combination(結(jié)合) is not properly now(I also make such mistake as said above), let me re-organize my wording:

new expression does two things:

  1. allocate memory
  2. initialization of the object

You and I(one year ago) are both confused about how does compiler initialize the object(via constructor or else) after allocating. Yes, I mentioned compiler, because C++ standard guarantee new will do the two things, but didn't how to, so, its compiler's work. So, it is not c++'s work, just compiler's. Now, we can see the assembly:

struct Foo
{
    Foo(int i) {}
};
int main()
{
    auto *a = new Foo(1);
}  

-O0:

Foo::Foo(int):
        push    rbp
        mov     rbp, rsp
        mov     QWORD PTR [rbp-8], rdi
        mov     DWORD PTR [rbp-12], esi
        pop     rbp
        ret
main:
        push    rbp
        mov     rbp, rsp
        push    rbx
        sub     rsp, 24
        mov     edi, 1
        call    operator new(unsigned long)
        mov     rbx, rax
        mov     esi, 1
        mov     rdi, rbx
        call    Foo::Foo(int)
        mov     QWORD PTR [rbp-24], rbx
        mov     eax, 0
        add     rsp, 24
        pop     rbx
        pop     rbp
        ret

codes related the new expression is follows: a

    mov     edi, 1
    call    operator new(unsigned long)
    mov     rbx, rax
    mov     esi, 1
    mov     rdi, rbx
    call    Foo::Foo(int)
    mov     QWORD PTR [rbp-24], rbx
    

Now, it is clear enough, right? assemble calls two procedures, oeprator new and Foo::Foo(int)

That's all, cheers!

So, your question is how the two combined?

涼汐 回答

用PHPunit做單元測試,單元測試如果能覆蓋完全上線前跑一次單元測試基本能鎖定有沒有問題,也就是可以做自動化測試了,整個思想主要是圍繞:

基于數(shù)據(jù)流動的思想,也就是說程序包含的三個部分:“輸入、處理邏輯、輸出”

驗證數(shù)據(jù)輸入以及輸出是否是你所想,基本就能確定程序是否正確了,具體的我給個鏈接:
http://www.phpunit.cn/

硬扛 回答

已解決,使用prop傳值,子組件使用父組件傳過來的對象就可以了,vue沒學(xué)好。
貼上iview 官方示例修改后的demo。
圖片描述

祉小皓 回答

你這寫的是從/detail跳到/detail/detailInfo啊,也就是組件detialPage換成了detialInfo

大濕胸 回答

service為單例的,是否存在線程安全問題主要取決于service本身。

  1. service方法為線程安全,則整體為線程安全
    我們寫業(yè)務(wù)方法的時候,一般從redis或db中獲取業(yè)務(wù)數(shù)據(jù),然后在數(shù)據(jù)上進行操作,最后將變更寫回到redis或db,這種情況下,并發(fā)問題由底層存儲保障(redis、MySQL)
  2. service方法為非線程安全,則為非線程安全
    如果在業(yè)務(wù)操作中,需要保留內(nèi)存對象,比如在service中存在共享對象,就比較麻煩了,情況比較多。如果共享對象在請求級別有效,可以在每次請求的時候創(chuàng)建新的service對象;如果共享對象跨越多個請求,則需要選擇線程安全的實現(xiàn),將service方法改造為線程安全

看你這種情況,service.save應(yīng)該是把對象直接存于數(shù)據(jù)庫,不會有線程安全問題,并發(fā)問題全部交給了db管理。

夏夕 回答
setTimeout/setImmediate 返回結(jié)果的順序不一定。 那么兩種可能性的分別是怎樣的?

那當(dāng)然,你都沒法保證是不是同一次輪詢(你可能是問這個?)。這就是為什么后面要加fs.readFile。

亮瞎她 回答

已解決

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微軟雅黑";}
    </style>
    <!--<script type="text/javascript" src="json.js" ></script>-->
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=zga15SpUh7sMrZkXaBKicRBshkN3bKtR"></script>
    <title>添加行政區(qū)劃</title>
</head>
<body>
    <div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
    // 百度地圖API功能
    var map = new BMap.Map("allmap");
    var pointArray = [];
    map.centerAndZoom(new BMap.Point(116.403765, 39.914850), 5);
    map.enableScrollWheelZoom();
    var oneDev = ["北京市","上海市","天津市","重慶市","黑龍江","遼寧省","吉林省","河北省","河南省","湖北省","湖南省","山東省","山西省","陜西省","安徽省","浙江省","江蘇省","福建省","廣東省","海南省","四川省","云南省","貴州省","青海省","甘肅省","江西省","臺灣","廣西","西藏","新疆","寧夏","內(nèi)蒙古","香港","澳門"];
    var colorArr = ['#ff541c','#1cecff','#3cff1c','#ff1c47'];
    boundary();
    function boundary(){
        for(var j=0;j<oneDev.length;j++){
            (function(index){
                var bdary = new BMap.Boundary();
                bdary.get(oneDev[index], function(rs){  //獲取行政區(qū)域
                    var ply = null;
                    //map.clearOverlays();        //清除地圖覆蓋物       
                    var count = rs.boundaries.length; //行政區(qū)域的點有多少個
                    for (var i = 0; i < count; i++) {
                        var color = colorArr[Math.floor(Math.random()*3+0)];
                        ply = new BMap.Polygon(rs.boundaries[i], {fillColor:color,strokeWeight: 2, strokeColor:'#000'}); //建立多邊形覆蓋物
                        map.addOverlay(ply);  //添加覆蓋物
                    }  
                    //map.setViewport(pointArray);    //調(diào)整視野  
                    ply.addEventListener('click',function(){
                        alert(index)
                    })
                });
            })(j)
        }
    }
</script>
擱淺 回答

加上屬性autocomplete="off"

 <Input
   type="password"
   placeholder="請輸入6~30位的新密碼,為字母和數(shù)字的組合"  
   autocomplete="off"
 />
妖妖 回答

這個進程是用來連接你的源代碼和app,代碼更新后,進程會幫你熱更新。當(dāng)然了你需要先在模擬器上開啟熱更新功能

不二心 回答

應(yīng)該是Vue不能檢測到數(shù)組數(shù)據(jù)的變動

你可以試試這樣:
1、把template中的

 <li v-for="item in data" :key="item.id">
  {{item.id}}--{{item.name}}--{{item.show}}
  <button @click="aa(item)">aa</button>
  <textarea :class="{actived:item.show}"></textarea>
 </li>

改為

 <li v-for="(item, i) in data" :key="item.id">
  {{item.id}}--{{item.name}}--{{item.show}}
  <button @click="aa(i)">aa</button>
  <textarea :class="{actived:item.show}"></textarea>
 </li>

2、修改方法aa為:

 aa(indexOfItem) {
    const currentItem = this.data[indexOfItem]
    this.data.splice(indexOfItem, 1, {
    ...currentItem ,
     show: !currentItem.show
    })
  }

注:數(shù)組的如下方法可以觸發(fā)視圖更新:

push()
pop()
shift()
unshift()
splice()
sort()
reverse()
懷中人 回答

它的意思就是前面的條件滿足了,才會去執(zhí)行后面的。

// 給a一個內(nèi)邊框
<div class="a">
    <div class="b"></div>
</div>

a.@click.self.prevent="c"的意思是當(dāng)你點擊的元素是a的時候,才會prevent默認(rèn)事件,而且執(zhí)行c事件,如果你點擊了b,由于事件傳播,傳播給了a,但是這個時候判斷出這個點擊事件不是a觸發(fā)的,所以不會prevent,也不會觸發(fā)c事件。

a.@click.prevent.self="c"總是先執(zhí)行prevent,無論是內(nèi)部元素還是本身元素觸發(fā),他都會prevent默認(rèn)事件。只不過只有當(dāng)你點擊a元素的時候,才會觸發(fā)c事件,點擊內(nèi)部元素不觸發(fā)c事件。

所以官網(wǎng)上的這句話,v-on:click.prevent.self 會阻止所有的點擊的意思是它會阻止所有點擊的默認(rèn)事件,并且只有點擊當(dāng)前元素才會觸發(fā)你定義的事件。同理可理解后面那句話。

汐顏 回答

圖示代碼完全是用 DOM API操作script標(biāo)簽的,跟react沒有關(guān)系。

接著你的代碼寫,在回調(diào)函數(shù)中不斷remove/append新的script標(biāo)簽。

逗婦惱 回答

無所謂,本質(zhì)上任意編碼的字符串都可以當(dāng)成普通的二進制(或十六進制,如果你喜歡的話)串來處理,一個字節(jié)一個字節(jié)地處理,無所謂編碼的。不論語言和編碼,一個字符串實際存儲的形式都是二進制形式,且其最小長度單位是字節(jié),你加密解密的時候按字節(jié)處理,而不是按字符處理就行。

陌南塵 回答

剛才去查了一下,gd庫只支持3個字符的utf-8,所有emoji都是4個字符,所以只要用gd庫就無解,大家散了吧