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> | |
template <typename Object> | |
class LinkedBinaryTree { | |
protected: | |
struct Node { | |
Object element; | |
Node* parent; | |
Node* left; | |
Node* right; |
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 asyncio | |
import pandas as pd | |
from aiohttp import ClientSession | |
from bs4 import BeautifulSoup | |
from typing import List, Dict, Optional, Any | |
ALGOLIA_URL = 'https://w1bghm6ujn-dsn.algolia.net/1/indexes/*/queries' | |
HEADERS = { | |
'x-algolia-agent': 'Algolia for JavaScript (3.35.1); Browser; instantsearch.js (3.7.0); Vue (2.6.11); Vue InstantSearch (2.6.0); JS Helper (2.28.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
#ifndef CUSTOMERROR_H_ | |
#define CUSTOMERROR_H_ | |
#include <string> | |
#include <iostream> | |
class RuntimeException { | |
public: | |
RuntimeException(const std::string& err) : error_message_(err) {} |
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 <vector> | |
using namespace std; | |
int main() { | |
int n; | |
cin >> n; | |
vector<int> arr(n); | |
vector<int> graph(n, 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 <iostream> | |
using namespace std; | |
int board[105][105]; | |
int dp[105][105]; | |
int main() { | |
cin.tie(0); | |
ios::sync_with_stdio(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 <iostream> | |
using namespace std; | |
int board[105][105], dp[105][105]; | |
int main() { | |
cin.tie(0); | |
ios::sync_with_stdio(0); | |
int n; |
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 session = require('express-session'); | |
const MemoryStore = require('memorystore')(session); | |
app.use(session({ | |
cookie: { | |
maxAge: 86400000 // 쿠키 만료 시간 설정 | |
}, | |
store: new MemoryStore({ | |
checkPeriod: 86400000 // 24시간마다 만료된 항목 정리 | |
}), |
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 os | |
import base64 | |
def compare_file_and_base64_size(file_path): | |
try: | |
with open(file_path, "rb") as file: | |
original_bytes = file.read() | |
# Encode the bytes to Base64 | |
base64_encoded = base64.b64encode(original_bytes) |
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
class Node { | |
constructor(item, next) { | |
this.item = item; | |
this.next = next; | |
} | |
} | |
class Stack { | |
constructor() { | |
this.top = null; |
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
class TrieNode { | |
public: | |
bool is_word; | |
TrieNode* children[26]; | |
TrieNode() { | |
is_word = false; | |
for (auto& child : children) | |
child = nullptr; | |
} |
NewerOlder