Posts Tagged ‘Ruby’

プログラムのヘッダー表記

水曜日, 11月 12th, 2008

#!/usr/local/bin/perl
#
# 関連オブジェクトファイル削除コマンド
#   src配下の*.c,*.pcのファイルを検索
#   include文で指定したヘッダを利用しているファイルを抽出
#   obj配下の関連するオブジェクトファイルを削除
#
# ディレクトリ構成
#   $base_dir
#    ├src/ ソース格納用
#    ├inc/ ヘッダ格納用
#    └obj/ オブジェクト格納用
#

/****************************************

 * Outline   : 本関数は………の処理を行なう

 * Description : ――もうすこし詳細な説明を書く

 * Type    : BOOL

 * Args    : nErrCd OUT NUMBER

 *        ――ここに引数NUMBERの説明を書く

 *        vcErrStr OUT VARCHAR2

 *        ――ここに引数VARCHAR2の説明を書く

 * Note    : ――使用上の注意を書く

 * Date    : ――最初のバージョン完成日

 * Update   : ――更新日付1と更新理由1および更新者前1を書く

 *        ――更新日付2と更新理由2および更新者前2を書く

 *        ――更新日付3と更新理由3および更新者前3を書く

 *        ―― …

*****************************************/

Tags:
Posted in Programing | No Comments »

exerbとmkexy

金曜日, 10月 31st, 2008

Exerb – コマンドリファレンス

Tags: ,
Posted in Programing | No Comments »

ファイルの行数数えて比較

金曜日, 10月 31st, 2008

count_max = Array.new

#ファイルを開いて行数を配列に追加
File.open(cybozu) { |file|
nil while file.gets
count_max << file.lineno
}

#ファイルを開いて行数を配列に追加
File.open(lv_moto) { |file|
nil while file.gets
count_max << file.lineno
}

#配列の中から大きい方をcount_motoに追加
count_moto = count_max.max

Tags:
Posted in Programing | No Comments »

20081011やること、やった事

日曜日, 10月 26th, 2008

・編集
・トップ編集
・リンク応募

・rubyインストール

Ubuntu 8.04.1でRuby on Railsを動かす – public class oui : Panda

http://d.hatena.ne.jp/oui27/20081001/1222878827

Yano lablog – 第6回 Ubuntu入門 ~Ruby on Railsのセットアップ~

http://anoy.cspc.jp/?p=80

・MySQLインストール

[S] Semantic Log: 【Ubuntu】 LAMP (Linux, Apache2, MySQL, Python)一発インストール

http://semanticlog.blogspot.com/2008/03/ubuntu-lamp-linux-apache2-mysql.html

・デモ作成

・プリンタセットアップ

・cocoyaソースをプリントアウト

Tags: ,
Posted in PC・Server設定 | No Comments »

csvファイルの読み込みと表示

火曜日, 10月 21st, 2008

require ‘csv’
CSV.open(“/temp/test.csv”, ‘r’) do |row|
puts row.join(“<>“)
end

Tags:
Posted in Programing | No Comments »

printとputsとp

火曜日, 10月 21st, 2008

違いを確認しておく

Tags:
Posted in Programing | No Comments »

NotePC NetBeans開発環境

月曜日, 8月 18th, 2008

NotePCに Ruby on Rails のNetBeans開発環境を構築する。

■ruby インストール
・One-Click Ruby
ruby186-26.exe

システム環境変数の”path”にrubyのpathを追加
;C:\ruby\bin

■MySQL
mysql-essential-5.0.51b-win32.msi

・default character を utf8 に変更
・Include Bin Directory in Windows PATHにチェックオン

■Rails
gemsでインストール

> gem install rails

c:\ruby>gem install rails
Bulk updating Gem source index for: http://gems.rubyforge.org
Install required dependency rake? [Yn] Y
Install required dependency activesupport? [Yn] Y
Install required dependency activerecord? [Yn] Y
Install required dependency actionpack? [Yn] Y
Install required dependency actionmailer? [Yn] Y
Install required dependency activeresource? [Yn] Y
Successfully installed rails-2.1.0
Successfully installed rake-0.8.1
Successfully installed activesupport-2.1.0
Successfully installed activerecord-2.1.0
Successfully installed actionpack-2.1.0
Successfully installed actionmailer-2.1.0
Successfully installed activeresource-2.1.0
Installing ri documentation for rake-0.8.1…
Installing ri documentation for activesupport-2.1.0…
Installing ri documentation for activerecord-2.1.0…
Installing ri documentation for actionpack-2.1.0…
Installing ri documentation for actionmailer-2.1.0…
Installing ri documentation for activeresource-2.1.0…
Installing RDoc documentation for rake-0.8.1…
Installing RDoc documentation for activesupport-2.1.0…
Installing RDoc documentation for activerecord-2.1.0…
Installing RDoc documentation for actionpack-2.1.0…
Installing RDoc documentation for actionmailer-2.1.0…
Installing RDoc documentation for activeresource-2.1.0…

c:\ruby>gem install rails
Successfully installed rails-2.1.0

#インストール許可を省略する際には”-y”オプション
> gem install rails -y

#1.2系をインストールする場合は以下参照
> gem install rails –version=”1.2.6″ -y

■プログラムインストール結果
C:\Documents and Settings\Miyai>mysql –version
mysql Ver 14.12 Distrib 5.0.51b, for Win32 (ia32)

C:\Documents and Settings\Miyai>rails -v
Rails 2.1.0

C:\Documents and Settings\Miyai>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

■NetBeansインストール
JDKが必要
Java SE Downloads

NetBeans 日本語サイト
ja: NetBeans 日本語サイト
netbeans-6.1-ml-ruby-windows.exe
※mlはマルチランゲージの事。日本語版を含みます。

■チュートリアル
Ruby のブログを 10 分で作成 – NetBeans IDE 6.0 チュートリアル

Tags: , , ,
Posted in PC・Server設定 | No Comments »

Get Adobe Flash playerPlugin by wpburn.com wordpress themes