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
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> |
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
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 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 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 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 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 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 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 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 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(root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(factory); | |
} | |
else if (typeof module === 'object' && module.exports) { | |
module.exports = factory(); | |
} | |
else { | |
root.BufferedPayloadQueue = factory(); | |
} |
OlderNewer