프로세서(Processor)는 컴퓨터 하드웨어 구성요소 중 운영체제와 가장 밀접한 하드웨어 입니다. 컴퓨터 운영을 위해서 기본적인 명령어들을 처리하고 반응하는 논리 회로 입니다. 컴퓨터의 두뇌라고 할 수 있는데 모든 컴퓨터의 작동과정이 프로세서의 제어를 받기 때문입니다. 프로세서는 레지스터, 산술 논리 연산장치, 제어장치 등으로 구성되는데요 우리가 흔히 사용하는 PC 에서는 주기억장치를 제외한 레지스터, 산술 논리 연산장치, 제어장치를 하나의 칩으로 구성한 마이크로프로세서를 보통 이용합니다.

 

참고

운영체제 그림으로 배우는 원리와 구조 개정판

위키백과 https://ko.wikipedia.org/wiki/%EC%A4%91%EC%95%99_%EC%B2%98%EB%A6%AC_%EC%9E%A5%EC%B9%98

Posted by ElvinKim
,

[python] naming rule

Python 2015. 7. 23. 09:55

Naming

module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_CONSTANT_NAME, global_var_name, instance_var_name, function_parameter_name, local_var_name.

Names to Avoid

single character names except for counters or iterators

dashes (-) in any package/module name

__double_leading_and_trailing_underscore__ names (reserved by Python)

Naming Convention

"Internal" means internal to a module or protected or private within a class.

Prepending a single underscore (_) has some support for protecting module variables and functions (not included with import * from). Prepending a double underscore (__) to an instance variable or method effectively serves to make the variable or method private to its class (using name mangling).

Place related classes and top-level functions together in a module. Unlike Java, there is no need to limit yourself to one class per module.

Use CapWords for class names, but lower_with_under.py for module names. Although there are many existing modules named CapWords.py, this is now discouraged because it's confusing when the module happens to be named after a class. ("wait -- did I write import StringIO or from StringIO import StringIO?")

Guidelines derived from Guido's Recommendations

Type Public Internal

Packages lower_with_under

Modules lower_with_under _lower_with_under

Classes CapWords _CapWords

Exceptions CapWords

Functions lower_with_under() _lower_with_under()

Global/Class Constants CAPS_WITH_UNDER _CAPS_WITH_UNDER

Global/Class Variables lower_with_under _lower_with_under

Instance Variables lower_with_under _lower_with_under (protected) or __lower_with_under (private)

Method Names lower_with_under() _lower_with_under() (protected) or __lower_with_under() (private)

Function/Method Parameters lower_with_under

Local Variables lower_with_under

Main

Posted by ElvinKim
,

프로그램 작성 중 다음과 같은 '[Decode error - output not utf-8]' 인코딩 관련 에러가 발생했을 때 해결책을 정리하려 합니다.


1. Sublime Text 2 에서 Preferences => Browse Packages.... 를 클릭합니다.


2. python 폴더에 들어 갑니다.

3. Python.sublime-build 파일을 엽니다.

4. cmd 창에서 chcp 명령어를 보고 활성 코드 페이지를 확인합니다.

5. 만약 활성 코드 페이지가 949 라면 Python.sublime-build 파일에 다음을 넣고 저장합니다.


Posted by ElvinKim
,