Skip to content

Instantly share code, notes, and snippets.

View ChlorUpload's full-sized avatar
🌴
On vacation

Daegeon Song ChlorUpload

🌴
On vacation
View GitHub Profile
@ChlorUpload
ChlorUpload / addmulcal.c
Last active September 7, 2019 17:05
A calculator recognizing addition and multiplication
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#define MAX 128
bool is_digit(char ch) { return (ch >= '0' && ch <= '9'); }
int main(void)
{
@ChlorUpload
ChlorUpload / double_pointer_exercise.cpp
Created September 9, 2019 16:13
double pointer exercise program ( visual studio 2019 )
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int main()
{
unsigned n;
scanf("%u", &n);
char* str = (char*)malloc(sizeof(char) * (n + 1));
@ChlorUpload
ChlorUpload / StackQueue.hpp
Last active September 17, 2019 13:59
find the number of fastest path in n by m matrix ( 0 is way, 1 is obstacle )
//Copyright 2019. Song, Dae-geon
#ifndef __H_STACKQUEUE__
#define __H_STACKQUEUE__
#include <stdio.h>
#include <stdlib.h>
#include <type_traits>
#include <string>
@ChlorUpload
ChlorUpload / main.cpp
Last active October 8, 2024 18:17
A Game loop using PeekMessage function
// Set project as empty windows project.
// A game loop using PeekMessage function.
// Uses double buffering.
#include <Windows.h>
#include <time.h>
#include <math.h>
#pragma comment(lib, "winmm.lib")
@ChlorUpload
ChlorUpload / number_of_cases.py
Created December 17, 2019 13:14
Solving "number of cases" math problem in python
from itertools import permutations
li_Consanant = [ 'B', 'C', 'D', 'F', 'G', 'H']
li_Vowel = ['A', 'E']
# check every consanant is neighbor in a statement
def isValid(statement): # statement list of code
def isConsanant(code):
global li_Consanant
@ChlorUpload
ChlorUpload / class.cpp
Created February 14, 2020 16:00
Constructor / Destructor Study
#define DEFAULT_CONSTRUCTOR_EXISTS
//#define COPY_CONSTRUCTOR_EXISTS
//#define ASSIGN_OPERATOR_EXITS
#include <iostream>
using namespace std;
class Parent
{
class EmptyException(Exception):
pass
class ArrayDeque:
# class varriable
DEFAULT_CAPACITY = 10
def __init__(self, capacity=DEFAULT_CAPACITY):
self._data = [None] * capacity
self._front = 0
@ChlorUpload
ChlorUpload / quad.py
Created April 13, 2020 17:55
Get Area of Quadratic function
def IntDefault(s : str, default : int):
if s == '':
return default
else:
return int(s)
def QFarea(d : str):
# Toknization (White Spacing kill)
d = d.replace(' ', '')
@ChlorUpload
ChlorUpload / Index.html
Created March 8, 2021 04:53 — forked from meziantou/Index.html
Javascript - Record audio
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<h1>Audio</h1>
@ChlorUpload
ChlorUpload / .clang-format
Created March 11, 2021 06:33 — forked from paxbun/.clang-format
My clang-format configuration file
# Copyright (c) 2020-2021 Chanjung Kim (paxbun). All rights reserved.
# See Clang 10 documentation for more information.
BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true