Skip to content

Instantly share code, notes, and snippets.

View sigmadream's full-sized avatar
😆

Sangkon, Han sigmadream

😆
View GitHub Profile
import java.util.*;
public class IterativeMergeSort {
public static Term[] iterativeMergeSort(Term[] terms) {
if (terms == null || terms.length <= 1) {
return terms;
}
int n = terms.length;
package Chap6_Sorting;
class Term implements Comparable<Term>{
double coef; // 계수
int exp; // 지수
Term(){}
//--- 생성자(constructor) ---//
Term(double coef, int exp) {
this.coef = coef; this.exp = exp;
package jvm.ds;
import java.util.*;
/**
* Collections를 활용한 N-Queen 문제 해결
* - ArrayList: 각 행의 퀸 위치(열) 저장
* - HashSet: 빠른 충돌 검사
*/
public class NQueenProblem {
@sigmadream
sigmadream / sort.test.ts
Last active September 11, 2025 03:26
간단한 정렬 테스트 코드
import { simpleSort } from '@/sort';
import '@jest/globals';
describe('숫자 정렬 함수', () => {
test('기본적인 정렬 동작', () => {
expect(simpleSort([3, 1, 2])).toEqual([1, 2, 3]);
expect(simpleSort([10, -5, 0, 2])).toEqual([-5, 0, 2, 10]);
expect(simpleSort([1])).toEqual([1]);
expect(simpleSort([])).toEqual([]);
expect(simpleSort([0, -1, 1, -2, 2])).toEqual([-2, -1, 0, 1, 2]);
from typing import Annotated, List, Dict, Any
from fastapi import APIRouter, Depends, status, HTTPException
from sqlmodel import Session, select
from .solve import path_getter, dir_maker
from ..database import get_db
from ..models import (
GichulQna,
GichulSet,
GichulSetGrade,
GichulSetInning,
---
description:
globs:
alwaysApply: true
---
## Core Directive
You are a senior software engineer AI assistant. For EVERY task request, you MUST follow the three-phase process below in exact order. Each phase must be completed with expert-level precision and detail.
## Guiding Principles

HTTPS 인증서

  • certbot를 사용해서 인증서 발급
sudo certbot certonly --manual --preferred-challenges dns -d "*.codemetrics.app" -d "codemetrics.app"

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for *.codemetrics.app and codemetrics.app
@sigmadream
sigmadream / myAngular.html
Created November 8, 2024 17:44 — forked from faustinoaq/myAngular.html
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;
시군구별 1997.01 1997.01 1997.01 1997.02 1997.02 1997.02 1997.03 1997.03 1997.03 1997.04 1997.04 1997.04 1997.05 1997.05 1997.05 1997.06 1997.06 1997.06 1997.07 1997.07 1997.07 1997.08 1997.08 1997.08 1997.09 1997.09 1997.09 1997.10 1997.10 1997.10 1997.11 1997.11 1997.11 1997.12 1997.12 1997.12 1998.01 1998.01 1998.01 1998.02 1998.02 1998.02 1998.03 1998.03 1998.03 1998.04 1998.04 1998.04 1998.05 1998.05 1998.05 1998.06 1998.06 1998.06 1998.07 1998.07 1998.07 1998.08 1998.08 1998.08 1998.09 1998.09 1998.09 1998.10 1998.10 1998.10 1998.11 1998.11 1998.11 1998.12 1998.12 1998.12 1999.01 1999.01 1999.01 1999.02 1999.02 1999.02 1999.03 1999.03 1999.03 1999.04 1999.04 1999.04 1999.05 1999.05 1999.05 1999.06 1999.06 1999.06 1999.07 1999.07 1999.07 1999.08 1999.08 1999.08 1999.09 1999.09 1999.09 1999.10 1999.10 1999.10 1999.11 1999.11 1999.11 1999.12 1999.12 1999.12 2000.01 2000.01 2000.01 2000.02 2000.02 2000.02 2000.03 2000.03 2000.03 2000.04 2000.04 2000.04 2000.05 2000.05 2000.05 2000.06 2000.06 2000.06 2000.07 2
@sigmadream
sigmadream / pokemon.json
Created October 24, 2024 06:31 — forked from mrcsxsiq/pokemon.json
List of pokemon
[
{
"name": "Bulbasaur",
"id": "#001",
"imageurl": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/001.png",
"xdescription": "Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.",
"ydescription": "Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.",
"height": "2' 04\"",
"category": "Seed",
"weight": "15.2 lbs",