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;
@EbbeVang
EbbeVang / gist:d6eabcfae4cf0c9cf344
Created March 2, 2016 10:34
Drawable interface
package com.company;
import java.awt.*;
public interface Drawable {
void draw(Graphics2D graphics2D) throws InterruptedException;
}
package com.company;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
public class Drawing extends JFrame{
private ArrayList<Drawable> drawables = new ArrayList<Drawable>();
public Drawing()
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) {