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.Timer; | |
import java.util.TimerTask; | |
public class test { | |
public static void main(String[] args) throws Exception { | |
Timer timer = new Timer(true); | |
timer.schedule(new TimerTask() { | |
public void run() { | |
System.out.println("Hello!"); | |
} |
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 test { | |
public static void main(String[] args) throws Exception { | |
Thread thread = new Thread(new Runnable() { | |
public void run() { | |
while(true) { | |
try { | |
System.out.println("Hello!"); | |
Thread.sleep(1000); | |
} catch(InterruptedException e) { | |
// ignore |
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 test { | |
public static void main(String[] args) throws Exception { | |
new Thread(new Runnable() { | |
public void run() { | |
while(true) { | |
try { | |
System.out.println("Hello!"); | |
Thread.sleep(1000); | |
} catch(InterruptedException e) { | |
// ignore |
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
' (参考) http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=20714&forum=7&start=8 | |
Imports System | |
Imports System.Text | |
Class Test | |
Public Shared Sub Main | |
Dim t As New Test | |
t.aaa() | |
End Sub |
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
Excel.create(function(excel) { | |
File.open(ARGV[0], "r", function(infile) { | |
infile.each(function(line) { | |
if(line.trim().length != 0) { | |
// 空行じゃなかったらシート追加 | |
excel.addSheet(line); | |
} | |
}); | |
}); | |
// デフォルトのシートを削除 |
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="Shift_JIS" ?> | |
<package> | |
<job> | |
<script language="VBScript"><![CDATA[ | |
Function convertToSafeArray2d(jsArray) | |
Dim l1, l2, result | |
l1 = jsArray.length | |
l2 = Eval("jsArray.[0].length") | |
ReDim result(l1, l2) |
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="Shift_JIS" ?> | |
<package> | |
<job> | |
<script language="JScript"><![CDATA[ | |
// 1次元のJScript配列を、1次元のSafeArrayに変換する関数 | |
// http://www.imasy.or.jp/~hir/hir/tech/js_tips.html#safearray | |
function JSArray2SafeArray(ar) { | |
var dic = new ActiveXObject("Scripting.Dictionary"); | |
for (var i = 0; i < ar.length; i++){ | |
dic.add(i, ar[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
<?xml version="1.0" encoding="Shift_JIS" ?> | |
<package> | |
<job> | |
<script language="VBScript"><![CDATA[ | |
' 1次元のJScript配列を、1次元のSafeArrayに変換する関数 | |
Function convertToSafeArray(jsArray) | |
Dim length, result(), elem, i | |
length = jsArray.length | |
ReDim result(length-1) |
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="Shift_JIS" ?> | |
<package> | |
<job> | |
<script language="JScript"><![CDATA[ | |
function convertToSafeArray2d(jsArray2d) { | |
try { | |
// Excelを起動する | |
var excelObj = new ActiveXObject("Excel.Application"); | |
var workbook = excelObj.workbooks.Add(); |
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
Compiled from "test.java" | |
public class test extends java.lang.Object{ | |
public test(); | |
Code: | |
0: aload_0 | |
1: invokespecial #1; //Method java/lang/Object."<init>":()V | |
4: return | |
public static void main(java.lang.String[]) throws java.lang.Exception; | |
Code: |