전체 글 229

http JSON

struct 을 JSON string 으로 변환type Book struct {     Title string `json:"title"`     Author string `json:"author"` } // an instance of our Book struct book := Book{Title: "Learning Concurreny in Python", Author: "Elliot Forbes"}byteArray, err := json.Marshal(book) if err != nil {     fmt.Println(err) } fmt.Println(string(byteArray)) struct 과 struct 속의 struct 을 JSON string 으로 변환type Book struct {    ..

backend (Go) 개발 2025.03.08

Build HTTP Server

http-server 폴더생성$ mkdir http-server$ cd http-server 모듈 초기화 $ go mod init http-server  server.go 화일을 생성하여 프로그래밍listenAddr = ":8080"  : 실행하는 서버의 8080 포트를 사용핸들러(http.NewServeMux())를 생성하여 setupHandlers에 건너준뒤 api 별 처리 함수를 등록http.ListenAndServe 로 항시 감시 서브api 요구가 오면 담당 함수에서 처리 빌드$ go build -o server 실행$ ./server 확인$ curl localhost:8080/api    Hello, world! $ curl localhost:8080/healthz    ok

backend (Go) 개발 2025.03.05

환경설정

Go (aka Golang) 소개2009년 google 에 의해 web application과 network server 개발 목적으로 심플 사용편리성을 염두에 두고 개발C++과 같이 컴파일을 통해 실행되므로 빠른 실행속도와 강력한 병렬실행을 지원한다.  개발 OS 환경에 맞게 인스톨 Download and install - The Go Programming LanguageDocumentation Download and install Download and install Download and install Go quickly with the steps described here. For other content on installing, you might be interested in: Download..

backend (Go) 개발 2025.03.04

if elif 쓰지 않기

종래 방법권고 방법food_item = input("Enter Food Item Name: ")def getPrice(food_item):      if food_item == "Burger":         return 100      elif food_item == "Pizza":         return 200       elif food_item == "Juice":         return 50       elif food_item == "Apple":         return 150print(getPrice(food_item))food_item = input("Enter Food Item Name: ")food_items = { "Burger":100 "Pizza":200 "Juice":..

data science/python 2025.03.04

Listening (Family Guy)

we finally made it Brian we're in India 우리가 드디어 해냈어, 브라이언! 우리 인도에 왔어!excuse me man with no pupil실례합니다, 눈동자가 없는 분,  where can we get a taxi cab around here?여기서 택시를 어디서 탈 수 있을까요?all right let's do it Stewie let's go find Padma 좋아, 스튜이, 가자! 패드마를 찾으러 가보자.shouldn't be hard in this dreamy land of Wonder 이 신비로운 경이의 땅에서는 어렵지 않을 거야.I can already smell the Enlightenment and tranquility이미 깨달음과 평온의 향기가 나는 것..

youtube english 2025.03.03

그 많던 쌀은 어디로 사라졌나?

21万トンの米はどこに消えた? 備蓄米を放出しても「適正価格に落ち着くまで2年近くかかる【全2回(前編/後編)の前編】  ついに放出されることになった21万トンの備蓄米。もちろん焦点は「これで価格は落ち着くのか」だが、昨年8月の「令和の米騒動」と、それに続くコメ価格news.yahoo.co.jp작년 봄까지만 해도 슈퍼에서 판매하는 5kg 쌀가격은 보통 2000엔 언저리였다. 그런게 여름부터 기온 상승으로 인한 흉작, 경작지 감소, 관광객 증가로 인한 수요 증가등의 뉴스가 흘러 나오더니 여름부터 쌀이 사라지는 슈퍼가 나타났다.그런데 농림부 장관이라는 자가 한가하게 가을 추수가 끝나면 자연히 해결 될거라 가볍게 무시하더니 이번엔 가격 상승을 노리는 업자들이 더욱 비축해 버리는 일까지 일어나 새쌀이 나와도 가격이 4000엔을 넘고 있다...

shell 의 환경화일 (.profile, .bashrc)

Linux OS와 User간의 소통을 위한 text 베이스의 인터페이스가 존재하는데 shell, terminal, prompt 등으로 불리운다.shell 의 종류로는    ・Interactive shell : 유저 입력을 받는 shell ( terminal 실행시 초기 shell )   ・Non-Interactive shell : 유저 입력과 관계없는 실행만 하는 shell (sh 화일이 실행되는 shell)  또한    ・Login shell : 로그인 했을 때 실행되는 shell ( ssh 로 리모트 로그인 등)    ・Non-Login shell : 보통의 shell ( terminal 실행시 shell ) Interactive Login shell보통 login(자동 로그인/그래픽 로그인 포함)시..

Commands/Linux 2025.03.03