전체 글
-
항해 99 5기 TIL_17항해 99 2022. 1. 27. 04:19
▶ Today I Learned 하드웨어에 10진 숫자보다도 비트를 사용해야 하는 이유? 1. 10진수 숫자 하나 세는 것 보다 비트를 세는 게 훨씬 많은 숫자를 나타낼 수 있으므로 ex) 10진수: 손가락으로 1부터 10까지 표현 비트: 2진수 방법으로 표현되므로 20인 1부터 29까지 표현 2. 재량권이 훨씬 커지기 때문에 비트의 경우 문턱값이 하나 뿐이기에 문턱값 전후 출력의 차이가 심함 → 간섭이 있어도 어느 한 쪽의 명령이 제대로 작동할 수 있음 [하드웨어] 선을 둥글게 감아 코일을 만듬, 거기에 전기를 흘려보내면 코일이 전자석이됨 전자석은 켜고 끌 수 있어 물건을 움직일 때 활용가능 예시) 코일에 전력이 들어가지 않아 스위치가 열려있는 경우 → 열린 릴레이 코일에 전력이 들어가 스위치가 닫혀있..
-
항해 99 5기 TIL_16항해 99 2022. 1. 26. 02:32
▶ Today I Learned [전기이론] 전류는 current (기호 I), 전압은 voltage (기호는 V), 저항은 resistance (기호는 R) I = V/R 도체: 전도도가 높아서 전기가 흐르기 쉬운 재료 부도체: 전기나 열을 전달하기 어려운 재료, 절연체 라고도 함, 온도가 높아지면 원자에서 전자들이 분리되어 이동할 가능성이 높아짐 -> 전기저항이 감소함 반도체: 도체와 부도체의 중간 정도로 전기가 흐르는 재료. 부도체와 마찬가지로 온도가 높아지면 전기 저항이 감소함 [npm init] Node Package Manager의 약자 npm, node.js에서 사용하는 모듈들은 패키지로 만들어 관리하고 배포하는 역할 npm init을 하면 package.json를 만듬. package.js..
-
항해 99 5기 TIL_15항해 99 2022. 1. 25. 01:02
▶ Today I Learned : 웹 주소창에 입력된 파라미터 값(문자열), 주로 key: value 형태로 이루어져 있으며 여러 개를 동시에 쓸 경우 &(앰퍼샌드)로 이어줄 수 있음 장점: URL상의 정보를 바꾸어 줌으로써 간단히 페이지를 넘길 수 있다 단점: 데이터의 길이에 제약이 있으며 정보가 그대로 노출되기 때문에 보안을 유지해야하는 데이터를 쓸 수 없다. 또한 특수문자를 이 방식으로 보낼 때는 URLencoded 메서드를 사용하여야 한다. /* 상품 수정 API */ // 일부가 아닌 모든 데이터 업데이트 시 put 사용 // 동일한 리소스에 대해서는 동일한 주소 사용 router.put("/goods/:goodsId/cart", async(req, res) => { const {goodsId..
-
항해 99 5기 WIL_2항해 99 2022. 1. 23. 23:26
▶ Weekly I Learned (회고) 프로그래머스 Level 1수준의 알고리즘 문제 30여개를 풀었다. 아직 갈 길이 멀지만 문제를 마주쳤을 때 어떻게 해결해야되는지에 대한 기본적인 틀이 잡혔다고 생각한다. 수료할때 쯤 최대한 level 2 ~ 3 수준이 되고 싶다. 물론 필요한 기능을 구현하는 능력도 겸비한 채. CS공부에 대한 갈망이 있었는데 이 스터디로 조금이나마 해소하고 있다. 컴퓨터에 대해 알면 알수록 배울 것이 참 많지만 그만큼 내가 성장할 여지가 많다는 점이 즐겁게 다가오기도 한다. 당장에 주어진 과제들을 하기에도 바쁘지만 기본 정도는 다 알고 가도록 하자 :) 완전히 깊이 있게 이해한 것은 아니지만 구글링하고 강의를 들으며 이제 기본 가닥은 잡힌 것 같다. 자바스크립트는 non-blo..
-
항해 99 5기 TIL_14항해 99 2022. 1. 23. 19:35
▶ Today I Learned 자바스크립트에서 비동기처리를 동기로 처리할 수 있게 돕는 객체 유형, [왜 Promise를 쓰려는 걸까?] $.get('url 주소', function(response) { // ... }); 와 같은 형태로 데이터를 받아와서 표시하려 하는데 데이터가 다 받아지기도 전에 데이터를 화면에 표시하는 기능이 작동해버리면 빈화면이 뜨거나 오류가 뜰 확률이 높음 -> 이러한 비동기처리를 방지하기 위해 Promise를 사용 프로미스는 resolve가 실행되어야 그 다음인 then()으로 넘어가며 거부인 reject 발생 시 catch()라는 오류를 띄어주는 구문으로 넘어감 프로미스(약속)이라는 건 미래의 어느 시점에 결과를 제공하겠다고 '약속'하기 때문 출처: https://deve..
-
항해 99 5기 TIL_13항해 99 2022. 1. 22. 23:51
▶ Today I Learned [색 표현 방법] RGB라는 표준을 많이 사용 16진 트리플렛 ex) #000000는 검은색 #ffffff는 흰색 API (Application Programming Interface) : 클라이언트와 DB와 같은 것을 이어주는 서버의 은행창구 같은 역할, 애플리케이션 간의 매개체 같은 역할 프로그래밍에서 논리적인 구조를 만들 수 있도록 도와줌 REST API(Representational State Transfer) : Headers, URL 등 네트워크 상의 표현 수단을 사람이 봐도 이해할 수 있도록 정의해주는 것 : JSON방식의 경우 키와 밸류의 이름이 똑같아도 둘다 키: 밸류 형태로 써주어야 함. 객체 초기자는 둘의 이름이 같을 경우 둘 중 하나만 써주어도 JSO..
-
항해 99 5기 TIL_12항해 99 2022. 1. 22. 00:22
▶ Today I Learned [문자코드] 컴퓨터는 사람의 언어를 읽을 수 없음 -> 사람의 언어를 읽을 수 있게 해주는 것이 문자코드 아스키ASCII 문자 코드(American Standard Code for Information Interchange) - 널리 쓰이고 있으며 모든 기호에 7비트만큼의 수 값을 할당함 확장 BCD 교환카드 EBCDIC - IBM에서 만듬, 펀치카드에 사용한 인코딩을 기반으로 만듬 - BCD 2진 코드화한 10진수 Unicode - 아스키코드는 영어를 기준으로 한 언어였음, 컴퓨터 보급에 따라 다른 언어에 대한 처리 지원이 필요했고 그에 따라 나오게 됨 - 문자에 16비트 코드 부여, 21비트까지도 확장되었음 UTF-8 (Unicode Transformation Form..
-
항해 99 5기 TIL_11항해 99 2022. 1. 21. 01:04
▶ Today I Learned [2진수 쉽게 표현하기] BCD: 10진수를 2진화 한 것 Binary Coded Decimal ex) 2진수: 1101 BCD: 0001 0011 좌측 4자리: 십의 자리 우측 4자리: 일의 자리 But 비트를 너무 많이 낭비한다는 단점이 있음 [8진법] 비트 3개를 사용하여 2진수를 8진수로 나타내기 ex) 2진수 101 8진수 5 8진수 015 -> 8**2*0 + 8**1*1 + 8*0*5 = 8 + 5 = 13 그러나 컴퓨터는 만들 때 8의 배수를 이용해 만드는 경우가 많음 4비트 2비트... 그러나 8진수는 한자리당 3개의 비트가 쓰여 갯수가 맞아 떨어지지 않음 요즘 많이 쓰이진 않음 [16진법] 비트 4개를 사용하여 2진수를 16진수로 나타내기 ex) 2진수 ..