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
const sqlite3 = require('sqlite3').verbose(); | |
let db = undefined; | |
function isDatabaseUndefined() { | |
if (!db) | |
return true; | |
return false; | |
} | |
function getNowDate() { | |
const d = new Date(); |
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
const postAjax = (url, data) => { | |
const ajax = new XMLHttpRequest(); | |
ajax.open("POST",url, false); | |
ajax.setRequestHeader("Content-Type", "application/json"); | |
ajax.send(JSON.stringify(data)) | |
} |
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
const cookieParser = require('cookie-parser'); | |
const bodyParser = require('body-parser'); | |
const express = require('express'); | |
const jwt = require('jsonwebtoken'); | |
const app = express(); | |
app.use(cookieParser()); | |
app.use(bodyParser.urlencoded({ extended: true })); | |
const config = { |
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 <SFML/Graphics.hpp> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <tuple> | |
using namespace std; | |
int main() { | |
auto windowVideoMode = sf::VideoMode(1000, 900); |
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
#pragma warning(disable:4996) | |
#pragma once | |
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <sstream> | |
#include <iomanip> | |
#include <chrono> | |
#include <ctime> |
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
\documentclass{article} | |
\usepackage{kotex} | |
\usepackage{graphicx} | |
\usepackage{titlepic} | |
\usepackage{indentfirst} | |
\usepackage{amsmath} | |
\usepackage{polynom} | |
\usepackage{abstract} | |
\usepackage{amssymb} | |
\usepackage{setspace} |
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 math | |
import random | |
import sys | |
def l(g, m): | |
return round(g - math.log(m, 2.5)) | |
def g1brighterg2(g1, g2): | |
return pow(2.5, abs(g2 - g1)) | |
def gradefn(g, brighter): | |
return l(g, brighter) |
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 <iostream> | |
#include <functional> | |
#include <vector> | |
#include <map> | |
#include <tuple> | |
namespace boost { | |
struct d2 { | |
int x = 0; | |
int y = 0; |
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 <random> | |
std::random_device rseed; | |
std::mt19937 gen(rseed()); | |
std::uniform_int_distribution<int> height(160, 210); | |
std::uniform_int_distribution<int> weight(40, 90); | |
height(gen); | |
weight(gen); |
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 <iostream> | |
using namespace std; | |
struct dllitem { | |
dllitem * prev; | |
dllitem * next; | |
float value; | |
}; |