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
<!--simple bootstarp tab example--> | |
<div> | |
<!-- Nav tabs --> | |
<ul class="nav nav-tabs" role="tablist"> | |
<!--class="active" means now focusing. 현재 첫번째 home으로 가는 li 태그가 기본--> | |
<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li> | |
<li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li> | |
<li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li> | |
<li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li> | |
</ul> |
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
// 넘어온 값이 빈값인지 체크합니다. | |
// !value 하면 생기는 논리적 오류를 제거하기 위해 | |
// 명시적으로 value == 사용 | |
// [], {} 도 빈값으로 처리 | |
var isEmpty = function(value){ | |
if( value == "" || value == null || value == undefined || ( value != null && typeof value == "object" && !Object.keys(value).length ) ){ | |
return true | |
}else{ | |
return false | |
} |
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
// color1의 값을 color2에 저장한다. | |
var color1 ="red"; | |
var color2 = color1; | |
console.log(color1); // "red" | |
console.log(color2); // "red" | |
color1 = "blue" | |
console.log(color1); // "blue" |
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; |
OlderNewer