項目 | テストコード | 定量的測定 |
---|---|---|
動作の正しさを保証 | ✅ できる | ❌ できない |
変更の安全性を確認 | ✅ できる | ❌ できない |
ユーザーシナリオの検証 | ✅ できる | ❌ できない |
迅速なフィードバック | ✅ できる | |
バグ修正コストの削減 | ✅ できる |
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
$SMTPServer = "smtp.gmail.com" | |
$SMTPPort = 587 | |
$Sender = "[email protected]" | |
$Recipient = "[email protected]" | |
$Username = "[email protected]" | |
$Password = "アプリパスワード(16桁)" # 取得したアプリパスワードを入力 | |
$Subject = "Windows再起動通知" | |
$Body = "PCが再起動されました。日時: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')" |
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 WshShell = new ActiveXObject("WScript.Shell"); | |
var FSO = new ActiveXObject("Scripting.FileSystemObject"); | |
var regPath = "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StuckRects3"; | |
var backupFile = "backup.txt"; | |
// タスクバーの位置を定義(分かりやすい名前) | |
var taskbarPositions = { | |
"LEFT": "00", // 左 | |
"TOP": "01", // 上 | |
"RIGHT": "02", // 右 |
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 WshShell = new ActiveXObject("WScript.Shell"); | |
var regPath = "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StuckRects3"; | |
var value = "00000000 00000000 03000000 00ffffff ffffffff ffffffff 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000"; | |
try { | |
// レジストリに新しい値を書き込む | |
WshShell.RegWrite(regPath, value, "REG_BINARY"); | |
// エクスプローラーを再起動 | |
WshShell.Run("taskkill /F /IM explorer.exe", 0, true); |
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 plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.javaopen.chime</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/afplay</string> | |
<string>/Users/yasuyuki/Music/Chime.m4a</string></array> |
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
Sub CopyAndCleanWorkbook() | |
Dim originalFileName As String | |
Dim copyFileName As String | |
Dim originalWb As Workbook | |
Dim copyWb As Workbook | |
Dim ws As Worksheet | |
Dim wsCopy As Worksheet | |
Dim cell As Range | |
Dim vbComp As Object | |
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
void main() { | |
testExtractStrings(); | |
} | |
List<String> extractStrings(String input) { | |
List<String> result = []; | |
List<int> stack = []; | |
int startIndex = 0; | |
for (int i = 0; i < input.length; 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
import java.io.*; | |
import java.nio.charset.StandardCharsets; | |
public class RemoveBOM { | |
public static void main(String[] args) { | |
File directory = new File(args[0]); | |
removeBOM(directory); | |
} |
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
(use srfi-13) | |
(use gauche.test) | |
(define (starts-with? str prefix) | |
(let ((str-len (string-length str)) | |
(prefix-len (string-length prefix))) | |
(if (> str-len prefix-len) | |
(string=? (substring str 0 prefix-len) prefix) | |
#f))) |
NewerOlder