problem: existing JS interpeters take up too much RAM to run on tiny chips
solutions:
/* | |
Firmata is a generic protocol for communicating with microcontrollers | |
from software on a host computer. It is intended to work with | |
any host computer software package. | |
To download a host software package, please clink on the following link | |
to open the list of Firmata client libraries your default browser. | |
https://github.com/firmata/arduino#firmata-client-libraries |
import ctypes | |
import ctypes.wintypes | |
import sys | |
class WINHTTP_CURRENT_USER_IE_PROXY_CONFIG(ctypes.Structure): | |
_fields_ = [("fAutoDetect", ctypes.wintypes.BOOL), | |
("lpszAutoConfigUrl", ctypes.wintypes.LPWSTR), | |
("lpszProxy", ctypes.wintypes.LPWSTR), | |
("lpszProxyBypass", ctypes.wintypes.LPWSTR)] | |
let opponentsmissile: game.LedSprite = null | |
let missile: game.LedSprite = null | |
let switchxposition = 0 | |
let player = game.createSprite(2, 4) | |
let nummissles = 0 | |
input.onButtonPressed(Button.A, () => { | |
player.change(LedSpriteProperty.X, -1) | |
}) | |
input.onButtonPressed(Button.B, () => { | |
player.change(LedSpriteProperty.X, 1) |
problem: existing JS interpeters take up too much RAM to run on tiny chips
solutions:
This small Java class is a utility class for escaping strings so that they are safe to use in HTML.
There's a single static method, htmlEscape()
, which does the job.
I've found that all existing solutions (libraries) I've reviewed suffered from one or several of the below issues:
[{"id":"a0f49a5c.5f0b68","type":"pubnub-keys","pub_key":"XXXX","sub_key":"XXXX"},{"id":"490810ab.b6f7f","type":"pubnub in","keys":"a0f49a5c.5f0b68","channel":"iol","x":94,"y":86,"z":"11e87d2f.ee1783","wires":[["1e0d1490.e1f2eb","1bd186c1.e42e79"]]},{"id":"965d4cc1.69a2b","type":"pubnub out","keys":"a0f49a5c.5f0b68","channel":"iol","x":656,"y":405,"z":"11e87d2f.ee1783","wires":[]},{"id":"1e0d1490.e1f2eb","type":"debug","name":"PubNub raw data","active":false,"console":"false","complete":"payload","x":337,"y":44,"z":"11e87d2f.ee1783","wires":[]},{"id":"e91c1b55.16e3e8","type":"inject","name":"","topic":"","payload":"From node-red, Hello World!","payloadType":"none","repeat":"","crontab":"","once":false,"x":140,"y":301,"z":"11e87d2f.ee1783","wires":[["20132ddb.dfecd2"]]},{"id":"fe4f5cf0.01b0a","type":"inject","name":"","topic":"","payload":"{command:lights_off}","payloadType":"none","repeat":"","crontab":"","once":false,"x":142,"y":365,"z":"11e87d2f.ee1783","wires":[["40213340.bfdecc"]]},{"id":"20132ddb.dfecd2", |
package ashcloud | |
class Map(val lines: Int, val columns: Int) { | |
var airports: Seq[(Int,Int)] = Seq() | |
var clouds: Seq[(Int,Int)] = Seq() | |
def addAirports(coordinates: Seq[(Int,Int)]) { | |
airports = airports ++ coordinates | |
} |
AR \ BC | Check in | Drop L. | Passp. C | Board | Transit | | |
----------+----------+---------+----------+-------+---------+ | |
Passenger | Y | | Y | Y | | | |
----------+----------+---------+----------+-------+---------+ | |
Luggage | Y | Y | | | Y | | |
----------+----------+---------+----------+-------+---------+ | |
Flight | Y | | | | | | |
----------+----------+---------+----------+-------+---------+ | |
Three bounded contexts: |
function render() { | |
aleph = Blockly.svg.cloneNode(true); | |
aleph.removeAttribute("width"); | |
aleph.removeAttribute("height"); | |
aleph.removeChild(aleph.children[0]); | |
aleph.removeChild(aleph.children[1]); | |
aleph.removeChild(aleph.children[1]); | |
if (aleph.children[0].children[1].children[0] !== undefined) { | |
aleph.children[0].removeChild(aleph.children[0].children[0]); | |
aleph.children[0].children[0].removeAttribute("transform"); |
import java.util.*; | |
import java.io.*; | |
import java.security.*; | |
public class ChangePassword | |
{ | |
private final static JKS j = new JKS(); | |
public static void main(String[] args) throws Exception | |
{ |