Skip to content

Instantly share code, notes, and snippets.

View EbbeVang's full-sized avatar

Ebbe Vang EbbeVang

View GitHub Profile
public class Main {
static ArrayList<int[]> myArrayList = new ArrayList<int[]>();
public static void main(String[] args) {
myArrayList.add(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9});
myArrayList.add(new int[]{9, 8, 7, 6, 5, 4, 3, 2, 1});
PrintInts(0);
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
@EbbeVang
EbbeVang / gist:cff736538c3e366082cd
Created November 2, 2015 13:39
HTMLwithBootStrapAttached
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
package com.company;
import com.sun.org.apache.regexp.internal.RE;
import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException, ClassNotFoundException {
public class Recipe implements Serializable {
public String title;
public String indgredients;
public String text;
public Recipe(String title, String ingredients, String text)
{
this.indgredients = ingredients;
this.text = text;
this.title = title;
package com.company;
import java.util.ArrayDeque;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
String[] messy = {"Mikkel", "Ebbe", "Liv"};
@EbbeVang
EbbeVang / gist:38ad3bc3614e51a2d452
Created March 10, 2016 11:07
generic bubblesort
package com.company;
import java.util.Arrays;
/**
* Created by ev on 09-03-2016.
*/
public class GenericSort<T extends Comparable> {
public T[] bubblesort(T[] array)
{
package com.company;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
public class Main {
public static void main(String[] args) {
@EbbeVang
EbbeVang / gist:206aee10c28ee7372cc3
Created March 10, 2016 11:09
comparable student
package com.company;
/**
* Created by ev on 10-03-2016.
*/
public class Student implements Comparable<Student> {
public Student(String firstName, String lastName, int age) {
this.firstName = firstName;
this.lastName = lastName;
package com.company;
/**
* Created by ev on 16-03-2016.
*/
public class Edge {
private double cost;
private Vertice dest;
public double getCost() {