別のキーワード
種類
- 特異メソッド (60)
- インスタンスメソッド (60)
- クラス (38)
- ライブラリ (12)
- 文書 (12)
ライブラリ
- ビルトイン (12)
- csv (48)
-
net
/ telnet (2) - prettyprint (12)
-
webrick
/ httpauth / digestauth (12) -
webrick
/ httpauth / htdigest (12) -
webrick
/ httpauth / htpasswd (12) - zlib (48)
クラス
- CSV (48)
- IO (12)
- PrettyPrint (12)
-
Zlib
:: Deflate (24) -
Zlib
:: GzipWriter (12) -
Zlib
:: Inflate (12)
キーワード
- << (12)
- DigestAuth (12)
- Htdigest (12)
- Htpasswd (12)
- Telnet (2)
- deflate (12)
- format (12)
- open (48)
- prettyprint (12)
-
ruby 1
. 6 feature (12)
検索結果
先頭5件
-
Zlib
:: Deflate # flush(flush = Zlib :: SYNC _ FLUSH) -> String (18393.0) -
deflate('', flush) と同じです。flush が 省略された時は Zlib::SYNC_FLUSH が使用されます。 このメソッドはスクリプトの可読性のために提供されています。
...te('', flush) と同じです。flush が
省略された時は Zlib::SYNC_FLUSH が使用されます。
このメソッドはスクリプトの可読性のために提供されています。
@param flush Zlib::NO_FLUSH Zlib::SYNC_FLUSH Zlib::FULL_FLUSH などを指定します。
require 'zli......ate(comp_str)
end
def case2
dez = Zlib::Deflate.new
comp_str = dez.deflate('hoge')
comp_str << dez.flush
comp_str << dez.deflate(' fuga')
comp_str << dez.flush
comp_str << dez.deflate(' end', Zlib::FINISH)
dez.close
p comp_str
p Zlib::Inflate.inflate(comp_str... -
Zlib
:: GzipWriter # flush(flush = Zlib :: SYNC _ FLUSH) -> self (18369.0) -
まだ書き出されていないデータをフラッシュします。
...します。
flush は Zlib::Deflate#deflate と同じです。
省略時は Zlib::SYNC_FLUSH が使用されます。
flush に Zlib::NO_FLUSH を指定することは無意味です。
@param flush Zlib::NO_FLUSH Zlib::SYNC_FLUSH Zlib::FULL_FLUSH などを指定します。
require 'zlib'......1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.puts "fuga"
gz.flush
gz.puts "ugo\n"
gz.flush
}
p File.read(filename)
end
case1
#=> "\037\213\b\000p\257pH\002\003K+MO\344*M\317\347\002\000<\326\000\371\t\00... -
IO
# flush -> self (18113.0) -
IO ポートの内部バッファをフラッシュします。
...ープンされていなければ発生します。
@raise Errno::EXXX fflush(3) が失敗した場合に発生します。
//emlist[例][ruby]{
require "tempfile"
Tempfile.open("testtmpfile") do |f|
f.print "test"
File.read(f.path) # => ""
f.flush
File.read(f.path) # => "test"
end
//}... -
Zlib
:: Deflate # deflate(string , flush = Zlib :: NO _ FLUSH) -> String (296.0) -
string を圧縮ストリームに入力します。処理後、ストリームからの 出力を返します。このメソッドを呼ぶと出力バッファ及び入力バッファは 空になります。string が nil の場合はストリームへの入力を 終了します。(Zlib::ZStream#finish と同じ)。 flush には Zlib::NO_FLUSH, Zlib::SYNC_FLUSH, Zlib::FULL_FLUSH, Zlib::FINISH のいずれかを指定します。 詳しくは zlib.h を参照して下さい。
...
flush には Zlib::NO_FLUSH, Zlib::SYNC_FLUSH,
Zlib::FULL_FLUSH, Zlib::FINISH のいずれかを指定します。
詳しくは zlib.h を参照して下さい。
@param string 圧縮する文字列を指定します。
@param flush Zlib::NO_FLUSH, Zlib::SYNC_FLUSH,
Zlib::FULL_FLUSH,......Zlib::FINISH のいずれかを指定します。
require 'zlib'
dez = Zlib::Deflate.new
p dez.deflate("123" * 20, Zlib::FINISH) #=> "x\2343426$\027\001\000e\217\v\271"... -
ruby 1
. 6 feature (84.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...張ライブラリに対して autoload が効いていませんでした。((<ruby-dev:16379>))
autoload :Fcntl, "fcntl"
require "fcntl"
=> -:2:in `require': uninitialized constant Fcntl (NameError)
from -:2
ruby 1.6.7 (2002-03-01) [i586-linux]
=> ruby 1.6.7 (2......数が既に定義されていると失敗していました。((<ruby-talk:30203>))
Constants = 1
require 'syslog'
p Syslog::Constants
=> -:2:in `require': Syslog::Fixnum is not a module (TypeError)
from -:2
ruby 1.6.6 (2001-12-26) [i5......ルサイズを返していませんでした。
File.open("/tmp/1GB", "w") {|f|
f.seek(2**30-1, 0)
f.puts
f.flush
p f.stat.size
}
# => ruby 1.6.3 (2001-04-03) [i586-linux]
-1073741824
# => ruby 1.6.4 (2001-04-19)... -
CSV
. open(filename , mode = "rb" , options = Hash . new) -> CSV (24.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File#path
* IO#pid
* IO#pos
* IO#pos=
* IO#reopen
* IO#seek
* IO#......m options CSV.new のオプションと同じオプションを指定できます。
//emlist[例 読み取り・ブロック指定なし][ruby]{
require "csv"
File.write("test.csv", <<CSV)
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.o......st # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}
//emlist[例 読み取り・ブロック指定あり][ruby]{
require "csv"
users =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
File.write("test.csv", use... -
CSV
. open(filename , mode = "rb" , options = Hash . new) {|csv| . . . } -> nil (24.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File#path
* IO#pid
* IO#pos
* IO#pos=
* IO#reopen
* IO#seek
* IO#......m options CSV.new のオプションと同じオプションを指定できます。
//emlist[例 読み取り・ブロック指定なし][ruby]{
require "csv"
File.write("test.csv", <<CSV)
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.o......st # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}
//emlist[例 読み取り・ブロック指定あり][ruby]{
require "csv"
users =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
File.write("test.csv", use... -
CSV
. open(filename , options = Hash . new) -> CSV (24.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File#path
* IO#pid
* IO#pos
* IO#pos=
* IO#reopen
* IO#seek
* IO#......m options CSV.new のオプションと同じオプションを指定できます。
//emlist[例 読み取り・ブロック指定なし][ruby]{
require "csv"
File.write("test.csv", <<CSV)
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.o......st # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}
//emlist[例 読み取り・ブロック指定あり][ruby]{
require "csv"
users =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
File.write("test.csv", use... -
CSV
. open(filename , options = Hash . new) {|csv| . . . } -> nil (24.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File#path
* IO#pid
* IO#pos
* IO#pos=
* IO#reopen
* IO#seek
* IO#......m options CSV.new のオプションと同じオプションを指定できます。
//emlist[例 読み取り・ブロック指定なし][ruby]{
require "csv"
File.write("test.csv", <<CSV)
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.o......st # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}
//emlist[例 読み取り・ブロック指定あり][ruby]{
require "csv"
users =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
File.write("test.csv", use...