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(){ | |
var textareas = document.getElementsByTagName('textarea'); | |
var len = textareas.length; | |
while(len--){ | |
var htmlContent = Base64.decode(textareas[len].innerHTML); | |
try{ | |
textareas[len].innerHTML = htmlContent; | |
} catch (err){ | |
//ie | |
textareas[len].value = htmlContent; |
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
// ==UserScript== | |
// @author Baztoune | |
// @name hashtaglol | |
// @namespace http://codeblessyou.com/ | |
// @include http://twitter.com/* | |
// @description Adds background on tweets with special hashtag (#trollface #likeaboss #foreveralone so far, more later) | |
// ==/UserScript== | |
function stuf(){ |
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
<%@ include file="../include/taglib_include.jsp" %> | |
<%@ page contentType="text/html; charset=UTF-8" %> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title><tiles:getAsString name="title"/></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<!-- We load JS 'modules' depending on the tiles definition--> |
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
; | |
; AutoHotkey Version: 1.x | |
; Language: English | |
; Platform: Win9x/NT | |
; Author: A.N.Other <myemail@nowhere.com> | |
; | |
; Script Function: | |
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder) | |
; |
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
%~d0 | |
cd %~dp0 | |
@echo off | |
echo Parameter? | |
set /p my_parameter= | |
echo Parameter2? | |
set /p my_parameter2= | |
java -Xms256M -Xmx1024M -cp classpath.jar; The.path.my_job_0_1.my_job --context=Default --context_param my_parameter=%my_parameter% --context_param my_parameter2=%my_parameter2% |
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
import org.apache.commons.lang.StringUtils; | |
public class MyLevenshteinUtils { | |
/** | |
* http://en.wikibooks.org/wiki/Algorithm_Implementation/ | |
* Strings/Levenshtein_distance#Java | |
* | |
* @param str1 | |
* @param str2 |
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
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import javax.faces.application.FacesMessage; | |
import javax.faces.component.UIComponent; | |
import javax.faces.context.FacesContext; | |
import javax.faces.validator.Validator; | |
import javax.faces.validator.ValidatorException; | |
import org.jboss.seam.annotations.Name; |
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 class SqlQueryHelper { | |
public List<SimpleEntry<String, Type>> getAvailableFieldsFromQuery( | |
String sqlQuery) { | |
List<SimpleEntry<String, Type>> availableFields = new ArrayList<SimpleEntry<String, Type>>(); | |
Connection c = null; | |
Statement st = null; | |
Session sess = null; | |
try { | |
Session delegate = (Session) entityManager.getDelegate(); |
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
<h:selectOneMenu value="#{myObject.value}"> | |
<s:selectItems value="#{app.globalList}" var="_o" label="#{_o.label}" noSelectionLabel="-" /> | |
<f:selectItem itemValue="-1" itemLabel="-------" itemDisabled="true" /> | |
<s:selectItems value="#{app.globalListComplement}" var="_o" label="#{_o.label}" /> | |
<s:convertEntity /> | |
</h:selectOneMenu> |
OlderNewer