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
var element = driver.FindElement(By.XPath("//*[@id='account']/a")); | |
element.Click(); |
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
/* List내의 Map 요소들을 특정 key-value를 기준으로 정렬 할 수 있다. */ | |
myList.sort(Comparator.comparing(m -> m.get("sysnamea"), Comparator.nullsLast(Comparator.naturalOrder()))); | |
myList.forEach(System.out::println); |
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
/* Stream<E>를 Iterable<E>로 중개해주는 어댑터 */ | |
public static <E> Iterable<E> iterableOf(Stream<E> stream) { | |
return stream::iterator; | |
} | |
/* Iterable<E>를 Stream<E>로 중개해주는 어댑터 */ | |
public static <E> Stream<E> streamOf(Iterable<E> iterable) { | |
return StreamSupport.stream(iterable.spliterator(), false); | |
} |
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
pattern1 = [1,2,3,4,5] | |
pattern2 = [2,1,2,3,2,4,2,5] | |
pattern3 = [3,3,1,1,2,2,4,4,5,5] | |
# 각 패턴의 크기는 재각각이고 어떤 비교 리스트에 대하여 패턴 주기를 맞출시 인덱스를 mod 나누어 주기 관리를 한다. | |
for idx, answer in enumerate(answers): | |
if answer == pattern1[idx%len(pattern1)]: | |
score[0] += 1 | |
if answer == pattern2[idx%len(pattern2)]: | |
score[1] += 1 |