2019年5月22日 星期三

設定Python3 的console print (stdout)採用utf-8

import sys, os

os.environ["PYTHONIOENCODING"] = 'utf-8'
sys.stdout.reconfigure(encoding='utf-8')

此法可避免console print時的cp950 error

2019年5月14日 星期二

Timers cannot be started from another thread可能解法

當遇到
QObject::startTimer: Timers cannot be started from another thread
或者
QObject::killTimer: Timers cannot be stopped from another thread

如果是PyQT5的程式,並且有用到thread或QThread時,
有可能是,QT的物件,並沒有全部放到信號(Signal)中,去執行,
試著將Qt的物件,如QtGui, QtWidgets ...等,都放到Signal中(QtCore.pyqtSignal)
用emit()執行,試試看,是否沒有錯誤訊息了…

2019年5月7日 星期二

Press F5 to produce pseudo C code out of IDA disassembly

這幾天才發現原來用ida pro做逆向,
按F5就可以得到C語言的偽源碼了 XD
參:
https://www.youtube.com/watch?v=gYkDcUO9otQ

2019年5月6日 星期一

To display a less than sign (<) we must write: < or <

To display a less than sign (<) we must write: &lt; or &#60;

A common character entity used in HTML is the non-breaking space: &nbsp;

The non-breaking hyphen (&#8209;) lets you use a hyphen character (‑) that won't break.


Some Other Useful HTML Character Entities

ResultDescriptionEntity NameEntity Number
non-breaking space&nbsp;&#160;
<less than&lt;&#60;
>greater than&gt;&#62;
&ampersand&amp;&#38;
"double quotation mark&quot;&#34;
'single quotation mark (apostrophe)&apos;&#39;
¢cent&cent;&#162;
£pound&pound;&#163;
¥yen&yen;&#165;
euro&euro;&#8364;
©copyright&copy;&#169;
®registered trademark&reg;&#174;

Note: Entity names are case sensitive.