2025/03/04 4

환경설정

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

JSON 데이터 보여주기

기본 단위 JSON 구조체는 Result 이고 이를 배열로 가지고 있는 구조체로 Response 를 선언 Line 21 : 초기값없는 빈(=()) Result 배열 변수 선언Line 34 : .task 는 뷰가 표시되기 전에 딱 한번만 실행되기 된다. 이때 loadData() 를 호출한다.                비동기처리 async await 페어로 사용하며 loadData() 함수에 async를 선언하여 호출측은 await로 대기Line 40 : guard let 은 if 문 대신에 쓰이는 것으로 else 부분을 먼저 처리하는 효과를 가진다. url 이 nil 이라면 else 처리Line 45 : 예외처리 do {  } catch { }Line 46 : URLSession.shared.data(u..

Mobile/Swift 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