๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ—ฃ Language์— ํ•ด๋‹นํ•˜๋Š” ๊ธ€๋“ค

47 Articles matched
๋ชฉ๋ก์ด ์—†์Šต๋‹ˆ๋‹ค.
[Javascript] ๋ชจ๋“  ๋งˆ์šฐ์Šค ํด๋ฆญ ์ด๋ฒคํŠธ ๋ง‰๋Š”๋ฐฉ๋ฒ• ํด๋ฆญ ์ด๋ฒคํŠธ ์ „์ฒด block ํ˜น์‹œ๋‚˜ ๋˜ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ ๋‹ค๋ฅธ์‚ฌ๋žŒ์ด ์ฐพ์•„๋ณผ๊นŒ๋ด ์ •๋ฆฌํ•ด๋ด…๋‹ˆ๋‹ค. ์ด๊ฑธ ๋งŽ์ด ์“ฐ์ง€๋Š” ์•Š๊ฒ ์ง€๋งŒ ํ˜น์‹œ๋‚˜! ์“ฐ์‹ค๋ถ„์€ ์“ฐ์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. ๋ชจ๋“  ํด๋ฆญ ์ด๋ฒคํŠธ๋ฅผ ๋ง‰์•„์ค„ ์ด๋ฒคํŠธ ์„ค์ • (mouse click event blocking) var stopFunc = function(e) { e.preventDefault(); e.stopPropagation(); return false; }; var all = document.querySelectorAll('*'); for (var idx in all) { var el = all[idx]; if (el.addEventListener) { el.addEventListener('click', stopFunc, true); // have to true } } ..
[Javascript] byte ๋ฐ์ดํ„ฐ๋ฅผ string ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜ํ•˜๊ธฐ byte ๋ฐ์ดํ„ฐ๋ฅผ string ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜ํ•˜๊ธฐ request๋ฅผ capturingํ•˜๋Š”๊ฒƒ์„ ๊ตฌํ˜„ํ•˜๋‹ค๊ฐ€ request์˜ ํŒŒ๋ผ๋ฏธํ„ฐ ๋ฐ์ดํ„ฐ๊ฐ€ byte๋กœ ๋˜์–ด์žˆ๋Š”๊ฒƒ์„ ๋ณด๊ณ ๋Š” ์ ˆ๋ง์„ ํ•˜์˜€์Šต๋‹ˆ๋‹ค. byte๋Š” ๋”ฑ ๋ณด๊ธฐ์— ์‚ฌ๋žŒ์ด ์ฝ์„ ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์— ์ด๋ฅผ ์–ด๋–ป๊ฒŒ ํ• ์ง€.. ๋ง‰๋ง‰ํ–ˆ๋Š”๋ฐ capturingํ•˜๋Š” ๋ถ€๋ถ„์ด javascript ๋ฌธ๋ฒ•์ด์–ด์„œ ์ด๊ฒƒ์„ ์–ด๋–ป๊ฒŒํ•˜์ง€ ํ•˜๋‹ค๊ฐ€ ์ฐพ์•„๋ณด๋‹ˆ stackoverflow์— ๋‹ต์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ƒ๊ฐ๋ณด๋‹ค ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. byte to string code 1. Object.prototype.toString ๋ฉ”์„œ๋“œ ์‚ฌ์šฉํ•˜์—ฌ ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜ var byte = var str = byte.toString(); var utf8_str = byte.toString('utf8'); 2. ์ƒ์„ฑ์ž ์—†์ด String์„ ..
[JAVA] java.security.cert.CertificateException: No name matching some_name found Problem public class UrlConnectionTest { public static void main(String[] args) throws Exception { URL url = new URL("http://example.com"); URLConnection conn = url.openConnection(); InputStream in = conn.getInputStream(); // occur error } } Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No name matching some_name found at com.sun.net.ssl.internal.ssl.Al..
[Javascript] Object์˜ key ๋ชฉ๋ก ๋‚˜์—ดํ•˜๊ธฐ AngularJS์—์„œ custom filter๋ฅผ ๋งŒ๋“ค์–ด ๋ณด๊ณ  ์žˆ๋Š”๋ฐ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฐ’์œผ๋กœ object(๊ฐ์ฒด) ํ˜•์‹์„ ๋„˜๊ฒผ์Šต๋‹ˆ๋‹ค. ๊ทผ๋ฐ filter์•ˆ์—์„œ ๋ฐ›๊ณ  ๋ณด๋‹ˆ๊นŒ ์˜ค๋ธŒ์ ํŠธ ์•ˆ์— ์–ด๋–ค ํ‚ค๊ฐ€ ์žˆ๋Š”์ง€ ๋ชจ๋ฅด๊ฒ ์–ด์„œ ์–ด๋–ป๊ฒŒํ•˜๋ฉด ํ‚ค ๊ฐ’์„ ๋ฝ‘์•„๋‚ด์„œ ๊ทธ ํ‚ค๊ฐ’์„ ํ†ตํ•ด ๋˜ ๋™์ผํ•œ ํ˜•ํƒœ์˜ ๊ฐ์ฒด์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์„๊นŒ๋ฅผ ๊ณ ๋ฏผํ•˜๋‹ค ๋ณด๋‹ˆ Javascript์— ์ด๋ฏธ ์žˆ๋Š”๊ฑธ ์•Œ๊ณ  ์ด๋ ‡๊ฒŒ ์ •๋ฆฌํ•ด๋ด…๋‹ˆ๋‹ค. ๋ฌธ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. var obj = { "key1" : "value1", "key2" : "value2" } var keys = Object.keys(obj); console.log(keys); for ( var i in keys ) { console.log(keys[i] + " : " + obj[keys[i]]); } [์‹คํ–‰๊ฒฐ๊ณผ][ '..
ํ‚ค์ฝ”๋“œ ํ…Œ์ด๋ธ” ํ‚ค ์ด๋ฒคํŠธ๋ฅผ ์ฒ˜๋ฆฌํ•  ๋•Œ ํ•ญ์ƒ ์ฐพ๋Š”๊ฒƒ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฐ”๋กœ ํ‚ค ์ฝ”๋“œ ์ธ๋ฐ์š” ํ‚ค๋ณด๋“œ์˜ ์–ด๋–ค ํ‚ค๊ฐ€ ๋ˆŒ๋ ธ์„ ๋•Œ ์ปดํ“จํ„ฐ๊ฐ€ ๋ฐ›์•„๋“ค์ด๋Š” ๊ฐ’์„ ๋ฐ”๋กœ ํ‚ค ์ฝ”๋“œ๋ผ๊ณ  ํ‘œํ˜„ํ•ฉ๋‹ˆ๋‹ค. ํ‚ค๋ณด๋“œ์˜ ํ‚ค๊ฐ€ ์ ์ง€ ์•Š์€ ํŽธ์ด๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค ์™ธ์šฐ๋Š”๊ฑด ํž˜๋“ ๋ฐ์š” ๋งค๋ฒˆ ๋ธ”๋กœ๊ทธ๋ฅผ ์ฐพ์œผ๋ฉด ๊ธˆ๋ฐฉ ๋‚˜์˜ค๊ธฐ๋Š” ํ•˜์ง€๋งŒ ์ œ ๋ธ”๋กœ๊ทธ์— ์ง์ ‘ ์ •๋ฆฌํ•ด๋‘๋ฉด ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์„œ ํ•ด๋ด…๋‹ˆ๋‹ค. ←(๋ฐฑ์ŠคํŒจ์ด์Šค) = 8 TAB = 9 ENTER = 13 SHIFT = 16 CTRL = 17 ALT = 18 PAUSEBREAK = 19 CAPSLOOK = 20 ํ•œ/์˜ = 21 ํ•œ์ž = 25 ESC = 27 ์ŠคํŒจ์ด์Šค = 32 PAGEUP = 33 PAGEDN = 34 END = 35 HOME =36 ←(์ค‘๊ฐ„) = 37 ↑(์ค‘๊ฐ„) = 38 →(์ค‘๊ฐ„) = 39 ↓(์ค‘๊ฐ„) = 40 INSERT..
[์›น ํ”„๋กœ๊ทธ๋ž˜๋ฐ] GET ๋ฐฉ์‹์œผ๋กœ query string ๋„˜๊ธธ ๋•Œ ํŠน์ˆ˜๋ฌธ์ž ์‚ฌ๋ผ์ง ํ˜„์ƒ ์›น์—์„œ GET๋ฐฉ์‹์œผ๋กœ ์–ด๋–ค ๊ฐ’์„ ๋„˜๊ฒจ์ค„ ๋•Œ ๊ฐ„ํ˜น ์ œ๋Œ€๋กœ ๋‚˜์˜ค์ง€ ์•Š๋Š” ๋ฌธ์ž๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฐ”๋กœ ํŠน์ˆ˜๋ฌธ์ž์ค‘์— +์™€ &์ธ๋ฐ GET๋ฐฉ์‹์œผ๋กœ ํ•˜๋ฉด Query String์œผ๋กœ URL์˜ ๋’ค์— '?'๋ฌธ์ž์™€ ํ•จ๊ป˜ ๊ฐ™์ด ๋ถ™์–ด์ ธ์„œ URL์„ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค. Query String ๋ฐฉ์‹์œผ๋กœ ๋„˜๊ฒจ์ฃผ๋ฉด +์™€ &๋Š” ์ƒ๋žต์ด ๋˜๋Š”๋ฐ ์ €๊ฐ™์€ ๊ฒฝ์šฐ๋Š” ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ์„ ๋„ฃ์„ ๋•Œ ๋ฒ„๊ทธ์‚ฌํ•ญ์œผ๋กœ ๊ฒฝํ—˜ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฒ€์ƒ‰์–ด ์ค‘์— (+)์™€ ๊ฐ™์€ ๊ธฐํ˜ธ๊ฐ€ ๋“ค์–ด๊ฐ€๋Š” ๋ถ€๋ถ„์ด ์žˆ์—ˆ๋Š”๋ฐ +๊ฐ€ ์ƒ๋žต๋˜๋Š” ๋ฐ”๋žŒ์— ์—‰๋šฑํ•œ ๊ฒฐ๊ณผ๋ฌผ์ด ๋‚˜์˜ค๊ฑฐ๋‚˜ ์•„์˜ˆ ์•ˆ๋‚˜์˜ค๋Š” ์ƒํ™ฉ์ด ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์€ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. ํ•ด๊ฒฐ๋ฐฉ๋ฒ• ๊ฐ„๋‹จํ•˜๊ฒŒ URI์˜ ์ธ์ฝ”๋”ฉ ๋ฐฉ์‹์ธ ํผ์„ผํŠธ ์ธ์ฝ”๋”ฉ(percent-encoding)์œผ๋กœ ์ธ์ฝ”๋”ฉ์„ ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ํผ์„ผํŠธ ์ธ์ฝ”๋”ฉ์— ๋”ฐ๋ฅด๋ฉด ์•ŒํŒŒ๋ฒณ์ด๋‚˜ ์ˆซ์ž ๋“ฑ ๋ช‡๋ช‡ ๋ฌธ์ž๋“ค์„ ์ œ์™ธํ•œ ..
[css] white-space ์†์„ฑ ์•Œ์•„๋ณด๊ธฐ ์›น์‚ฌ์ดํŠธ๋ฅผ ๊ฐœ๋ฐœํ•˜๋‹ค๋ณด๋ฉด ์ค„๋ฐ”๊ฟˆ์ด ์ž˜ ์•ˆ๋˜์–ด ์žˆ๊ฑฐ๋‚˜ ํ…Œ์ด๋ธ” ๋ ˆ์ด์•„์›ƒ ์•ˆ์— ๊ธ€๋“ค์ด ํ…Œ์ด๋ธ” ๋ฐ–์œผ๋กœ ์‚์ € ๋‚˜์™€์žˆ๊ฑฐ๋‚˜ ์งค๋ฆฌ๋Š” ํ˜„์ƒ์„ ๋งˆ์ฃผํ•˜๊ณค ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Ÿด๋•Œ๋งˆ๋‹ค ์‚ฌ์šฉํ•˜๊ฒŒ๋˜๋Š” CSS ์†์„ฑ์ด ๋ฐ”๋กœ ์˜ค๋Š˜ ์ •๋ฆฌํ•  white-space์ž…๋‹ˆ๋‹ค. white-space๋Š” ์ŠคํŽ˜์ด์Šค์™€ ํƒญ, ์ค„๋ฐ”๊ฟˆ, ์ž๋™์ค„๋ฐ”๊ฟˆ์„ ์–ด๋–ค์‹์œผ๋กœ ์ฒ˜๋ฆฌํ•  ๊ฑด์ง€ ์ •์˜ํ•ด์ฃผ๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค. ํŠน์ง• ๊ธฐ๋ณธ๊ฐ’ : normal์ƒ์† : O์• ๋‹ˆ๋ฉ”์ด์…˜ : X๋ฒ„์ „ : CSS Level 1 ์‚ฌ์šฉ๋ฒ•(๋ฌธ๋ฒ•) white-space: normal | nowrap | pre | pre-wrap | pre-line | initial | inherit initial์€ ๊ธฐ๋ณธ๊ฐ’์ธ normal๋กœ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด๊ณ , inherit์€ ๋ถ€๋ชจ ์š”์†Œ์— ์„ค์ •๋˜์–ด์žˆ๋Š” ์†์„ฑ๊ฐ’์„ ์ƒ์†๋ฐ›๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ŠคํŽ˜์ด์Šค์™€ ํƒญ ์ค„..
file input clear ์›น ๊ฐœ๋ฐœ์„ ํ•˜๋‹ค๊ฐ€ ๋ณด๋ฉด ๋ณด์•ˆ ๋ฌธ์ œ์— ๋ถ€๋”ชํžˆ๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ํฐ ๋ณด์•ˆ ๋ฌธ์ œ๋„ ์žˆ๋Š” ๋ฐ˜๋ฉด ์‚ฌ์†Œํ•œ ๋ณด์•ˆ ๋ฌธ์ œ๋„ ์žˆ๋Š”๋ฐ ๊ฐœ๋ฐœ์„ ํ•˜๋‹ค ๋ณด๋ฉด file ํƒ€์ž…์˜ inputํƒœ๊ทธ๋ฅผ ์ดˆ๊ธฐํ™” ํ•ด์ฃผ๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ๊ฐ€ ์ƒ๊ธด๋‹ค. ์˜ˆ๋ฅผ๋“ค๋ฉด form์•ˆ์— file ํƒ€์ž…์˜ inputํƒœ๊ทธ๊ฐ€ ์žˆ๊ณ  ์‚ฌ์šฉ์ž์— ์˜ํ•ด form์˜ ์š”์†Œ๋“ค์ด ์ „๋ถ€ ๋นˆ ๊ฐ’์œผ๋กœ ์ดˆ๊ธฐํ™”๋˜๊ธฐ๋ฅผ ์›ํ•˜๋Š” ์ƒํ™ฉ์ด ์žˆ์„ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๋Ÿด ๋•Œ ์•„๋ž˜์™€ ๊ฐ™์ด ํ•ด์ฃผ๋ฉด file ํƒ€์ž…์˜ inputํƒœ๊ทธ๋ฅผ clearํ•  ์ˆ˜ ์žˆ๋‹ค. ์ œ์ด์ฟผ๋ฆฌ (jQuery) $("input[type='file']").val(null); AngularJS angular.element("input[type='file'").val(null); ์œ„์—์„œ ์–ธ๊ธ‰ํ•œ ๋ณด์•ˆ๋ฌธ์ œ๋Š” ์›น์ƒ์—์„œ๋Š” ๋ณด์•ˆ์ƒ์˜ ๋ฌธ์ œ๋กœ js์ˆ˜์ค€์—์„œ fileํƒ€์ž…์˜ inpu..