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.0 | |
import QtWebKit 3.0 | |
import QtQuick.Window 2.2 | |
// DISPLAY=:0.0 qmlscene webview.qml | |
Window { | |
width: Screen.width | |
height: Screen.height | |
TextInput { |
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
#include <fstream> | |
#include <jpeglib.h> | |
#include <setjmp.h> | |
#include <QDebug> | |
#include <QtQml/qqml.h> | |
#include <QtQml/QQmlExtensionPlugin> | |
#include <QDir> | |
#include <tensorflow/core/framework/graph.pb.h> | |
#include <tensorflow/core/framework/tensor.h> |
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
#include <SoftwareSerial.h> | |
#include <Servo.h> | |
// Bluetooth(RX, TX), | |
// RX and TX pins on Arduino board. | |
SoftwareSerial Bluetooth(10, 11); | |
Servo servoTurn; | |
Servo servoMove; | |
#define MAX_UARTCMDLEN 128 |
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/lib/python3/dist-packages/click/install.py.old 2016-01-12 19:05:39.000000000 +0000 | |
+++ /usr/lib/python3/dist-packages/click/install.py 2016-01-12 19:07:08.000000000 +0000 | |
@@ -418,7 +418,8 @@ | |
for dirpath, dirnames, filenames in os.walk(inst_dir): | |
for entry in dirnames + filenames: | |
entry_path = os.path.join(dirpath, entry) | |
- entry_mode = os.stat(entry_path).st_mode | |
+ if os.path.exists(entry_path): | |
+ entry_mode = os.stat(entry_path).st_mode | |
new_entry_mode = entry_mode | stat.S_IRGRP | stat.S_IROTH |
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
$ cat test.swift | |
cat test.swift | |
func quicksort_swift(inout a:[CInt], start:Int, end:Int) { | |
if (end - start < 2){ | |
return | |
} | |
var p = a[start + (end - start)/2] | |
var l = start | |
var r = end - 1 |
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
// Usage: casperjs 8comic.js http://new.comicvip.com/show/cool-1050.html | |
var casper = require('casper').create({ | |
pageSettings: { | |
webSecurityEnabled: false | |
} | |
}); | |
var pages, currentPage; |
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/sh | |
set -e | |
D=$(date +"%Y%m%d%H%M%S") | |
size=$(adb shell "fbset|sed -n -e's/^mode.*\"\([0-9]\+x[0-9]\+\)[-\"].*$/\1/p'") | |
adb shell mirscreencast -m /var/run/mir_socket -n 1 -f /tmp/${D}.rgba | |
adb pull /tmp/${D}.rgba | |
/opt/ImageMagick/bin/convert -depth 8 -size $size ${D}.rgba ~/Desktop/${D}.png | |
/bin/rm ${D}.rgba | |
#qlmanage -p ~/Desktop/${D}.png >& /dev/null & |
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.0 | |
import QtGraphicalEffects 1.0 | |
Rectangle { | |
id: root | |
color: '#EEEEEE' | |
width: 960 | |
height: 768 | |
Item { |
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
{ | |
"description": "SlateKit Shell", | |
"framework": "ubuntu-sdk-14.04", | |
"hooks": { | |
"slatekit-shell": { | |
"apparmor": "slatekit-shell.json", | |
"desktop": "slatekit-shell.desktop" | |
} | |
}, | |
"maintainer": "Penk Chen <penkia@gmail.com>", |
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
#include <QtGui/QGuiApplication> | |
#include <QtQml/QQmlApplicationEngine> | |
#include <QtWebEngine/qtwebengineglobal.h> | |
int main(int argc, char *argv[]) | |
{ | |
QGuiApplication app(argc, argv); | |
QtWebEngine::initialize(); | |
QQmlApplicationEngine appEngine; | |
appEngine.load(QUrl("main.qml")); |