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
public T findOne(String query, Object... params) { | |
try { | |
ParameterizedType superclass = (ParameterizedType) getClass().getGenericSuperclass(); | |
Class<?> aClass = (Class<?>) ((ParameterizedType) superclass).getActualTypeArguments()[0]; | |
Method findMethod = aClass.getMethod("find", String.class, Object[].class); | |
Object[] arr = new Object[2]; | |
arr[0] = query; | |
arr[1] = params; | |
System.arraycopy(params, 0, arr, 1, params.length); | |
Object resultObj = findMethod.invoke(null, arr); |
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
package repositories; | |
import play.db.jpa.GenericModel; | |
import play.db.jpa.Model; | |
import play.utils.Java; | |
import java.lang.reflect.ParameterizedType; | |
public abstract class BaseRepository<T extends Model> { | |
private Class<T> modelClass; |
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
package controllers; | |
import com.google.common.base.Predicate; | |
import com.google.common.collect.Collections2; | |
import play.db.jpa.Model; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.HashSet; | |
import java.util.List; |
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
~ Resolving dependencies using C:\work\CS\portal\src\conf\dependencies.yml, | |
~ | |
using play.deps.YamlParser@741ad263 to parse file:/C:/work/CS/portal/src/conf/dependencies.yml | |
:: resolving dependencies :: play-application#src;1.0 | |
confs: [default] | |
validate = true | |
refresh = false | |
resolving dependencies for configuration 'default' | |
== resolving dependencies for play-application#src;1.0 [default] | |
loadData of play-application#src;1.0 of rootConf=default |
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
*.bak | |
*.swp | |
*.log | |
*.iws | |
*.orig | |
.idea/workspace.xml | |
.idea/projectCodeStyle.xml | |
out | |
server.pid | |
logs/ |
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; |
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
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
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
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 @@ |