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 animatedBounce = function({ selector = ".ohoroyoi", ...rest } = {}) { | |
$(selector).addClass('animated bounce'); | |
return Promise.resolve(true); | |
} | |
const makeChosen = function({ selector = "#ohoroyoi_table", ...rest } = {}) { | |
$(selector).chosen({ | |
width: "100%" | |
}); | |
return Promise.resolve(true); |
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
#include <iostream> | |
#include <queue> | |
#include <vector> | |
using namespace std; | |
#define MAX_VALUE 1001 // (1<= N <= 1000) | |
int jeongjum; | |
int gansun; | |
int start_jeongjum; |
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 time | |
from threading import Thread | |
def myfunc(i): | |
print("sleeping 5 sec from thread %d" % i) | |
time.sleep(5) | |
print("finished sleeping from thread %d" % i) | |
for i in range(10): | |
t = Thread(target=myfunc, args=(i,)) # ์ i์๋๊ณ i,?? https://docs.python.org/3/library/threading.html#threading.Thread ํํํ์ด๋ผ ํจ |
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
// // callback | |
// function add(a, b){ | |
// return a + b; | |
// } | |
// function addFour(x, f){ // ์ธ์๋ก ํจ์๋ฅผ ๋ฐ๋ ํํ | |
// return f(x, 4); | |
// } |
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
// callback : ์ธ์๋ก ํจ์๋ฅผ ๋ฐ๋ ํํ | |
function add(a, b){ | |
return a + b; | |
} | |
function addFour(x, f){ // ์ธ์๋ก ํจ์๋ฅผ ๋ฐ๋ ํํ | |
return f(x, 4); | |
} |
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 getTime = (callback) => { | |
callback('์๋ '); | |
} | |
getTime((message)=>{ | |
console.log(message); | |
}); | |
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
$.getJSON('https://jsonplaceholder.typicode.com/todos/1', (data) => { | |
console.log(data); | |
}); | |
const getTodos = (id, onSuccess) => { | |
$.getJSON(`https://jsonplaceholder.typicode.com/todos/${id}`, (data) => { | |
// console.log(data); | |
onSuccess(data); | |
}); |
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 todosPromise = new Promise((resolve, reject) => { | |
// const condition = Math.random() > 0.5; //true or false | |
// return condition ? resolve('์ฑ๊ณตํ์ด์') : reject('์คํจํ์ด์ฉ'); | |
// }); | |
// // console.log(todosPromise); | |
// todosPromise.then((data) => { | |
// console.log(data); |
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 getTodos = (id) => { | |
return new Promise((resolve, reject) => { | |
$.getJSON(`https://jsonplaceholder.typicode.com/todos/${id}`, (data) => { | |
resolve(data); | |
}); | |
}); | |
} | |
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 getTodos = (id) => { | |
return new Promise((resolve, reject) => { | |
$.getJSON(`https://jsonplaceholder.typicode.com/todos/${id}`, (data) => { | |
resolve(data); | |
console.log(data); | |
}); | |
}); | |
} | |
// // ์๋์ฒ๋ผ ํ๋ฉด ์์๋ณด์ฅ x |
OlderNewer