bigDemimal
Size C
http://makandracards.com/makandra/1178-bigdecimal-arithmetic-in-ruby
http://raveendran.wordpress.com/2012/01/24/ruby-big-decimal-sample-usage/
Size C
http://makandracards.com/makandra/1178-bigdecimal-arithmetic-in-ruby
http://raveendran.wordpress.com/2012/01/24/ruby-big-decimal-sample-usage/
require 'bigdecimal'
float_integer_plain = 400.56 - 400
float_integer_bigdecimal = BigDecimal("400.56") - BigDecimal("400")
#-----------------------------------
print "$"
puts float_integer_plain
print "$"
puts float_integer_bigdecimal.to_f
When it is run:
$0.5600000000000023
$0.56
cmath
Size C
Size C
coverage
Size A
Size A
benchmark
Size B
Size B
cgi
Size C
Size C
http://ruby-doc.org/stdlib-2.1.0/libdoc/cgi/rdoc/CGI.htmlThe Common Gateway Interface (CGI) is a simple protocol for passing an HTTP request from a web server to a standalone program, and returning the output to the web browser.
Basically, a CGI program is called with the parameters of the request passed in either in the environment (GET) or via $stdin (POST), and everything it prints to $stdout is returned to the client.
abbrev
Size A
Size A
base64
Size A
Size A
- form of encoding if you want to send a program to someone through email
- or an image/jpg
- in a website there can be base64 image files
- hackers
- Spammers use Base64 to evade basic anti-spamming tools, which often do not decode Base64 and therefore cannot detect keywords in encoded messages.
- movies - Jurasic Park
- http://en.wikipedia.org/wiki/Base64
- Base 64 Decoder
- http://www.base64-image.de/ Instant Image encoder
How to save a base64 string as an image using ruby
The best approach is to specify the correct flag on the open call:
File.open('shipping_label.gif', 'wb') do|f|
f.write(Base64.decode64(base_64_encoded_data))
end
http://stackoverflow.com/questions/201479/what-is-base-64-encoding-used-for/201510#201510
"When you have some binary data that you want to ship across a network, you generally don't do it by just streaming the bits and bytes over the wire in a raw format. Why? because some media are made for streaming text. You never know -- some protocols may interpret your binary data as control characters (like a modem), or your binary data could be screwed up because the underlying protocol might think that you've entered a special character combination (like how FTP translates line endings).
So to get around this, people encode the binary data into characters. Base64 is one of these types of encodings. Why 64? Because you can generally rely on the same 64 characters being present in many character sets, and you can be reasonably confident that your data's going to end up on the other side of the wire uncorrupted."
curses (It is deprecated - only works in ruby 2.0.0 right now)
Size C
http://www.ruby-doc.org/stdlib-2.0/libdoc/curses/rdoc/Curses.html
cursor actions
Curses::Window - class with the means to draw a window or box
Curses::MouseEvent - class for collecting mouse events
ncurses http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html
Size C
http://www.ruby-doc.org/stdlib-2.0/libdoc/curses/rdoc/Curses.html
cursor actions
Curses::Window - class with the means to draw a window or box
Curses::MouseEvent - class for collecting mouse events
ncurses http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html
No comments:
Post a Comment