I have used Google Analytics, so target url is this blog.
Most popular page in this blog is My open source have new features 2 in period from a day of start blog to today.
I written this page about my open source's new feature that is enable to load uv coordinate and texture file infomation from 3ds file.
3/30/2008
3/27/2008
Define local function in Ruby
I will write code like procedural language with Ruby ;-)
Next codes are to define local function and to call it from main function.
Next codes are to define local function and to call it from main function.
- def OutputFile
- infile = open("filename")
- while line = infile.gets
- print line
- end
- end
- begin
- OutputFile()
- end
3/24/2008
Define Class Method in Ruby
Today, I study the way to define class method in ruby.
This way help me to make tiny utility function.
Following codes are the way.
Keynote is the 3 line.
This line expresses to define next codes as class method code.
Calling way is simple.
It's next!
This way help me to make tiny utility function.
Following codes are the way.
- module MyModule
- class Utility
- def Utility.writingSignLine(f)
- f.print "#"
- for i in 0...77
- f.print "="
- end
- f.print "\n"
- end
- end
- end
Keynote is the 3 line.
This line expresses to define next codes as class method code.
Calling way is simple.
It's next!
- f = open(file_name, "w")
- MyModule::Utility::writingSignLine(f)
3/23/2008
Good 3D Model Site
I have found a good site about 3d model.
URL is this.
URL is this.
There are models that are STAR WARS, Dragon Ball and so on.
Especially Darth Vador and Millenium Falcon like good model!
Especially Darth Vador and Millenium Falcon like good model!
3/21/2008
The way to make directory with Ruby
If I make a directory with ruby.
Above codes allow me to create a directory.
1 line expresses that this file is ruby process.
2 line is Main thread starting sign, 8 line is end sign.
4 line checks to exists or not.
7 line real make directory.
- #!/usr/bin/ruby
- begin
- directory_name = Dir::pwd + "/" + "test"
- if FileTest::directory?(directory_name)
- return
- end
- Dir::mkdir(directory_name)
- end
Above codes allow me to create a directory.
1 line expresses that this file is ruby process.
2 line is Main thread starting sign, 8 line is end sign.
4 line checks to exists or not.
7 line real make directory.
3/20/2008
Long Time No See Ruby!
I studied Ruby 5 years ago.
At the time, I did know object oriented, c++, computer science.
Therefore, I did not understand good elements of Ruby.
Now, I have grown up at that time!
I see document of ruby.
I understand that ruby is good programming language!!
Ruby is ideal object oriented programming.
Next codes are that I wrote yesterday.
At the time, I did know object oriented, c++, computer science.
Therefore, I did not understand good elements of Ruby.
Now, I have grown up at that time!
I see document of ruby.
I understand that ruby is good programming language!!
Ruby is ideal object oriented programming.
Next codes are that I wrote yesterday.
#!/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
3/18/2008
Improve Code
Now, A part of code of my open source is dirty and likes mud.
There is dirty code in user interface.
I builded user interface with gtk+ library.
When I written my open source, I did not have so much time.
But, I improve code of user interface.
There is dirty code in user interface.
I builded user interface with gtk+ library.
When I written my open source, I did not have so much time.
But, I improve code of user interface.
3/16/2008
I can not join debian session
I can not finish to write a report of the software license, so I do not join debian study session.
I regret not to join this session.
I regret not to join this session.
3/09/2008
vector erase
Vector in stl allow me to erase element.
This way is calling "erase" method.
Following codes are sample.
This way is calling "erase" method.
Following codes are sample.
#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;
}
3/08/2008
I want to join debian study session in japan
I caught news Debian study session.
The date is 03/15/2007, the place is Google Tokyo office.
Detailed announcement page is url.
Time limit to join is 3/13.
Before I do, is to write report about possible of only data package, trouble with license or my favorite license.
The date is 03/15/2007, the place is Google Tokyo office.
Detailed announcement page is url.
Time limit to join is 3/13.
Before I do, is to write report about possible of only data package, trouble with license or my favorite license.
3/03/2008
My open source have new features 2
Subscribe to:
Comments (Atom)
 


