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 models; | |
import java.awt.image.BufferedImage; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import javax.imageio.ImageIO; | |
import play.libs.MimeTypes; | |
import play.modules.morphia.Blob; |
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
<script> | |
// <snip> | |
(function (window, document) { | |
var loader = function () { | |
var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0]; | |
script.src = "http://errorception.com/projects/" + _errs[0] + "/beacon.js"; | |
tag.parentNode.insertBefore(script, tag); | |
}; | |
// Wait until window.onload before downloading any more code. |
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
.fc { | |
direction: ltr; | |
text-align: left; } | |
.fc table { | |
border-collapse: collapse; | |
border-spacing: 0; } | |
.fc .btn { | |
line-height: 1.2em; } | |
html .fc { |
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
function My_App() { | |
this.foo = '', | |
this.bar = '', | |
this.jQuery = false, | |
// Initializes our app. | |
this.init = function(params){ | |
// Set any custom app options. | |
for ( key in params ) this[key] = params[key]; |
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 short snippet for detecting versions of IE: | |
// Uses a combination of object detection and user-agent | |
// sniffing. | |
// ---------------------------------------------------------- | |
// If you're not in IE then: | |
// ie === NaN // falsy | |
// If you're in IE then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: |
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 fi.markoa.proto.jersey2.jetty; | |
import org.eclipse.jetty.server.Server; | |
import org.eclipse.jetty.webapp.WebAppContext; | |
public class JettyWebApp { | |
public static void main(String ... args) throws Exception { | |
Server server = new Server(8090); | |
WebAppContext webapp = new WebAppContext(); | |
webapp.setContextPath("/app1"); |
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
@RequestMapping(value = "/hola", method = RequestMethod.GET) | |
public String hola(Model model, | |
@ModelAttribute("command") Object command, | |
BindingResult results, | |
RedirectAttributes redirectAttributes ) { | |
model.addAttribute("command", command); | |
ValidationUtils.invokeValidator(validator, command, results); | |
if (results.hasErrors()) { | |
redirectAttributes.addFlashAttribute("errors", results.getAllErrors()); |
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
# How Akka maps to EAI Patterns | |
Might be up for debate or just plain wrong. Just some notes I scribbled down some time ago. | |
----------------------------------------------------------------------------------------------------------------- | |
EAI PATTERN AKKA PATTERN REFERENCE | |
----------------------------------------------------------------------------------------------------------------- | |
Point to Point Channel Regular Actor Communication http://www.eaipatterns.com/PointToPointChannel.html | |
Event-Driven Consumer Regular Actor Receive http://www.eaipatterns.com/EventDrivenConsumer.html | |
Message Selector Actor with Stash http://www.eaipatterns.com/MessageSelector.html |
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 org.backstage; | |
import au.com.bytecode.opencsv.CSVReader; | |
import com.vaadin.Application; | |
import com.vaadin.data.Item; | |
import com.vaadin.data.util.IndexedContainer; | |
import com.vaadin.ui.Table; | |
import com.vaadin.ui.Upload; | |
import com.vaadin.ui.VerticalLayout; | |
import com.vaadin.ui.Window; |
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
<link href="print.css" rel="stylesheet" type="text/css" media="screen,print"/> | |
... | |
<div style="-fs-page-sequence: start; page-break-before: always"> | |
<div style="position: running(current);"> | |
<div id="page-header" class="small"> | |
<span class="align-left">some stuff here</span> | |
<span class="align-right">some other stuff here</span> | |
<div class="line"> </div> |
OlderNewer