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
const target = 486; | |
const nums = [3, 3, 6, 8, 9, 100]; | |
const op = [['+', (a, b) => a + b], ['-', (a, b) => a - b], ['*', (a, b) => a * b], ['/', (a, b) => a / b]]; | |
let numSolutions = 0; | |
let bestSolution; | |
function solve(nums, solution) { | |
for (let i = 0; i < nums.length; 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
const fileMachine = Machine({ | |
id: 'bb3', | |
initial: 'not_ready', | |
states: { | |
not_ready: { | |
on: { | |
SPI_READY: 'ready' | |
} | |
}, | |
ready: { |
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 defaultValues = { | |
startFrequency: 1234 | |
}; | |
var values = await input({ | |
title: "Enter Start Frequency", | |
fields: [ | |
{ | |
name: "startFrequency", | |
unit: "frequency", |
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 defaultValues = { | |
startFrequency: 1234, | |
selectedOption: "opt2" | |
}; | |
var values = await input({ | |
title: "Enter Start Frequency", | |
fields: [ | |
{ | |
name: "startFrequency", |
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 defaultValues = storage.getItem("EezDlogValues", { | |
ch1voltage: true, | |
ch1current: true, | |
ch1power: false, | |
ch2voltage: true, | |
ch2current: true, | |
ch2power: false, | |
period: 0.02, | |
time: 10, | |
file: "file.dlog" |
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
// Preamble: | |
// <format>,<type>,<points>,<count>,<xincrement>,<xorigin>,<xreference>,<yincrem ent>,<yorigin>,<yreference> | |
// Wherein, | |
// <format>: 0 (BYTE), 1 (WORD) or 2 (ASC). | |
// <type>: 0 (NORMal), 1 (MAXimum) or 2 (RAW). | |
// <points>: an integer between 1 and 12000000. | |
// <count>: the number of averages in the average sample mode and 1 in other modes. | |
// <xincrement>: the time difference between two neighboring points in the X direction. | |
// <xorigin>: the start time of the waveform data in the X direction. | |
// <xreference>: the reference time of the data point in the X direction. |
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
(function (f) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f() } else if (typeof define === "function" && define.amd) { define([], f) } else { var g; if (typeof window !== "undefined") { g = window } else if (typeof global !== "undefined") { g = global } else if (typeof self !== "undefined") { g = self } else { g = this } g.kurentoUtils = f() } })(function () { | |
var define, module, exports; return (function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw f.code = "MODULE_NOT_FOUND", f } var l = n[o] = { exports: {} }; t[o][0].call(l.exports, function (e) { var n = t[o][1][e]; return s(n ? n : e) }, l, l.exports, e, t, n, r) } return n[o].exports } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++)s(r[o]); return s })({ | |
1: [function (require, module, export |
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
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.kurentoUtils = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
var freeice = require('freeice'); | |
var inherits = require('inherits'); | |
var UAParser = require('ua-parser-js'); | |
var uuid = require('uuid'); | |
var hark = require('hark'); | |
var E |
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 <SPI.h> | |
#include <stdlib.h> | |
//////////////////////////////////////////////////////////////////////////////// | |
// BOARD | |
const uint8_t PWR_DIRECT = 55; | |
const uint8_t PWR_SSTART = 56; | |
const uint8_t WATCHDOG = 5; | |
const uint8_t BP_SELECT = 9; |