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
// See problem on Advent of Code | |
// http://adventofcode.com/2017/day/15 | |
import annotation.tailrec | |
object adventOfCode15 { | |
// generic testmethod | |
def test [I, O] (indata: I, outdata: O, f: (I => O)) : Boolean = { | |
val res = f(indata) | |
if (res == outdata) { |
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 | |
# | |
# (c) GPLv3 | |
# | |
# schrumpf5.sh: Schrumpf ein Bild mit der Endung JPG auf 1/5 der Breite u. 1/5 der Höhe, | |
# also auf ein 1/25 der Fläche und benenne es von *JPG zu *jpg um dabei. | |
# | |
# Überschreibt eventuell schon existierende Dateien mit Namen jpg ohne Nachfrage | |
# | |
# Dateien mit falscher Endung (nicht JPG) werden überpedantisch zurückgewiesen. |
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
# Geburtstage der dt. Bundesliga - Hertha BSC | |
# | |
# | |
301089 188 Burchart | |
220788 187 Kraft | |
270693 196 Sprint | |
280193 193 Brooks | |
050881 190 Franz | |
110790 172 Holland | |
060684 192 Hubnik |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 annotation.tailrec | |
// http://stackoverflow.com/questions/10710954/how-do-i-remove-trailing-elements-in-a-scala-collection/10711396#10710954 | |
object DropRightConditionalBench extends Benchcoat [List[Int], List[Int]] { | |
type I=List[Int] | |
type O=List[Int] | |
/** |
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
package com.example | |
import cc.spray._ | |
trait HelloService extends Directives { | |
def prime (x: Int): Boolean = { | |
if ((x < 2) || (x % 2 == 0)) false | |
((3 to math.sqrt(x).toInt by 2).find (n => (x % n == 0)) == None) | |
} |
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
// ==UserScript== | |
// @name German translations. | |
// @namespace http://vennard.org.uk/greasemonkey/ | |
// @description The dictionary for the French Stack Overflow translation. | |
// @include http://stackoverflow.com/* | |
// @include http://meta.stackoverflow.com/* | |
// @include http://superuser.com/* | |
// @include http://meta.superuser.com/* | |
// @include http://serverfault.com/* | |
// @include http://meta.askubuntu.com/* |
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
/** | |
Benchcoat.scala | |
done: | |
2011-11-17 v.4: improvement in plot-code | |
x-axis and y-axis needs description (how many units measured, time in second) | |
2011-11-17 v.3: minor improvement in plot-code | |
2011-10-22 v.2: improvement in plot-code and renaming prettyPrint | |
extend Benchcoat by | |
providing a List of ( |
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
/** | |
Benchcoat.scala | |
2011-10-22 v.2: Improvement in plot-code and renaming prettyPrint | |
extend Benchcoat by | |
providing a List of ( | |
names, | |
combined with a functions, which takes some | |
I and returns some O | |
) |