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> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
std::random_device rd; | |
std::mt19937 rng(rd()); | |
std::uniform_int_distribution<int> uni(0, 10000000); | |
for (int i = 0; i < 10; ++i) { |
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 <stdio.h> | |
#include <wchar.h> //wcslen | |
int is_contain_hangul(const wchar_t *str) { | |
const size_t len = wcslen(str); | |
const wchar_t start_ch = L'가'; | |
const wchar_t end_ch = L'힣'; | |
register int i; | |
for (i = 0; i < len; ++i) { |
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 <nana/gui.hpp> | |
#include <nana/gui/widgets/label.hpp> | |
int main() | |
{ | |
using namespace nana; | |
form fm; | |
label lb{ fm, rectangle{ 10, 10, 100, 100 } }; | |
lb.caption("Hello, world!"); |
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
# parser for this problem (https://www.acmicpc.net/problem/9987) | |
import requests | |
from bs4 import BeautifulSoup | |
if __name__ == "__main__": | |
url = "http://web.archive.org/web/20140301191716/http://pokemondb.net/pokedex/national" | |
soup = BeautifulSoup(requests.get(url).text, 'lxml') | |
list = soup.find_all('span', {'class': 'infocard-tall '}) | |
db = [] |
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
/* declaration and option settings */ | |
%{ | |
void addWord(char *text); | |
void addNewLine(void); | |
void addChar(void); | |
int chars = 0; | |
int words = 0; | |
int lines = 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
# python3 | |
import magneturi | |
TORRENT_FILE_NAME = 'ubuntu-16.04.3-desktop-amd64.iso.torrent' | |
def main(): | |
print(magneturi.from_torrent_file(TORRENT_FILE_NAME)) | |
if __name__ == '__main__': | |
main() |
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 <stdio.h> | |
#include <string.h> | |
int main() { | |
char prefix[100]; | |
snprintf(prefix, sizeof(prefix), "%s-%s", "main-for","abc"); | |
printf("%s\n", prefix); | |
return 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
Java 🕓 36h45m ██████████████████▋░░░ 85.2% | |
Java Properties 🕓 2h33m █▎░░░░░░░░░░░░░░░░░░░░ 5.9% | |
Properties 🕓 1h42m ▊░░░░░░░░░░░░░░░░░░░░░ 4.0% | |
HTML 🕓 1h14m ▋░░░░░░░░░░░░░░░░░░░░░ 2.9% | |
SQL 🕓 21m ▏░░░░░░░░░░░░░░░░░░░░░ 0.8% |
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 time | |
import urllib.request | |
from selenium.webdriver.chrome.options import Options | |
from selenium import webdriver | |
VIEWER_PATH = "http://webtoon.daum.net/webtoon/viewer/" | |
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
# Untap AdoptOpenJDK first | |
brew untap AdoptOpenJDK/openjdk | |
# If you want to download latest version | |
brew install --cask temurin | |
# To install specific version | |
brew tap homebrew/cask-versions | |
brew install --cask temurin8 temurin11 |
OlderNewer