易截截图软件、单文件、免安装、纯绿色、仅160KB

ruby学习笔记

1. 进制的快捷转换
"100".to_i(2) , 将100作为二进制输出十进制数,
结果 : 4
"100".to_i(9), 九进制,
结果: 81
"100".to_i(16), 十六机制,
结果: 256
比较帅,字符串转换在vc编程里面比较头疼。


相关文档:

Ruby Ruport实践—中文PDF报表之FPDF

Ruport中pdf_writer对中文的支持并不好,输出的中文显示的是乱码。上网查了很多资料,也没有找到好的解决方案,无奈只好查看源代码,到底为什么Ruport自带的PDF工具不支持中文输出。
Ruport::Formatter::PDF::Writer中找到以下代码
   metrics = load_font_metrics(font)
   metrics = PDF::Writer: ......

Installing Ruby 1.8.6 from Source on Ubuntu

Installing Ruby from source is my preferred method, although in Ubuntu Feisty you can supposedly install it with apt-get install ruby
now. Here’s the essential packages needed to get a source build working right though and the process I just went through:
sudo apt-get install build-essentia ......

Install ruby 1.9 on Windows using zip binary

Update:  This post is outdated. All in one installer for 1.9
is ready now, you should use it if you need 1.9 on windows. Get it here
http://rubyforge.org/frs/?group_id=167
Ruby has “all-in-one” installer for Windows, but it is outdated. As
of May 2009, Ruby 1.9.1 is released, ......

Ruby语言学习系列 基本的ruby语法


Ruby语言学习系列--基本的ruby语法
 
1.     基本的ruby语法
1.1      变量、常量和类型
1)      定义变量
变量类型
描述
示例
局部变量(或伪变量)
以小写字母或下划线卡头
var    _var
全局变量
以$开头
$ ......

Ruby Ruport实践—报表参数实现

此例子在 Ruby Ruport实践—简单报表系统 及 Ruby Ruport实践—中文PDF报表之PRAWN  的基础上进行完善,添加了对报表参数的设计及实现。
一、创建数据表report_parameters
create table report_parameters
(report_parameter_id integer not null auto_increment,
report_execute_id integer not null, ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号