Programming 6

[Git] fatal: Authentication failed ํ•ด๊ฒฐ๋ฒ•

๋ฌธ์ œ์ƒํ™ฉ remote: Invalid username or password. fatal: Authentication failed for '~~~~' ์›์ธ ํ•ด๋‹น ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ ‘๊ทผ ์•„์ด๋””์˜ ํŒจ์Šค์›Œ๋“œ๊ฐ€ ๋ณ€๊ฒฝ๋œ ๊ฒฝ์šฐ ํ•ด๊ฒฐ๋ฐฉ๋ฒ•: ๋กœ๊ทธ์ธ ์ •๋ณด ๊ฐฑ์‹  > git config credential.helper store > git fetch Username for '~~~~': your-id Password for '~~~~': your-password

Programming 2021.10.25

java์—์„œ Kotlin ์ฝ”๋“œ ์‚ฌ์šฉํ•˜๊ธฐ

package level function org.example.AppKt์ž๋ฐ” ํด๋ž˜์Šค๊ฐ€ ์ƒ์„ฑ๋˜๊ณ  ๋‚ด๋ถ€ static method ๋กœ ์ปดํŒŒ์ผ ๋จ. AppKt : ํŒŒ์ผ๋ช… // app.kt package org.example class Util fun getTime() { /*...*/ } // Java new org.example.Util(); org.example.AppKt.getTime(); @file:JvmName("DemoUtils"): ์ƒ์„ฑ๋  Java ํด๋ž˜์Šค ๋ช…์„ ๋ฐ”๊พธ๊ณ  ์‹ถ์„ ๋•Œ ์‚ฌ์šฉ @file:JvmName("DemoUtils") package org.example class Util fun getTime() { /*...*/ } // Java new org.example.Util(); org.exa..

Programming 2021.06.17

Google 2021 Kick Start ์ผ์ •

2021๋…„ Google Kick Start ์ฒซ๋ฒˆ์งธ ๋ผ์šด๋“œ์ธ Round A๊ฐ€ UTC Mar 21 2021, 04:00, ํ•œ๊ตญ์‹œ๊ฐ„์œผ๋กœ 3์›” 21์ผ ์ผ์š”์ผ ์˜คํ›„ 1์‹œ์— ์—ด๋ฆฝ๋‹ˆ๋‹ค. Round A๋ฅผ ์‹œ์ž‘์œผ๋กœ 8๊ฐœ์˜ Round๊ฐ€ 6์›”์„ ์ œ์™ธํ•œ 11์›”๊นŒ์ง€ ๋งค๋‹ฌ ํ•œ๊ฐœ์”ฉ ์—ด๋ฆฝ๋‹ˆ๋‹ค. ๐Ÿ—“ 2021 Google 2021 Kick Start ์ผ์ • (ํ•œ๊ตญ์‹œ๊ฐ„ ๊ธฐ์ค€) ๐Ÿ“Œ ์ง€๋‚œ Kickstart ๋ฌธ์ œ ๋ชจ์Œ codingcompetitions.withgoogle.com/kickstart/archive Kick Start - Google’s Coding Competitions Hone your coding skills with algorithmic puzzles meant for students and those new to coding..

Programming 2021.03.17

[Python List] for loop ์•ˆ์—์„œ list.remove() ์‚ฌ์šฉ ์‹œ ์ฃผ์˜ํ•  ์ 

๋ฌธ์ œ์ƒํ™ฉ ํŒŒ์ด์ฌ ๋ฆฌ์ŠคํŠธ๋ฅผ for loop๋กœ ์ˆœํšŒํ•˜๋ฉด์„œ ์•„์ดํ…œ์˜ ๊ฐ’์ด 3 ๋ฏธ๋งŒ์ธ ๊ฒฝ์šฐ ๋ฆฌ์ŠคํŠธ์—์„œ ์‚ญ์ œํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. mylist์—” 1, 2 ๊ฐ’์ด ์‚ญ์ œ๋œ [3, 4, 5]๊ฐ€ ๋“ค์–ด์žˆ์„ ๊ฒƒ์ด๋ผ ์˜ˆ์ƒํ•˜์˜€๋Š”๋ฐ, mylist = [1, 2, 3, 4, 5] for item in mylist: if item < 3: mylist.remove(item) ๊ฒฐ๊ณผ๋Š” ์•„๋ž˜ ์ฒ˜๋Ÿผ 1๋งŒ ์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. print(mylist) # [2, 3, 4, 5] 2๋Š” ์™œ ์‚ญ์ œ ๋˜์ง€ ์•Š์•˜์„๊นŒ์š”? ๋””๋ฒ„๊น…ํ•ด๋ณด๋ฉด item์ด 0๋ฒˆ ์ธ๋ฑ์Šค๋ฅผ ์ฐธ์กฐํ•˜์—ฌ mylist.remove(1)์ด ์ˆ˜ํ–‰๋˜์–ด 1์ด ์‚ญ์ œ๋˜๊ณ  ๋‹ค์Œ์ธ๋ฑ์Šค์ธ 1๋ฒˆ ์ธ๋ฑ์Šค๋ฅผ ์ฐธ์กฐํ–ˆ์„ ๋•Œ, ๋ณ€๊ฒฝ๋œ ๋ฆฌ์ŠคํŠธ์—์„œ 1๋ฒˆ ์ธ๋ฑ์Šค์˜ ๊ฐ’์ธ(3)์„ ์ฐธ์กฐํ•˜๊ฒŒ ๋˜๋ฉด์„œ ์‚ญ์ œ ์ „ 1๋ฒˆ ์ธ๋ฑ์Šค์˜€๋˜ 2๋ฅผ ๊ฑด๋„ˆ๋›ฐ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค..

Programming/Python 2021.03.17

Python์—์„œ์˜ Short-circuit evaluation(SCE)

๐Ÿ™‹๐Ÿป‍โ™€๏ธ ์•ˆ๋…•ํ•˜์„ธ์š”! ํ…Œ์ผ๋Ÿฌ์ž…๋‹ˆ๋‹ค. ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด์—์„œ ์‚ฌ์šฉ๋˜๋Š” Evaluation strategies์—๋Š” ํฌ๊ฒŒ ์•„๋ž˜ ๋‹ค์„ฏ๊ฐ€์ง€ ์ „๋žต์ด ์žˆ์Šต๋‹ˆ๋‹ค. Evaluation strategies Eager evaluation Lazy evaluation Partial evaluation Remote evaluation Short-circuit evaluation ์˜ค๋Š˜์€ ๊ทธ ์ค‘์—์„œ Short-circuite evaluation(SCE)์˜ ์ •์˜ Python์—์„œ ์ ์šฉ๋˜๋Š” SCE ์— ๋Œ€ํ•ด ์ •๋ฆฌํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. Short-circuit evaluation(SCE) minimul evaluation. McCarthy evaluation. ๋‹จ๋ฝํ‰๊ฐ€. Evaluates boolean conditions lazily. and , o..

Programming/Python 2021.03.10

Chapter 1. Arrays and Strings

1.1 Is Unique Implement an alogrithm to determine if a string has all unique characters. What if you cannot use additional data structures? Ask Interview whether the string is ASCII based or Unicode based. ⇒ ์งˆ๋ฌธ์— ๋Œ€ํ•œ ์กฐ๊ฑด์„ ๊ตฌ์ฒดํ™”ํ•  ๊ฒƒ . (Unicode ๋ผ๋ฉด array size๋ฅผ ํฌ๊ฒŒ ์žก๊ณ  ํ’€๋ฉด ๋จ.) input_str = 'abcde' char_size = 126 # if ascii 126, if extend ascii 280, if unicode 65536 def is_unique(input_str: str) -> bool: is_e..