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

鍍金池/ 問答
玩控 回答

因?yàn)槟憬壎ǖ木褪莡ndefined,
1 var有聲明的提升作用,換為let或者const直接報錯
2 在es3環(huán)境下this = undefined => window
var obj = {

con: (function(){
return function fn(x){
        console.log(x);        
        console.log(this);     
    };
console.log(obj);  // undefined
})()

}
你的代碼和這個一樣的效果
var obj = {

con: function fn(x){
        console.log(x);        
        console.log(this);     
    }

}

obj.con = obj.con.bind(undefined); // 將undefined換為obj就ok

詆毀你 回答

這個rewrite沒有用處。
因?yàn)?及其后面的字符在rewrite前就已經(jīng)被刪掉了。

寫這規(guī)則的不懂HTTP協(xié)議,#只能在前端處理。

任她鬧 回答

檢查下 com.coco.crud.bean.Department 是否存在。

放開她 回答

本地文件夾打開的html,瀏覽器是無法讀寫cookie的,印象中只有Firefox可以。

挽歌 回答

你好,我使用php在做掃普通鏈接二維碼打開小程序,我在后臺提交表單的時候,要調(diào)用文檔上第一個接口來生成這個二維碼,圖片描述

命多硬 回答

問題發(fā)現(xiàn)了 是引入的路徑寫錯了 引入的路徑是直接引入的圖一的文件 其實(shí)不然 應(yīng)該要引入在判定后寫入的json文件

愿如初 回答

因?yàn)槟愕膇nsert語句寫得不對

insert into user2 select i.u_id, i.u_name, i.u_age, i.u_schoolid from user1;

你這樣寫,等同于把i插了N遍,N為user1的記錄數(shù)。
而且你外層又循環(huán)了N遍,結(jié)果就是你把user1表的每條記錄都插了8遍

你要這么寫才是對的:

insert into user2 select i.u_id, i.u_name, i.u_age, i.u_schoolid from dual;

要不就正常點(diǎn),既然你是一行一行的讀,那你就一行一行的插

insert into user2 (u_id,u_name,u_age,u_schoolid)
values(i.u_id, i.u_name, i.u_age, i.u_schoolid);
悶油瓶 回答

check to avoid "property of undefined" ex:

if(req&&req.query&&req.query.id){
    // do something with req.query.id.
}


The example you given is also a check: it wants to make sure the callback is a function and then use it.

陌上花 回答

你對規(guī)制式的理解還需要加強(qiáng)啊,你y=x.replace(/([^"]*)/g,"'$1'");期望匹配a和b并替換為添加外面的單引號,這個是匹配不了的,*的問題前面人說了,這里再提一點(diǎn)是[^"]是指非"的字符,在x中實(shí)際有3個,分別是a`,`b啊。
y=x.replace(/([A-z]+)/g,"'$1'");可能才是你期望的。

夕顏 回答

如問題所示,存在兩個使用了webpack code-splitting 和 懶加載的路由文件,路由文件都使用了公用的public.js模塊。
// page/index/Index.vue 首頁路由文件

<template>首頁</template>
<script>
    import pub from 'script/public'
    ...
</script>

// 用戶頁
// page/index/Index.vue 用戶頁路由文件

<template>用戶頁</template>
<script>
    import pub from 'script/public'
    ...
</script>

要將 public.js公用模塊抽離,有兩種解決方案

方案一,CommonsChunkPlugin 具名模塊

手動將所有共用的模塊抽離在一個文件。
創(chuàng)建文件commons.js

// commons.js
import pub from 'public'

webpack.config.jsCommonsChunkPlugin插件指定commons 的entry

// webpack.config.js
entry:{
    main: 'src/main.js',
    commons: 'src/commons.js'
},
...
    new webpack.optimize.CommonsChunkPlugin({
        name: "commons",   // 和 entry的commons對應(yīng),
        filename: 'common.bundle.js', // 抽離公共文件
        minChunks: Infinity,
    })

這樣,如果路由文件或其他模塊使用到了 commons.js中的模塊,都不會重復(fù)加載代碼,而是在common.bundle.js中獲取。

方案二,CommonsChunkPlugin 設(shè)置 children 屬性

官方文檔CommonsChunkPlugin 中 children屬性解釋

Move common modules into the parent chunk

With Code Splitting, multiple child chunks of an entry chunk can have common dependencies. To prevent duplication these can be moved into the parent. This reduces overall size, but does have a negative effect on the initial load time. If it is expected that users will need to download many sibling chunks, i.e. children of the entry chunk, then this should improve load time overall.

可知,設(shè)置 children 為 true 可以將code-splitting的模塊的依賴模塊抽離到父模塊,這樣做的后果就是,確實(shí)抽離公用模塊,降低了代碼重復(fù),減少了代碼體積。但是同時,抽離到父模塊,也意味著如果有一個懶加載的路由 ShopList.vue 沒有用到public.js 模塊,但是實(shí)際上引入了父模塊,也為這ShopList.vue也引入了public.js的代碼。

這就需要CommonsChunkPluginasync 屬性。

方案三(最佳實(shí)踐),childrenasync 雙管齊下

Extra async commons chunk

Similar to the above one, but instead of moving common modules into the parent (which increases initial load time) a new async-loaded additional commons chunk is used. This is automatically downloaded in parallel when the additional chunk is downloaded.

設(shè)置了async, 會將上述懶加載的路由文件公用的模塊代碼,抽離打包成一個單獨(dú)的文件,并且該文件是按需加載的,如果某個路由沒有使用到這些公用模塊,是不會加載進(jìn)來的。

舉個例子:
首頁路由模塊(訪問路徑/index),引用了 public模塊
用戶路由模塊(訪問路徑/user),引用了 public模塊
購物車模塊(訪問路徑/shop),沒有引用 public模塊

那么,打包生成的文件大概是

main.js - 根入口文件
index.js - 首頁路由文件
user.js - 用戶路由文件
shop.js - 購物車路由文件
0.js - 抽離路由的公用模塊文件

訪問url/index,加載的依賴文件是main.js + index.js + 0.js
訪問url/user,加載的依賴文件是main.js + user.js + 0.js
訪問url/shop,加載的依賴文件是main.js + shop.js
基本解決了 lazy load + code-splitting 情況下的公用模塊抽離。

以下附上簡單的webpack.config.js配置代碼

entry: {
    main: './src/main.js'
},
...
plugins: [
    ...
    new webpack.optimize.CommonsChunkPlugin({
        name: "main",
        minChunks: 2,
        children: true,
        // deepChildren: true,
        async: true,
    })
]

參考資料

commons-chunk-plugin
CommonChunkPlugin: Feature - Select statically imported modules from chunks that were created from a dynamic import (require.ensure / System.import / import(".."))

挽歌 回答

有更詳細(xì)的異常信息沒,你提供的代碼片段看不出什么問題。

舊時光 回答

調(diào)用組件的 onChange 方法啊。

練命 回答

答案已經(jīng)找到了 是一個非常低級的錯誤! 我在有瀏覽器前綴的js語句中少給了 ‘px’作為單位 造成 樣式無效!低級錯誤 一定要避免!

尐懶貓 回答

是不是被autoprefix去掉了,看看webpack的配置

喜歡你 回答

Webpack 只懂 JavaScript 。

file-loader 讓 Webpack 可以理解一些非 JavaScript 的資源,自動生成(emit)文件到目標(biāo)文件夾(outputPath),然后返回項(xiàng)目運(yùn)行時用的地址(publicPath)。(也可以不生成文件,只為獲得地址,文件再自行處理)。目的是為了借用 Webpack 來一并處理文件依賴。

url-loader 功能跟 file-loader 一樣,只是可以對小的資源進(jìn)行 base64 編碼 URL 處理而不 emit 文件。

css-loader 是為了讓 Webpack 理解 CSS,只是把 url() 變成 import/require()。還需要上面兩個 loader 來處理資源。

離殤 回答

需要用flannel等實(shí)現(xiàn)節(jié)點(diǎn)間容器的訪問
另外還要注意防火墻策略,INPUT和FORWARD鏈沒有禁止有關(guān)數(shù)據(jù)包

冷咖啡 回答

URLencoder.encode();
URLencoder.decode();

久愛她 回答

new name()這個是直接拿來用了 如果沒有name這個方法肯定報錯
就相當(dāng)于 var str = a || "abc" 這里a根本就沒定義就會報錯
但是,我試了一下用ie11模擬ie低版本,連ie5都有XMLHttpRequest這個東西,所以你這樣寫是不會報錯的,永遠(yuǎn)走的是new XMLHttpRequest

心上人 回答

[^>]* 匹配非左尖括號的任意字符多次.

html tag 可以很長,比如:

<link rel="icon" sizes="any" mask  />