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 pooledconnectiontest; | |
import java.sql.Connection; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import javax.sql.DataSource; | |
import org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40; | |
import org.apache.derby.jdbc.EmbeddedDataSource40; |
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
/** | |
* Apache DerbyのシーケンスをINSERT文に使用し、その生成された値を | |
* getGeneratedKeysメソッドで取得する方法 | |
* @param args | |
* @throws SQLException | |
*/ | |
public static void main(String[] args) throws SQLException { | |
EmbeddedDataSource40 ds = new EmbeddedDataSource40(); | |
ds.setDatabaseName("memory:myDb"); | |
ds.setCreateDatabase("create"); |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace AsyncTest |
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 appdirtest; | |
import java.awt.BorderLayout; | |
import java.awt.Container; | |
import java.io.*; | |
import java.net.URISyntaxException; | |
import java.net.URL; | |
import java.security.CodeSource; | |
import java.security.ProtectionDomain; | |
import javax.swing.JFrame; |
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.Locale; | |
import org.apache.struts.util.PropertyMessageResourcesFactory; | |
import org.apache.struts.util.MessageResources; | |
// リソースファイルからメッセージリソースを構築 | |
PropertyMessageResourcesFactory mesResFactory = new PropertyMessageResourcesFactory(); | |
MessageResources mesRes = mesResFactory.createResources("MessageResources"); | |
// リクエストされたロケール |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\06cadf0e-64ed-448a-8927-ce7bf90eb35d] | |
"Attributes"=dword:00000000 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\12a0ab44-fe28-4fa9-b3bd-4b64f44960a6] | |
"Attributes"=dword:00000000 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\40fbefc7-2e9d-4d25-a185-0cfd8574bac6] | |
"Attributes"=dword:00000000 |
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 showjdialogontaskbarsample; | |
import java.awt.BorderLayout; | |
import java.awt.Container; | |
import java.awt.FlowLayout; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.WindowAdapter; | |
import java.awt.event.WindowEvent; | |
import java.awt.event.WindowListener; | |
import javax.swing.*; |
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
' "MS-WORD"などのVBAより実行する. (EXCEL自身ではダメ) | |
Public Sub DDE_EXCEL_POKE_TEST() | |
Shell "excel.exe", vbNormalNoFocus | |
Dim pokechan As Variant | |
pokechan = DDEInitiate("Excel", "Sheet1") | |
DDEPoke pokechan, "R1C1", "11" | |
DDEPoke pokechan, "R1C2", "22" | |
DDEPoke pokechan, "R2C2", "33" | |
DDETerminate pokechan |
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 helloapplet; | |
import java.awt.event.ActionEvent; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.lang.reflect.Method; |
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
unsigned __int64 fileIndex = 0; | |
HANDLE fh = CreateFile( | |
absolutePath.c_str(), | |
0, // device access | |
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, | |
NULL, | |
OPEN_EXISTING, | |
0, | |
NULL); | |
if (fh != INVALID_HANDLE_VALUE) { |