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 World\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
/* node-qsb npm Module Example (Select Query Default) */ | |
var qsb = require('node-qsb'); | |
var qs = new qsb().select('tableName') | |
.where('idx', '>', '10') | |
.build(); | |
qs.printString(); | |
//Standard Output : SELECT * FROM `tableName` WHERE `idx` > '10'; | |
console.log(qs.returnString()); |
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
//node-qsb를 사용한 데이터베이스 쿼리문 관리 | |
var qsb = require('node-qsb'); | |
var mysql = require('../config/mysql.js') | |
var params = { | |
cols : ['email', 'passwd', 'uName', 'stdNum', 'major', 'phone', 'emailNotify', 'tIdx'], | |
vals : [req.email, req.sha2passwd, req.uName, req.stdNum, req.major, req.phone, req.emailNotify, '5'], | |
} | |
var usingQsbQs = new qsb() | |
.insert("users") |
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
//node-qsb를 사용하지 않고 데이터베이스 쿼리문 하드 코딩 | |
var originQs = "insert into users(email, passwd, uName, stdNum, major, phone, emailNotify, tIdx) " | |
+ "values ('"+req.email+"', '"+req.sha2passwd +"', '" | |
+ req.uName+"', '"+req.stdNum+"', '"+req.major+"', '"+req.phone+"', '" | |
+ req.emailNotify+"', 5);"; |
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 qsb = require("node-qsb") | |
var qs = new qsb().select('myTable', 'MT') | |
.join('yourTable', 'YT') | |
.join('ourTable', 'OT') | |
.where('MT.idx', '=', 'YT.mIdx') | |
.where('YT.idx', '=', 'OT.yIdx') | |
.where('MT.idx', '<=', 10) | |
.whereOr('YT.idx', '<', 100) | |
.limit(0, 100) |
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
<head> | |
<title>JSON Basic</title> | |
<meta charset="utf-8"/> | |
</head> | |
<body> | |
<script> | |
/* Array and Object Definition */ | |
var arr = [ "Yongwoo", 25, "Catholic Univ, of Korea", "Computer Science" ]; | |
var obj = { "NAME" : "Yongwoo", "AGE" : 25, "UNIVERSITY" : "Catholic Univ, of Korea", "MAJOR" : "Computer Science" }; |
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
<head> | |
<title>JSON Basic</title> | |
<meta charset="utf-8"/> | |
</head> | |
<body> | |
<script> | |
/* Array and Object Definition */ | |
var arr = [ "Yongwoo", 25, "Catholic Univ, of Korea", "Computer Science" ]; | |
var obj = { "NAME" : "Yongwoo", "AGE" : 25, "UNIVERSITY" : "Catholic Univ, of Korea", "MAJOR" : "Computer Science" }; |
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 express = require('express'); | |
var app = express(); | |
var expressVaildator('express-vaildator'); | |
app.use(expressVaildator()); |
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 express = require('express'); | |
var util = require('util'); | |
var expressVaildator = require('express-validator'); | |
var app = express(); | |
app.use(expressVaildator()); | |
app.get('/*', function(req, res) { | |
req.checkQuery('email', 'Invaild email type').isEmail(); |
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
/* import dependency package */ | |
import express from 'express'; | |
import path from 'path'; | |
import bodyParser from 'body-parser'; | |
import dotenv from 'dotenv'; | |
import morgan from 'morgan'; | |
import session from 'express-session'; | |
import expressValidator from 'express-validator'; | |
import webpackDevServer from 'webpack-dev-server'; |
OlderNewer