This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Money { | |
| constructor(value) { | |
| if (value < 0) throw Error('Money Type Valiation Exception'); | |
| this.value = value; | |
| } | |
| } | |
| class Email { | |
| constructor(email) { | |
| const regExp = /^[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class A { | |
| constructor(value) { | |
| this.value = value | |
| } | |
| adder() { | |
| this.value += 1; | |
| } | |
| } | |
| const v = new A(10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="ko"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Oops !!</title> | |
| <!-- Fonts --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| module.exports = { | |
| entry: './src/index.js', | |
| output: { | |
| path: path.resolve(__dirname, 'public/'), | |
| filename: 'bundle.js', | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const csv = require('csvtojson'); | |
| const moment = require('moment'); | |
| const path = './update_needed_usersv4.csv'; | |
| // csv file sample (./update_needed_usersv4.csv) | |
| /* | |
| idx,created_at | |
| 130,2015-10-07 8:22 | |
| 131,2015-10-07 8:23 | |
| 132,2015-10-07 8:24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # sudo ifconfig [adapter] hw ether [MAC Addr] | |
| sudo ifconfig wlp58s0 down | |
| sleep 1 | |
| sudo ifconfig wlp58s0 hw ether AA:BB:CC:DD:EE:FF | |
| sudo ifconfig wlp58s0 up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| import numpy as np | |
| x_data = np.float32(np.random.rand(2, 100)) | |
| y_data = np.dot([0.100, 0.200], x_data) + 0.300 | |
| b = tf.Variable(tf.zeros([1])) | |
| W = tf.Variable(tf.random_uniform([1, 2], -1.0, 1.0)) | |
| y = tf.matmul(W, x_data) + b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| state = tf.Variable(0, name="counter") | |
| one = tf.constant(1) | |
| new_value = tf.add(state, one) | |
| update = tf.assign(state, new_value) | |
| init_op = tf.global_variables_initializer() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Facebook Login JavaScript Example</title> | |
| <meta charset="UTF-8"> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/aws-sdk/2.7.14/aws-sdk.min.js"></script> | |
| </head> | |
| <body> | |
| <script> | |
| // This is called with the results from from FB.getLoginStatus(). |