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.concurrent.ExecutionException; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; | |
/** | |
* Used when you need to return a Future, but you already have the answer. | |
*/ | |
public class ResolvedFuture<T> implements Future<T>{ | |
private final T item; |
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
# Upstart script for a play application that binds to an unprivileged user. | |
# put this into a file like /etc/init/playframework | |
# you can then start/stop it using either initctl or start/stop/restart | |
# e.g. | |
# start playframework | |
# http://dominikdorn.com | |
description "Description of your app" | |
author "Dominik Dorn <dominik@studyguru.eu>" | |
version "1.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 javax.imageio.ImageIO; | |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.image.BufferedImage; | |
import java.io.IOException; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
public class Example { | |
/** |
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
# Application dependencies | |
require: | |
- play: | |
exclude: | |
- org.hibernate -> hibernate-core | |
- play -> secure | |
- play -> crud | |
- play -> less 0.9 | |
# Buggy: |
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
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000670406ef, pid=7560, tid=8440 | |
# | |
# JRE version: 7.0_01-b08 | |
# Java VM: Java HotSpot(TM) 64-Bit Server VM (21.1-b02 mixed mode windows-amd64 compressed oops) | |
# Problematic frame: | |
# V [jvm.dll+0x3e06ef] | |
# |
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
eb31fd63a313757ad25c032248a28944d375959f | |
.../jquery-ui-wizard/jquery.form.wizard.js | 27 +++++++++++++++++--- | |
1 files changed, 23 insertions(+), 4 deletions(-) | |
diff --git a/portal/src/public/libraries/jquery-ui-wizard/jquery.form.wizard.js b/portal/src/public/libraries/jquery-ui-wizard/jquery.form.wizard.js | |
index 39a2397..c5525a9 100644 | |
--- a/portal/src/public/libraries/jquery-ui-wizard/jquery.form.wizard.js | |
+++ b/portal/src/public/libraries/jquery-ui-wizard/jquery.form.wizard.js | |
@@ -13,7 +13,7 @@ |
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 javax.imageio.ImageIO; | |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.image.BufferedImage; | |
import java.io.IOException; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
public class ImageCreator { | |
private ImageCreator(){} |
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
Sample output, the result of processing this board: Board: https://trello.com/board/coolest-project-ever/4ec946d2772461073dbcce4c | |
Total number of lists: 6 | |
-------- | |
List: Sprint 5 | |
-------- | |
Fix input form | |
Fix bug #1315 - user can't login | |
Add Update User flow |
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
BTCmsg Protocol v1 (2011-09-18) | |
=============================== | |
Each message is represented by multiple payment which is calculated by | |
the following algorithm: | |
1. Two first chars for message type ('01' for md5, '02' for ascii). | |
2. Then the message in hex (python binascii.hexlify). | |
3. Split the long string to groups of 4 hex digits. | |
4. Each group of 4 hex (e.g. 2 ascii letters from the message) is | |
represented by a payment in satoshi (maximum 0xffff=65535). |
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 play.mvc.Controller; | |
import play.mvc.Router; | |
import java.util.Map; | |
import static com.google.common.base.Preconditions.checkArgument; | |
import static com.google.common.collect.Maps.newHashMap; | |
public class RouteBuilder { | |
private final Class<? extends Controller> controller; |