This file contains 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 2.2 | |
import QtQuick.Controls 1.1 | |
Rectangle { | |
id: root | |
color: "silver" | |
height: 150 | |
width: 200 | |
Timer { |
This file contains 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
QString f = "download.png"; | |
qDebug() << "Filename: f=" << f; | |
QUrl u = QUrl(f); | |
QUrl ulf = QUrl::fromLocalFile(f); | |
qDebug() << "u = QUrl(f) =" << u << " => " << u.toLocalFile(); | |
qDebug() << "ulf = QUrl::fromLocalFile(f) =" << ulf << " => " << ulf.toLocalFile(); |
This file contains 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
QUrl dst; | |
QUrl src = QUrl::fromLocalFile("aPictureFile.jpg"); | |
qDebug() << "INITIAL STATE"; | |
qDebug() << "Source: " << src; | |
qDebug() << "Destination URL: " << dst; | |
dst = src; | |
qDebug() << "END STATE 1"; | |
qDebug() << "Destination URL: " << dst; | |
qDebug() << "Destination local file: " << dst.toLocalFile(); | |
dst = src.toLocalFile(); |
This file contains 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 python3 | |
import threading | |
import glob | |
import os.path | |
import time | |
class myThread (threading.Thread): | |
def __init__(self, threadID, name, repo): | |
threading.Thread.__init__(self) | |
self.threadID = threadID |
This file contains 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 | |
''' | |
Requirements | |
------------ | |
* Install [hkdf](https://github.com/webmaster128/python-hkdf) globally. | |
sudo python setup.py install | |
* Copy file `hkdf-expander` to /usr/local/bin | |
* Make `/usr/local/bin/hkdf-expander` executable | |
sudo chmod +x /usr/local/bin/hkdf-expander |
This file contains 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 2.2 | |
import QtQuick.Controls 1.2 | |
import QtQuick.Layouts 1.1 | |
Rectangle { | |
width: 400 | |
height: 400 | |
GridLayout { | |
anchors.fill: parent |
This file contains 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
#!/bin/bash | |
echo "Test 1: '<'" | |
if [[ 13.10 < 14.04 ]]; then echo "ok"; else echo "fail"; fi; | |
if [[ 13.10 < 14.04.1 ]]; then echo "ok"; else echo "fail"; fi; | |
echo | |
echo "Test 2: '-lt'" | |
if [[ 13.10 -lt 14.04 ]]; then echo "ok"; else echo "fail"; fi; | |
if [[ 13.10 -lt 14.04.1 ]]; then echo "ok"; else echo "fail"; fi; |
This file contains 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
#ifndef LIBRARYLOGGER_H | |
#define LIBRARYLOGGER_H | |
#include <iostream> | |
#include <memory> | |
#include <cassert> | |
#ifndef Log | |
#define Log LibraryLogger(__FILE__, __LINE__, __PRETTY_FUNCTION__) | |
#endif |
This file contains 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 2.3 | |
import QtQuick.Controls 1.1 | |
import QtQuick.Window 2.1 | |
ApplicationWindow { | |
visible: true | |
width: 300 | |
height: 300 | |
title: qsTr("Hello World") |
This file contains 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 2.3 | |
import QtQuick.Controls 1.2 | |
import QtQuick.Window 2.2 | |
ApplicationWindow { | |
title: qsTr("Hello World") | |
width: 300 | |
height: 300 | |
OlderNewer