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 QtQuick.Window 2.2 | |
Window { | |
id: root | |
Flickable { | |
id: flick | |
Layout.minimumHeight: 50 | |
Layout.fillHeight: true |
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
*.db diff=sqlite3 |
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
// http://www.slideshare.net/emayssat/qt-quick-qml-and-canvas-tutorial | |
import QtQuick 2.0 | |
Item { | |
Rectangle { | |
id: root | |
width: 640 | |
height: 360 | |
color: "#3C3C3C" | |
ListModel { |
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
#!/usr/bin/env python | |
# This file is intended to be a quick template for making a commandline tool in python using getopt to hande the arguments. | |
import sys, os, re, getopt | |
def usage(): | |
# output comparable to argparse | |
# https://docs.python.org/2/library/argparse.html#module-argparse | |
filename = os.path.basename(__file__) |
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
Sub Main() | |
Call explode_rows("Sheet1", "Sheet2", 2, ",") | |
End Sub | |
Function explode_rows(sheet_src As String, sheet_dest As String, col As Integer, sep As String) | |
Dim wb As Workbook | |
Dim r_src As Integer | |
Dim r_dest As Integer |
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
# Prints the stack trace and some context lines for where the stack trace happened | |
# rotate the log | |
unlink /var/rotating_log.log | |
datetime=$(date +%m%d%Y_%H%M%S); | |
logfile="rotating_log_$datetime.log" | |
echo "Started on $datetime" > $logfile | |
#chfile mygroup 664 $logfile | |
ln -s $logfile rotating_log.log |
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
{ | |
"game_setups": [ | |
{ | |
"name": "setup_template", | |
"players": [ | |
{ | |
"name": "Player 1" | |
}, | |
{ | |
"name": "Player 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
#include <QApplication> | |
#include "mypushbutton.h" | |
int main(int argc, char *argv[]) | |
{ | |
QApplication a(argc, argv); | |
MyPushButton pb; | |
pb.show(); | |
return a.exec(); | |
} |
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
#include "readonlydelegate.h" | |
ReadOnlyDelegate::ReadOnlyDelegate(QObject *parent) : | |
QItemDelegate(parent) | |
{ | |
} | |
bool ReadOnlyDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) | |
{ | |
return false; |
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
#include "checkablesortfilterproxymodel.h" | |
CheckableSortFilterProxyModel::CheckableSortFilterProxyModel(QObject *parent) : | |
QSortFilterProxyModel(parent) | |
{ | |
} | |
void CheckableSortFilterProxyModel::setParameters(QList<int> boolCols) { | |
booleanSet.clear(); | |
if (!boolCols.isEmpty()) { |