도장이라던가 이런건 배경이 투명하면 쓰기 좋으니(ppt라던가 doc에 첨부시)
GIMP로 한번 끄적여서 만들어 보게 되었다... (아 귀찮아 -ㅁ-)
Step 1. 이미지를 열고, 레이어를 하나 만들어 준 후, 이미지를 전체 선택한뒤 잘라내기 + 붙여넣기 하면 "떠있는 선택(붙여 넣은 레이어)" 가 되는데 "레이어 - 레이어 고정(A)" 을 눌러 새 레이어로 만들어 준다.
그리고 배경 레이어는 전체 선택후 삭제하고, 눈을 클릭해서 보이지 않도록 설정한다.
Step 2. 투명하게 할 부분을 잘 선택하고 나서 삭제한다.
Step 3. 파일을 저장하되 확장자를 GIF로 해주면 아래와 같은 대화상자가 열린다.
"보이는 레이어 합치기"를 선택후 내보내기(E)를 클릭한다.
Step 4. 윈도우 기본 내장 이미지 뷰어로 보면 배경이 흰색으로 나온다.(분간이 안됨)
Step 5. 파워포인트에 아무거나 그리고 파일을 드래그 해서 이미지를 표시한 화면.
위에서 흰색으로 나왔던 부분이 투명하게 적용된것을 알수있다.
주의사항: GIF는 256컬러가 한계이므로, 색상이 많은 사진을 투명으로 적용하기에는 적합하지 않다.
사족 : 어려운데 왜 이걸로 하냐고 하면, 그냥 가능한 방법을 찾아보고 싶었을뿐.. 이라고 대답할수 밖에 -ㅁ-
# ps PID USER VSZ STAT COMMAND 1 root 3120 S init 2 root 0 SW< [ksoftirqd/0] 3 root 0 SW [watchdog/0] 4 root 0 SW< [events/0]
STAT의 값들을 보면 ps의 BSD style의 내용과 같다.
PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to
describe the state of a process.
D Uninterruptible sleep (usually IO)
R Running or runnable (on run queue) S Interruptible sleep (waiting for an event to complete)
T Stopped, either by a job control signal or because it is being traced. W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z Defunct ("zombie") process, terminated but not reaped by its parent.
For BSD formats and when the stat keyword is used, additional characters may be displayed: < high-priority (not nice to other users)
N low-priority (nice to other users)
L has pages locked into memory (for real-time and custom IO)
s is a session leader
l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
+ is in the foreground process group
그냥.. 안드로메다 스타일인가? -ㅁ-
아무튼, busybox의 ps에는 priority가 나오지 않는다.
이경우 수작업으로 확인하려면, /proc/{pid}/stat의 19번째 항목을 확인하면 된다.
stat - Status information about the process used by the ps(1) command. Fields are:
1. pid - Process id
2. comm - The executable filename
3. state - R (running), S(sleeping interruptable), D(sleeping), Z(zombie), or T(stopped on a signal).
4. ppid - Parent process ID
5. pgrp - Process group ID
6. session - The process session ID.
7. tty - The tty the process is using
8. tpgid - The process group ID of the owning process of the tty the current process is connected to.
9. flags - Process flags, currently with bugs
10. minflt - Minor faults the process has made
11. cminflt - Minor faults the process and its children have made.
12. majflt
13. cmajflt
14. utime - The number of jiffies (processor time) that this process has been scheduled in user mode
15. stime - in kernel mode
16. cutime - This process and its children in user mode
17. cstime - in kernel mode
18. counter - The maximum time of this processes next time slice. 19. priority - The priority of the nice(1) (process priority) value plus fifteen.
20. timeout - The time in jiffies of the process's next timeout.
21. itrealvalue - The time in jiffies before the next SIGALRM is sent to the process because of an internal timer.
22. starttime - Time the process started after system boot
23. vsize - Virtual memory size
24. rlim - Current limit in bytes of the rss of the process.
25. startcode - The address above which program text can run.
26. endcode - The address below which program text can run.
27. startstack - The address of the start of the stack
28. kstkesp - The current value of esp for the process as found in the kernel stack page.
29. kstkeip - The current 32 bit instruction pointer, EIP.
30. signal - The bitmap of pending signals
31. blocked - The bitmap of blocked signals
32. sigignore - The bitmap of ignored signals
33. sigcatch - The bitmap of catched signals
34. wchan - The channel in which the process is waiting. The "ps -l" command gives somewhat of a list.
노약자석에 아가씨가 약간의 짐을 무릎에 얹고 DMB를 보고있다.
맞은편에는 할머니께서 서계시고
그 할머니 오른쪽 대각선에도 짐도 없는 아가씨가 앉아있다.
왜 남자들은 이야기가 없냐고 할지 모르겠지만,
최소한 남자들은 경로석에 앉아있지 않았고, 유독 눈에 띄었다고 하면 돌이 날아오려나?
(건장한 대한건아는 앞쪽에는 앉지않고 뒤에 앉거나 서서가는 사람밖에 없었다)
아무튼, 짐이 많거나 몸이 안좋으면 어느정도 이해하지만
그래도 DMB 본다고!!! 노약자분들 특히 소심하고 착하게 살아오셔서
차마 "이봐 젊은이 미안한데 자리좀 양보해줄수 없겠는가?" 라는 말이 떨어지지 않는
순한 노약자분들은 둘러보지도 않고, 열심히 TV 감상을 하는건 좀 아니지 않은가?
물론 일부 양보를 강요하는 미친 노친네들도 있긴 하지만
그래도 그렇게 말도 못하고 힘드시지만 서서 가시는 할아버지/할머니에게는 자리를 양보하는게 옳지 않을까?
사족0: 저~~얼대 내가 DMB 없어서 그러는거 아님! (DMB는 취향이 아니라 -ㅁ-)
사족1: 저~~얼대 내가 서서가서 그러는거 아님! (난 세정거장만 가면 내림!)
사족2: 내 노트북 소리 졸라 키우면 니네 DMB 보다 소리 더 크게 낼수 있거덩? ㄱ-
사족3: 낙인이론인가. 이상하게 요즘에 도로에서라던가 버스에서/지하철에서 밉상들은 대개 여성들이 많다 -ㅁ-
물론 되도않은 패션의 꼴스러운 남정네들과 머리에 힘좀 주고 시발시발 대는 고삐리 머스마들도 있지만
번외편
애인과 데이트 하다가 집에 바래다주러 가는데
횡단보도에 떡하니 시즈모드 하고 신호대기를 하면서 핸드폰을 열심히 들여다 보는 차량이 있었다.
네비게이션도 있는데 왜 핸폰을 보나? 싶었는데 대략 30대 초반 정도로 보이는 아/가/씨!
뒤에 한대더 그냥 대기중이었고 그 뒤로 우회전 차량들이 있었는데 두대 덕분에 뒷차들도 시즈모드 사람들도 회피모드!
머.. 길거리에서 이상한 운전하는 사람보면 아줌마가 많다지만.. 내 눈에는 희한하게 왜 아가씨들이 더 눈에 띌까 -ㅁ-
소스코드는 AVR BIBLE (배성중/북두출판사) 를 참고하였으며
winavr 요즘 버전에 맞추고(ISR, outp 매크로, include 경로), 클럭이 맞지않아 변수들을 수정하여 타이밍을 조절하였다.
지루한 계산 16Mhz = 16,000,000 hz 이고
서보 모터는 20ms = 0.02sec 단위로 신호를 넣어준다.
그리고 PWM 신호는 0.5ms ~ 2ms 사이의 길이를 넣어주면 0 ~ 180도의 각도로 이동한다.
(책에는 1.5ms 에서 길거나 짧거나 라고 하는데 서보마다 다른듯.. 데이터 시트에도 없다 ㄱ-)
일단 8bit timer를 사용함으로 256 clock 마다 overflow를 발생시키며
16,000,000(clock/sec) / 256 = 62,500 times 1초에 62,500 번의 overflow가 발생하게 된다.
1/62500 = 0.000016 sec 이며 62500/50 = 1250 번이다.(20ms 는 1초에 50회)
즉, 256번씩의 overflow를 1250번 반복하게 되면 0.02sec = 20msec 간격을 잡을수 있다.
그리고 1msec는 62.5 인터럽트가 모이면 되고,
실험적으로 서보에서 사용하는 PWM의 width를 얻어내면 된다.
아무튼 위의 값은 정확한건 아니지만.. (ㄱ-) 대략적으로 맞아들어가며
0도와 180도의 하한/상한을 찾은뒤 평균내면 90도가 잡아진다.(레드썬!)
(위의 값으로는 180도 쪽이 약간 5도 정도 부족해 보이나,
끽끽대며 더이상 가지 못하는 문제가 있어 실질적으로 90도를 약간 좌측으로 수정해야 하지 않을까 싶다.)
대충의 계산방식이 들어있는 스프레드시트 파일.
클럭과 timer overflow 에 필요한 clock을 입력하면 된다.