Skip to content

Instantly share code, notes, and snippets.

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 }
};
@jaecktec
jaecktec / Create largest possible number
Created March 6, 2017 16:25
Creates the largest possible Integer using the given Integers
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) {
@jaecktec
jaecktec / keybase.md
Created July 9, 2019 13:10
keybase.md

Keybase proof

I hereby claim:

  • I am jaecktec on github.
  • I am c_m_j (https://keybase.io/c_m_j) on keybase.
  • I have a public key ASA2o84fzGT5DkY5h5Oj4W76KZBxETxO-5J-UZ_VlTXT1wo

To claim this, I am signing this object:

@jaecktec
jaecktec / index.js
Created October 21, 2019 20:54
file inliner to inline markdown code into swagger documents
#!/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);
};
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()
@jaecktec
jaecktec / query.js
Created February 4, 2020 22:16
steam gforce now query
// 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) {
@jaecktec
jaecktec / README.md
Created February 27, 2022 01:14
Arduino Software SPI (2022)