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
@(field: play.api.data.Field, id2: String, name2: String, value2: String, args: (Symbol,Any)*)(implicit handler: helper.FieldConstructor, lang: play.api.i18n.Lang) | |
@inputType = @{ args.toMap.get('type).map(_.toString).getOrElse("text") } | |
@helper.input(field, args.filter(_._1 != 'type):_* ) { (id, name, value, htmlArgs) => | |
<input type="@inputType" id="@id" name="@name" value="@value" style="width:6em" @toHtmlArgs(htmlArgs)> | |
<input type="@inputType" id="@id2" name="@name2" value="@value2" @toHtmlArgs(htmlArgs)> | |
} |
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 | |
( | |
echo ------------------------------ | |
echo sudo -i pkg_add -r $* | |
sudo -i pkg_add -r $* | |
echo | |
) | tee -a install.log |
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 literal; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class L { | |
private L(){} | |
public static <T> ListBuilder<T> add(T e) { | |
ListBuilder<T> listBuilder = new ListBuilder<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
var util = Utility(); | |
// settings | |
var FTP_IP = "xxx.xxx.xxx.xxx"; | |
var FTP_USER = "username"; | |
var FTP_PASSWORD = "password"; | |
var FTP_MODE = "ascii"; | |
// メイン関数 | |
(function main(){ |
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
#!/usr/local/bin/bash | |
# [前提] | |
# ①flavour/default に、以下のファイルをセットアップ済みであること | |
# - /etc/rc.conf | |
# - /etc/resolv.conf | |
# - /etc/make.conf | |
# - /etc/ssh/sshd_config | |
# - /var/ports/packages/ | |
# |
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.io.UnsupportedEncodingException; | |
public class Char2SjisHexString { | |
// Test | |
public static void main(String args[]){ | |
String str = "月陽炎DVD"; | |
for (char c : str.toCharArray()) { | |
System.out.println(Character.toString(c) + ":" + char2SjisHexString(c)); | |
} |
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
@echo off | |
setlocal | |
rem ******************************************************************************** | |
if "%1"=="-h" goto USAGE | |
if "%1"=="--help" goto USAGE | |
if "%1"=="/?" goto USAGE | |
goto MAIN | |
rem ******************************************************************************** | |
:USAGE |
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 (1==1) /* | |
@echo off | |
if "%~1"=="" goto :USAGE | |
if "%~1"=="/?" goto :USAGE | |
rem ******************************************************************************** | |
:MAIN | |
CScript //nologo //E:JScript "%~f0" %* | |
If ERRORLEVEL 1 goto :USAGE |
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
cat TESTCPY.cbl | cut -b8- | tr -d "\n" | tr "." "\n" | sed 's/^ *//g' | sed 's/(0*/(/g' | sed 's/[()]/ /g' \ | |
|nawk '$3=="PIC" ? ($4=="N" ? $5=$5*2:1) :1' \ | |
|sed 's/ *PIC *[9XN] */ PIC A/g' \ | |
|nawk '$3=="PIC" ? ($6=="COMP-3" ? $4="S9COMP3":1):1' | sed 's/S9COMP3 */H/g' | sed 's/ *COMP-3 *//g' \ | |
|sed 's/ *PIC */ /g' | cut -d " " -f1,3- \ | |
|nawk '{if($2=="OCCURS"){for(i=0;i<$3-1;i++){$(10+i)=$4;$2="";$3=""}}; $1="";print $0}' \ | |
|tr -d " " | tr -d "\n" | xargs -I% perl -nle "@o=unpack(%, \$_);print join(',',@o)" cobolfile.txt |
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/bash | |
# 入力ファイルをTSVからCSV形式に変換する。ついでにヘッダの除去も行う | |
cat "$1" | tr -s ' ' | tr '\n' ',' | cut -d, -f2- | tr , '\n' | tr ' ' , | grep -v "^$" > tmp.input | |
# 1列目の項目を抜出し、キー1とする | |
cat tmp.input | cut -d, -f1 | sort -u > tmp.key1 | |
# 2列目の項目を抽出し、キー2とする | |
cat tmp.input | cut -d, -f2 | sort -u > tmp.key2 |