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
# 「.c」「.cpp」ファイルをfindし、見つかったファイルをさらにgrepするサンプル | |
find . -name '*.c' -or -name '*.cpp' | xargs grep 'WriteFile(' |
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 setCheckboxGroup(className, isOn) { | |
var elements = document.getElementsByTagName("input"); | |
for (var i = 0; i < elements.length; i++) { | |
var elem = elements[i]; | |
if (elem.className === className) { | |
elem.checked = isOn; | |
} | |
} | |
} |
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
Option Explicit | |
dim MdbName | |
MdbName = WScript.Arguments(0) | |
Const CSVDir = "." | |
Const MDBDir = "." | |
Const MDBLang = ";LANGID=0x0411;CP=932;COUNTRY=0" | |
'空のMDBファイル作成 | |
Dim WS, DB |
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
/*global document, Option */ | |
var MSELECT = {}; | |
MSELECT.MultiSelectBox = function (parentElem) { | |
"use strict"; | |
if (!parentElem || !parentElem.appendChild) { | |
throw new Error("Invalid parameter of 'parentElem'"); | |
} | |
var tableElem = document.createElement("table"), |
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
/** | |
* @param cols 切替候補カラム | |
* @return SQL文case式部分 | |
*/ | |
public String editAltNullCase(String[] cols) { | |
StringBuilder res = new StringBuilder(); | |
if (cols.length == 1) { | |
res.append(cols[0]); | |
res.append(" "); | |
} else { |
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 String toUniqueName(String srcName, final List<String> existing) { | |
return toUniqueName(srcName, "", new NameChecker() { | |
@Override | |
public boolean exists(String name) { | |
return existing.contains(name); | |
} | |
}); | |
} | |
public File toUniqueFile(File file) { |
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 static String toHankakuNum(String text) { | |
StringBuilder res = new StringBuilder(); | |
final String listZens = "0123456789.-"; | |
final String listHans = "0123456789.-"; | |
for (int textIdx = 0; textIdx < text.length(); textIdx++) { | |
char ch = text.charAt(textIdx); | |
int listIdx = listZens.indexOf(ch); | |
if (listIdx >= 0) { | |
res.append(listHans.charAt(listIdx)); |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<div style="width:80px; background-color:gray; padding: 5px 0px"> | |
<input type="text" style="width:80px" value="横幅がはみだす"/><br/> | |
<input type="button" style="width:80px" value="こっちはOK"/><br/> | |
</div> |
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 addEvent(target, type, listener) { | |
if (target.addEventListener) { // W3C | |
target.addEventListener(type, listener, false); | |
} else if (target.attachEvent) { // IE | |
target.attachEvent("on" + type, listener); | |
} else { | |
target["on" + type] = listener; | |
} | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE configuration> | |
<project basedir="." default="all" name="sample"> | |
<property name="javac.debug" value="true"/> | |
<property name="javac.debuglevel" value="source,lines,vars"/> | |
<property name="javac.target" value="1.6"/> | |
<property name="javac.source" value="1.6"/> | |
<property name="javac.encoding" value="utf-8"/> | |
<property name="src.java.dir" value="src"/> |