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 jp.roundrop.util; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLEncoder; |
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
/* | |
jQuery plugin sample: Twitter-like dynamic character countdown for textareas | |
Example: | |
$('#textarea').countdown({ | |
limit: 140, | |
init: function(counter){ | |
$('#counter').css('color','#999999').val(counter); | |
$('#submit').attr('disabled','disabled'); |
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
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
# check sudo | |
if [ "`whoami`" != "root" ]; then | |
echo "You need to be root to run this!" | |
exit 1 | |
fi |
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
GroovyConsleの動きがいまいちの場合は以下を修正すること | |
(groovyConsoleのシェルの方を治すのも可。特にMac!!) | |
$GROOVY_HOME/bin | |
startGroovy | |
## 先頭に | |
export JAVA_HOME=/Library/Java/Home | |
export JAVA_OPTS='-Dgroovy.source.encoding=UTF-8 -Dfile.encoding=UTF-8' |
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
Jetty9.1.5 + Quercus4.0.39 + WordPress3.9日本語版 | |
環境 | |
=========== | |
* Vagrant 1.5.3 | |
* Ubuntu 14.04 64bit - https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box | |
* Java 1.7.0_55 | |
事前準備 | |
==== |
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 javax.servlet.ServletException; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import org.apache.struts.action.ActionForm; | |
import org.apache.struts.action.ActionForward; | |
import org.apache.struts.action.ActionMapping; | |
import org.apache.struts.action.ExceptionHandler; | |
import org.apache.struts.config.ExceptionConfig; | |
import org.seasar.struts.config.S2ActionMapping; |
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
private static final String INDEXED_DELIM = "["; | |
private static final String INDEXED_DELIM2 = "]"; | |
@Override | |
protected void setProperty(Object bean, String name, Object value) { | |
if (bean == null) { | |
return; | |
} | |
int startIndexedIndex = name.indexOf(INDEXED_DELIM); | |
int endIndexedIndex = name.indexOf(INDEXED_DELIM2); |
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 doGet(req) { | |
var result = { ok : 0 }; | |
if (req.parameters.api_key == 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') { | |
var rows = []; | |
try { rows = JSON.parse(req.parameters.rows) } catch (e) { } | |
if (rows.length) { | |
var ss = SpreadsheetApp.openById('*****************************************'); | |
var sheet = ss.getSheets()[0]; | |
for (var i = 0, len = rows.length; i < len; i++) { |
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
<html> | |
<head></head> | |
<body> | |
<input type="text" id="foo" value="" /> | |
</body> | |
</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
public CopyManager getCopyManager() throws SQLException { | |
Connection conn = ((JdbcManagerImplementor) jdbcManager).getDataSource().getConnection(); | |
XAConnection xaConn = ((ConnectionWrapperImpl) conn).getXAConnection(); | |
Connection pgConn = xaConn.getConnection(); | |
return ((PGConnection) pgConn).getCopyAPI(); | |
} |
OlderNewer