Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
sean_chou committed Feb 19, 2019
2 parents acd12fd + 6d439ef commit 0e1843a
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 2,505 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Git 學習
[JavaScript Array Learning Note]: <js/javascript-learning-array-note.md>
[JavaScript Function Learning Note]: <js/javascript-learning-function-note.md>
[JavaScript Advance Learning Note]: <js/javascript-advance-learning-note.md>
[JavaScript ES6 Note]: <js/javascript-es6-note.md>
[JavaScript ES6 Note]: <js/javascript-es6-notes.md>

[CSS Learning Note]: <css/css-learning-note.md>
[CSS Animation Learning Note]: <css/css-animation-note.md>
Expand Down
File renamed without changes.
19 changes: 18 additions & 1 deletion html/html-web-notes.md → html&web/html-web-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,25 @@ Web Storage 包含 sessionStorage & localStorage
reference: https://www.huanlintalk.com/2012/06/html5-web-storage.html


## Login

// ?
user 登入後,server 生成 token 給 user 存到 cookies 裡面,server 並且存到 session 裡面
client 端每次換頁都使用這個 sessionid + token + user name 丟給 server 做驗證
定期 refresh token

### CSRF

https://blog.techbridge.cc/2017/02/25/csrf-introduction/


## Server-Side Rendering

// TODO


## Reference
* 你會做WEB上的用戶登入功能嗎?
 + https://coolshell.cn/articles/5353.html



2 changes: 1 addition & 1 deletion js/javascript-es6-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const chartType = {

當我們使用的時候,事實上變數內的內容並不重要,只需要不要重複即可

ES6 可改為利用 Symbol,為一不重複的類型
ES6 可改為利用 Symbol,為一不重複的類型

```js
const chartType = {
Expand Down
23 changes: 15 additions & 8 deletions ml/ml-google-learning-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ https://developers.google.com/machine-learning/crash-course/ml-intro

## ML Concepts

1. [ML Framing](ml-framing.md)
2. [Descending into ML](ml-descending-into-ml.md)
3. [Reducing Loss](ml-reducing-loss.md)
4. [TensorFlow](ml-tensorFlow.md)
5. [Generalization](ml-generalization.md)
6. [Splitting data and validation](ml-splitting-data-and-validation.md)
7. [Feature Engineering](ml-feature-engineering.md)
8. [Feature Crosses](ml-feature-crosses.md)
1. [ML Framing](ml-framing.md)
2. [Descending into ML](ml-descending-into-ml.md)
3. [Reducing Loss](ml-reducing-loss.md)
4. [TensorFlow](ml-tensorFlow.md)
5. [Generalization](ml-generalization.md)
6. [Splitting data and validation](ml-splitting-data-and-validation.md)
7. [Feature Engineering](ml-feature-engineering.md)
8. [Feature Crosses](ml-feature-crosses.md)
9. [Regularization]()
10. [Logistic Regression]()
11. [Classification]()

## ML Engineering

## ML Real World Examples


# Other refernece
* https://ithelp.ithome.com.tw/users/20103529/ironman/1212
* https://ithelp.ithome.com.tw/users/20103835/ironman/1806
16 changes: 16 additions & 0 deletions ml/ml-regularization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Regularization

Model 就是一堆 W0 * W1 + W1 * X1 + ... + Wn * Xn
x 是 feature
train 的過程是去找一組 w 來使得這個多項式最符合 data,或是錯誤最少

L1 正規化 w 取絕對值
L2 正規化 w 取平方

為了控制正規化 (tune the overall impact of the regularization),會加上一個 lambda


Early stopping



106 changes: 106 additions & 0 deletions react/react-webpack-stepbystep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# React with webpack and babel

## Initial Project

建立一個空專案並且產生 package.json

```sh
mkdir myapp
cd myapp
npm init -y
```

* npm init 使用 -y 可以略過所有問題

## Install Webpack, React and Babel

<strong>Install Webpack</strong>

```sh
npm i webpack@4 webpack-cli@3 -D
```

* -D: -save-dev

<strong>Install React</strong>

```sh
npm i react@16 react-dom@16 -S
```

* -S: --save

<strong>Install Babel</strong>

```sh
npm i babel-loader@8 @babel/core @babel/preset-env @babel/preset-react -D
```

<strong>Install html-webpack-plugin</strong>

```sh
npm i html-webpack-plugin -D
```

<strong>Install webpack-dev-server</strong>

```sh
npm i webpack-dev-server -D
```

並修改 package.json

```json
...
"scripts": {
"start": "webpack-dev-server --mode development --open",
"build": "webpack --mode production"
},
...
```

<strong>Install css-loader and style-loader</strong>

```sh
npm i css-loader style-loader -D
```

## 建立 webpack.config.js 與 .babelrc

<strong>webpack.config.js</strong>

```js
const HtmlWebPackPlugin = require('html-webpack-plugin');

module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
},
plugins: [
new HtmlWebPackPlugin({
template: './src/index.html',
filename: './index.html'
})
]
};
```

<strong>.babelrc</strong>

```json
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
```
Loading

0 comments on commit 0e1843a

Please sign in to comment.