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
// Sensors begin here | |
var __device_sensors_service_entry = { | |
"name": null, | |
"version": null, | |
"proto": __device_sensors, | |
"descriptor": __device_sensors_descriptor, | |
"providers": [{ | |
"descriptor": __sp_sensors_descriptor, | |
"instance": __sp_sensors_instance | |
}] |
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 express = require('express'); | |
var io = require('socket.io'); | |
var server = require('http'); | |
var dgram = require("dgram"); | |
var app = express() | |
, server = require('http').createServer(app) | |
, io = io.listen(server) | |
, server2 = dgram.createSocket("udp4"); | |
app.use(express.static(__dirname + '/public')); |
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
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile 'com.tinkerpop.blueprints:blueprints-neo4j-graph:2.6.0', | |
'org.neo4j:neo4j-lucene-index:2.1.8', |
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
/* | |
Rotary Encoder - Polling Example | |
The circuit: | |
* encoder pin A to Arduino pin 2 | |
* encoder pin B to Arduino pin 3 | |
* encoder ground pin to ground (GND) | |
*/ | |
#include <Arduino.h> | |
#include <U8g2lib.h> |
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
struct TwoNibbles | |
{ | |
byte v1:4; | |
byte v2:4; | |
}; | |
union Nibble | |
{ | |
TwoNibbles nibble; | |
byte Nibble[sizeof(TwoNibbles)]; |
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
#!/bin/bash | |
# | |
# For reference: | |
# VT330/VT340 Programmer Reference Manual | |
# Volume 2: Graphics Programming | |
# | |
# | |
# This script plots vector graphics in the terminal emulator mlterm when mlterm is compiled with ./configure --with-tools | |
# The graph is generated by gnuplot compiled with ./configure --with-regis | |
# |
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
import java.io.File | |
var file: MutableList<List<String>> = ArrayList() //list of lists | |
var file2: MutableList<List<String>> = ArrayList() //list of lists | |
fun main(args: Array<String>) { | |
file = readDir(args[0]) | |
file2 = readDir(args[1]) | |
for (e in file) println(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
// Usage: java kotgombinate.jar Dir1 Dir2 Dir3 startOfRange endOfRange | |
// Output: Dir1(A, B) * Dir2(C, D) = Dir3 (A_C, A_D, B_C, B_D) | |
// Range is line-numbers so files in Dir1 and Dir2 need to correspond 1-to-1 | |
import java.io.File | |
import kotlin.system.exitProcess | |
data class Butt(var fileContents: MutableList<List<String>>, var fileName: MutableList<String>) | |
var dir1 = Butt(ArrayList(), ArrayList()) | |
var dir2 = Butt(ArrayList(), ArrayList()) | |
var dir3 = Butt(ArrayList(), ArrayList()) |
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
#install.packages("httr") #install.packages("jsonlite") #install.packages("tidyverse") | |
#install.packages("stringr") #install.packages("furrr") #install.packages("igraph") | |
require(httr) | |
require(jsonlite) | |
require(tidyverse) | |
require(stringr) | |
#require(furrr) #require(igraph) | |
url_base <- "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=linkshere&lhlimit=500" | |
articles <- c("Maximal and minimal elements", "Maxima and minima") |
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
#install.packages("httr") | |
#install.packages("jsonlite") | |
#install.packages("tidyverse") | |
#install.packages("stringr") | |
require(httr) | |
require(jsonlite) | |
require(tidyverse) | |
require(stringr) | |
base <- "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=linkshere&lhlimit=500" |
OlderNewer