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
document.head.appendChild(Object.assign(document.createElement('style'), { innerHTML: ` | |
/*********************************************/ | |
/* PUT YOUR ADDITIONAL CUSTOM CSS STYLESHEET */ | |
/* HERE AS WHATEVER YOU WANT. START */ | |
/*********************************************/ | |
body.android .photoFrame .smileCnt i.smile { | |
top:0.05em; | |
} | |
.photoFrame .smileCnt .smileCntTxt { |
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
// 케밥케이스, 스네이크케이스, 카멜케이스 변환 함수 (DB용 컬럼명도 처리) | |
function convertCase(str) { | |
// 탭 구분된 문자열 처리 | |
return str.includes('\t') | |
? str.split('\t').map(convertCase).join('\t') // 탭으로 분리된 문자열에 대해 반복 처리 | |
: (str.includes('-') || str.includes('_') // 케밥케이스 또는 스네이크케이스 | |
? str.toLowerCase().replace(/[-_](.)/g, (m, c) => c.toUpperCase()) // 케밥/스네이크 -> 카멜 | |
: str.replace(/([a-z])([A-Z])/g, '$1_$2').toUpperCase()); // 카멜 -> DB용(스네이크) | |
} |
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 y24.m05.d13.c01_BigDecimal_exp; | |
import lombok.extern.slf4j.Slf4j; | |
import org.junit.jupiter.api.Test; | |
import java.math.BigDecimal; | |
import java.math.MathContext; | |
import java.math.RoundingMode; | |
@Slf4j |
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 generateRandomPassword(length) { | |
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=[]{}|;:,.<>? "; | |
let password = ""; | |
for (let i = 0; i < length; i++) { | |
const randomIndex = Math.floor(Math.random() * charset.length); | |
password += charset[randomIndex]; | |
} | |
return password; | |
} |
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 a1; | |
var a2 = []; | |
var a3 = {}; | |
var a4 = {x:undefined}; | |
var a5 = {x:'1'}; | |
console.log("a1:", a1?.x || 'error'); | |
console.log("a2:", a2?.x || 'error'); | |
console.log("a3:", a3?.x || 'error'); | |
console.log("a4:", a4?.x || 'error'); |
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 toCamelCase(str){ | |
var regExp=/[-_]\w/ig; | |
return str.toLowerCase().replace(regExp,function(match){ | |
return match.charAt(1).toUpperCase(); | |
}); | |
} | |
function toCamelCaseList(arr) { | |
let result = []; | |
arr = arr.split("\n"); | |
for(var a of arr) { |
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
<Style type="text/css"> | |
pre { display:none; background:red; color:white; font-weight:bold; padding:5px; width:850px; } | |
</Style> | |
<pre id="debugPre" style="display:none;"> | |
Your debugging HTML HERE | |
</pre> | |
<script type="text/javascript"> |
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 printFormData(formId) { | |
const formEl = document.getElementById(formId); | |
const formData = new FormData(formEl); | |
const params = {}; | |
for(const [key, val] of formData.entries()) { | |
params[key] = val; | |
} |
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
// Give dynamic rainbow colored borders to ALL the elements being found in query. Quite useful for testing CSS | |
function rainbow(query, styles) { | |
var colors = ['Red', 'Lime', 'Blue', 'Yellow', 'Cyan', 'Magenta', 'Silver', 'Gray', 'Maroon', 'Olive', 'Green', 'Purple', 'Teal', 'Navy'] | |
document.querySelectorAll(query).forEach(function(el) { | |
var rand = Math.floor(Math.random() * colors.length); | |
var color = colors[rand]; | |
el.style.border = '2px ridge ' + color; | |
if(styles != undefined) { | |
for(var [key, val] of Object.entries(styles)) { | |
el.style[key] = val; |
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 utils.logging; | |
import ch.qos.logback.classic.Logger; | |
import ch.qos.logback.classic.LoggerContext; | |
import ch.qos.logback.classic.encoder.PatternLayoutEncoder; | |
import ch.qos.logback.classic.spi.ILoggingEvent; | |
import ch.qos.logback.core.AppenderBase; | |
import org.slf4j.LoggerFactory; | |
public class CustomAppender extends AppenderBase<ILoggingEvent> { |
NewerOlder