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

鍍金池/ 問答
墨小白 回答
更新元素的 innerHTML 。注意:內(nèi)容按普通 HTML 插入 - 不會(huì)作為 Vue 模板進(jìn)行編譯 。如果試圖使用 v-html 組合模板,可以重新考慮是否通過使用組件來替代。

v-html

vue是通過html模板觸發(fā)依賴收集,再代理dataget/set進(jìn)行更新渲染,所以你是不可能通過v-html添加進(jìn)去還能監(jiān)聽數(shù)據(jù)變化的。文檔也寫了你可以通過使用組件代替。

撿肥皂 回答

這說明safri中的tr不支持背景漸變。
可以嘗試用tr背景透明,并給其加上偽元素::after,然后將偽元素設(shè)置為z-index=-1的塊級(jí)元素,在這個(gè)div上應(yīng)用背景漸變。

遲月 回答

利用es6的Set吧
求并集,判斷size

const s1 = 'abcsk'
const s2 = 'abnn'
if (new Set(s1).size === new Set(s1 + s2).size) {
    // 說明s2里面只有s1的元素
} else {
    // 說明s2里面含有s1意外的元素
}
念初 回答

閉包是函數(shù)內(nèi)部有權(quán)訪問函數(shù)外部的變量,不是外部訪問內(nèi)部

首先看下完整版 破解前端面試(80% 應(yīng)聘者不及格系列):從 閉包說起

其實(shí)主要利用了基本類型在函數(shù)調(diào)用時(shí),按值傳遞的,所以就能拿到不同時(shí)期 i 對(duì)應(yīng)的值,跟閉包沒多大關(guān)系。

硬扛 回答

在頁面引入store 例如:import store from '../vuex/index'

大濕胸 回答

不同語言前臺(tái)可后臺(tái)獲取到的date格式不同,直接給前端不見得能解析成功,然而時(shí)間戳都是一樣的。

話寡 回答

https://segmentfault.com/q/10...
——————————————————————————————
第一次回復(fù)時(shí)沒看你的內(nèi)容,只回應(yīng)了標(biāo)題所以貼了個(gè)網(wǎng)址
下面正式回復(fù)
你的問題不是cookies的問題,我根據(jù)那篇文章改了下運(yùn)行成功了,你自己對(duì)照下

package main

import (
    "fmt"
    "io"
    "io/ioutil"
    "log"
    "net/http"
    "net/http/cookiejar"
    "net/url"
    "regexp"
    "strings"
)

var cookies_lagou []*http.Cookie

const (
    login_url_lagou string = "https://passport.lagou.com/login/login.html"

    post_login_info_url_lagou string = "https://passport.lagou.com/login/login.json"

    username_lagou string = "13330295142"
    password_lagou string = "4525674692ac06e619cdb3f1b4b65b08"
)

func getToken(contents io.Reader) (string, string) {

    data, _ := ioutil.ReadAll(contents)

    regCode := regexp.MustCompile(`X_Anti_Forge_Code = '(.*?)';`)
    if regCode == nil {
        log.Fatal("解析Code出錯(cuò)...")
    }

    //提取關(guān)鍵信息
    code := regCode.FindAllStringSubmatch(string(data), -1)[0][1]

    regToken := regexp.MustCompile(`X_Anti_Forge_Token = '(.*?)';`)
    if regToken == nil {
        fmt.Println("MustCompile err")
    }

    //提取關(guān)鍵信息
    token := regToken.FindAllStringSubmatch(string(data), -1)[0][1]

    return token, code
}

func login_lagou() {
    //獲取登陸界面的cookie
    jar, _ := cookiejar.New(nil)
    client := &http.Client{
        Jar: jar,
    }
    req, _ := http.NewRequest("GET", login_url_lagou, nil)
    res, _ := client.Do(req)
    // for k, v := range res.Cookies() {
    //     fmt.Printf("%v=%v\n", k, v)
    // }
    token, code := getToken(res.Body)
    fmt.Println(token, code)
    //post數(shù)據(jù)
    postValues := url.Values{}
    postValues.Add("isValidate", "true")
    postValues.Add("username", username_lagou)
    postValues.Add("password", password_lagou)
    postValues.Add("request_form_verifyCode", "")
    postValues.Add("submit", "")
    // body := ioutil.NopCloser(strings.NewReader(postValues.Encode())) //把form數(shù)據(jù)編下碼
    // requ, _ := http.NewRequest("POST", post_login_info_url_lagou, nil)

    requ, _ := http.NewRequest("POST", post_login_info_url_lagou, strings.NewReader(postValues.Encode()))
    requ.Header.Set("Referer", "https://passport.lagou.com/login/login.html")
    requ.Header.Set("X-Requested-With", "XMLHttpRequest")
    requ.Header.Set("X-Anit-Forge-Token", token)
    requ.Header.Set("X-Anit-Forge-Code", code)
    requ.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0")
    requ.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")

    //for _, v := range res.Cookies() {
    //    requ.AddCookie(v)
    //}

    res, _ = client.Do(requ)
    //cookies_lagou = res.Cookies()
    data, _ := ioutil.ReadAll(res.Body)
    res.Body.Close()
    fmt.Println(string(data))
}

func main() {
    login_lagou()
}

運(yùn)行結(jié)果

15f131a3-74b0-4914-bd6e-2672f36675e1 28747049
{"content":{"rows":[]},"message":"該帳號(hào)不存在或密碼(驗(yàn)證碼)誤,請(qǐng)重新輸入","state":400,"submitCode":23207051,"submitToken":"666f51d4-ccef-462a-bb56-55cb97c5231a"}

Process finished with exit code 0
巴扎嘿 回答

決定并發(fā)的根本原因是數(shù)據(jù)庫存取,其次一個(gè)服務(wù)器能承載的并發(fā)量并非軟件決定,還是要看硬件性能

小眼睛 回答

不知道你解決了沒有, 推薦一個(gè)項(xiàng)目里曾經(jīng)用過的方式, 不需要直接操作dom元素, 使用Subject來傳遞輸入值, 然后通過rxjs的操作符完成具體的操作.

    <input type="text" #searchInput (keyup)="search.next(searchInput.value)">
    
    search: Subject<string> = new Subject<string>();
    
    ngOnInit() {
        this.search.asObservable().debounceTime(400).filter().map().subscribe();
    }
深記你 回答

那就改權(quán)限唄
sudo chmod -R 755 /public/download/

嘟尛嘴 回答

1.node 8.9.3支持

node --experimental-modules a.mjs

2.瀏覽器未支持

枕頭人 回答

你解決了嗎,我也遇到這個(gè)問題,窗口大小調(diào)整就正常了,但是不調(diào)整就不出來分頁條

礙你眼 回答

可以通過Logrotate將日志每天定時(shí)進(jìn)行切割。
需要維護(hù)如下的一份配置文件:

/var/log/mysql/*.log {
  create 644 mysql mysql
  notifempty
  daily
  rotate 5
  missingok
  nocompress
  sharedscripts
  postrotate
  # run if mysqld is running
  if test -n &quot;`ps acx|grep mysqld`&quot;; then
    /usr/bin/mysqladmin flush-logs
  fi
  endscript
}
薄荷糖 回答

網(wǎng)上查了好多帖子,終于搞定了,以饗后來者~
PS.如果確認(rèn)自己各項(xiàng)參數(shù)都對(duì),但是還是提示簽名錯(cuò)誤,更新一下API密鑰,然后就ok了,微信那邊好像有緩存

創(chuàng)建一個(gè)沙箱驗(yàn)收的類,擴(kuò)展自WxPayDataBase

class Sandbox extends WxPayDataBase{

    //設(shè)置對(duì)象的屬性
    public function s_setValues($k, $v){
        $this->values[$k] = $v;
    }

    //讀取對(duì)象的屬性
    public function s_getValues($k){
        return $this->values[$k];
    }
    
    //獲取密鑰API
    public static function getSignKey($input, $mch_key){

        console_log( '1:'.json_encode($input->values) );
        
        //提交業(yè)務(wù)
        $url = 'https://api.mch.weixin.qq.com/sandboxnew/pay/getsignkey';
        
        //生成簽名
        $input->setSign($mch_key);
        console_log( '2:'.json_encode($input->values) );
        
        //$values = $input->GetValues();
        //console_log( '3:'.json_encode($values) );
        
        $xml = $input->array2xml();
        console_log( '4:'.$xml );

        //向微信請(qǐng)求接口
        $result = self::postXmlCurl($xml, $url);
        console_log( json_encode($result) );

        $result = $input->xml2array($result);
        console_log( json_encode($result) );

        return $result;
    }

    

    /**
     * 
     * 產(chǎn)生隨機(jī)字符串,不長于32位
     * @param int $length
     * @return 產(chǎn)生的隨機(jī)字符串
     */
    public static function getNonceStr($length = 32) 
    {
        $chars = "abcdefghijklmnopqrstuvwxyz0123456789";  
        $str ="";
        for ( $i = 0; $i < $length; $i++ )  {  
            $str .= substr($chars, mt_rand(0, strlen($chars)-1), 1);  
        } 
        return $str;
    }


    /**
     * 以post方式提交xml到對(duì)應(yīng)的接口url
     * 
     * @param string $xml  需要post的xml數(shù)據(jù)
     * @param string $url  url
     * @param bool $useCert 是否需要證書,默認(rèn)不需要
     * @param int $second   url執(zhí)行超時(shí)時(shí)間,默認(rèn)30s
     * @throws WxPayException
     */
    private static function postXmlCurl($xml, $url, $useCert = false, $second = 30)
    {    
        $ch = curl_init();
        
        //設(shè)置超時(shí)
        curl_setopt($ch, CURLOPT_TIMEOUT, $second);

        //設(shè)置訪問的網(wǎng)址
        curl_setopt($ch, CURLOPT_URL, $url);
        
        //skysowe_modifid
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
        
        //設(shè)置header
        curl_setopt($ch, CURLOPT_HEADER, FALSE);
        
        //要求結(jié)果為字符串且輸出到屏幕上
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

        console_log( 'cert:'.$useCert );
        if($useCert == true){
            //設(shè)置證書
            //使用證書:cert 與 key 分別屬于兩個(gè).pem文件
            curl_setopt($ch,CURLOPT_SSLCERTTYPE,'PEM');
            curl_setopt($ch,CURLOPT_SSLCERT, WxPayConfig::SSLCERT_PATH);
            curl_setopt($ch,CURLOPT_SSLKEYTYPE,'PEM');
            curl_setopt($ch,CURLOPT_SSLKEY, WxPayConfig::SSLKEY_PATH);
        }
        
        //post提交方式
        curl_setopt($ch, CURLOPT_POST, TRUE);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
        //console_log( 'xml:'.json_encode($xml) );

        //運(yùn)行curl
        $data = curl_exec($ch);
        //console_log( 'curl_result:'.json_encode($data) );
        
        //返回結(jié)果
        if($data){
            curl_close($ch);
            return $data;
        } else { 
            $error = curl_errno($ch);
            curl_close($ch);
            throw new WxPayException("curl出錯(cuò),錯(cuò)誤碼:$error");
            //console_log( 'curl_error:'.$error );
        }
    }


    /**
     * 輸出xml字符
     * @throws WxPayException
    **/
    public function array2xml()
    {
        if(!is_array($this->values) 
            || count($this->values) <= 0)
        {
            throw new WxPayException("數(shù)組數(shù)據(jù)異常!");
        }
        
        $xml = "<xml>";
        foreach ($this->values as $key=>$val)
        {
            if (is_numeric($val) || $key=="nonce_str" || $key=="sign" ){
                $xml.="<".$key.">".$val."</".$key.">";
            }else{
                $xml.="<".$key."><![CDATA[".$val."]]></".$key.">";
            }
        }
        $xml.="</xml>";
        return $xml; 
    }

    /**
     * 將xml轉(zhuǎn)為array
     * @param string $xml
     * @throws WxPayException
     */
    public function xml2array($xml)
    {    
        if(!$xml){
            throw new WxPayException("xml數(shù)據(jù)異常!");
        }
        //將XML轉(zhuǎn)為array
        //禁止引用外部xml實(shí)體
        libxml_disable_entity_loader(true);
        $this->values = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);        
        return $this->values;
    }

}

然后獲取sandbox_signkey

    //沙箱用例:0 獲取驗(yàn)簽秘鑰
    $sandbox_test = new Sandbox();

    $sandbox_test->s_setValues('mch_id', WxPayConfig::MCHID);
    $sandbox_test->s_setValues('nonce_str', $sandbox_test->getNonceStr());

    //debug
    console_log( $sandbox_test->s_getValues('mch_id') );
    console_log( $sandbox_test->s_getValues('nonce_str') );
    console_log( WxPayConfig::KEY );

    $rs = Sandbox::getSignKey($sandbox_test, WxPayConfig::KEY);

    //debug
    echo json_encode($rs);
    echo $rs['sandbox_signkey'];

    exit;
卟乖 回答

寫的很亂啊

shouldComponentUpdate(nextProps, nextState) {
  14 |     if( nextProps.states.set.title !== "undefined"){ // 這里set是個(gè)對(duì)象
> 15 |         this.setState({set:[nextProps.states.set[0]]}) // 這里set怎么變成數(shù)組了?
  16 |         console.log(nextProps.states)
  17 |         return true
  18 |     }

而且一般的組件更新并不使用shouldComponentUpdate,這個(gè)方法通常用在無法利用組件機(jī)制自動(dòng)更新或某些特殊情況時(shí),手動(dòng)更新的,直接通過props傳過來的值,父級(jí)改變,子集也會(huì)自動(dòng)render,不應(yīng)該把props值重新用state管理,參考下官方給教程:
https://reactjs.org/tutorial/...

心癌 回答

Unknown column 'ys170606100349' in 'where clause' 他都說不識(shí)別的ys170606100349是不是ys這個(gè)的緣故
你打印sql看看能不能運(yùn)行

笨小蛋 回答

知道了:

    @NonNull @Override
    public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = null;
        // inflate 的第2個(gè)參數(shù)要傳入 parent
        view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_1, parent, false);
        return new MyViewHolder2(view);
    }
蝶戀花 回答

先理清表之間的關(guān)系,及各字段的含義,然后再進(jìn)行操作
建議將表結(jié)構(gòu)及個(gè)字段含義,目標(biāo)結(jié)果貼下

眼雜 回答

在編譯的時(shí)候,變量就已經(jīng)和內(nèi)函數(shù)綁定了 另外25在程序中十分常用,引用數(shù)的變化可能不同于預(yù)想 (變量在編譯階段時(shí)計(jì)算"引用數(shù)"而不是執(zhí)行時(shí)計(jì)數(shù))