Node.js์์ RESTful API๋ฅผ ๊ตฌ์ถํ๊ธฐ ์ํด ์ฐ์ด๋ ๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ธ ํ๋ ์์ํฌ๋ Express - Node.js web application framework์ ๋๋ค.
var express = require('express')
var app = express()
app.get('/', function(req, res) {| export const lazyLoad = (src, callback) => { | |
| const script = document.createElement('script') | |
| script.type = 'text/javascript' | |
| script.async = true | |
| script.src = src | |
| document.getElementsByTagName('head')[0].appendChild(script); // add to page | |
| if (script.readyState) { | |
| script.onreadystatechange = function () { | |
| if (script.readyState == "loaded" || script.readyState == "complete") { |
| var x = 'jyhwng' | |
| // string.length | |
| console.log(x.length === 6) | |
| // string.prototype.indexOf | |
| var index = x.indexOf('j') | |
| console.log(index === 0) |
Node.js์์ RESTful API๋ฅผ ๊ตฌ์ถํ๊ธฐ ์ํด ์ฐ์ด๋ ๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ธ ํ๋ ์์ํฌ๋ Express - Node.js web application framework์ ๋๋ค.
var express = require('express')
var app = express()
app.get('/', function(req, res) {I hereby claim:
To claim this, I am signing this object:
| mike@rbci:~$ psql -U postgres | |
| psql (9.0.3) | |
| Type "help" for help. | |
| postgres=# update pg_database set datallowconn = TRUE where datname = 'template0'; | |
| UPDATE 1 | |
| postgres=# \c template0 | |
| You are now connected to database "template0". | |
| template0=# update pg_database set datistemplate = FALSE where datname = 'template1'; | |
| UPDATE 1 |
| from os import listdir | |
| import sys | |
| import json | |
| import csv | |
| import gevent | |
| import pandas as pd | |
| import numpy as np |
| library(jsonlite) | |
| basic.members <- fromJson("assembly_members.json") | |
| basic.attendances <- read.csv("attendances.csv") | |
| members <- basic.members[, c("idx", "name_kr", "party", "when_elected")] | |
| main.attendances <- merge(members, basic.attendances, by = "idx") | |
| write.csv(main.attendances, file = "main_attendaces.csv", sep = ",", row.names = FALSE) |
| from os import listdir | |
| import sys | |
| import json | |
| import csv | |
| import gevent | |
| import pandas as pd | |
| import numpy as np |
| import sys | |
| import csv | |
| from pymongo import MongoClient | |
| MONGO_HOST = 'localhost' | |
| MONGO_PORT = 27017 | |
| DOCUMENT_NAME = 'test' | |
| COLLECTION_NAME = 'service' |
| import json | |
| import csv | |
| CSV_FILENAME = 'services.csv' | |
| JSON_FILENAME = 'services.json' | |
| COLUMNS = ('์ ๋ชฉ', '์ง์๋ด์ฉ', '์๋น์ค ๋ชฉ์ ', '์ํ์ผ์', '์ข ๋ฃ์ผ์', '์๊ด๊ธฐ๊ด', '์๊ด๊ธฐ๊ด ์ฐ๋ฝ์ฒ', '๊ด์ฌ๋ถ์ผ', '์ง์ํํ', '์ง์๋์', '์๊ธ์๊ฒฉ', '์ ์ ๊ธฐ์ค', '์ค๋ณต๋ถ๊ฐ ์๋น์ค', '์ ์ฒญํ์์ฌ๋ถ', '์จ๋ผ์ธ์ ์ฒญ๊ฐ๋ฅ์ฌ๋ถ', '์ฒ๋ฆฌ๊ธฐํ', '์ ์ฒญ์ ์ฐจ', '๊ตฌ๋น์๋ฅ', '์ ์ฒญ๊ธฐํ', '์ ์๊ธฐ๊ด', '์ ์๊ธฐ๊ด ์ฐ๋ฝ์ฒ', '์ฒ๋ฆฌ๊ธฐ๊ด', '์ฒ๋ฆฌ๊ธฐ๊ด ์ฐ๋ฝ์ฒ', '๋ฌธ์์ฒ', '๋ฌธ์์ ํ๋ฒํธ', '์น์ฌ์ดํธ') | |
| def convert(): | |
| csv_reader = open(CSV_FILENAME, 'r') | |
| json_writer = open(JSON_FILENAME, 'w') |