Install PyQt5.5 on Macos
Macos: 10.10.5
Python: 3.4.3
PyQt: 5.5
https://riverbankcomputing.com/software/pyqt/download5
download source
http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.9/sip-4.16.9.tar.gz/download
install Qt5
add qmake path
sudo vi /etc/paths
add '/Users/xxx/Qt5.5.0/5.5/clang_64/bin
cd Path/of/PyQt
python3 configure.py
make
make install
(install to /Library/Frameworks/Python.framework)
#! /Library/Frameworks/Python.framework/Versions/3.4/bin/python3
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class Editor(QMainWindow):
def __init__(self, parent=None):
super(Editor, self).__init__(parent)
self.text = QTextEdit(self)
self.setCentralWidget(self.text)
self.setWindowTitle("PyEditor")
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
mainWindow = Editor()
mainWindow.show()
sys.exit(app.exec_())
2015年10月20日 星期二
2013年12月22日 星期日
mount disk permission problem
today, I mount a disk by user 1, and the other user cann't rw this disk,
so, i modify permission and ownship (chmod and chown), but it's did work, the value was change, but i still didn't read/write disk.
finally, i restart computer, then the new configure have update.
1 auto mount
1.1 find out uuid of disk
#sudo blkid
1.2 mount by uuid
other condition is modify permission and ownship can pass, but the value didn't change, this may the format of File system not support group, in the other word, it is not a file system of Linux system, it may be FAT or NTFS, in this case, you should umount disk and mount system in new parameter.
so, i modify permission and ownship (chmod and chown), but it's did work, the value was change, but i still didn't read/write disk.
finally, i restart computer, then the new configure have update.
1 auto mount
1.1 find out uuid of disk
#sudo blkid
1.2 mount by uuid
other condition is modify permission and ownship can pass, but the value didn't change, this may the format of File system not support group, in the other word, it is not a file system of Linux system, it may be FAT or NTFS, in this case, you should umount disk and mount system in new parameter.
2013年6月24日 星期一
Quartus 11.1, 13.0sp1 on Ubuntu 64bit
sudo apt-get upgrade
sudo apt-get install ia32-libs
./11.1_173_quartus_linux.sh
bash /11.1_173_quartus_linux/setup
error 1: ./setup: Syntax error: "&" unexpected
出現這個錯誤是因為quartus xxxx.sh被設定成/bin/sh,但其實是用bash寫的,所以只需改成bash執行即可。
最近Altera 更新了Quartus 13.0 sp1, 我也順便更新下我的系統 時發現 Altera終於修正了 Quartus 11的問題,所以現在只用無腦的雙擊setup.sh(改名了) Quartus 13就能順利的安裝。
2013年4月15日 星期一
SVN on Ubuntu 12.10
使用svn co https://xxx.xxx/xxx時出現SSL handshake failed: SSL error: Key usage violation in certificate has been detected.
原來是ssl版本的問題,
$sudo apt-get install libneon27
$sudo mv /usr/lib/libneon-gnutls.so.27 /usr/lib/libneon-gnutls.so.27.old
$sudo ln -s /usr/lib/libneon.so.27 /usr/lib/libneon-gnutls.so.27
Reference
http://stackoverflow.com/questions/10062095/svn-on-ubuntu-sslhandshake-failed
2013年4月9日 星期二
parser - Flex & Bison
- 加入 %option c++在xxx.l檔的第一行
- 實作yyFlexLexer::yywrap()在xxx.l的c++ code 區
- 產生lex.yy.cc而非lex.yy.c,且指令變成flex -+ xxx.l
- 在main.cpp #include "FlexLexer.h"
- 之後就使用class yyFlexLexer
2013年4月8日 星期一
PC/ FPGA communication
和Altera FPGA通訊最容易的方式應該就是透過USB-blaster了,如果不想花太多時間debug硬體的話,其實只要用Qsys加入NIOS, no chip memory和jtag_uart,然後再用NIOS IDE寫printf/ scanf就能send/recv message from Jtag
然後配上這個程式就可以從PC收發資料了,原始的程式是自http://www.alteraforum.com/forum/showthread.php?t=2199找到的。
然後配上這個程式就可以從PC收發資料了,原始的程式是自http://www.alteraforum.com/forum/showthread.php?t=2199找到的。
2013年4月3日 星期三
擴充Notepad++ Language style
Notepad++ 除了內建的language style外,還可以擴充任何需要的語言
方法是從http://www.noanylove.com/2012/07/notepad-add-user-defined-language/看來的,不過其中翻譯的詞都不同,可能是版本有差吧!
不過下載下來的CUDA定義的字型我不喜歡,所以把它都改回notepad++預設的字型
我的CUDA定義
Flex Bison定義
方法是從http://www.noanylove.com/2012/07/notepad-add-user-defined-language/看來的,不過其中翻譯的詞都不同,可能是版本有差吧!
- menu ->檢視 ->自訂語法對話窗
- 在http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files有 各種語言的定義,下載所需的之後
- 選import 即可
不過下載下來的CUDA定義的字型我不喜歡,所以把它都改回notepad++預設的字型
我的CUDA定義
Flex Bison定義
訂閱:
文章 (Atom)