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
| function serializeParam(name, value) { | |
| if (typeof value === "object" && value !== null) { | |
| var stack = []; | |
| if (isIndexable(value)) { | |
| for (var index in value) { | |
| if (!isMetadataProperty(index)) { | |
| var indexName = getIndexName(name, index); | |
| var serialized = serializeParam(indexName, value[index]); | |
| if (serialized) { | |
| stack.push(serialized); |
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
| <% | |
| String name = "[[INSERT ATTRIBUTE NAME]]"; | |
| Object object = pageContext.findAttribute(name); | |
| if (object != null) { | |
| java.io.Writer writer = pageContext.getOut(); | |
| Class<?> beanClass = object.getClass(); | |
| String groupName = beanClass.getName() + " instance description"; | |
| writer.write("<script>console.group('" + groupName + "');"); |
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
| package com.jacknie.doodle.kakao; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.Queue; | |
| import java.util.StringTokenizer; | |
| import java.util.concurrent.LinkedBlockingQueue; | |
| import java.util.stream.Collectors; |
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
| package com.jacknie.doodle.kakao; | |
| import java.util.Arrays; | |
| import java.util.LinkedHashMap; | |
| import java.util.function.Supplier; | |
| public class KakaoTest3 { | |
| public static void main(String[] args) { | |
| int t1 = getRunningTime(3, new String[] {"Jeju", "Pangyo", "Seoul", "NewYork", "LA", "Jeju", "Pangyo", "Seoul", "NewYork", "LA"}); |
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
| package com.jacknie.doodle.kakao; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| public class KakaoTest2 { | |
| static final Pattern DART_RESULT_PATTERN = Pattern.compile("(\\d{1,2})([SDT])([*#]?)"); | |
| public static void main(String[] args) { |
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
| package com.jacknie.doodle.kakao; | |
| import java.util.Arrays; | |
| public class KakaoTest1 { | |
| public static void main(String[] args) { | |
| String[] r1 = decryptMap(5, new int[] {9, 20, 28, 18, 11}, new int[] {30, 1, 21, 17, 28}); | |
| String[] r2 = decryptMap(6, new int[] {46, 33, 33, 22, 31, 50}, new int[] {27, 56, 19, 14, 14, 10}); | |
| System.out.println(Arrays.toString(r1)); |
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
| ํ๋ก์ ํธ์์ LOCK ์ด ์์ฃผ ๊ฑธ๋ฆฌ๋ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ฌ ์ฐ๊ตฌํ๋ ์ค์ ์๋์ sql ๋ฌธ์ ์ด์ฉํ์ฌ lock ์ธ์ ์ ์ฐพ์์ ๊ด๋ฆฌํ ์ ์๋ค๋ ๊ฒ์ ์์๋ค. ๊ทธ๋ฌ๋ ์ด SQL ์ System ์ ์ ๋ง์ด ์ฌ์ฉํ ์ ์๋ค๋ ์ ์ฝ์ด ์๋ค. | |
| LOCK ์ด ๋ฐ์ํ๊ฒ ๋๋ฉด ํ๋ก๊ทธ๋จ์ด ๋์ํ๋ค๊ฐ ๋ฉ์ถ๊ณ ๊ธฐ๋ค๋ฆฌ๊ฒ ๋๋ค. ์์ธ์ ํ์ ํ๋๋ฐ ์๊ฐ์ด ํ๋นํ๊ฒ ๋๋๋ฐ ์๊ณ ๋ณด๋ ํ ์ด๋ธ์ LOCK์ด ๊ฑธ๋ฆฐ ๊ฒ์ด์๋ค๋ฉด ํํํจ์ ๊ธํ ์ ์๋ค. ์์ฃผ LOCK ์ด ๊ฑธ๋ฆฌ๋ ํ ์ด๋ธ์ด๋ผ๋ฉด SELECT ํ ๋ WAIT ํ์์ 1 ์ ๋๋ก ์ฃผ๋ฉด 1์ด๋์ LOCK ์ด ํ๋ฆฌ๊ธฐ๋ฅผ ๋๊ธฐํ๋ค๊ฐ ์ค๋ฅ ์ฒ๋ฆฌ๋๋ฏ๋ก ๊ฐ๋ฐ์๊ฐ ์ฝ๊ฒ LOCK ๊ฑธ๋ฆฐ ์ํฉ์ ์ธ์งํ ์ ์๋ค. | |
| -- ๋ฝ๊ฑธ๋ฆฐ ํ ์ด๋ธ ํ์ธ | |
| SELECT DO.OBJECT_NAME, DO.OWNER, DO.OBJECT_TYPE, DO.OWNER, | |
| VO.XIDUSN, VO.SESSION_ID, VO.LOCKED_MODE | |
| FROM V$LOCKED_OBJECT VO, DBA_OBJECTS DO | |
| WHERE VO.OBJECT_ID = DO.OBJECT_ID; |
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
| WITH CUSTOMIZATION AS ( | |
| SELECT | |
| UTC.TABLE_NAME AS TABLE_NAME | |
| , (SELECT COMMENTS FROM USER_TAB_COMMENTS WHERE TABLE_NAME = UTC.TABLE_NAME) AS TABLE_COMMENT | |
| , UTC.COLUMN_NAME AS COLUMN_NAME | |
| , UCC.COMMENTS AS COLUMN_COMMENT | |
| , LOWER(SUBSTR(UTC.COLUMN_NAME, 0, 1)) || SUBSTR(REPLACE(INITCAP(UTC.COLUMN_NAME), '_', ''), 2) AS PROPERTY_NAME | |
| , UTC.DATA_TYPE || '(' || UTC.DATA_LENGTH || ')' AS DATA_TYPE | |
| , UTC.DATA_DEFAULT | |
| , UTC.NULLABLE |
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
| Don't speak English well. Thank you for your patience. | |
| It's functions xml file. | |
| <mapper namespace="org.jacknie.mybatis.Functions"> | |
| <sql id="isBlank"> | |
| <bind name="isBlank" value=":[@org.apache.commons.lang3.StringUtils@isBlank(#this)]" /> | |
| </sql> | |
| <sql id="sysout"> | |
| <bind name="sysout" value=":[@System@out.println(#this)]" /> | |
| </sql> |
NewerOlder