본문 바로가기

반응형

IT/ETC

(70)
C Programming Language(week1, problem set) https://cs50.harvard.edu/college/psets/1/ 1. Hello 1 2 3 4 5 6 7 8 #include #include int main(void) { string name = get_string("What is your name?\n"); printf("hello, %s\n", name); } 2a. Mario less 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include #include int main(void) { int stairs = get_int("Height: "); while(!(stairs >= 1 && stairs
Memory (week3) Compiling contains four steps, preprocessing, compiling, assembling and linking. First convert a source code into required functions, like for instance in c, read hashtags and copy and past files. Second step is compiling, convert source code into assembling codes. Third step is assembling, converting assembling codes into machine codes, 1s and 0s. Last, link all files into 0s and 1s. Programmer..
Arrays and Sorting Algorithms (week2) Preprocessing – #include Compiling - programming language converts codes to assembly language for computer to understand Assembling – using assembling code and converts to 10101010100101001010s(machine code, object code) Linking – linking step links all the imported files, stdio.h + cs50.h + yourfile.h. These days, people call these four steps compiling to be general. Ram, random access memory, ..
C Programming Language(week 1) Now a day, computers are performing billions of things in a second gigahertz speed, a more readable code is more preferred in some cases. Input | Source code – code we humans have written using java, c, python Compiler Output | Machine code – 0 and 1s Ram – temporary storage, has finite number of transistors which means there are finite of values that can be represented and stored accurately. Fo..
Computational Thinking & Scratch – Intro to Computer Science(week 0) Computer science is about problem solving H I (letter ascii) 72 73 (decimal numbers) 1001000 1001001 (binary 8 bit) Abstraction – converting lower level details into more simplified version and focus on problem solving Since there are so many languages that cannot be represented by 8 bit(256 different type of possibilities), now we use Unicode or utf-8 which uses 16 bit(2 to 16th power or 65536 ..
The Shawshank Redemption review I figured I would give myself some time off by watching some movies. Contains Spoiler! Protagonist in this story is Andy Dufrense played by Tim Robbins, a young person with many talents at that age and a position as a vice president in the bank. He was trialed for murder for his wife and her affair golf player. Andy was sentenced to prision and while inside, he meets Red, a man who can get thing..
이것이 자바다 노트3(제너릭) GENERIC Generic은 타입을 파라미터화해서 컴파일시 구체적인 타입이 결정되도록 한다 - 컴파일시 강한 타입 체크를 할 수 있다 - 타입변환을 제거할 수 있다. 기본적으로 object타입으로 저장을 하는데, 만약 스트링으로 사용하고 싶으면 형변환을 해야한다. 하지만 제너릭을 사용하면 처음부터
이것이 자바다 노트2(스레드 + 멀티스레드) 프로세스는 운영체제에서 할당받은 메모리를 가지고 실행합니다. 스레드는 프로세스안에서 작업을 실행하는 역할을 가지고 있습니다. 멀티프로세스 개념은 여러개의 프로세스를 가지고 있지만 서로 연관이 안되어있어서 프로세스에 에러가 발생해도 다른 프로세스는 문제 없이 작동합니다. Ex. 워드를 사용하다 오류때문에 종료를 해야되지만 엑셀은 지속적으로 사용가능한 상황. 반면 멀티스레드는 하나의 프로세스안에서 실행이되기 때문에 만약 하나의 스레드에 문제가 발생하면 다른 스레드에도 영향을 끼칩니다. Ex. 메신저어플에서 파일을 보내다가 문제가 생기면 메신저 통채로 종료되는 현상. 어떤 자바 애플리케이션이건 메인 스레드는 반드시 존재한다. 자바에서는 작업 스레드도 객체로 생성된다. Java.lang.Thread를 직접 객체..

반응형