After creating it, I try to make My open source program reading it and It was possible
.
Next picture is my 3dcg data using my open source.
 
This blog's themes are Computer Graphic(Especially 3DCG) , Game Development, Programming and so on. Sometimes, other themes written.


puts "abcdefg"[3 .. 5]
class Data
attr_accessor :param, :index, :parent, :children
def initialize()
@index = index
@param = param
@children = []
@parent = nil
end
end
case Time.now.hour # get now time
when 6..9 # use range type
puts "Good Morning"
when 9..17
puts "Hello"
when 17..6
puts "Good night"
else
puts "What?" # nothing time
end
class Test
end
class SubTest < SuperClass
end
file << [10].pack("i")
#!/usr/bin/ruby
require 'net/smtp'
if ARGV[0] == nil then
print "usage : " + $0 + " directory\n"
exit(1)
end
print "check directory " + ARGV[0] + "\n"
cmd = "du -h -c " + ARGV[0]
array = []
IO.popen(cmd, 'r+') do |pipe|
t = pipe.read
t.gsub(/(?:[0-9]+(\.[0-9]*)?|(\.[0-9]+))([eE][-+]?[0-9]+)?\w/){|s|
array.push(s)
}
end
mailstring = "total = " + array.last() + "\n"
Net::SMTP.start( 'severname', portnumber ) {|smtp|
smtp.send_mail(mailstring, "from@localhost", "to@localhost")
}

 
install :
install -d /usr/local/bin
install $(ELF_FILE) /usr/local/bin
install -d $(HOME)/.$(PROJECT_NAME)/
cp -rp $(DATA_DIRECOTRY) $(HOME)/.$(PROJECT_NAME)/
def function()
  handle = Yourclass.new()
  handle
end
#include < algorithm >
#include < iostream >
#include < list >
using namespace std;
class Data
{
public:
  int m_true_id;
  int m_inner_id;
  Data(int ti = -1, int ii = -1);
  void output(void);
  bool operator < (const Data& arg){
    if( this->m_true_id > arg.m_true_id ) return true;
    return false;
  }
};
Data::Data(int ti, int ii) :
m_true_id(ti),
m_inner_id(ii)
{
}
void Data::output(void)
{
  cout << "Data[" << m_true_id << "]" << endl;
  cout << endl;
}
int main(void)
{
  list< Data > nodes;
  for(int i =0; i < 10; i++){
   nodes.push_back(Data(i));
  }
  for( list< Data >::iterator ite = nodes.begin(); ite != nodes.end(); ite++){
    (*ite).output();
  }
  list< Data >::iterator target
= lower_bound(nodes.begin(), nodes.end(), a);
  target->output();
  return 0;
}
#!/usr/bin/ruby
class TextValue
# class's member
TABLE = {
"ProjectName"=>"AAA",
"author"=>"bulldog",
"date"=>Time.now.strftime("%Y-%m-%d")}
end
begin
TextValue::TABLE["ProjectName"] = ARGV[1]
# open the file
tmp = open(ARGV[1])
while line = tmp.gets()
if /\$(\w*)\$/ =~ line thenprint line.gsub(/\$(\w*)\$/, TextValue::TABLE[$1])
else
print line
end
end
tmp.close
end
#!/usr/bin/ruby
=begin
Hello !
Tomorrow, I will install ruby-el in My laptop-machine.
=end
# define my class
module My
class Data
attr_accessor :param, :index
# This method is original method
def output
p @param
p @index
end
# This method is constructor
def initialize( index, param)
@index = index
@param = param
end
end
end
# Following codes main thread!
begin
data = My::Data.new(10, "Hello Ruby!!")
p data.param
end
#include < iostream >
#include < vector >
using namespace std;
int main(void)
{
vector< int > tmp;
tmp.push_back(1);
tmp.push_back(2);
tmp.push_back(3);
tmp.push_back(4);
for( int i = 0;i < tmp.size(); i++){
cout << tmp[i] << endl;
}
cout << "erase" << endl;
vector< int >::iterator ite = tmp.begin();
ite++;
ite++;
tmp.erase(ite);
for( int i = 0;i < tmp.size(); i++){
cout << tmp[i] << endl;
}
return 0;
}
template < typename TYPE >void test(void){
cout << sizeof(TYPE) << endl;
}
#include < iostream >
#include < string >
#include < algorithm >
#include < cctype >
using namespace std;
int main(void)
{
string tmp("ABC");
cout << tmp << endl;
transform(tmp.begin(),
tmp.end(),
tmp.begin(),
tolower);
cout << tmp << endl;
return 0;
}
#include <iostream>
#include <stack>
using namespace std;
int main(void)
{
stack<int> datas;// It's that stack contents are dequeue.
datas.push(0x01);
datas.push(0x10);
while( !datas.empty() ){
cout << datas.top() << endl;
datas.pop();
}
return 0;
}
