#A simple Slideshow module wrapped in a Backbone View
- Dependencies ** underscore.js ** backbone.js
Viewable in action in this jsfiddle
public class Application extends Controller { | |
public static void index() { | |
render(); | |
} | |
public static void uploadPicture(Picture picture) { | |
picture.save(); | |
index(); | |
} |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
#A simple Slideshow module wrapped in a Backbone View
Viewable in action in this jsfiddle
#!/bin/sh | |
exec scala -savecompiled "$0" "$@" | |
!# | |
import java.io._ | |
val docs = new File(".").listFiles | |
.filter(_.getName.endsWith(".textile")) // process only textile files | |
.map(new DocumentationFile(_)) |
# ======================================== | |
# Testing n-gram analysis in ElasticSearch | |
# ======================================== | |
curl -X DELETE localhost:9200/test | |
curl -X PUT localhost:9200/test -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { |
import org.codehaus.jackson.JsonNode; | |
import play.libs.WS; | |
import play.libs.F.Promise; | |
import play.libs.WS.WSRequestHolder; | |
/** | |
* Refer | |
* http://goo.gl/HXhJG | |
* Javadoc api/2.1.0/java/play/libs/WS.WSRequestHolder : http://goo.gl/AXmBY |
import java.io.{BufferedOutputStream, FileOutputStream, FileInputStream, BufferedInputStream} | |
import java.util.zip.{GZIPOutputStream, GZIPInputStream} | |
import scala.io.{Source, Codec} | |
import scala.language.{reflectiveCalls, implicitConversions} | |
object main extends App { | |
import utils._ | |
val inFile = "/Users/bytter/Documents/Development/shiftforward/spitz/coopeventsfiltered.log.gz" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>@comeetie : carte données carroyées</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> |
/** | |
* Uses Tikas {@link AutoDetectParser} to extract the text of a file. | |
* | |
* @param document | |
* @return The text content of a file | |
*/ | |
@Override | |
public String extractTextOfDocument(File file) throws Exception { | |
InputStream fileStream = new FileInputStream(file); | |
Parser parser = new AutoDetectParser(); |