Skip to content

Instantly share code, notes, and snippets.

letnotimitateothers

Block or report user

Report or block letnotimitateothers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View regex-weburl.js
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@letnotimitateothers
letnotimitateothers / Application.java
Last active Sep 13, 2015 — forked from steren/Application.java
Upload and store image with Play! Framework
View Application.java
public class Application extends Controller {
public static void index() {
render();
}
public static void uploadPicture(Picture picture) {
picture.save();
index();
}
@letnotimitateothers
letnotimitateothers / Geocode.java
Created Jul 19, 2016 — forked from rkaneko/Geocode.java
The Snippet to call Google Geocode API on Play framework(v2.1.0) .
View Geocode.java
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
@letnotimitateothers
letnotimitateothers / README.md
Created Oct 23, 2016 — forked from davemo/README.md
A simple Backbone.js powered Slideshow, with pause/play controls and jump-to controls.
View README.md

#A simple Slideshow module wrapped in a Backbone View

  • Dependencies ** underscore.js ** backbone.js

Viewable in action in this jsfiddle

View elastic_search_ngram_analyzer_for_urls.sh
# ========================================
# Testing n-gram analysis in ElasticSearch
# ========================================
curl -X DELETE localhost:9200/test
curl -X PUT localhost:9200/test -d '
{
"settings" : {
"index" : {
"analysis" : {
View error-handling-in-scala.md

Error Handling in Scala

Scala does not have checked exceptions like Java, so you can't do soemthing like this to force a programmer to deal with an exception:

public void stringToInt(String str) throws NumberFormatException {
  Integer.parseInt(str)
}
You can’t perform that action at this time.