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/bin/ruby | |
require 'pp' | |
testDir = "./tests/" | |
tests = Hash.new | |
Dir.glob(testDir + '**/*.php') do |filename| | |
File.open(filename) do |file| | |
targets = [] | |
file.each_line do |line| | |
/(.*)(@dataProvider )(test.*)/ =~ 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
#!/usr/bin/ruby | |
sourceDir = "./app/" | |
testDir = "./tests/" | |
tests = Hash.new | |
Dir.glob(testDir + '**/*.php') do |filename| | |
sourcePath = filename.gsub(testDir, sourceDir) | |
sourceFile = sourcePath.gsub('Test.php', '.php') | |
tests[sourceFile] = filename | |
end |
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 input_array = [1,2,3,5,6,7,9,11,12,13,14,16,18,19,23,24,25,26]; | |
var result = ""; | |
var arrIndexElements = function (element, index, array) { | |
//console.log("a[" + index + "] = " + element + " " + array + " " + this); | |
console.log("a[" + index + "] = " + element + ":" + result); | |
if (index === 0) { | |
result = result + element; | |
} else { | |
var prev = array[index - 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
import hudson.model.* | |
displayChildren(Hudson.instance.items) | |
def displayChildren(items) { | |
for (item in items) { | |
if (item.class.canonicalName != 'com.cloudbees.hudson.plugins.folder.Folder') { | |
println(item.name) | |
} |
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 | |
result="job.rslt" | |
rm $result | |
for var in 0 0 0 | |
do | |
# ./child.sh $var& | |
ruby child.rb $var& | |
mypid=$! | |
echo $mypid |
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 | |
ARG1=$1 | |
echo $ARG1 | |
sleep 30s | |
exit $ARG1 |
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
require 'net/smtp' | |
Dir.glob("./**/*.eml") { |filename| | |
open(filename) do |f| | |
Net::SMTP.start('mail.example.com') {|smtp| | |
smtp.send_message(f,'from@example.com','to@example.com') | |
} | |
end | |
} |
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
alert("A"); |
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
///// intValueはこの元のメソッドの引数でint型 | |
int fuga = 0; | |
// 90<XXX率 | |
if (intValue >= 90) | |
{ | |
// 値を設定 | |
fuga = 1; | |
} | |
// 80<XXX率≦90 | |
if (80 < intValue && intValue <= 90) |
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
#include <iostream> | |
#include <string> | |
#define FIZZ "Fizz" | |
#define BUZZ "Buzz" | |
#define CRLF "\r\n"; | |
template<int N> | |
struct num { | |
static std::string value() { |
NewerOlder