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
Error: ./~/serialport/lib/bindings/linux-list.js | |
Module not found: Error: Can't resolve 'child_process' in '/home/wd/dev/MyProject/src/node_modules/serialport/lib/bindings' | |
resolve 'child_process' in '/home/wd/dev/MyProject/src/node_modules/serialport/lib/bindings' | |
Parsed request is a module | |
using description file: /home/wd/dev/MyProject/src/node_modules/serialport/package.json (relative path: ./lib/bindings) | |
Field 'browser' doesn't contain a valid alias configuration | |
after using description file: /home/wd/dev/MyProject/src/node_modules/serialport/package.json (relative path: ./lib/bindings) | |
resolve as module | |
looking for modules in /home/wd/dev/MyProject/src/node_modules | |
using description file: /home/wd/dev/MyProject/src/package.json (relative path: ./node_modules) |
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
Error: ./~/serialport/lib/list-unix.js | |
Module not found: Error: Can't resolve 'child_process' in '/home/wd/dev/MyProject/src/node_modules/serialport/lib' | |
resolve 'child_process' in '/home/wd/dev/MyProject/src/node_modules/serialport/lib' | |
Parsed request is a module | |
using description file: /home/wd/dev/MyProject/src/node_modules/serialport/package.json (relative path: ./lib) | |
Field 'browser' doesn't contain a valid alias configuration | |
after using description file: /home/wd/dev/MyProject/src/node_modules/serialport/package.json (relative path: ./lib) | |
resolve as module | |
looking for modules in /home/wd/dev/MyProject/src/node_modules | |
using description file: /home/wd/dev/MyProject/src/package.json (relative path: ./node_modules) |
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
let fs = require('fs'); | |
let CombinedStream = require('combined-stream2'); | |
let path = require('path'); | |
let parseStream = require('json-parse-stream'); | |
let getStreamedDir = (file) => { | |
let combinedStream = CombinedStream.create(); | |
let extensions = ['.json']; | |
if (fs.lstatSync(file).isDirectory()) { | |
fs.readdirSync(file) |
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
npm install -g @angular/[email protected] | |
/home/vic/.nvm/versions/node/v6.9.1/lib | |
├── @angular/[email protected] | |
├── UNMET PEER DEPENDENCY [email protected] | |
└── UNMET PEER DEPENDENCY zone.js@^0.7.2 | |
npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed. | |
npm WARN @angular/[email protected] requires a peer of zone.js@^0.7.2 but none was installed. | |
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
// >>>> code below <<<< | |
var request = require('request'); | |
request({ | |
url: 'http://192.168.4.1', | |
body: JSON.stringify({ | |
a: "c", | |
b: "d" | |
}) | |
}, function (error, response, body) { |
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 <QCoreApplication> | |
#include <QDebug> | |
#include <QStringList> | |
#include <QJsonObject> | |
#include <QJsonArray> | |
#include <QJsonDocument> | |
#include <QVariant> | |
#include <QJsonValue> | |
#include <QByteArray> | |
#include <QDataStream> |
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
template <class Key, class T> | |
QString mapToString(QMap<Key, T> &map){ | |
// this is derivative of the code that qDebug uses to serialize a QVariantMap | |
// qtbase/src/corelib/io/qdebug.h | |
// template <class Key, class T> | |
// inline QDebug operator<<(QDebug debug, const QMap<Key, T> &map) | |
QByteArray buf; | |
QDataStream s(&buf, QIODevice::ReadWrite); | |
s << "("; |
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
<div class="menu"> | |
<div class="item" *ngFor="#unt of unitOpts" (click)="changeUnits(unt)"> | |
<div [innerHTML]="unt.formatted" data-tooltip="{{unt.tooltip}}" data-position="right center"></div> | |
</div> | |
</div> | |
produces... | |
browser_adapter.ts:74 EXCEPTION: Error: Uncaught (in promise): Template parse errors: | |
Can't bind to 'tooltip' since it isn't a known native property ("pts" (click)="changeUnits(unt)"> | |
<div [innerHTML]="unt.formatted" [ERROR ->]data-tooltip="{{unt.tooltip}}" data-position="right center"></div> |
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
var dgram = require('dgram'); | |
dgram.createSocket('udp4', (error) => {console.log(`Complete: `, error)}) |
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
'use strict'; | |
var Promise = require('bluebird'); | |
var promiseDoWhilst = require('promise-do-whilst'); | |
var dgram = require('dgram'); | |
var ANNOUNCEMENT_PORT = 43662; | |
var SUBNET_BROADCAST_ADDRESS = '192.168.1.255'; | |
function sendDatagram(){ | |
let message = new Buffer(JSON.stringify(messageJson)); | |
var client; |
NewerOlder