Skip to content

Instantly share code, notes, and snippets.

View joennlae's full-sized avatar
🏗️

Jannis Schönleber joennlae

🏗️
View GitHub Profile
@joennlae
joennlae / .html
Created April 23, 2016 07:53
header.php wordpress
<img style="display:block;margin-left:auto;margin-right:auto; width:80%;" src="http://lsglaufen.ch/wp-content/uploads/2015/11/logo_full.png" />
// UNCOMMENT THE NEXT LINE TO ENABLE THE TESTS AND BEFORE SUBMITTING
//#include "tests.h"
#include <iostream>
using namespace std;
// PRE 0<= x < 2
// POST: return value is the binary representation of the inputed variable with 16 significant bits
void binExp(double dec);
int main(){
@joennlae
joennlae / calendar.cpp
Created November 5, 2016 13:25
problem6
// UNCOMMENT THE NEXT LINE TO ENABLE THE TESTS AND BEFORE SUBMITTING
#include "tests.h"
#include <iostream>
// PRE: a year greater than 1900
// POST: returns whether that year was a leap year
bool is_leap_year(unsigned int year);
// PRE: a year greater than 1900
// POST: returns the number of days in that year
unsigned int count_days_in_year(unsigned int year);
// UNCOMMENT THE NEXT LINE TO ENABLE THE TESTS AND BEFORE SUBMITTING
//#include "tests.h"
#include <iostream>
#include <fstream>
#include <string>
char convertToChar(std::string a);
void runThroughString(std::string &a);
int main(){
std::cin >> std::noskipws;
public static String decrypt(String s) {
StringBuffer res = new StringBuffer();
for( int i = 0; i < s.length(); i++){
res.append((char)(s.charAt(i) - 3));
}
return res.toString();
}
package u4a2;
import u4a1.Stack;
public class IterativeAckermann {
/**
* Stack-based iterative implementation of the Ackermann function.
*
* @param n parameter n
* @param m parameter m
package u5a1;
import java.util.NoSuchElementException;
import list.List;
public class Lists {
/**
* Returns a string representation of the list.
*
* @return a comma-separated list of the list values
package u7a1;
import java.util.ArrayList;
public class Filter implements IFilter{
private ArrayList<Student> finalList;
Filter(){
}
package u8a3;
import reversi.Coordinates;
import reversi.GameBoard;
import reversi.OutOfBoundsException;
import reversi.Utils;
public class CheckMove implements ICheckMove{
package u7a4;
import java.util.ArrayList;
import reversi.*;
public class GreedyPlayer implements ReversiPlayer
{