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 org.hamcrest.BaseMatcher; | |
import org.hamcrest.Description; | |
public class RegexMatcher extends BaseMatcher { | |
private final String regex; | |
public RegexMatcher(String regex){ | |
this.regex = regex; | |
} |
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
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
flatDir { | |
dirs 'lib' | |
} | |
} |
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 java.awt.AlphaComposite; | |
import java.awt.Color; | |
import java.awt.Graphics2D; | |
import java.awt.RenderingHints; | |
import java.awt.image.BufferedImage; | |
import java.awt.image.RenderedImage; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; |
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
float yPos = 0.0; | |
float xPos = 0.0; | |
float xDirection = 1.0; | |
float yDirection = 1.0; | |
void setup() { | |
size(800, 600); | |
background(0); | |
} |
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 java.util.Arrays; | |
import java.util.List; | |
public class SortSomeValues { | |
public static void main(String[] args) { | |
int[] values = {75, 100, 30, 50, 2, 144, 303, 0, 402, 0.0, 83}; | |
} | |
} |