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

鍍金池/ 問答
拼未來 回答

目前我是這么解決的。要是有更好的方案希望能告知。

  1. 文件都放到statics下面。
  2. index.template.html引入css

    <link rel="stylesheet" type="text/css" href="statics/css/iconfont.css">
  3. <q-icon class="iconfont" name="icon-name" />

去Tools > Android > SDK Manager 切換到 SDK Tools 標(biāo)簽欄,看看你的模擬器版本是不是最新的,如果不是,可以更新一下。

尋仙 回答

快照顧名思義就是相當(dāng)于一張照片,這個在git回滾的過程用得到,每次的commit就會形成一個id,這個id值就是你項(xiàng)目提交的快照,回滾的時候,找到這次id就能回滾到這次的commit的內(nèi)容。下面詳細(xì)解釋回滾的過程。

初始化之后查看狀態(tài),文件都是未追蹤狀態(tài)
圖片描述
提交一個文件之后再次查看狀態(tài)
圖片描述
將提交的這次操作commit
此時形成快照,git log之后生成一個唯一的commit的id值,這個id值是經(jīng)過計算得出來的,是唯一的
圖片描述
進(jìn)行修改之后再次commit
圖片描述
生成兩個commit的id
每次新的快照會放到最上邊
圖片描述
用git reset的方式回滾
--hard回滾本地的倉庫快照,覆蓋暫存區(qū)工作區(qū)
--soft只會回滾本地倉庫的快照,不會覆蓋暫存區(qū)工作目錄
--mixed(默認(rèn))回滾本地倉庫的快照,并且覆蓋暫存區(qū),但是不覆蓋工作目錄
之后跟上要回滾到的commit的id前幾位就可以了
圖片描述

吃藕丑 回答

type="username"應(yīng)該是這個報錯了。把這個刪掉試試。data里面的username應(yīng)該就是input的value。

愿如初 回答

應(yīng)該是根據(jù)時間計算的一個序列
令牌的使用大概需要和服務(wù)器時間相差不要太多才可以,Q Q 安全手機(jī)令牌是這樣的。。

陌上花 回答

有mac電腦的話連上Safari,調(diào)試一下看看

逗婦乳 回答

3n+2 3n+3。
不太考慮兼容的話,可以用flex做。

display: flex; // 有兼容問題
flex-wrap: wrap; // 有更嚴(yán)重的兼容問題
justify-content: space-between
涼薄 回答
  1. https應(yīng)該是簡單而有效的方法。
  2. 如果你沒有解決傳輸被偷聽的問題,那么就必須解決“重放”的問題

比如,你將密碼用md5加密后再傳,那別人也可以截獲你md5后的密碼進(jìn)行重放。就算你的密碼不但md5加密了,還用非對稱加密再包一層,別人同樣截獲的是你最終的加密結(jié)果來重放。

用戶的密碼是不變的,如何讓一個“密碼”只能有效一次,是解決重放的關(guān)鍵思路,一般可以用黑白名單的方式來實(shí)驗(yàn),具體可以自己試試。

另外,登錄成功后使用JWT時,要注意JWT必須有“有效時間”的判斷,否則,一旦jwt被攔截竊取,會持續(xù)有效,直到你改secret

執(zhí)念 回答

clipboard.png
不管你原來的port端口是多少,現(xiàn)在改成8080試試

舊時光 回答

go get -v看看哪個資源沒下載下來,再把哪個資源加進(jìn)代理

裸橙 回答

大致流程如下:

視圖層

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="/test" method="post">
    {:token()}
    username:
    <input type="text" name="username">
    email:
    <input type="email" name="email">
    <input type="submit" value="submit">
</form>
</body>
</html>

驗(yàn)證器User

<?php

namespace app\index\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'username'  => 'require|max:25|token',
        'email'     => 'email',
    ];
}

Controller層

<?php

namespace app\index\controller;

use think\Controller;
use think\Request;

class Index extends Controller
{
    public function index()
    {
        return view('index');
    }

    public function test(Request $request)
    {
        $result = $this->validate(
            [
                '__token__' => $request->param('__token__'),
                'username'  => $request->param('username'),
                'email'     => $request->param('email'),
            ],
            'app\index\validate\User'
        );
        if ($result !== true) {
            dump($result);
        } else {
            dump($request->param());
        }
    }
}
久礙你 回答

nuxt是用來做ssr的,也就是說需要seo的網(wǎng)站,上nuxt是個不錯的選擇。這和前后端分離沒什么直接關(guān)系。前后端分離一般是后端提供restful接口,前端接收純json數(shù)據(jù)。從你的言語中可以得知你在前端的水平還在一個比較低的層次,那么這個時候去思考nuxt為時過早了。js的基礎(chǔ)打好,什么node框架都是浮云。所以css3/js那些,先去扎實(shí)的學(xué)吧。真正去做后端,學(xué)的東西不比前端內(nèi)容少。

嫑吢丕 回答

在碼云 Gitee插件 這邊問了一下以及經(jīng)過兩天的各種搜索,原來是因?yàn)樵诖a云的webhook url需要配置一個公網(wǎng)ip,意思就是在jenkins的 系統(tǒng)管理 》系統(tǒng)設(shè)置 》Jenkins Url

圖片描述
這里需要的是公網(wǎng)ip才可以

另外在po一下那邊給我的回答,非常感謝!

圖片描述

眼雜 回答

v-model 會忽略所有表單元素的 value、checked、selected 特性的初始值而總是將 Vue 實(shí)例的數(shù)據(jù)作為數(shù)據(jù)來源。你應(yīng)該通過 JavaScript 在組件的 data 選項(xiàng)中聲明初始值。

夢若殤 回答
 fetch:
      src: /tmp/{{ inventory_hostname }}.txt
      dest: /tmp/ss-{{ inventory_hostname }}
      flat: yes
//fetch 是調(diào)用這個模塊
 fetch:
 //src 是遠(yuǎn)程服務(wù)器的路徑,這里的 inventory_hostname 就是填在 /etc/ansible/hosts 文件里面的內(nèi)容。比如說 hosts 文件你填的是 192.168.1.3
// 那這里的 {{inventory_hostname}}.txt 就是 192.168.1.3.txt
      src: /tmp/{{ inventory_hostname }}.txt
      dest: /tmp/ss-{{ inventory_hostname }}
      flat: yes
失魂人 回答

ajax 里設(shè)置timeout = 大一點(diǎn)的毫秒數(shù)
話說ajax等一個小時。。。。用戶不會砸電腦?

執(zhí)念 回答

首先,你的 $config 數(shù)組中一定包含以下元素:

$config = [
    //others
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
        ], 
        'gii'   => [
            'class' => 'yii\gii\Module',
        ];
    ],
    //others
]

這里說明一下繼承關(guān)系:

class yii\base\Application extends yii\base\Module

class yii\base\Module extends yii\di\ServiceLocator

class yii\di\ServiceLocator extends yii\base\Component

class yii\base\Component extends yii\base\Object

  • yiibaseApplication::__construct() 方法注解
public function __construct($config = [])
{
    Yii::$app = $this;
    //將\yii\base\Application中的所有的屬性和方法交給Yii::$app->loadedModules數(shù)組中
    static::setInstance($this);

    $this->state = self::STATE_BEGIN;

    //加載配置文件的框架信息 如:設(shè)置別名,設(shè)置框架路徑等等最為重要的是給加載默認(rèn)組件
    $this->preInit($config);

    //加載配置文件中的異常組件
    $this->registerErrorHandler($config);

    // 調(diào)用父類的 __construct。
    // 由于Component類并沒有__construct函數(shù)
    // 這里實(shí)際調(diào)用的是 `yii\base\Object__construct($config)`
    Component::__construct($config);
}

上面方法中 Component::__construct($config) 會調(diào)用 yii\base\Object::__construct() 方法

  • yiibaseObject::__construct() 方法注解
public function __construct($config = [])
{
    if (!empty($config)) {
        // 將配置文件里面的所有配置信息賦值給Object。
        // 由于Object是大部分類的基類,
        // 實(shí)際上也就是有配置信息賦值給了yii\web\Application的對象
        Yii::configure($this, $config);
    }
    $this->init();
}

一、下面只是為了說明 'components' => [ 'log' => [...]] 從哪來,若不關(guān)心可以直接看 第二步。

  • 先看 $this->preInit($config);,即 yii\base\Application::preInit(&$config)
public function preInit(&$config)
{
    //others...
    
    // merge core components with custom components
    // 合并核心組件和自定義組件
    foreach ($this->coreComponents() as $id => $component) {
        if (!isset($config['components'][$id])) {
            // 若自定義組件中沒有設(shè)置該核心組件配置信息,直接使用核心組件默認(rèn)配置
            $config['components'][$id] = $component;
        } elseif (is_array($config['components'][$id]) && !isset($config['components'][$id]['class'])) {
            // 若自定義組件有設(shè)置該核心組件配置信息,但是沒有設(shè)置 'class'屬性,則添加該class屬性
            $config['components'][$id]['class'] = $component['class'];
        }
    }
}

/**
 * Returns the configuration of core application components.
 * 返回核心應(yīng)用組件的配置
 * @see set()
 */
public function coreComponents()
{
    return [
        // 日志分配器組件
        'log' => ['class' => 'yii\log\Dispatcher'],
        
        //others...
    ];
}
  • 經(jīng)過 $this->preInit($config);, 我們得到的 $config
$config = [
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
        ], 
        'gii'   => [
            'class' => 'yii\gii\Module',
        ];
    ],
    'components' => [
        'log'   => [
            'class' => 'yii\\log\\Dispatcher',
        ],
        
        //others...
    ]
    //others...
]


上面只是為了說明 'components' => [ 'log' => [...]] 從哪來

二、重點(diǎn)在這里

  • yii\base\Object::__construct($config = []) 中的 Yii::configure($this, $config);
public static function configure($object, $properties)
{
    // 只是遍歷配置信息,賦值給當(dāng)前對象
    foreach ($properties as $name => $value) {
        $object->$name = $value;
    }
    return $object;
}
  • 這里我們要配合 yii\base\Object::__set($name, $value)
/**
 * 為實(shí)例不存在的屬性賦值時調(diào)用
 *
 * Do not call this method directly as it is a PHP magic method that
 * will be implicitly called when executing `$object->property = $value;`.
 * 這個是PHP的魔術(shù)方法,會在執(zhí)行 `$object->property = $value;` 的時候自動調(diào)用。
 */
public function __set($name, $value)
{
    // setter函數(shù)的函數(shù)名
    // 由于php中方法名稱不區(qū)分大小寫,所以setproperty() 等價于 setProperty()
    $setter = 'set' . $name;
    if (method_exists($this, $setter)) {
        // 調(diào)用setter函數(shù)
        $this->$setter($value);
    } elseif (method_exists($this, 'get' . $name)) {
        // 如果只有g(shù)etter沒有setter 則為只讀屬性
        throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);
    } else {
        throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name);
    }
}

當(dāng)前情景下的 $object 我們可以認(rèn)為是 yii\base\Application 的對象 $app

  • 當(dāng)遍歷到:
$app->modules =  [
    'debug' => [
        'class' => 'yii\debug\Module',
    ], 
    'gii'   => [
        'class' => 'yii\gii\Module',
    ];
]

這里會調(diào)用 yii\base\Module::setModules($modules) 方法

public function setModules($modules)
{
    foreach ($modules as $id => $module) {
        $this->_modules[$id] = $module;
    }
}

這樣便有了問題中的

["_modules":"yii\base\Module":private]=>
    array(3) {
        ["debug"]=> object(yii\debug\Module)#33 (28) {
            ......
        }
        ["gii"]=> object(yii\gii\Module)#113 (21) {
            ......
        }
        ...
    }
  • 同樣的道理,當(dāng)遍歷到:
$app->components =  [
    'log'   => [
        'class' => 'yii\\log\\Dispatcher',
    ],
]
  • 這里會調(diào)用 yii\di\ServiceLocator::setComponents($components) 方法
public function setComponents($components)
{
    foreach ($components as $id => $component) {
        $this->set($id, $component);
    }
}

public function set($id, $definition)
{
    // others ...

    if (is_object($definition) || is_callable($definition, true)) {
        // an object, a class name, or a PHP callable
        $this->_definitions[$id] = $definition;
    } elseif (is_array($definition)) {
        // 定義如果是個數(shù)組,要確保數(shù)組中具有 class 元素
        // a configuration array
        if (isset($definition['class'])) {
            // 定義的過程,只是寫入了 $_definitions 數(shù)組
            $this->_definitions[$id] = $definition;
        } else {
            throw new InvalidConfigException("The configuration for the \"$id\" component must contain a \"class\" element.");
        }
    } else {
        throw new InvalidConfigException("Unexpected configuration type for the \"$id\" component: " . gettype($definition));
    }
}

這樣便有了問題中的

["_definitions":"yii\di\ServiceLocator":private]=>
        array(24) {
            ["errorHandler"]=> .....
            ["request"]=> ......
            ["log"]=> ......
            ......
        }