crontab -e
then, helped by crontab.guru, add a new line like:
var deepCopy = function (o) { | |
var t, x, key | |
t = Array.isArray(o) ? [] : {} | |
for (key in o) { | |
x = o[key] | |
t[key] = (typeof x === "object" && x !== null && !(x instanceof Date)) ? deepCopy(x) : x | |
} | |
return t | |
} |
crontab -e
then, helped by crontab.guru, add a new line like:
function CSVToMatrix(csv,delimiter){ | |
let matrix = []; | |
csv.split('\n').map( l => { l.trim() == "" ? 0 : matrix.push(l.trim().split(delimiter).map(v=>v.trim())) }) | |
return matrix | |
} | |
function MatrixToJSON(matrix,from,to){ | |
let jsonResult = []; from = from||0; | |
matrix.map((a,i) => { | |
let obj = Object.assign({}, ...matrix[0].map((h, index) => ({[h]: matrix[i][index]}))) |
/** | |
* @usage: | |
* | |
* <ToggleSwitch :trueFalseLabels="['On','Off']" :trueFalseColors="['#1CD4A7','#ccc']" v-model="isOn" /> | |
* | |
* data() { | |
* return { | |
* isOn: false | |
* } | |
* } |
async function readlines(stream, callback, buffer_len = 16) { | |
const reader = stream.getReader() | |
const td = new TextDecoder('ascii') | |
let overflow = null | |
let buffer = [] | |
function flush_buffer() { | |
for (let b of buffer) { | |
callback(td.decode(b)) | |
} |
# Macros | |
ALL = program1 program2 program3 | |
SRCDIR = src/ | |
BINDIR = bin/ | |
EXT = cpp | |
CXX = g++ | |
CXXFLAGS = -std=c++14 -O3 -Wall -Wextra |
Find original instructions for your linux flavor here: (https://snapcraft.io/docs/installing-snapd)[https://snapcraft.io/docs/installing-snapd].
For ubuntu 18.04:
sudo apt install snapd
const BlobToBase64 = function(blob){ | |
let blobUrl = URL.createObjectURL(blob); | |
return new Promise((resolve, reject) => { | |
let img = new Image(); | |
img.onload = () => resolve(img); | |
img.onerror = err => reject(err); | |
img.src = blobUrl; | |
}).then(img => { | |
URL.revokeObjectURL(blobUrl); |
/** | |
* @usage: | |
* | |
* <CheckBox label="Foo" value="foo" v-model="MySelectedValues" /> | |
* <CheckBox label="Bar" value="bar" v-model="MySelectedValues" /> | |
* <CheckBox label="Baz" value="baz" v-model="MySelectedValues" /> | |
* | |
* data(){ | |
* return { | |
* MySelectedValues: [], |