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

鍍金池/ 問(wèn)答
膽怯 回答

js

data() {
      return {
          permissions: [
                "account:update",
                "account:list",
                "account:findById",
                "adveradvertiser:add"
            ],
      }
}

html

 v-if="permissions.some(p=>p==='adveradvertiser:add')"
脾氣硬 回答

PHP面向?qū)ο蟀?/p>

/**
 * Created by: Singee77
 */

class Standard
{
    //答對(duì)全部題所得總分
    private $totalScore = 0;
    //標(biāo)準(zhǔn)答案
    private $standard = [];
    //提交答案
    private $answer = [];
    //所得總分
    private $getScore = 0;

    public function __construct($totalScore)
    {
        $this->setTotalScore($totalScore);
    }

    /**
     * @return int
     */
    public function getTotalScore()
    {
        return $this->totalScore;
    }

    /**
     * @param int $totalScore
     */
    public function setTotalScore($totalScore)
    {
        $this->totalScore = $totalScore;
    }


    /**
     * @param array $standard
     */
    public function setStandard($standard)
    {
        $this->standard = $standard;
    }

    /**
     * @return array
     */
    public function getStandard()
    {
        return $this->standard;
    }

    /**
     * @param $answer
     */
    public function checkStandard()
    {
        foreach ($this->answer as $each) {
            if (!$weight = $this->checkAnswer($each)) {
                //選錯(cuò)一個(gè)總分為0
                $this->setGetScore(0);
                break;
            }
            //答對(duì)一個(gè)就追加分?jǐn)?shù)
            $this->appendGetScore($this->getTotalScore() * $weight);
        }
    }

    /**
     * @param array $answer
     */
    public function setAnswer($answer)
    {
        $this->answer = $answer;
    }

    /**
     * @return array
     */
    public function getAnswer()
    {
        return $this->answer;
    }

    /**
     * @param $each
     * return $weight
     */
    private function checkAnswer($each)
    {
        return array_key_exists($each, $this->standard) ? $this->standard[$each] : 0;
    }

    /**
     * @param int $getScore
     */
    public function setGetScore($score)
    {
        $this->getScore = $score;
    }

    /**
     * @return int
     */
    public function getGetScore()
    {
        return $this->getScore;
    }

    /**
     * @param int $totalScore
     */
    public function appendGetScore($appendScore)
    {
        $this->getScore += $appendScore;
    }


}

//實(shí)例一個(gè)CHECK對(duì)象并設(shè)置總分
$std = new Standard(10);
//設(shè)置標(biāo)準(zhǔn)答案以及占比
$std->setStandard(['A' => 0.2, 'B' => 0.4, 'C' => 0.4]);
//設(shè)置答案
$std->setAnswer(['A', 'B']);
//計(jì)算分?jǐn)?shù)
$std->checkStandard();
//獲取所得總分
$totalScore = $std->getTotalScore();
echo $totalScore;
網(wǎng)妓 回答

因?yàn)槟愕?lt;div v-for="(item, index) in list1" :key="index">item{{index}}</div>子元素把父級(jí)撐高了。

裸橙 回答

執(zhí)行下面語(yǔ)句后再發(fā)布看看

git config --global http.postBuffer 524288000
薄荷糖 回答

你可以監(jiān)聽(tīng)一下刷新頁(yè)面事件,然后把路由重置成為你想要的正規(guī)路由
https://segmentfault.com/q/10...

伴謊 回答

$("").focus(function(){

    document.activeElement.blur();
});
這樣試試
何蘇葉 回答

因?yàn)闆](méi)有callback

let a = function(i){
    console.log(i,"i")
}(i)

a;//undefined
久舊酒 回答

內(nèi)置方式:使用.NET Framework 3.5/4.0中提供的System.Web.Script.Serialization命名空間下的JavaScriptSerializer類(lèi)進(jìn)行對(duì)象的序列化與反序列化,很直接。

Project p = new Project() { Input = "stone", Output = "gold" };
 JavaScriptSerializer serializer = new JavaScriptSerializer();
 var json = serializer.Serialize(p);
 Console.WriteLine(json);

 var p1 = serializer.Deserialize<Project>(json);
 Console.WriteLine(p1.Input + "=>" + p1.Output);
 Console.WriteLine(ReferenceEquals(p,p1));

契約方式:使用System.Runtime.Serialization.dll提供的DataContractJsonSerializer或者 JsonReaderWriterFactory實(shí)現(xiàn)。

Project p = new Project() { Input = "stone", Output = "gold" };
DataContractJsonSerializer serializer = new DataContractJsonSerializer(p.GetType());
string jsonText;

using (MemoryStream stream = new MemoryStream())
{
    serializer.WriteObject(stream, p);
    jsonText = Encoding.UTF8.GetString(stream.ToArray());
    Console.WriteLine(jsonText);
}

using (MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonText)))
{
    DataContractJsonSerializer serializer1 = new DataContractJsonSerializer(typeof(Project));
    Project p1 = (Project)serializer1.ReadObject(ms);
    Console.WriteLine(p1.Input + "=>" + p1.Output);
}
兮顏 回答

是否用了 router.addRoutes 如果用了 要在router.addRoutes里面重定向,否則router.addRoutes中的路由全部會(huì)被重定向

涼薄 回答

vuex沒(méi)有寫(xiě)對(duì)應(yīng)修改這個(gè)購(gòu)物車(chē)列表內(nèi)購(gòu)買(mǎi)數(shù)量的的mutation么?直接提交這個(gè)mutation解決。
你商品列表頁(yè)面通過(guò)計(jì)算屬性返回的值,動(dòng)態(tài)跟著變化,沒(méi)毛病啊。

茍活 回答

執(zhí)行時(shí)機(jī)的問(wèn)題,你在使用

oBtn.onclick = function() {
                alert(n1+n2);
            };

實(shí)際上n1和n2的賦值語(yǔ)句的執(zhí)行時(shí)機(jī)是window.onload,那個(gè)時(shí)候input里面還沒(méi)有值,所以是NaN,

歆久 回答

其實(shí)使用render函數(shù)做是很簡(jiǎn)單明了的,看看文檔就可以https://cn.vuejs.org/v2/guide...

不過(guò)寫(xiě)起來(lái)可能會(huì)比較累,那就試試這個(gè)vue中使用jsx插件吧,也是官方推薦的
https://github.com/vuejs/babe...

厭惡我 回答

golang 的時(shí)間格式確實(shí)困擾新人,需要一點(diǎn)適應(yīng)時(shí)間。

這里只需要調(diào)用 time.Parse(),然后讀取 time.Unix() 結(jié)果便可。
時(shí)間格式應(yīng)該是 "2006-01-02T15:04:05.999-0700",請(qǐng)參考下面的示例

package main

import (
    "fmt"
    "testing"
    "time"
)

func TestParseTime(t *testing.T) {
    str := "2018-06-07T20:14:03.368+0800"

    format := "2006-01-02T15:04:05.999-0700"
    tm, err := time.Parse(format, str)
    if err != nil {
        t.Fatal(err)
    }
    _, zoffset := tm.Zone()
    if tm.Year() != 2018 || tm.Month() != 6 || tm.Day() != 7 || tm.Hour() != 20 || tm.Minute() != 14 || tm.Second() != 3 || zoffset != 8*3600 {
        t.Fatal(tm)
    }
    fmt.Println(tm.Unix())
}
賤人曾 回答

請(qǐng)問(wèn),服務(wù)器以何種方式回調(diào)你的接口?

爛人 回答

加上括號(hào)?。。?!

柚稚 回答

這樣的話(huà)是可以的

  • 不使用x參數(shù)
class A:

    def __init__(self, x):
        self.x = x

    def a(self, a):
        return print(a)

    def b(self, b):
        return print(b)

A = A(object)
print(A.a(5))
  • 使用x參數(shù)

class A:

    def __init__(self, x):
        self.x = x

    def a(self, a):
        return print(a)

    def b(self):
        return print(self.x)

B = A(3)
print(B.b())
擱淺 回答

$('.subtotal')獲取到的是個(gè)集合

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