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
interface PhoneNumberDictionary { | |
[phone: string]: { | |
num: number; | |
}; | |
} | |
enum PhoneType { | |
Home = 'home', | |
Office = 'office', | |
Studio = 'studio' |
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 <cstdio> | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
using ull = long long int; | |
int 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 <cstdio> | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <set> | |
using namespace std; | |
using ull = long long int; | |
int 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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class 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
s = input() | |
# wrong ab = "abcdefghijklmnopqrstuvxwyz" | |
ab = "abcdefghijklmnopqrstuvwxyz" | |
ans = [-1] * len(ab) | |
for i in range(len(s)): | |
for j in range(len(ab)): | |
if s[i] == ab[j] and ans[j] == -1: | |
ans[j] = i | |
print(" ".join(map(str,ans))) |
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 sys | |
import numpy as np | |
import random | |
# setup | |
words = [] | |
if len(sys.argv) < 3: | |
print("Usage: {} numItem numUser".format(sys.argv[0])) | |
exit(1) |
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
<configuration> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
</appender> | |
<root level="debug"> | |
<appender-ref ref="STDOUT" /> | |
</root> |
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 java.util.Arrays; | |
public class Solution { | |
public String solution(String[] participant, String[] completion) { | |
Arrays.sort(participant); | |
Arrays.sort(completion); | |
int 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
USE honuxdb; | |
SET SESSION transaction_isolation='SERIALIZABLE'; | |
# SELECT @@GLOBAL.transaction_isolation, @@transaction_isolation; | |
START TRANSACTION; | |
SELECT SLEEP(3); | |
UPDATE SUA SET B = B + 1 WHERE A = 'YJ'; | |
SELECT * FROM SUA; |
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 NUM = 10; | |
fs = require('fs'); | |
const ws = fs.createWriteStream('./data.csv'); | |
const genId = (i) => { | |
const ids = ['apple', 'banana', 'mango', 'tuna' , 'muken', | |
'ym', 'sony', 'aiwa', 'circus' ]; | |
const prefix = ids[parseInt(Math.random() * ids.length)]; | |
return prefix + i; |