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

๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

(377)
[Network] 443 80 http ๊ธฐ๋ณธ ํฌํŠธ : 80 https ๊ธฐ๋ณธ ํฌํŠธ : 443 johngrib.github.io/wiki/why-http-80-https-443/ http์˜ ๊ธฐ๋ณธ ํฌํŠธ๊ฐ€ 80, https์˜ ๊ธฐ๋ณธ ํฌํŠธ๊ฐ€ 443์ธ ์ด์œ ๋Š” ๋ฌด์—‡์ผ๊นŒ? 80์€ ์ฒ˜์Œ๋ถ€ํ„ฐ ์ง€์ •, 443์€ ๋‚˜์ค‘์— ์š”์ฒญ์„ ๋ฐ›์•„ ๋นˆ ๊ณต๊ฐ„์œผ๋กœ ์ˆœ์„œ๋Œ€๋กœ ๋ฐฐ์ • johngrib.github.io ์ƒ์„ธํ•˜๊ฒŒ ์†Œ๊ฐœํ•ด ์ฃผ์…จ๋‹ค.
[SonarQube] SonarQube ์„ค์น˜ ๊ทธ๋ฆฌ๊ณ  ์„ค์น˜ ํ™•์ธ ์šฐ๋‹นํƒ•ํƒ• SonarQube ํ™ˆํŽ˜์ด์ง€์—์„œ ๋‹ค์šด๋กœ๋“œ ํ™”๋ฉด์—์„œ Community๋ฅผ ์„ ํƒ. Download for free. ZIP ํŒŒ์ผ๋กœ ๋‹ค์šด๋กœ๋“œ๋œ ๊ฒƒ์„ ํ™•์ธ docs.sonarqube.org/latest/setup/get-started-2-minutes/ Try Out SonarQube | SonarQube Docs From the zip file Download the SonarQube Community Edition zip file. As a non-root user, unzip it, let's say in C:\sonarqube or /opt/sonarqube. As a non-root user, start the SonarQube Server: # On Windows, execute: C:\sonarqube..
[Java] Version ๊ต์ฒด Java 8์—์„œ Java 11๋กœ ๊ต์ฒดํ•ด์•ผ ํ•  ํ•„์š”๊ฐ€ ์ƒ๊ฒผ๋‹ค. ํ˜„์žฌ Java ๋ฒ„์ „ ํ™•์ธ java -version : ์ž๋ฐ” ๋ฒ„์ „ ํ™•์ธ javac -version : ์ž๋ฐ” ์ปดํŒŒ์ผ๋Ÿฌ ๋ฒ„์ „ ํ™•์ธ ๊ธฐ์กด Java 8 jdk๋ฅผ ๋‚จ๊ฒจ์•ผ ํ• ๊นŒ, ๋ง์•„์•ผ ํ• ๊นŒ ๊ณ ๋ฏผ ์ข€ ํ•˜๊ณ . ์ผ๋‹จ ์ง€์šฐ์ง€ ์•Š๊ณ  ๋‚จ๊ธฐ๊ณ  Java 11์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ›๊ธฐ๋กœ ํ–ˆ๋‹ค. Java SE Development Kit 11 ๋‹ค์šด๋กœ๋“œ ์˜ค๋ผํด Java Download ํŽ˜์ด์ง€ ๊ฐ€์„œ ๋‚ด PC Windows OS์— ๋งž๊ฒŒ Java SE Development Kit 11 ์„ ํƒํ•ด ๋‹ค์šด๋กœ๋“œ๋ฐ›์•˜๋‹ค. ๋„ค. ๋™์˜ํ•ฉ๋‹ˆ๋‹ค. ์˜ค๋ผํด ๊ณ„์ • ๋กœ๊ทธ์ธ ๋‹ค์šด๋กœ๋“œ ํ™•์ธ JDK ์„ค์น˜ exe ํŒŒ์ผ ์‹คํ–‰ ๋‹ค์Œ ์„ค์น˜ ์œ„์น˜ ํ™•์ธ ํ›„ ๋‹ค์Œ. ์„ค์น˜ ์™„๋ฃŒ ๊ธฐ๋‹ค๋ฆผ. ์„ค์น˜ ์™„๋ฃŒ ํ›„ Close ๋ฒ„ํŠผ ํด๋ฆญ. ํ™”๋ฉด ์บก์ณ๋ฅผ..
[Programming] ๋ฉฑ๋“ฑ(ๅ†ช็ญ‰, idempotent) ko.wikipedia.org/wiki/%EB%A9%B1%EB%93%B1%EB%B2%95%EC%B9%99 ๋ฉฑ๋“ฑ๋ฒ•์น™ - ์œ„ํ‚ค๋ฐฑ๊ณผ, ์šฐ๋ฆฌ ๋ชจ๋‘์˜ ๋ฐฑ๊ณผ์‚ฌ์ „ ์œ„ํ‚ค๋ฐฑ๊ณผ, ์šฐ๋ฆฌ ๋ชจ๋‘์˜ ๋ฐฑ๊ณผ์‚ฌ์ „. ๋ฉฑ๋“ฑ๋ฒ•์น™(ๅ†ช็ญ‰ๆณ•ๅ‰‡) ๋˜๋Š” ๋ฉฑ๋“ฑ์„ฑ(ๅ†ช็ญ‰ๆ€ง, ์˜์–ด: idempotent)์€ ์ˆ˜ํ•™์ด๋‚˜ ์ „์‚ฐํ•™์—์„œ ์—ฐ์‚ฐ์˜ ํ•œ ์„ฑ์งˆ์„ ๋‚˜ํƒ€๋‚ด๋Š” ๊ฒƒ์œผ๋กœ, ์—ฐ์‚ฐ์„ ์—ฌ๋Ÿฌ ๋ฒˆ ์ ์šฉํ•˜๋”๋ผ๋„ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ ko.wikipedia.org ๋ฉฑ๋“ฑ๋ฒ•์น™, ๋ฉฑ๋“ฑ์„ฑ ์—ฐ์‚ฐ์„ ์—ฌ๋Ÿฌ๋ฒˆ ์ ์šฉํ•ด๋„ ๊ฒฐ๊ณผ๋Š” ๊ฐ™์€ ์„ฑ์งˆ ๋ฉฑ๋“ฑ์„ฑ์ด ์žˆ๋Š” ํ•จ์ˆ˜๋Š” ๋ฉฑ๋“ฑ ํ•จ์ˆ˜(idempotent function)๋ผ๊ณ  ๋ถ€๋ฆ„ ๋‹จํ•ญ์—ฐ์‚ฐ ๋‹จํ•ญ์—ฐ์‚ฐ f, ์–ด๋–ค ์ง‘ํ•ฉ S์˜ ๋ชจ๋“  ์›์†Œ๋Š” x f(f(x)) = f(x) ์ดํ•ญ์—ฐ์‚ฐ ์ดํ•ญ์—ฐ์‚ฐ โ˜…, ์–ด๋–ค ์ง‘ํ•ฉ S์˜ ๋ชจ๋“  ์›์†Œ x xโ˜…x = x ํ”„๋กœ๊ทธ๋ž˜๋ฐ์—์„œ ๋ฉฑ๋“ฑ์„ฑ ํ•จ์ˆ˜๋ฅผ ์—ฌ๋Ÿฌ๋ฒˆ ํ˜ธ์ถœํ•ด..
[Library] Moshi Converter github.com/square/retrofit/tree/master/retrofit-converters/moshi square/retrofit A type-safe HTTP client for Android and the JVM. Contribute to square/retrofit development by creating an account on GitHub. github.com ์˜ˆ์ œ private fun getRetrofit() = Retrofit.Builder() .baseUrl(BASE_URL) .addConverterFactory(MoshiConverterFactory.create()) .build() Gson ๋ณด๋‹ค Moshi๊ฐ€ ๋‚˜์€ ์  : www.reddit.com/r/androiddev/..
[Java] Class.java public boolean isAssignableFrom(Class<?> cls) java.lang.Class public boolean isAssignableFrom(Class cls) ํ•ด๋‹น ํด๋ž˜์Šค(๋˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค)์˜ Class object ๊ฐ€ ํŒŒ๋ผ๋ฏธํ„ฐ cls(ํด๋ž˜์Šค ๋˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค) Class์™€ ๋™์ผํ•˜๊ฑฐ๋‚˜ cls์˜ superclass ๋˜๋Š” superinterface์ผ ๊ฒฝ์šฐ true๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค. ์•„๋‹ ๊ฒฝ์šฐ false ๋ฐ˜ํ™˜. ์ฆ‰, ํ•ด๋‹น ํด๋ž˜์Šค/์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ๋งค๊ฐœ๋ณ€์ˆ˜์˜ ํด๋ž˜์Šค/์ธํ„ฐํŽ˜์Šค์™€ ๊ฐ™๊ฑฐ๋‚˜, ๋งค๊ฐœ๋ณ€์ˆ˜์˜ ํด๋ž˜์Šค์˜ ๋ถ€๋ชจ ํด๋ž˜์Šค/์ธํ„ฐํŽ˜์ด์Šค์ธ์ง€ ์—ฌ๋ถ€๋ฅผ ๋ฐ˜ํ™˜. {์ž์‹ ํด๋ž˜์Šค}.isAssignableFrom({์ž์‹ ํด๋ž˜์Šค}) -> true {์ž์‹ ํด๋ž˜์Šค}.isAssignableFrom({๋ถ€๋ชจ ํด๋ž˜์Šค}) -> false {๋ถ€๋ชจ ํด๋ž˜์Šค}.isAssignableFrom({์ž์‹ ํด๋ž˜์Šค}) -> fals..
[Kotlin] ::class.java ์ฝ”ํ‹€๋ฆฐ์—์„œ ์ž๋ฐ” ๋ฆฌํ”Œ๋ ‰์…˜ ์‚ฌ์šฉํ•˜๋„๋ก ํ•จ. kotlinlang.org/docs/java-interop.html#java-reflection
[Android ์‚ฝ์งˆ ๊ตํ›ˆ] ์ด๋ชจ์ง€ ํ•˜๋‚˜๋ฅผ ํ•œ ๊ธ€์ž๋กœ ์„ธ๊ธฐ ์œ„ํ•ด ์ปค์Šคํ…€ InputFilter๋ฅผ ๋งŒ๋“ค์—ˆ์–ด์š”. ์š”์•ฝ ์•ˆ๋“œ๋กœ์ด๋“œ ์ž…๋ ฅ์ฐฝ์—์„œ ์ด๋ชจ์ง€ ํ•˜๋‚˜๋ฅผ ํ•œ ๊ธ€์ž๋กœ ์ธ์‹ํ•˜์ง€ ๋ชปํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์–ด์š”. ๊ทธ๋ž˜์„œ ์ด๋ชจ์ง€ ํ•˜๋‚˜๋ฅผ ํ•œ ๊ธ€์ž๋กœ ์—ฌ๊ธฐ๊ณ  ๊ธ€์ž ์ˆ˜๋ฅผ ์„ธ๊ธฐ ์œ„ํ•ด์„œ๋Š” ์ž‘์—…์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ์ €๋Š” ์ปค์Šคํ…€ InputFilter๋ฅผ ๋งŒ๋“ค์—ˆ์–ด์š”. ๊ธฐํš์ƒ ์ž…๋ ฅ์ฐฝ์— ๊ธ€์ž์ˆ˜ ์ œํ•œ์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ผ๋ฐ˜ ๊ธ€์ž, ์ˆซ์ž, ๊ธฐํ˜ธ, ์ด๋ชจ์ง€๋ฅผ ํฌํ•จํ•ด์„œ ๊ธ€์ž์ˆ˜ ์ œํ•œ์ด ์žˆ์—ˆ๊ณ , ๋‹น์—ฐํžˆ ์ง๊ด€์ ์œผ๋กœ ์ด๋ชจ์ง€ ํ•˜๋‚˜๋Š” ํ•œ ๊ธ€์ž ์•„๋‹ˆ๊ฒ ์Šต๋‹ˆ๊นŒ. ๋„ˆ๋ฌด๋‚˜ ์‰ฝ๊ฒŒ ์ƒ๊ฐํ•˜๊ณ  ๊ธฐํš๋Œ€๋กœ ์ž‘์—…ํ–ˆ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ๋Š”๋ฐ, ํ…Œ์ŠคํŠธ๋ฅผ ํ•ด๋ณด๋‹ˆ ์ด๋ชจ์ง€๋ฅผ ๊ธ€์ž ํ•˜๋‚˜ ์ด์ƒ์œผ๋กœ ์„ธ๋”๊ตฐ์š”.๐Ÿ˜ณ ๋Œ€๊ฐœ ์ œ๊ฐ€ ํ…Œ์ŠคํŠธํ–ˆ๋˜ ์ด๋ชจ์ง€๋“ค์€ ํ•œ ์ด๋ชจ์ง€๋‹น 2๊ธ€์ž ์ •๋„๋กœ ์ธ์‹ํ–ˆ์Šต๋‹ˆ๋‹ค. iOS์—์„œ๋Š” ์ด๋ชจ์ง€ ํ•˜๋‚˜๋ฅผ ํ•œ ๊ธ€์ž๋กœ ์ธ์‹ํ•ด์„œ ์ด๊ฒƒ๊ณผ ๊ด€๋ จํ•ด ๋ฌธ์ œ๊ฐ€ ์—†์ด ์‰ฝ๊ฒŒ ๊ฐ€๋Š”๋ฐ, ์•ˆ๋“œ๋กœ์ด๋“œ๋Š” ๊ทธ๋ ‡์ง€ ๋ชปํ•ด์„œ ์†์œผ๋กœ ํˆดํˆด๊ฑฐ๋ฆฌ๊ณ ๐Ÿคจ๐Ÿคจ์™œ ๊ทธ๋Ÿฐ์ง€,..