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
//ommited code | |
def receive = { | |
case aMessage => | |
val aFuture = future(db.getConnection) | |
aFuture.map { theConn => //from previous line when you acquire the conn and when you execute the next line | |
//it could pass a long time they run in different threads/time | |
//that's why you should better create an actor that handles this sync and let | |
//akka do the async part | |
theConn.prepareStatemnt(someSQL) |
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
#################################### | |
# Akka Actor Reference Config File # | |
#################################### | |
# This is the reference config file that contains all the default settings. | |
# Make your edits/overrides in your application.conf. | |
akka { | |
# Akka version, checked against the runtime version of Akka. | |
version = "2.4-SNAPSHOT" |
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
@Grab('com.itextpdf:itextpdf:5.3.4') | |
@GrabConfig(systemClassLoader = true) | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import com.itextpdf.text.DocumentException; | |
import com.itextpdf.text.pdf.PdfContentByte; | |
import com.itextpdf.text.pdf.PdfReader; | |
import com.itextpdf.text.pdf.PdfStamper; | |
import com.itextpdf.text.pdf.PdfRectangle; |
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 interface UselessService | |
{ | |
public int blah(); | |
} | |
import org.springframework.context.annotation.Profile; | |
import org.springframework.stereotype.Component; |
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 bajoneando | |
trait Position | |
object Left extends Position | |
object Right extends Position | |
class Node[T](parent : Node[T], value : T) { |
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
{ | |
"dojoBuild": "lnramirez.profile.js" | |
} |
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
if (confirm("Are you sure you want to delete this image?")) { | |
require(["dojo/json","dojo/request/xhr","dojo/query","dojo/dom-construct"], | |
function(json,xhr,query,domConstruct) { | |
xhr.del("${pageContext.request.contextPath}/images/delete/" + id_,{headers: {"Content-Type": "application/json"}}). | |
then(function(response) { | |
var node = query("div#" + id_)[0]; | |
if (node != 'undefined') { | |
node.parentNode.removeChild(node); | |
} | |
}); |