Skip to content

Instantly share code, notes, and snippets.

View benlau's full-sized avatar

Ben Lau benlau

View GitHub Profile
{
"type": "model",
"authority-id": "SdRZ9wR70BgZ7kMFKlgUvkXvDULyTdbG",
"brand-id": "SdRZ9wR70BgZ7kMFKlgUvkXvDULyTdbG",
"series": "16",
"model": "my-sgx",
"architecture": "amd64",
"base": "core18",
"gadget": "pc=18",
"kernel": "pc-kernel",
qreal a = mat.at<double>(0,0);
qreal b = mat.at<double>(1,0);
qreal c = mat.at<double>(0,1);
qreal d = mat.at<double>(1,1);
qreal e = mat.at<double>(0,2);
qreal f = mat.at<double>(1,2);
m_sx = sqrt(a * a + b * b);
m_sy = sqrt(c * c + d * d);
m_dx = e;
template <typename Object, typename Source, typename Iteratee>
inline Object assignWith(Object& object, const Source & source, Iteratee iteratee ) {
using source_info = _::Private::key_value_info<Source>;
using object_info = _::Private::key_value_info<Object>;
_underline_static_assert_is_iteratee_invokable("_::assignWith: ", (_::Private::is_invokable5<Iteratee,
typename object_info::value_type,
typename source_info::value_type,
typename source_info::key_type,
Object, Source>::value));
$ cat node_modules/swagger-editor-live/package.json
{
"_from": "swagger-editor-live@^2.2.1",
"_id": "swagger-editor-live@2.2.1",
"_inBundle": false,
"_integrity": "sha1-Iu/5u8oKMd78PK8U0+bjSSJubAQ=",
"_location": "/swagger-editor-live",
"_phantomChildren": {},
"_requested": {
@benlau
benlau / main.cpp
Last active September 1, 2018 06:34
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#ifdef QT_DEBUG
#include "livenodeengine.h"
#include "remotereceiver.h"
#endif
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#QML Live
INCLUDEPATH += $$[QT_INSTALL_HEADERS]/qmllive
LIBS += -L$$[QT_INSTALL_LIBS] -lqmllive
DEFINES += SRCDIR=\\\"$$PWD/\\\"
@benlau
benlau / Example.qml
Created July 25, 2018 01:47
QML Tips #1
import QtQuick 2.0
Item {
property alias content: content // 這裏不會產生任何的錯誤,外面若讀取xxx.content.value會回傳10.
Item {
id: content
property int value: 10
}
@benlau
benlau / Dockerfile
Created May 14, 2018 14:30
Docker with Qt 5.9.0
FROM ubuntu:17.10
MAINTAINER Ben Lau version: 0.1
SHELL ["/bin/bash", "-c"]
VOLUME /data
ENV DOWNLOAD https://download.qt.io/archive/qt/5.9/5.9.0/qt-opensource-linux-x64-5.9.0.run
{
"actionRows": [
{
"format": "PNG",
"formatQuality": "HD",
"renamePrefix": "",
"renameRange": "",
"renameSuffix": "",
"renameTo": "icon_16x16",
"resizeToHeight": "",
{
"actionRows": [
{
"format": "PNG",
"formatQuality": "HD",
"renamePrefix": "",
"renameRange": "",
"renameSuffix": "",
"renameTo": "iTunesArtwork",
"resizeToHeight": "",