- 浏览: 629111 次
- 性别:
- 来自: 杭州
-
最新评论
-
oldrat:
引用Special cases aren't special ...
武汉大学开源技术俱乐部 技术交流 第1期 -
yzsunlight:
试了试 ,不行
Android Studio SDK Manager无法正常下载如何设置 -
qianjigui:
更全面的文档:http://www.5wpc.info/it/ ...
Ruby正则表达式操作参考 -
qianjigui:
Anddy 写道Anddy 写道tag是自动创建的吗? 能手动 ...
vim的跳转 -
Anddy:
Anddy 写道tag是自动创建的吗? 能手动创建吗? 在sh ...
vim的跳转
文章列表
人在大三漂
- 博客分类:
- Coder Living
有人病了,流感来了吗?没有。
有人急了,末日来了吗?没有。
有人放弃了,年龄大了吗?不是。
压力是我们前进的动力,而不是一个包袱。
都是年轻人,确定目标,向前走就好了。
- 2008-11-29 23:35
- 浏览 1021
- 评论(0)
按照我们一般的思维模式,特别是在大量使用了Java等高级强静态语言后,可能对变量作用域有很好的理解。
但是在Ruby中,我们会发现一些不同往常经验的例子。
系统环境 写道
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
请看这个 ...
--- /var/run/grub/menu.lst 2008-11-29 09:45:10.626544415 +0800
+++ /tmp/filekID55z 2008-11-29 09:45:10.626544415 +0800
@@ -1,14 +1,25 @@
## ## End Default Options ##
+title Ubuntu 8.04.1, kernel 2.6.24-22-generic
+root (hd0,0)
+kernel /vmlinuz-2.6.24-22-generic root=UUID=3bb13774-7acc-40a8-b7a7-xx ...
- 2008-11-29 09:50
- 浏览 1181
- 评论(0)
1.
Are there any memory errors in the following
program? If so, identify all of the errors and provide a corrected code
fragment to alleviate the problem. Assume that the user enters in
correct input, and that the sizes entered are at least one.
Write your solution in ...
- 2008-11-28 21:06
- 浏览 2381
- 评论(0)
Debugging Malloc Lab: Detecting Memory-Related Errors
Introduction
The usual implementation of malloc
and
free
are unforgiving to errors in their callers' code,
including cases where the programmer overflows an array, forgets
to free memory, or frees a memory block twice. This often does
no ...
- 2008-11-28 20:32
- 浏览 5226
- 评论(1)
Take Assessment: Practical Quiz 2
A Tabbed Panel Photo Album
Description
In this assignment, you will create a tabbed panel that indexes
collections of image files.
In the sample solution, photos of President
Clinton and Hillary Clinton are found under separate tabs. The image files
used in s ...
- 2008-11-27 11:53
- 浏览 995
- 评论(0)
Take Assessment: Exercise 6
Programming and Heuristic Evaluation
This exercise has two parts:
A programming part, in which you will
create a Visual Basic program that implements a substantial part of the
windows Date/Time control panel
A Heuristic Evaluation part, in which you
will use the ...
- 2008-11-27 11:21
- 浏览 1238
- 评论(1)
Take Assessment: Exercise 5
Time Zone Editor
Description
This assignment is to create an interface for entering a time
zone. This interface is patterned after the interface found in
the standard Windows Date/Time Control Panel. (To see this
control panel, click on the "Start" button, ...
- 2008-11-26 17:15
- 浏览 1124
- 评论(1)
Take Assessment: Practical Quiz 1
An Interactive Panel
This assignment, similar to Exercise 4, is to create a small Visual Basic interface
using buttons and labels. This interface will allow three integer values
to be incremented and decremented using the buttons, as shown below. These v ...
- 2008-11-26 16:10
- 浏览 1093
- 评论(1)
Programming and Heuristic Evaluation
This exercise has two parts:
A programming part
, in which you will
create a Visual Basic form that responds to the user's actions rather
than merely displaying information
A Heuristic Evaluation part
, in which you
will use the heuristics you have learned ...
- 2008-11-26 15:56
- 浏览 1797
- 评论(1)
很长时间没有在虚拟机里面跑游戏了,今天兴致来了和同学们好好过了把CS瘾。
蛮放松,蛮开心的。
写完这笔,该去洗洗睡觉了。
一个美好的周末又开始了。
哦也!
- 2008-11-22 03:41
- 浏览 1039
- 评论(0)
最近在巩固Ruby 的基本语法知识,在这里把以前一些不知道的特性一一总结下来。
在Ruby中是允许method的重复声明的,并且在合适的时候还允许你去一个一个调用(利用super关键字)。
在这里通过几个实例,我将和大家分享一下Ruby的method查找路径和方式以及super的使用和参数问题。
首先,让大家来看看这样一个例子:
class A
def a
p 'a 1'
end
def a
p 'a 2'
super
p 'a 2 END'
end
end
b = A.new
b.a
输出结果是:
Output 写道
:!ruby metho ...
这个题目和Exercise02 没什么区别,在这里把我的解答给出来,就不再赘述了。
Introduction
The purpose of this assignment is to become
more familiar with bit-level representations and manipulations.
As with the Data Lab, you'll do this by solving a small number of
programming "puzzles."
Getting Started
Download and ...
- 2008-11-18 16:12
- 浏览 1651
- 评论(0)
这篇文章应该是承接
SSD06 Exercise02 个人解答
文章的,由于原问题中必需用c解答所以我就单独作为一篇文章来解释并做了完整的补充。
首先,大家需要明确Ruby是无法用按题目中的要求解决问题的,至少直接将C的代码翻译过来是不行的。
原因是:运算符 ! 的使用范围被限制了
(原始的C语言作用的数据有基本数据,但是Ruby语言作用的一切数据都是对象),对于对象的!(非)运算效果有很大不同。Ruby中所有的对象都有一个boolean值,除了false、nil两个const对象的结果为false以外,其它对象的值都为true.
wpc@wpc-laptop:~$ irb
irb(main ...
- 2008-11-18 16:07
- 浏览 1992
- 评论(0)
题目 写道
Data Lab: Manipulating Bits
Introduction
The purpose of this assignment is to become more familiar with bit-level representations and manipulations. You'll do this by solving a series of programming ``puzzles.'' Many of these puzzles are quite artificial, but you'll find yourself thinking much ...
- 2008-11-18 15:45
- 浏览 3235
- 评论(2)