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

鍍金池/ 問(wèn)答
痞性 回答

把path轉(zhuǎn)換成版本號(hào)進(jìn)行對(duì)比排序

$a = [
    '1' => '0',
    '2' => '0',
    '3' => '0',
    '4' => '1',
    '5' => '1',
    '6' => '2',
    '7' => '1',
    '8' => '1',
    '9' => '2',
    '10' => '3',
    '11' => '3',
    '12' => '2',
    '13' => '1',
    '14' => '1,8',
    '15' => '1,8,14',
    '16' => '2,9',
    '17' => '1,8',
    '18' => '3,10',
    '19' => '3,11',
    '20' => '3,10,18',
    '21' => '1,8,14,15',
    '22' => '1,8,14',
];

$result = treeSort($a);
print_r($result);

function treeSort($arr)
{
    $list = [];
    foreach ($arr as $key => $item) {
        $version = $item == 0 ? $item : ('0.' . $item);
        $list[] = [$key, str_replace(',', '.', $version) . '.' . $key];
    }
    $mySort = function ($a, $b) {
        return version_compare($a[1], $b[1], 'ge');
    };
    usort($list, $mySort);
    $tree = [];
    foreach ($list as $item) {
        $tree[$item[0]] = $arr[$item[0]];
    }
    return $tree;
}
替身 回答

你這是java還是php,注入問(wèn)題終極解決方案就是放棄sql拼接,使用PrepareStatement的參數(shù)占位符

脾氣硬 回答

類似這樣

#!/bin/bash

ssh root@192.2.1.160 <<'ENDSSH'
cd /home/app/scripts/
sh -x arr.sh 'test'
ENDSSH

你的就是這樣

#!/bin/bash

ssh root@MachineB <<'ENDSSH'
cd xxx
sh -x local_script.sh -ub
ENDSSH
妖妖 回答

試下下面代碼,改了一點(diǎn)點(diǎn)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <title>RunJS 演示代碼</title>
  </head>
<body>
  <div id="helloApp">
        {{test}}
        <button @click="fun1"> te</button>
    </div>  
    
  </body>

<script>
    var helloApp = new Vue({
        el: "#helloApp",
        data: {
            test: "200"
        },
        methods: {
            fun1() {
                this.test = "300"
                this.fun2()
            },
            fun2() {
                alert(this.test)
                this.test = "400"
            }
        }
    })
            

</script>

</html>
        
敢試 回答
db.<coll>.update({條件}, {$set: {字段}, $setOnInsert: {date: new Date()}}, {upsert: true});

加上$setOnInsert表示只有在插入的時(shí)候才帶這個(gè)字段。跟關(guān)系數(shù)據(jù)庫(kù)不同的是,這個(gè)時(shí)間來(lái)自你的應(yīng)用,而不是數(shù)據(jù)庫(kù)加上去的默認(rèn)值。

哎呦喂 回答

forceUpdate會(huì)跳過(guò)shouldComponentUpdate步驟直接觸發(fā)組件的render方法
官網(wǎng)建議應(yīng)該盡量避免使用forceUpdate

Normally you should try to avoid all uses of forceUpdate() and only read from this.props and this.state in render().
https://reactjs.org/docs/reac...
愚念 回答

方法:
scrollTo(x, y, time, easing)
參數(shù):
{Number} x 橫軸坐標(biāo)(單位 px)
{Number} y 縱軸坐標(biāo)(單位 px)
{Number} time 滾動(dòng)動(dòng)畫(huà)執(zhí)行的時(shí)長(zhǎng)(單位 ms)
{Object} easing 緩動(dòng)函數(shù),一般不建議修改,如果想修改,參考源碼中的 ease.js 里的寫(xiě)法

例子:
this.scroll.scrollTo(0, 0, 500)
//this.scroll為實(shí)例化的BScroll對(duì)象
//scrollTo()為方法
//(0, 0, 500)以500毫秒的速度滾動(dòng)到坐標(biāo)為(0,0)的位置,也就是頂部。

孤星 回答

holo.php 通過(guò)require 'checkingAge.php'; 導(dǎo)入php文件,并在holo.php中調(diào)用checkingAge函數(shù)并傳值,這是視頻出的作業(yè)題目,這沒(méi)問(wèn)題吧?圖片描述

久礙你 回答

o是生產(chǎn)環(huán)境中壓縮后的變量名
你需要在開(kāi)發(fā)環(huán)境測(cè)一測(cè),看看到底是哪個(gè)變量有問(wèn)題

命于你 回答

wx.openAddress是微信公眾號(hào)網(wǎng)頁(yè)的JSSDK接口,小程序沒(méi)這個(gè)東西

不將就 回答

這是因?yàn)槟闶褂昧藙?dòng)態(tài)加載組件

……我覺(jué)得Ls答案沒(méi)毛病啊,明明就是個(gè)匯總值,為什么要循環(huán)執(zhí)行echo?


不太明白你這里的數(shù)據(jù)結(jié)構(gòu)是怎么規(guī)劃的……這里應(yīng)該是一個(gè)二維數(shù)組結(jié)構(gòu)吧。
另外看你上邊用了number_format,這個(gè)輸出是個(gè)字符串,建議你在所有計(jì)算結(jié)束后頁(yè)面渲染前再用,因?yàn)橛?jì)算機(jī)的原生浮點(diǎn)數(shù)在計(jì)算時(shí)會(huì)存在精度誤差(可以自己搜一下“IEEE754精度誤差”),另外類型也不對(duì)。

背叛者 回答

你這樣將/api代理到了本地3000端口,請(qǐng)求端口上的/api接口,就要用/api/api吧。。你試試看

有你在 回答

其實(shí) es6 的 let 根本沒(méi)抓住問(wèn)題的本質(zhì)

關(guān)鍵在于 js 作為一個(gè)允許副作用的語(yǔ)言,它的 closure 卻只支持引用外層作用域的變量,而不支持「引用」外層作用域中變量的值

C++ 就沒(méi)有這個(gè)問(wèn)題~

#include <functional>
#include <iostream>

using namespace std;

int main() {
  function<void()> a[10];
  for (int i = 0; i < 10; i++) {
    a[i] = [i] () {
      cout << i << '\n';
    };
  }
  a[6](); // 6
}

之所以出現(xiàn)這個(gè)反直覺(jué)的現(xiàn)象,就是因?yàn)槟隳?10 個(gè)函數(shù)引用的都是同一個(gè) i 變量,而這個(gè)變量的值是 for 循環(huán)最后一次執(zhí)行時(shí)的值,也就是 10。

舊城人 回答

jQuery()

Working With Plain Objects(使用普通的對(duì)象)

目前,只支持包裹在jQuery中的普通的JavaScript對(duì)象是:.data(),.prop(),.bind(), .unbind(),
.trigger() 和 .triggerHandler()。使用.data()(或者任何返回.data()的方法),在一個(gè)普通的對(duì)象會(huì)產(chǎn)生一個(gè)新的屬性的名為jQuery{randomNumber}(如jQuery123456789)。

我覺(jué)得這段翻譯的不太好,不過(guò)下邊那個(gè)Demo應(yīng)該能看明白。

囍槑 回答

打印微信接口返回的日志即可,如果對(duì)應(yīng)的服務(wù)器公網(wǎng)IP沒(méi)有在微信的白名單下的話,調(diào)接口的時(shí)候微信會(huì)返回access clientip is not registered hint,后面會(huì)帶上具體的IP的,把該IP填到白名單即可。

離人歸 回答

你看看你發(fā)送的請(qǐng)求的Content-Type 是不是 multipart/form-data .....

念初 回答

官方不推薦使用事件委托。

Is event delegation necessary?

Well, delegation has two main advantages: one is practical - it saves you from having to add (and remove!!) those listeners individually. But Vue already does that for you.

The other one is performance / memory. But since every click listener in a v-vor loop would use the same callback, this is minimal unless you have hundreds or thousands of rows.

And finally, you can use delegation pretty easily by adding an @click listener to the <ul> element instead of the children. But then you have to resort to checks on the click target to evaluate which item in your data it might represent. So I would only use that if you truly find any performance problems without delegation.