This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 numpy as np | |
| def generateMoney(numPlayers): | |
| # global variables and Constants | |
| MAX_MONEY = 9_999_900 | |
| MIN_MONEY = 0 | |
| STEP = 100 | |
| # μ κ·λΆν¬ μ€μ | |
| mean = (MAX_MONEY - MIN_MONEY) / 2 # μ€μκ°μ νκ· μΌλ‘ | |
| std_dev = mean / 6 # λλ΅ Β±3Οκ° μ 체 λ²μκ° λλλ‘ μ€μ | |
| # μ κ·λΆν¬λ‘ λμ μμ± |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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; |