Software SPI compatible with the default SPI class. No Interrupt support.
Based on https://github.com/MajenkoLibraries/SoftSPI/blob/master/src/SoftSPI.cpp
Software SPI compatible with the default SPI class. No Interrupt support.
Based on https://github.com/MajenkoLibraries/SoftSPI/blob/master/src/SoftSPI.cpp
// usage: node query.js STEAM_API_KEY STEAM_ACCOUNT_ID | |
const fetch = function (url) { | |
// return new pending promise | |
return new Promise((resolve, reject) => { | |
// select http or https module, depending on reqested url | |
const lib = url.startsWith('https') ? require('https') : require('http'); | |
const request = lib.get(url, (response) => { | |
// handle http errors | |
if (response.statusCode < 200 || response.statusCode > 299) { |
infix fun <T, E : Exception> Any.tryForCause(init: () -> T): TryForCause<T, E> { | |
return TryForCause<T, E>().execute(init) | |
} | |
class TryForCause<T, out E : Exception> { | |
private var throwable: Exception? = null | |
private var result: Any? = null | |
fun execute(init: () -> T): TryForCause<T, E> { | |
try { | |
result = init() |
#!/usr/bin/env node | |
const commandLineArgs = require('command-line-args'); | |
const fs = require('fs'); | |
String.prototype.replaceAll = function (search, replacement) { | |
const target = this; | |
return target.replace(new RegExp(search, 'g'), replacement); | |
}; | |
I hereby claim:
To claim this, I am signing this object:
package testproj.uebung; | |
import java.util.Arrays; | |
public class Problem4 { | |
public static void main(String[] args) throws Exception { | |
System.out.println(arrageLargest(new Integer[] { 501, 50, 56, 12, 1, 19 })); | |
} | |
public static String arrageLargest(Integer[] values) { |
package testproj.uebung; | |
public class Problem6 { | |
private static final int[][] INPUT = { | |
{ 1, 2, 3, 4 }, | |
{ 5, 6, 7, 8 }, | |
{ 9, 10, 11, 12 }, | |
{ 13, 14, 15, 16 } | |
}; |