This file contains 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
var http = require('http'); // node 내장 모듈 불러옴 | |
var hostname = '127.0.0.1'; // localhost와 동일 | |
var port = 3000; | |
http.createServer(function(req, res){ | |
res.writeHead(200, { 'Content-Type': 'text/plain' }); | |
res.end('Hello World\n'); | |
}).listen(port, hostname); |
This file contains 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
<button id="popoverBtn" type="button" class="btn btn-primary pull-right" data-toggle="popover" data-placement="top">Add</button> | |
<div id="popover-content" class="hide"> | |
<form id="addFaq" role="form"> | |
<div class="form-group"> | |
<label for="popoverTitle">Title</label> | |
<textarea class="form-control" name="title" id="popoverTitle" placeholder="Enter title" required></textarea> | |
</div> | |
<div class="form-group"> | |
<label for="popoverContents">Content</label> | |
<textarea class="form-control" name="contents" rows="5" id="popoverContents" placeholder="Enter content" required></textarea> |
This file contains 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
{ | |
"auto_complete": true, | |
"auto_indent": true, | |
"default_encoding": "UTF-8", | |
"disable_formatted_linebreak": true, | |
"font_size": 12, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" |
This file contains 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 <stdio.h> | |
int main(void) { | |
printf("hello c\n"); | |
} |
This file contains 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
// 문자열 | |
var name = "Ryan" | |
var sex = "male" | |
// 숫자 | |
var age = 26 | |
var weight = 77 | |
// 불린 | |
var happy = true; |
This file contains 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
// 문자열 | |
var name = "Ryan" | |
var sex = "male" | |
// 숫자 | |
var age = 26 | |
var weight = 77 | |
// 불린 | |
var happy = true; |
This file contains 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
// Psedo Code | |
public static index seqSearch(int n, keytype[] S, keytype x){ | |
location = 1; | |
while( location <= n && S[location] != x ){ | |
location++; | |
} | |
if( location >n ) | |
location = 0; | |
return location; |
This file contains 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
//Pseho Code | |
index binarySearch(int n, keytype[] S, keytype x){ | |
location = 0; // 못 찾은 경우 | |
int high, low, mid; | |
low = 1; // 시작은 1부터 | |
high = n // 가장 큰 위치는 전체 배열 크기 | |
while( low <= high && location == 0 ){ | |
mid = (low + mid) / 2 // 소수점 자동 삭제됨 | |
if( x == S[mid] ) // 중앙 값이 찾는 값 |
This file contains 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
//Psedo Code | |
int fib_1(int n){ | |
if( n <= 1) | |
return n; | |
else | |
return fib_1(n-1) + fib_1(n-2); | |
} |
This file contains 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
//Psedo Code | |
int fib_2(int n){ | |
index i, j; | |
int f[] = new int[n+1]; | |
int f[0] = 1; // 처음 값 1로 | |
if( n > 0){ | |
int f[1] = 1 ; // 두번째도 1로 피보나치 수열 기본 | |
for( i = 2 ; i <= n ; i++) | |
f[i] = f[i-1] + f[i-2]; | |
} |
OlderNewer