This file contains hidden or 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 class MyWeld { | |
private static WeldContainer weldContainer = new Weld().initialize(); | |
public static void main(String[] args) { | |
System.out.println(get(Router.class).allRoutes().size()); | |
get(Router.class).allRoutes().stream().map(Route::getOriginalUri).forEach(System.out::println); | |
} | |
private static <T> T get(Class<T> type) { |
This file contains hidden or 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
Process: Plex Media Server [2724] | |
Path: /Applications/Plex Media Server.app/Contents/MacOS/Plex Media Server | |
Identifier: com.plexapp.plexmediaserver | |
Version: 0.9.8.18 (0.9.8.18.290-11b7fdd) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [175] | |
Responsible: Plex Media Server [2724] | |
User ID: 501 | |
Date/Time: 2014-01-18 19:19:07.842 -0200 |
This file contains hidden or 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
#include <stdio.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
pid_t pid, pid2; | |
if( (pid = fork()) < 0 ) { | |
perror("fork failed"); |
This file contains hidden or 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 class Controller { | |
public void x() { | |
// custom whatever | |
result.from(object).with(new RafaelRuleOfNonArrayReplicationInJson()); | |
// music include | |
result.from(object).with(include("musica")); | |
This file contains hidden or 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
/** | |
* My application desires | |
**/ | |
@ApplicationScoped // PROBABLY IMPORTANT, or will CDI read the parent one? | |
@Environment({"development", "test", "acceptance"}) | |
public class AcceptanceAndTest extends EmailConfig { | |
// mandatory configuration | |
public File getBaseDir() { | |
return new File("/tmp"); |
This file contains hidden or 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 class ApplicationHelper implements ViewHelper { | |
private final PrettyTimeFormatter formatter; | |
public ApplicationHelper(PrettyTimeFormatter formatter) { | |
this.formatter = formatter; | |
} | |
public String format(AbstractInstant instant) { | |
return formatter.format(instant); |
This file contains hidden or 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
Criteria criteria = session.createCriteria(User.class); | |
criteria.add(eq("email", email); | |
criteria.add(eq("password", password); | |
User found = criteria.setMaxResults(1).uniqueResult(); |
This file contains hidden or 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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
This file contains hidden or 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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.clone(); |
This file contains hidden or 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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |