ubuntu ctrl_alt_f1 f2 f3 …开启不了终端问题解决方式
November 15th, 2008sudo vim /etc/event.d/tty2
最后一行
/sbin/getty 38400 tty3exec /sbin/getty 38400 tty3
这个地方应该换成
exec /sbin/getty 38400 tty3
不知道是什么时候的BUG
可能是自己当小白鼠的时候留下的后遗症,现在终于解决了
sudo vim /etc/event.d/tty2
最后一行
/sbin/getty 38400 tty3exec /sbin/getty 38400 tty3
这个地方应该换成
exec /sbin/getty 38400 tty3
不知道是什么时候的BUG
可能是自己当小白鼠的时候留下的后遗症,现在终于解决了
宴百福馄饨关了,新接手的竟然是以前在西新桥开干洗店的老板。
怪不得我一进那店感觉老板那么熟悉,原来是他。
现在那店改名为 一品香面馆
老板说他学了四个月,专门学做牛肉面跟老鸭褒
那我肯定要尝尝了。
他的牛肉面还不错,8块一碗,味道很好,值的一试。
老鸭褒怎么说呢,价格满贵1整只是55块,半只是32块,我买了半只。
味道还可以,一般偏上。
最后说一下,那牛肉面真不错。
http://www.google.cn/intl/zh-CN/renrou
最近人肉搜索引擎非常红火,没想到google这个搜索巨头也推出了人肉搜索引擎!暴汗
那是前两天的事情了,我记得是奥运会闭幕的那天,应该是23号
有小偷在我们姚家港九组的路边上的小房子中实施了盗窃。
我在这里诅咒那些偷东西的小偷
据邻居说,偷的是几个外地的小伙子
我奶奶70多岁了,赚点钱不容易啊,现在是什么社会阿,我考,横扇的公安局的盗窃破案率我估计没0.1%,想要抓住小偷基本上是不可能了
我在这里永久诅咒那几个小偷,他妈的生儿子没屁眼!
顺便诅咒一下上次偷我家电饭锅的那个小偷
算起来,我家被小偷光顾的次数不算少了,什么治安?
千万不要来横扇,这个地方是垃圾。
一分鐘英語
1. I love you not because of who you are, but because of who I am when I am with you.
我愛你不是因為你是誰,而是我在你面前可以是誰。
2. No man or woman is worth your tears, and the one who is, won’t make you cry.沒有男人或女人是值得你為他流眼淚,值得的那一位,不會要你哭。
3. Just because someone doesn’t love you the way you want them to,
doesn’t mean they don’t love you with all they have.
那人不是你所想般愛你,但不代表那人不是全心全意地愛你。
4. A true friend is someone who reaches for your hand and touches your heart.
一個真正的朋友是向著你伸手,觸動你心靈的人。
5. The worst way to miss someone is to be sitting right beside them knowing you can’t have them.
掛念一個人最差的方式,就是你坐在他身旁,而知道你不能擁有他。
6. Never frown, even when you are sad, because you never know who is falling in love with your smile.
就算你不快樂也不要皺眉,因為你永不知道誰和你絕交的笑容。
7. To the world you may be one person, but to one person you may be the world.
在世界裡你可能只是某人,但對某人你可能是全世界。
8. Don’t waste your time on a man/woman, who isn’t willing to waste their time on you.
不要花時間在一個不會花時間在你身上的人。
9. Maybe God wants us to meet a few wrong people before meeting the right one, so that when we finally meet the person, we will know how to be grateful.
可能神要我們在遇到那位對的人之前先遇上一些錯的人,讓我們遇到那位對先生/對小 姐時懂得珍惜。
10. Don’t cry because it is over, smile because it happened.
不要因為完結而哭,要為曾經發生而微笑。
11. There’s always going to be people that hurt you so what you have to do is keep on trusting and just be more careful about who you trust next time around.
這個世界永遠也會有一些傷害你的人,你要做的就是繼續去信人和小心你下次信的人。
12. Make yourself a better person and know who you are before you try and know someone else and expect them to know you.
在你嘗試了解其他人和盼望其他人明白你之前,先把你自己變成一個更好的人和了解你自己。
13. Don’t try so hard, the best things come when you least expect them to.
不要太努力去找,最好的東西是在你最預計不到的時候出現。
14. REMEMBER: WHATEVER HAPPENS, HAPPENS FOR A REASON.
緊記: 所有事也是因果循環的。
15. True friends: How many people actually have 8 true friends?
真正朋友: 有幾多人有八位真正的朋友 ?
16. Hardly anyone I know ! But some of us have all right friends and good friends!!!
我幾乎不認識這些人! 但在我們當中有些人全有對和好的朋友 !!!
17. Being happy is the priority of living, If u wanna be sad, Be sad for something thats worth it.
珍惜你所擁有的,慶幸所曾發生的
把 iso 里的文件解压到一个文件夹内
下载 http://ftp.ubuntu.org.cn/home/gnix_oag/boot_livecd_from_hd/gutsy/bhd_i386_2.6.22-14g-ntfs1.tar.gz
里面有一键还原,和DOS,把文件中的 boot/grub/dos98.gz boot/ghost_1.gz boot/grub/mem_disk.gz
放到 /boot/grub/ 中
编辑 /boot/grub/menu.lst 加入
title Ghost 11.0
kernel (hd0,0)/boot/grub/mem_disk.gz c=120 h=2 s=36 floppy
initrd (hd0,0)/boot/grub/ghost_1.gz c=120 h=2 s=36 floppy
title DOS
kernel (hd0,0)/boot/grub/mem_disk.gz c=64 h=8 s=36 floppy
initrd (hd0,0)/boot/grub/dos98.gz c=64 h=8 s=36 floppy
重启后进入Dos
进入解压文件夹中 运行 winnt.bat 即可
注意:
你只有一个Vfat分区,安装时不能格式化分区了
你的Vfat分区不是第一个分区,安装好可能不能引导
安装好deppin XP 后会清除 Grub 的,自己要会修复 Grub
本文最终的效果是
搜寻朋友的日志:
可以使用如下代码
User.find_by_name(”aotianlong”).friends.journals.find :all,:limit=>10
意思是在aotianlong的朋友之间的日志中寻找日志 ,一个爽字了的
如果换成PHP,JAVA肯定搞出人命来
首先它依赖于rails svn 中的 named_scope,当然你也可以安装has_finder插件
rails中的named_scope是has_finder插件作者写的
用户跟用户之间的朋友关系
class Friendship < ActiveRecord::Base
belongs_to :user
belongs_to :friend
end
日志
class Journal < ActiveRecord::Base
belongs_to :user
named_scope :friends , lambda{|user|
{:conditions=>”#{Journal.table_name}.user_id in (select friend_id from friendships where user_id = #{user.id})”}
}
end
用户模型
class User < ActiveRecord::Base
has_many :journals
has_many :friendships
has_many :friends,:through=>:friendships do
//这里是魔术的开始
def journals
Journal.friends(proxy_owner)
end
end
Ok,现在可以使用文章开头处的语法了
aotianlong = User.find_by_name “aotianlong”
aotianlong.friends.journals.find :first
哈!不得不佩服 rails 以及 ruby !太优雅了。