This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt4 import QtGui, QtCore | |
#http://stackoverflow.com/questions/36675609/how-can-i-create-multi-page-applications-in-pyqt4/36676917 | |
class Window(QtGui.QMainWindow): | |
def __init__(self): | |
QtGui.QMainWindow.__init__(self) | |
widget1 = QtGui.QLabel("Page 1") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt4 import QtGui, QtCore | |
class Window(QtGui.QMainWindow): | |
def __init__(self): | |
QtGui.QMainWindow.__init__(self) | |
widget1 = QtGui.QDockWidget("Page 1") | |
widget1.setWidget(QtGui.QLabel("Page 1")) | |
widget2 = QtGui.QDockWidget("Page 2") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt4 import QtGui, QtCore | |
class Window(QtGui.QMainWindow): | |
def __init__(self): | |
QtGui.QMainWindow.__init__(self) | |
widget = QtGui.QWidget() | |
widget1 = QtGui.QLabel("Page 1", widget) | |
widget2 = QtGui.QLabel("Page 2", widget) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import getpass | |
import mysql.connector | |
class WordNotFoundError(Exception): | |
def __init__(self, word): | |
self.word = word | |
def __str__(self): | |
return self.word + " was not found." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import getpass | |
import mysql.connector | |
class WordNotFoundError(Exception): | |
def __init__(self, word): | |
self.word = word | |
def __str__(self): | |
return self.word + " was not found." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class dotdict(dict): | |
__getattr__ = dict.__getitem__ | |
__setattr__ = dict.__setitem__ | |
"""descriptions: | |
Like a JavaScript, get dictionary item via attribute. | |
d = dotdict() | |
d.a = 1 | |
print(d.a) # ==> 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in range(100):print(i%3//2*"Fizz"+i%5//4*"Buzz"or-~i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Data] | |
DataCount=1 | |
[Data_1] | |
Comment=Dolphin の基本的なジェスチャーです。(マウスジェスチャーに使用するボタンは「全体設定」で変更できます) | |
DataCount=12 | |
Enabled=true | |
Name=Dolphin ジェスチャー | |
SystemGroup=0 | |
Type=ACTION_DATA_GROUP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro_rules! print_var_fmt { | |
($e:expr) => { | |
concat!(stringify!($e), ":\t{}") | |
}; | |
($e:expr, $($es: expr),+) => { | |
concat!(print_var_fmt!($e), ",\t", print_var_fmt!($($es),+)) | |
}; | |
} | |
macro_rules! print_var { |
OlderNewer