이론 관련/전기 전자2017. 4. 14. 09:41

AND OR NOT

NAND NOR XOR


기호에 동그라미는 NOT 입력이나 NOT 출력


[링크 : http://www.ktword.co.kr/abbr_view.php?nav=2&id=735]



AND / OR / NOT 게이트 회로

AND/OR는 다이오드와 저항만 있으면되고

NOT은 TR이 있어야 하는 군...


[링크 : http://jht0620.tistory.com/37]



각종 회로기호 모음

[링크 : http://forum.falinux.com/zbxe/index.php?document_srl=550845]


버퍼(NOT에 동그라미 뺸거)

[링크 : http://bunrint10103.tistory.com/entry/BUFFER-게이트]


버퍼 사용 이유 - 팬아웃(fan out)

[링크 : http://blog.daum.net/trts1004/12108898]


FET 기호 - 꼭 스위치 같네...

ATmega128 / GPIO 회로에서 좌상단


'이론 관련 > 전기 전자' 카테고리의 다른 글

배터리 방전율 관련  (0) 2017.07.04
LVCMOS, LVTTL  (0) 2017.05.24
크리스탈 정밀도 - PPM  (0) 2016.11.23
자전거 속도계 센서 - 리드 스위치  (0) 2016.11.23
27MHz에 1Mohm 저항을 왜 달까?  (2) 2016.10.26
Posted by 구차니
Programming/php2017. 4. 13. 18:55

php에서 세션은 /tmp에 파일로 저장되는데(리눅스 기준)

/tmp는 누구나 접근이 가능한 곳이라 보안상의 문제가 되기에

세션변수로 패스워드를 저장하면 안된다고 한다.


[링크 : http://blog.habonyphp.com/entry/php-세션-데이터-보안의-중요성]


그리고 /tmp는 파일로 저장하기에 세션변수를 많이 쓰면 file i/o로 부하가 많이 걸릴수 있다.

[링크 : http://jonnung.github.io/php/2016/12/17/php-session-start-inefficient/]


그래서 memcached 라던가 sqlite 등의 DB에 세션을 저장하는 거였나...

$ sudo apt-cache search memcache

php5-memcache - memcache extension module for PHP5

php5-memcached - memcached extension module for PHP5, uses libmemcached

memcached - high-performance memory object caching system

memcachedb - Persistent storage engine using the memcache protocol 

[링크 : http://php.net/manual/en/book.memcached.php]



+

원래 찾으려고 했던 내용...

걍 global로 지정해서 저장하던가 아니면 class로 해서 변수 저장하던가.. 인가?

[링크 : http://blog.naver.com/mikong22/220835017565]

'Programming > php' 카테고리의 다른 글

php static과 변수 유효범위  (0) 2017.04.15
php 상수 선언 - define  (0) 2017.04.15
php mvc 구현(+ PDO)  (2) 2017.04.07
php mysql 자동증가값 받기  (0) 2017.03.14
php zend guard ?  (2) 2017.03.14
Posted by 구차니

혹시나 해서 먼가 잘못한게 있나 onenote 깔아봐도

선택해서 옮기거나 축소 확대 하는 기능은

갤럭시 노트 3 이후 버전의 S 노트 밖에 없네


확실히 노트 2용 S노트는 벡터가 아니라 픽셀 단위로 삭제 되고

노트3용 부터 벡터로 그려서 확대 축소가 가능한 듯

그나마 아쉬운대로 윈도우 필기장 비슷하게 쓰는 중


단, 노트 2에서는 갤럭시 앱스에 들어가서 S 노트를 설치해야 한다.




찾아보니 PC 버전도 있네?

S노트 자체는 삼성계정과 에버노트 정도(한번 깐적이 있어서...)는 동기화 되는거 같은데..

[링크 : http://www.samsung.com/sec/galaxy/apps/s-note/]


+

에버노트는 이동은 되는데 크기 조절은 안된다.

'개소리 왈왈 > 모바일 생활' 카테고리의 다른 글

smardi gam.r 분해  (0) 2017.04.25
노트2 S펜 / 2710p 펜  (2) 2017.04.14
노트2는 ART 미지원?  (0) 2017.04.11
skt용 갤럭시 노트2 3g 만 사용하기  (0) 2017.03.26
라이트닝 - USB 어댑터 분해  (0) 2017.03.25
Posted by 구차니
개소리 왈왈/블로그2017. 4. 13. 08:58

집에 가서 한번

핸드폰으로 한번

회사에서 한번

이제.. 남은건 아이패드 하나인가 -_-


그런데...

이거 보안설정 된건 오래전부터 알고 있는데

왜 갑자기 이게 뜨는거야?




Posted by 구차니

wiki 식으로 리비전을 계속 올리면서 저장을 하게 되면...

고민을 해보니 대용량의 경우 엄청나게 용량을 쳐묵쳐묵 하게 되는데

(wiki 페이지 하나가 400kb 넘어가는데 그걸 하루 한번 1년 한다고 하면..)

내용 자체를 compress 해서 넣고 decompress 해서 사용하면 조금 느려도 괜찮으려나 싶었지만

sql 문을 통해 검색이 안될거 같아서 포기..


그러다가 찾은게.. db 자체를 압축하는 건데

라즈베리 버전에서는 활성화가 안되어있는지 안뜬다.

COMPACT랑 REDUNDANT만 뜨는 상태..


[링크 : http://stackoverflow.com/questions/8228950/compressing-text-before-storing-it-in-the-database]


[링크 : https://dev.mysql.com/doc/refman/5.6/en/innodb-row-format-dynamic.html]

[링크 : https://dev.mysql.com/doc/refman/5.6/en/innodb-row-format-antelope.html]


+

phpmyadmin 에서 sql을 통해 실행해도 나온다.



SET GLOBAL innodb_file_per_table=1;

SET GLOBAL innodb_file_format=Barracuda; 

[링크 : https://dev.mysql.com/doc/refman/5.6/en/innodb-compression-usage.html]


기본값은 antelope 이고 barracuda는 신규 포맷


[링크 : https://dev.mysql.com/doc/refman/5.6/en/innodb-file-format.html]

'프로그램 사용 > mysql & mariaDB' 카테고리의 다른 글

db varchar 와 char  (0) 2017.05.09
db에 mac / ip 저장하기(자료형)  (0) 2017.05.09
mysql view  (0) 2017.03.14
db designer  (0) 2017.03.14
데이터베이스 구조 버전관리  (0) 2017.02.13
Posted by 구차니
프로그램 사용/apache2017. 4. 12. 09:43

에러로그 설정하고 보는데 먼소리인지 모르겠다 ㅠㅠ

일단 규칙은 아래와 같이 들어온 주소를 index.php?url="어쩌구" 식으로 바꾸어 주는건데

문제는 ^(.+)$ ...

처음부터 끝까지 내용이 없던 머던 상관없는데 이걸 $1로 치환하라 인데

Options -MultiViews

RewriteEngine On

Options -Indexes

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L] 


현재 읽혀 있는 경로에서 달라지는 내용만을 적용대상으로 삼는건가?

/var/www/html/arch/test/index.php 에서 있는 파일은 웹상으로 접속하면

http://localhost/arch/test 인데, 이 파일에서 링크된 다른 경로

arch/test/board는 이전 주소를 기본으로 볼때 board가 하나 추가 된 셈이니

test 이후의 board만 들어가서 rewrite rule에 적용을 받는건가?

 [perdir /var/www/html/arch/test/] add path info postfix: /var/www/html/arch/test/board -> /var/www/html/arch/test/board/, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] strip per-dir prefix: /var/www/html/arch/test/board/ -> board/, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] applying pattern '^(.+)$' to uri 'board/', referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] rewrite 'board/' -> 'index.php?url=board/', referer: http://localhost/arch/test/board/

 split uri=index.php?url=board/ -> uri=index.php, args=url=board/, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] add per-dir prefix: index.php -> /var/www/html/arch/test/index.php, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] strip document_root prefix: /var/www/html/arch/test/index.php -> /arch/test/index.php, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] internal redirect with /arch/test/index.php [INTERNAL REDIRECT], referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] strip per-dir prefix: /var/www/html/arch/test/index.php -> index.php, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] applying pattern '^(.+)$' to uri 'index.php', referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] pass through /var/www/html/arch/test/index.php, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] strip per-dir prefix: /var/www/html/arch/test/public/css/style.css -> public/css/style.css, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] applying pattern '^(.+)$' to uri 'public/css/style.css', referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] pass through /var/www/html/arch/test/public/css/style.css, referer: http://localhost/arch/test/board/ 


[링크 : http://webskills.kr/archives/515]


+

QSA는 Cond를 지난 결과에 덧 붙인다라는 의미..

음.. 경로의 마법은 저 Cond와 QSA인가?

[링크 : http://soul0.tistory.com/208]


+

REQUEST_FILENAME

The full local filesystem path to the file or script matching the request, if this has already been determined by the server at the time REQUEST_FILENAME is referenced. Otherwise, such as when used in virtual host context, the same value as REQUEST_URI. Depending on the value of AcceptPathInfo, the server may have only used some leading components of the REQUEST_URI to map the request to a file.


REQUEST_URI

The path component of the requested URI, such as "/index.html". This notably excludes the query string which is available as its own variable named QUERY_STRING.

[링크 : http://httpd.apache.org/docs/current/mod/mod_rewrite.html]


Filename should give you the complete local path, where request uri will be exactly what was requested (should also include the GET parameters). From the manual:

REQUEST_URI

The resource requested in the HTTP request line. (In the example above, this would be "/index.html".)

REQUEST_FILENAME

The full local filesystem path to the file or script matching the request. 

[링크 : http://www.miva.com/...-htaccess-what-s-the-difference-between-request_filename-and-request_uri]

Posted by 구차니
프로그램 사용/apache2017. 4. 12. 09:30

테스트를 해보니.. apache 전역 환경설정에서 해야 하고

로컬 .htaccess에 설정하면 에러가 발생한다.

[Wed Apr 12 09:14:03.530865 2017] [core:alert] [pid 30981] [client 0.0.0.0:3628] /var/www/html/arch/test/.htaccess: LogLevel not allowed here 


아파치 2.4 이후

LogLevel alert rewrite:trace3

[링크 : http://httpd.apache.org/docs/current/mod/mod_rewrite.html]


아파치 2.2 이전

RewriteEngine on

RewriteLog /path/to/log

RewriteLogLevel 5 

[링크 : https://wiki.apache.org/httpd/RewriteLog]



그나저나 한 페이지 로딩할때 이미지나 css 등 개별파일들 전부 적용되서 로그가 남는구나 ㄷㄷ

Posted by 구차니

간단요약.

COM3의 경우 윈도우에서 시리얼 마우스로 자동 탐지를 하는데

USB to RS232 등을 COM3로 사용시

M이나 B를 인식하면서 마우스 클릭하거나 이상하게 이동하는 문제가 발생을 한다.


시리얼 마우스 서비스를 종료하거나

해당 포트를 열거하지 않도록 함으로서 해결 가능


[링크 : http://stackoverflow.com/questions/9226082/device-misdetected-as-serial-mouse]

[링크 : http://www.taltech.com/support/entry/windows_2000_nt_serial_mice_and_missing_com_port]

[링크 : http://www.sealevel.com/.../How-to-fix-crazy-mouse-syndrome-with-USB-serial-adapters.html]

'모종의 음모 > Win32 시리얼' 카테고리의 다른 글

MFC 시리얼 포트 관련  (0) 2017.05.17
mfc readfile timeout 설정  (0) 2017.04.06
mfc win32 시리얼  (0) 2017.04.05
시리얼 baudrate 목록  (0) 2017.04.05
win32 시리얼 포트 목록 얻기  (0) 2017.04.05
Posted by 구차니

검색해도 이거 밖에 언급된 내용을 못 찾음 ㅜㅜ

아무튼 노트2는 안되고

3나 4의 롤리팝/마시멜로우 부터 정식적용 된 듯?


[링크 : https://ko-kr.facebook.com/permalink.php?story_fbid=634271276655585&id=427271000688948]

Posted by 구차니
프로그램 사용/apache2017. 4. 11. 19:54

기본값으로는 해당 모듈이 활성화 되어 있지 않았네...


$ cd /etc/apache2/mods-enabled

$ sudo ln -s ../mods-available/rewrite.load rewrite.load 




+

Directory 항목중 AllowOverride all 를 해주지 않으면

파일로 저장된 .htaccess를 적용되지 않는 것으로 보인다.

[링크 : http://zetawiki.com/wiki/하위폴더_.htaccess_설정]

'프로그램 사용 > apache' 카테고리의 다른 글

mod_rewrite 테스트..  (4) 2017.04.12
mod_rewrite 로그설정  (0) 2017.04.12
mod_rewrite 설정 및 정규표현식  (0) 2017.04.10
apache mod_deflast mod_gzip  (0) 2017.01.23
무료 ssl 인증서 - lets encrypt  (2) 2017.01.20
Posted by 구차니