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

鍍金池/ 問答/ 網(wǎng)絡(luò)安全問答
硬扛 回答

沒有指定 node 運行環(huán)境吧。

在文件頭指定 node 運行環(huán)境。

比如:

#!/usr/bin/env node
青黛色 回答

//span前加個.

我甘愿 回答

原來在thinkphp5下的Model.php實現(xiàn)了JSON 序列化接口, 調(diào)用了Model.php的toArray方法,所以json_encode才會輸出這樣的數(shù)據(jù)出來.

實現(xiàn) JsonSerializable 的類可以在 json_encode() 時定制他們的 JSON 表示
// JsonSerializable
public function jsonSerialize()
{
    return $this->toArray();
}

參考資料:
JSON 序列化接口

薄荷綠 回答

查一下是否安裝了emmet插件 工具>插件安裝 安裝后才能使用

陪她鬧 回答

備份 重置 更新 提交 啥問題都能解決

遲月 回答

最后用的是sqlsrv自帶的HASHBYTES('SHA1',$str) ,然后插入。

執(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è)置框架路徑等等最為重要的是給加載默認組件
    $this->preInit($config);

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

    // 調(diào)用父類的 __construct。
    // 由于Component類并沒有__construct函數(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是大部分類的基類,
        // 實際上也就是有配置信息賦值給了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è)置該核心組件配置信息,直接使用核心組件默認配置
            $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' => [...]] 從哪來

二、重點在這里

  • yii\base\Object::__construct($config = []) 中的 Yii::configure($this, $config);
public static function configure($object, $properties)
{
    // 只是遍歷配置信息,賦值給當前對象
    foreach ($properties as $name => $value) {
        $object->$name = $value;
    }
    return $object;
}
  • 這里我們要配合 yii\base\Object::__set($name, $value)
/**
 * 為實例不存在的屬性賦值時調(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);
    }
}

當前情景下的 $object 我們可以認為是 yii\base\Application 的對象 $app

  • 當遍歷到:
$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) {
            ......
        }
        ...
    }
  • 同樣的道理,當遍歷到:
$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"]=> ......
            ......
        }
莫小染 回答

你這個問題解決了嗎?我也碰到問題,不過jenkins提示成功了,但是沒有生成文件

笨笨噠 回答

問題出在SelectOptions組件的

componentWillReceiveProps(nextProps) {
    // 問題出在這里
    // 嘗試調(diào)用父組件傳來的回調(diào)函數(shù)去設(shè)置父組件的狀態(tài)
    if (nextProps.active) {
      nextProps.onSelectedHandler(nextProps.style)
    }
  }

優(yōu)化調(diào)用onSelectedHandler時機

不將就 回答

cd ~/.gitbook/versions/版本/lib/output/website/
vim copyPluginAssets.js
刪除112行
原因:https://github.com/GitbookIO/...

她愚我 回答

已解決已解決已解決已解決已解決已解決已解決已解決已解決已解決已解決已解決已解決已解決

懶洋洋 回答

chrome 默認最小字12px 然后 12 5 + (border)12 = 62

厭遇 回答

可以這樣解決
.replace(/http/g, "https");

礙你眼 回答

http://t.cn/RnoLSet 已經(jīng)有平臺實現(xiàn)了,可以在線生成,拿走不謝哦~

呆萌傻 回答

QueryList不支持不完整的html,需要手動補全html結(jié)構(gòu),或者截取你要采集的部分完整html代碼片段給QueryList來提取內(nèi)容。

墻頭草 回答
  1. 雙擊導(dǎo)入你的服務(wù)器證書到鑰匙串
  2. 找到你的證書

clipboard.png

賤人曾 回答

已解決,重寫MappingJackson2HttpMessageConverterwriteInternal方法即可,完整配置如下:

@Configuration
public class HttpConverterConfig extends WebMvcConfigurerAdapter {

    public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(){
        return new MappingJackson2HttpMessageConverter(){
            @Override
            protected void writeInternal(Object object, Type type, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException {
                if(object instanceof String){
                    Charset charset = this.getDefaultCharset();
                    StreamUtils.copy((String)object, charset, outputMessage.getBody());
                }else{
                    super.writeInternal(object, type, outputMessage);
                }
            }
        };
    }

    @Override
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
        MappingJackson2HttpMessageConverter converter = mappingJackson2HttpMessageConverter();
        converter.setSupportedMediaTypes(new LinkedList<MediaType>(){{
            add(MediaType.TEXT_HTML);
            add(MediaType.APPLICATION_JSON_UTF8);
        }});
        converters.add(new StringHttpMessageConverter());
        converters.add(converter);
    }
}
礙你眼 回答

可以實時的把blob通過ajax提交給后端