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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics] | |
"BorderWidth"="-15" | |
"CaptionFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\ | |
00,00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,00,\ | |
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ | |
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 | |
"CaptionHeight"="-330" | |
"CaptionWidth"="-330" |
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
module.exports = { | |
port: 8080, | |
createOptions: { | |
name: 'Http Server', | |
version: '1.0.0' | |
}, | |
bodyParserOptions: { | |
uploadDir: '/tmp/node_https', | |
keepExtensions: true | |
} |
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
# Demonstrates psql command line client on Ubuntu machines | |
# See: https://www.postgresql.org/download/linux/ubuntu/ | |
cat $HOME/.pgpass <<EOF | |
$PGHOST:5432:$PGINST:$PGUSER:$PGPASS | |
EOF | |
psql -h $PGHOST -p 5432 -U $PGUSER $PGINST -t -f - <<EOF | |
drop table primes; | |
create table primes ( |
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.7 | |
import QtQuick.Controls 2.1 | |
import ArcGIS.AppFramework 1.0 | |
import ArcGIS.AppFramework.Networking 1.0 | |
Item { | |
Flickable { | |
anchors.fill: parent | |
contentWidth: textArea.width | |
contentHeight: textArea.height |
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
// Implements a convenient ListModel that contains sorted items. | |
// | |
// properties: | |
// sortKey: specifies one or more key to sort on with an optional "-" prefix to set descending order | |
// compareFunc: allows you to replace the default compare function with your own | |
// | |
// methods: | |
// insertSorted(obj) - uses binary search insertion sort, duplicates aren't allowed, last in wins. | |
// sort() - leverages from Array.prototype.sort() to rapidly sort all items to a new compareFunc | |
// load() - load from another model |
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.7 | |
import QtQuick.Controls 2.1 | |
import ArcGIS.AppFramework 1.0 | |
Item { | |
TextField { | |
text: AppFramework.userHomeFolder.filePath(":/abc.txt") | |
} | |
} |
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
QT -= gui | |
CONFIG += c++11 console | |
CONFIG -= app_bundle | |
# The following define makes your compiler emit warnings if you use | |
# any feature of Qt which as been marked deprecated (the exact warnings | |
# depend on your compiler). Please consult the documentation of the | |
# deprecated API in order to know how to port your code away from it. | |
DEFINES += QT_DEPRECATED_WARNINGS |
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 json, sys | |
def combine(attr, prefix): | |
return attr if prefix == "" else prefix + "." + attr | |
def flatjson(obj, prefix = ""): | |
if isinstance(obj, list): | |
print combine("len", prefix) + "\t" + str(len(obj)) | |
for i, row in enumerate(obj): | |
flatjson(obj[i], prefix + "[" + str(i) + "]") |
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
// Convert AAMVA string to JSON | |
function aamva_decode(data) { | |
var m = data.match(/^@\n\u001e\r(ANSI )(\d{6})(\d{2})(\d{2})(\d{2})/); | |
if (!m) { | |
return null; | |
} | |
var obj = { | |
header: { |
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.9 | |
import QtQuick.Controls 2.4 | |
import QtQuick.Layouts 1.3 | |
import QtQuick.Window 2.2 | |
import Qt.Test 1.0 | |
Window { | |
visible: true | |
width: 640 | |
height: 480 |