http://jeffe.cs.illinois.edu/teaching/algorithms/
[작성자:] 다솜돌이
[Windows] Windows 10 시작 프로그램 등록
시작 -> 실행 -> shell startup 을 실행하면 시작 프로그램 폴더가 탐색기처럼 뜬다.
여기에 등록하고 싶은 시작 프로그램을 드래그 & 드랍이든, 복사하기/붙여넣기든 추가하면 된다.
추가된 시작 프로그램은 “작업관리자”의 “시작프로그램” 탭에서 사용/사용안함을 설정할 수 있다.
[Internet Explorer] 즐겨찾기 모음 순서 바꾸기
즐겨찾기 모음에 즐겨찾기 순서를 바꾸고 싶을 때,
“즐겨찾기(A)” -> “즐겨찾기 관리(O)…” -> “즐겨찾기 모음”으로 들어가서,순서를 바꾸고 싶은 항목을 클릭한 후, Alt 키를 누른 채로 키보드의 위/아래 방향키를 누르면 순서가 바뀐다.
[Windows] Apache 2.4 + PHPv5
Apache는 apache lounge의 것을 이용하자.
https://www.apachelounge.com/download/
설치 방법은 zip 파일 내부의 ReadMe.txt를 읽어보면 충분하다. 간단히 보면 httpd.conf의 SRVROOT 경로를 설치한 폴더로 바꿔준 후, httpd.exe -k install 후 서비스 시작하면 된다.
PHP는 moniwiki를 사용하기 위해서 설치한 거라 php5를 설치했다. apache 서비스는 중지하고 설치한다.
https://windows.php.net/download/ 에서 php5를 받아 d:\php5 에 풀어준다. apache의 httpd.conf 에 다음을 추가해 준다.
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php5_module “d:/php5/php5apache2_4.dll”
PHPIniDir “d:/php5”
php5 설치 디렉토리 안의 php.ini-development 를 php.ini로 복사해준다.
apache 서비스를 시작!
다음과 같은 에러는 extension을 설치하지 않았을 때 나는 에러로 http://php.net/manual/it/install.windows.extensions.php 를 참조하여 해결한다.
“Call to undefined function mb_strwidth()”
해결 방법을 간단히 적으면, extension_dir = d:\php5\ext 와 같이 바꾸고, ;extension=php_mbstring.dll 과 같이 comment되어 있는 줄의 ;를 지워 comment를 해제한다.
[Windows] UltraMon의 대체 freeware – ZBar
듀얼 이상의 모니터에서 각각의 모니터에 작업표시줄을 붙이고 싶을 때, UltraMon이란 프로그램을 많이 쓴다.
Free한, 아예 commercial free한 프로그램으로 ZBar를 사용하기도 하는 것 같다.
[Windows] Ditto – Clipboard 프로그램
복사하기/붙여넣기를 하다보면 이전에 복사했던 걸 다시 붙여넣고 싶을 때가 있다.
Ditto(https://ditto-cp.sourceforge.io/)를 사용하면 된다. Ctrl + ‘ 을 누르면 이전에 복사했던 목록이 나온다.
데이의 “세 황금문”
누구나 말 하기 전에 세 문을 거쳐야 한다.
‘그것이 참말인가?’, ‘그것이 필요한 말인가?’, ‘그것이 친절한 말인가?’
아쉽다
막상 할 때는 긴장했는지 머리가 멍하다가,
끝나자마자 잠깐 마음을 가다듬고 다시 생각해보니,
아! 이런! 이거 엄청 쉬운거였잖아! ㅠㅠ
이것도 실력이지… 아휴…
잊지 말자 오늘을.
[ASM] IT Block
이게 ARM에만 관련된 것인지는 확실치 않다.
일단 ARM Compiler toolchain Assembler Reference에 IT instruction에 관한 설명(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/Cjabicci.html)이 있다.
IT는 (If-Then) instuction을 말한다. 이름에서 알 수 있듯이, 분류는 Branch and control instruction 이다. IT instruction은 4개의 이어지는 instructions conditional로 구성되는데, 이를 IT block이라고 한다. 이들 condition은 모두 같을 수도, 일부는 다른 것들과 논리적으로 반대일 수도 있다. 이 instruction이 conditional flags를 바꾸지는 않는다.
IT{x{y{z}}} {cond} 로 쓰인다.
x는 그 IT block에서 두번째 instruction을 위한 condition switch, y는 세번째, z는 4번째, cond는 첫번째이다.
IT block의 2번째에서 4번째 instruction은 다음 중 하나일 수 있다:
T: Then. cond condition이 적용된다.
E: Else. cond의 반대 condition이 적용된다.
BKPT instruction을 제외한 IT block 안의 (branches를 포함하는) instrcution들은 {cond} 부분에 condition을 적어야 한다.
assembler가 뒤의 instruction에 적힌 condition에 따라 자동으로 생성해주므로, IT instrcution을 작성할 필요는 없다. IT instruction을 작성한다면, assembler가 그 validity를 체크한다.
ARM code를 assembling할 때 assembler가 같은 체크를 하지만, IT instrcution을 생성하지는 않는다.
CMP, CMN, TST를 제외한 condition code flags에 영향을 주지 않는 16-bit instrcution들은 IT blcok안에서 사용되어도 상관없다.
IT block 안의 BKPT instrcution은 언제나 실행되기 때문에 {cond} 부분 안에 condition은 필요없다. IT bock은 그 다음 instrcution부터 이어진다.
NOTE: AL condition을 사용함으로써 unconditional instruction을 위한 IT block을 사용할 수 있다.
IT block 안에서의 conditional branches는 IT block 밖에 있는 것보다 더 긴 branch range를 갖는다.
IT block 안에 다음 instruction들은 허용되지 않는다
- IT
- CBZ, CBNZ
- TBB, TBH
- CPS, CPSID, CPSIE
- SETEND
IT block이 사용될 때 다른 제한은 다음과 같다.
- PC를 바꾸는 branch나 다른 instrcution은 그 instruction이 그 block의 마지막 instruction일 때만 허용된다.
- exception handler로부터 되돌아가기 전까지는 IT block 안의 어떤 instruction으로도 branch할 수 없다.
- IT block 안에서 어떤 assembler directive도 사용할 수 없다.
NOTE: assembler는 IT block 안에서 이들 instruction들이 사용되면 disgnostic message를 출력한다.
[Raspberry Pi] 라즈베리파이에 미디어위키(MediaWiki) 설치
라즈베리파이의 OS, Raspbian에서는 패키지를 제공하므로 매우 간단하다.
sudo apt-get install mediawiki
설치하면 apache2의 available configuration에 mediawiki라는 새로운 configuration(/etc/apache2/conf-available/mediawiki.conf)이 생긴다.
아래의 Alias를 풀어서 /mediawiki 로 접근해도 된다.
#Alias /mediawiki /var/lib/mediawiki
난 VirtualHost를 이용한다.
/etc/apache2/sites-available/wiki.dasomoli.org.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName wiki.dasomoli.org
ServerAdmin dasomoli@gmail.com
DocumentRoot /var/lib/mediawiki
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/wiki_error.log
CustomLog ${APACHE_LOG_DIR}/wiki.access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
Include conf-available/serve-cgi-bin.conf
</VirtualHost>
이제 mediawiki configuration을 enable 하자
sudo a2enconf mediawiki
wiki.dasomoli.org site도 enable하자
sudo a2ensite wiki.dasomoli.org.conf
apache2도 reload하자
sudo service apache2 reload
이제 wiki.dasomoli.org에 접속해서 mediawiki 설치를 시작한다.
설치가 끝나면 LocalSettings.php 파일을 저장할 수 있는데, 이 파일을 /etc/mediawiki/LocalSettings.php 로 저장한다.
다시 wiki.dasomoli.org로 접속해보면. 설치된 위키를 볼 수 있다!