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
| public class LogUtil { | |
| static int log2 (int number) { | |
| int logCount = 0; | |
| if(65536 <= number) { logCount += 16; number >>= 16; } | |
| if(256 <= number) { logCount += 8; number >>= 8; } | |
| if(16 <= number) { logCount += 4; number >>= 4; } | |
| if(4 <= number) { logCount += 2; number >>= 2; } | |
| return logCount + (2 <= number ? 1 : 0); | |
| } | |
| } |
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 TestTimeout | |
| { | |
| static void Main(string[] args) | |
| { | |
| new Timeout( | |
| start: () => | |
| { | |
| Thread.Sleep(10000); | |
| Console.WriteLine("it's working!"); | |
| }, |
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
| void move(int from, int to){ | |
| printf("\nMove from %d to %d", from, to); | |
| } | |
| // n๊ฐ์ ์๋ฐ์ from ์์ by๋ฅผ ๊ฑฐ์ณ to๋ก ์ฎ๊ธด๋ค. | |
| void hanoi(int n, int from, int by, int to){ | |
| if (n == 1) | |
| move(from, to); | |
| else{ | |
| hanoi(n - 1, from, to, by); // 1๋ฒ N-1๊ฐ์ ์๋ฐ์ ๊ธฐ๋ฅ3์ ๊ฑฐ์ณ 2๋ก ์ฎ๊ธด๋ค. |
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
| public class LogUtil { | |
| static int log2 (int number) { | |
| int logCount = 0; | |
| while(number>>=1 > 0) logCount++; | |
| return logCount; | |
| } | |
| } |
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
| using System; | |
| namespace Samples | |
| { | |
| /// <summary> | |
| /// ๋๊ธฐ์ ์ผ๋ก ์ฌ์๋๋ฅผ ํด์ผํ๋ ๊ฒฝ์ฐ ์ฌ์ฉ๋๋ retry ํจ์์ ๋๋ค. | |
| /// </summary> | |
| public class Retry | |
| { | |
| /// <summary> |
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
| { | |
| "editor.tabSize": 3, | |
| "editor.insertSpaces": false, | |
| "editor.renderWhitespace": "boundary", | |
| "editor.detectIndentation": false, | |
| "editor.wrappingColumn": 1000, | |
| "workbench.welcome.enabled": true, | |
| "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe", | |
| "explorer.openEditors.visible": 0 | |
| } |
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 Vue from 'vue' | |
| import VueRouter from 'vue-router' | |
| import firebase from 'firebase' | |
| import signIn from './sign-in.vue' | |
| Vue.use(VueRouter); | |
| const router = new VueRouter({ | |
| routes: [ | |
| { |
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 Vue from 'vue' | |
| import VueRouter from 'vue-router' | |
| import firebase from 'firebase' | |
| import signIn from './sign-in.vue' | |
| Vue.use(VueRouter); | |
| const router = new VueRouter({ | |
| routes: [ | |
| { |
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 Vue from 'vue' | |
| import VueRouter from 'vue-router' | |
| import firebase from 'firebase' | |
| import {Message} from 'element-ui' | |
| import signIn from './sign-in.vue' | |
| Vue.use(VueRouter); | |
| var routes = { | |
| root: { |
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
| git config --global alias.st status | |
| git config --global alias.br branch | |
| git config --global alias.co checkout | |
| git config --global alias.cm "commit -m " | |
| git config --global alias.l 'log --color --graph --pretty=oneline --decorate --date=short --abbrev-commit --branches' | |
| git config --global alias.ds 'diff --stat' | |
| git config --global diff.tool vimdiff | |
| git config --global merge.tool vimdiff | |
| git config --global difftool.prompt false |