본문 바로가기

전체 글

(430)
Chap 12. MAC(Media Access Control) Chap 12. MAC(Media Access Control) * Random Access Protocol (RAP) - ALOHA, CSMA/CD, CSMA/CA* ALOHA - Tm * 2 -time out (Cnt max - abort)* vulnerable time - Tfr * 2 * Process volume - G(frame count) * e ^-2G* slotted ALOHA - vulnerable time - Tfr* Process volume - G(frame count) * e ^-G * CSMA (carrier sense multiple access) 충돌 낮추고 성능 높이고* 보내기 전 체크를 하는 것* persistent - 1 non p* CSMA/CD* Tfr >= 2 * ..
Chap 8. Class and Method Design Chap 8. Class and Method Design * Polymorphism ( dynamic binding), (encapsulation, information hiding)* Inheritance * Design Criteria - Coupling, Cohesion, (Connascence)* Coupling - method, inheritance Level - no direct coupling, data, stamp, control, global, pathological* Cohesion - method, classMethod Cohesion Level - Functional, Sequential, Communicational, Procedure, Temporal, Logical, Coinc..
Chap 11. Connecting to Processes Near and Far Servers and Sockets Chap 11. Connecting to Processes Near and Far Servers and Sockets * Unix - one Interface(FILE IO interface) -> disk, device, pipe, socket* Client -Server Processclient - interface / server - service supply* example) BC(client) - DC(server)* BC - DC * fdopen(fd, 모드), fopen(filename, 모드), popen(명령어, 모드) => FILE * 반환* popen() -> fp 값으로 fprintf fscanf 등 가능 * Socket server, client* socket Server - so..
Chap 7. Moving to Design Chap 7. Moving to Design * Analysis -> Design (Evolving)(analysis ~ Design mutually go) * Analysis Model Examine(Cross Check)Functional - Structural (activity diagram ~ class diagram)Functional - Behavior (activity diagram ~ communication diagram, state machine)Structural - Behavior (class Diagram ~ communication diagram, state machine) * Analysis Model -> Design Model !!non-Functional Requireme..
Chap 10. I/O Redirection and Pipes Chap 10. I/O Redirection and Pipes * CLI Communication by I/O and PIPES * cmd $ Comm A B -> print difference1) A & !B2) B & !A3) A & B * The ">" operator can be used to treats files as variables of arbitrary size and structure( cmd > writeFile , cmd then we receive "THE LOWEST FD" * Shell $ CMD > FD then, if you write st..
자료구조 프로그래밍 Lab07) AVL Tree 만들기 자료구조 프로그래밍 Lab07) AVL Tree 만들기 AVL Tree란 balanced Tree 중에서 가장 초기에 나온 tree이다.BST의 효율성을 증대시키기 위해서 level을 최대한 낮춰야하는데, 이 중 한 방법으로AVL tree가 등장하였다.(AVL인 이유는 이 tree를 고안한 G.M. Adelson-Velskii와 E.M. Landis의 이름들을 따서 지었다) AVL tree는 다음과 같이 왼쪽 subtree의 높이와 오른쪽 subtree의 높이 차를 bf에 저장하여 bf의 절댓값이 1 이하인 경우를 계속 유지해야한다.그래서 재귀적으로 삽입을 수행한 후, 루트까지 오면서 bf를 체크하고 bf의 절댓값이 2인 경우에는 회전을 통하여 균형을 수정한다.그리고 이러한 회전에는 총 4가지가 있는데 ..
MIPS assembly PR_ 문자열로 숫자 입력받아 처리하기 문제. 해결 https://github.com/YoonShinWoong/MIPS_Assembly_Programming 해결 알고리즘은 위의 구현순서 5단계에 맞춰 처리한다. 1. 문자열을 입력 받아서 while문을 통해 '.' 을 포함하고 있는지 아닌지를 판단한다.2. '.' 을 포함하고 있다면 실수 처리, 그렇지 않다면 정수 처리 ------------------------------------------------------------------------------------------------------------------------------------실수처리3. '.'이 포함된 위치를 레지스터에 저장해두고, '.' 전 까지 정수값을 *10 하면서 가져와 더해둔다(실수의 정수부).단, -는 ..
RubyOnRails Excel file 파싱하기(xlsx 파일) RubyOnRails Excel file 파싱하기(xlsx 파일) Rails에는 다양한 Excel File Parsing 방법이 존재한다.참고 : https://stackoverflow.com/questions/3321011/parsing-xls-and-xlsx-ms-excel-files-with-ruby 그 중에서도 simple_xlsx_reader gem을 사용해서 하는 방법을 사용했다. Gemfile에gem 'simple_xlsx_reader' 를 추가해주고$ bundle 을 통해 gem을 설치한다 그리고 특정 컨트롤러에서 다음의 코드를 통해 Parsing을 처리할 수 있다 1234567891011121314151617181920212223242526# 임의 controllerdef school r..