Computer
-
ASUS B365M-A 윈도 처음 설치 후 IRST 문제Computer/Hardware 2020. 10. 3. 11:01
ASUS B365M-A에 Windows 10 2004 버전을 설치 했다. 부팅 잘 되고 업데이트 했고 ASUS Q-Installer가 실행 되어 드라이버까지 설치 했다. 그런데 재부팅 하면 자동복구 - PC를 복구하지 못했습니다 나온다. 이상이 있나 하고 복원을 해도 문제가 반복 되었다. 자세히 읽어보니 로그가 남아 있다고 한다. 고급옵션 - 명령프롬프트로 들어가서 로그 (C:\Windows\System32\LogFiles\Srt\SrtTrail.txt 를 읽어 보았다. 중간에 보면 다음과 같은 문제를 진단 했다. Root cause found: --------------------------- Boot critical file c:\windows\system32\drivers\iastorac.sys i..
-
DELL Thunderbolt Dock WD19TB 문제점Computer/Hardware 2020. 8. 21. 18:47
이 전에 Belkin F4U095 Thunderbolt Dock을 쓰면서 Macbook Pro도 연결하고 XPS 15 2017년에 샀던 기종도 연결하여 쓰고 있었다. 이번에 XPS 15 7590을 사용하게 되어서 Dell의 Thunderbolt Dock인 WD19TB를 함께 쓰기로 했다. 이전의 Dell TB16 Dock에 문제가 많았었지만 이번에 개선되었기를 바랐다. 연결 후 Firmware Update 하고 Apple Cinema Monitor에 연결 했는데 화면이 깜빡깜빡 하기 시작했다. 그러다가 어느순간 Internal Power Error 나오며 Blue Screen이 떴다. 메모리 덤프 100%까지 간 후에 자동으로 시작하지 않았다. 한참 기다려도 XPS15가 불같이 뜨거운 상태로 머물러 있었..
-
Python 3 unittest vs. Python 2 unittest - __init__.pyComputer/Programming 2020. 4. 11. 20:14
Python 2 에서 unittest 할 때는 Module에 __init__.py 있으면 해당 디렉토리 안에서는 해당 디렉토리를 root로 하고 import에서 path를 생략해도 알아서 잘 했었다. Python 3에서는 unittest 할 때 __init__.py가 동작하지 않는다. 그래서 unittest 할 때 import 할 때 path를 다 넣어야 한다. 예를 들어 myproject ---- my_mod1.py ---- my_mod2.py tests ---- test_myproject.py my_mod2.py 에서 import my_mod1 되어 있으면 python -m unittest -f -v tests.test_my_project ModuleNotFoundError가 발생한다. 그래서 my_..
-
TDM GCC - GDB python 2, 3 동시 설치시 Python 3 site.py 참조Computer/Programming 2020. 2. 25. 10:23
TDM GCC 5.1 버전에서 GDB를 실행하면 파일에서 Python2를 사용하려 하는데 Python3 설치 되어 있으면 에러 발생 PYTHON 2를 설치해도 동일한 에러 발생 File ".../python3.6/site.py", line 183 file=sys.stderr) ^ SyntaxError: invalid syntax 이런 에러가 나온다. site.py 참조하면서 에러 발생. 살펴보니 커맨드창에서 Py -2 실행해도 동일한 에러가 발생한다. PYTHONHOME 환경변수를 지워 버리고 PYTHON2HOME, PYTHON3HOME 정도로 하면 에러가 해결 되고 정상 실행 된다.
-
QString to wchar_t arrayComputer/Programming 2019. 11. 27. 11:31
https://stackoverflow.com/questions/16225810/unable-to-convert-qstring-to-wchar-array/42361091#42361091 Unable to convert QString to WChar Array QString processName = "test.exe"; QString::toWCharArray(processName); I'm getting the following error: error: C2664: 'QString::toWCharArray' : cannot convert parameter 1 from 'QString' to 'wchar_... stackoverflow.com QString을 wchar_t로 바꿀 때 채택 된 첫 번 째 답이..
-
IDA Pro 마우스 우클릭으로 실행Computer/Program Analysis 2019. 11. 18. 13:56
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\IDA64] @="&IDA64" [HKEY_CLASSES_ROOT\*\shell\IDA64\command] @="\"C:\\Program Files\\IDA Pro 7.4\\ida64.exe\"" Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\IDA32] @="&IDA32" [HKEY_CLASSES_ROOT\*\shell\IDA32\command] @="\"C:\\Program Files\\IDA Pro 7.4\\ida.exe\"" Mouse RIght Click으로 IDA 열 때 사용하는 레지스트리.
-
python defaultdict 이용한 histogram - key 검색과 초기화 없이 세기Computer/Programming 2019. 3. 22. 10:34
파이썬에서 dict 가지고 빈도 수 측정 하려면 다음과 같이 key가 있는지 검사하고 없으면 0으로 초기화, 있으면 +1을 한다. import random freq = dict() for i in range(100): dice = random.randint(1,6) if dice in freq: freq[dice] += 1 else: freq[dice] = 0 for n in freq: print('%d : %d times' % (n, freq[n])) defaultdict가 이런 귀찮음을 해결해 준다. 초기화 할 때 int 로 하게 되면 기본값을 0으로 가져가게 된다. import random from collections import defaultdict freq = defaultdict(int) f..