Monday, January 18, 2010

[work] miktex repository

make a local repository directory

for example, localtex

put two files in the folder
miktex-zzdb1-2.6.tar.bz2
miktex-zzdb2-2.6.tar.bz2

download the necessary packages for local installation
http://tug.ctan.org/tex-archive/systems/win32/miktex/tm/packages/

Saturday, January 16, 2010

[work] ruby search convert files


require 'find'
require "FileUtils"
require "ftools"

def pfm2exr(dirname)
sum=0
Find.find(dirname) do |f|
if(f[f.length()-4..f.length()]==".pfm")
puts f
fnew=f[0..f.length()-4]+"exr"
cmdline="D:/proj/pfm2exr/Release/pfm2exr.exe -in \""+f+"\" -out \""+fnew+ "\" -precision 1"
puts cmdline
system("#{cmdline}")
puts "delete"+f
File.delete(f)
end
end
sum
end

if ARGV.length != 1
puts "ruby pfm2exr.rb \n"
Process.exit
end


dir=ARGV[0]

pfm2exr(dir)

[work] ruby time


oldtime=Time.now
for i in 0..18000
a=Math::cos(0.2)
#puts "hahahhee"
end
puts Time.now-oldtime

Monday, January 4, 2010

Monday, December 21, 2009

[Work] Ruby, check directory folder existence


if File.exists? path_out
puts path_out+" exists"
else
# puts path_out+" doesn't exist"
Dir.mkdir(path_out)
end

Wednesday, December 16, 2009

[work] Free System Utilities for Window

Redmond lab

Free System Utilities for Window

http://redmondlab.googlepages.com/home

[work] gnuplot

C:\gnuplot\bin\wgnuplot.exe plot_gather.pl

file: plot_gather.pl
==============

set output "stoke_C_gather7.png"
#set terminal postscript eps color 22
set terminal png size 1200, 900

set xlabel "Roughness"
set ylabel "C"
plot [][] \
'curve.txt' using 1:2 with lines title "Roughtness-C"