Skip to content

Instantly share code, notes, and snippets.

ajaxCall = PAGE
ajaxCall {
typeNum = 5000
10 < plugin.tx_unsereextension_pi1
config {
disableAllHeaderCode = 1
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
$("#content").load("http://mein.typo3.url #content");
@cokeSchlumpf
cokeSchlumpf / gist:5046595
Created February 27, 2013 09:24
String Switch
package de.michaelwellner.edu.stringswitch;
public class StringSwitch {
private static final String HALLO = "Hallo";
private static final String GUT = "Gut";
private static final String SCHOENEN_TAG = "Schönen Tag noch!";
private static final String CIAO = "Ciao";
private static final String TSCHUESS = "Tschüss";
@cokeSchlumpf
cokeSchlumpf / gist:5046887
Last active December 14, 2015 06:59
ForkJoin API
package de.michaelwellner.edu.forkjoin;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.RecursiveTask;
public class ForkJoin {
private static final boolean DEBUG = false;
private static class Fibonacci {
package de.michaelwellner.edu.file;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@cokeSchlumpf
cokeSchlumpf / gist:6015417
Created July 16, 2013 21:42
Logische Algebra Java ..
// === AND.java ===
package com.ibm.fp.java.patternmatching;
public final class AND extends BinaryExpression {
public AND(Expression left, Expression right) {
super(left, right);
}
}
@cokeSchlumpf
cokeSchlumpf / gist:6015425
Created July 16, 2013 21:43
Logische Algebra in Scala ...
package com.ibm.fp.scala
object PatternMatching extends App {
sealed trait Expression
sealed trait UnaryExpression extends Expression { val unary: Expression }
sealed trait BinaryExpression extends Expression { val left: Expression; val right: Expression }
object DeclarativeLanguage extends App {
final case class Employee(firstname: String, lastname: String, department: String, salary: Int, ismanager: Boolean)
val employees = List(
Employee("Joe", "Smith", "Sales", 50000, false),
Employee("Suzanne", "Harrison", "Sales", 40000, false),
Employee("Mary", "Jones", "Sales", 100000, true),
Employee("Ben", "Simpson", "Accounting", 90000, true),
Employee("Paul", "Miller", "Accounting", 25000, false))
package com.ibm.fp.scala
import language.implicitConversions
object LazyEvaluation extends App {
def trivial = {
val max = 5
implicit class MyInt(i: Int) { def doSomethingCool = ??? }
42.doSomethingCool