Skip to content

Instantly share code, notes, and snippets.

View SnowyPainter's full-sized avatar
🎯
Focusing

Minwoo Yu SnowyPainter

🎯
Focusing
View GitHub Profile
const sqlite3 = require('sqlite3').verbose();
let db = undefined;
function isDatabaseUndefined() {
if (!db)
return true;
return false;
}
function getNowDate() {
const d = new Date();
const postAjax = (url, data) => {
const ajax = new XMLHttpRequest();
ajax.open("POST",url, false);
ajax.setRequestHeader("Content-Type", "application/json");
ajax.send(JSON.stringify(data))
}
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 = {
#include <SFML/Graphics.hpp>
#include <iostream>
#include <string>
#include <vector>
#include <tuple>
using namespace std;
int main() {
auto windowVideoMode = sf::VideoMode(1000, 900);
@SnowyPainter
SnowyPainter / FileErrorReport.cpp
Created January 24, 2022 14:51
save errors to file
#pragma warning(disable:4996)
#pragma once
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <chrono>
#include <ctime>
\documentclass{article}
\usepackage{kotex}
\usepackage{graphicx}
\usepackage{titlepic}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{polynom}
\usepackage{abstract}
\usepackage{amssymb}
\usepackage{setspace}
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)
#include <iostream>
#include <functional>
#include <vector>
#include <map>
#include <tuple>
namespace boost {
struct d2 {
int x = 0;
int y = 0;
#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);
#include <iostream>
using namespace std;
struct dllitem {
dllitem * prev;
dllitem * next;
float value;
};