-
2011-12-25
外婆
“告诉你一件事”,妈妈在电话那边说,声音很低也很稳。
“嗯?"
"外婆走了"
“哦”
意料之中。几个月前,妈妈从北京回家没多久,外婆就生病了。去医院,诊断是肝硬化晚期,然后就卧床不起了。中间我请假回了趟家,见到了她老人家最后一面。神志已经不甚清醒了,不大能够认出人来。妈妈说,羊羊来看你了。她笑了笑,拉着我的手说羊羊好能干。以往每年回家她都要拉着我的手,从手摸到胳膊,一脸满足的笑容。
妈妈说她没有难过,也没有伤心,有的只是不舍,因为外婆走的很安详。在临终前的几个月里面,妈妈一直陪在她身边,照顾她。外婆在冬至前一晚已经不行了。她硬撑了一晚,直到早上见着了妈妈。她睁着眼睛望着妈妈。妈妈说,你放心,你交代给我的三件事,分别是什么、什么和什么,我一定办到。外婆听完之后,闭上眼睛留下了眼泪。一个小时后,离开了。
外婆的前半生很苦,家乡大水,和第一任老公走散了,一路要饭来到了九江。经人介绍认识了外公。靠着当环卫工人扫大街抚养了三个子女。她为人谦和,我从未见过她和人争吵。因为我是二胎,妈妈怀我的时候备受压力。很多人都劝妈妈不要我。在这个关头,外婆坚持要我妈妈生下我。直到现在,家里面的亲戚还说,你要感谢外婆,没有她当年的坚持,就没有你。
梅余氏,1924年生于湖北黄梅,2011年冬至离世,享年87岁。
-
2011-12-10
今天洗车了,上几张pp
挺漂亮的侧面
这个角度的侧面也不错
屁股不好看,呵呵,不过前面是我大哥~
-
2011-10-07
rpm spec 各字段含义
rpm specification file
spec文件规范
能熟练掌握以上命令以及部分参数含义,管理日常的rpm软件包就不成问题了。然而随着Linux风靡全球,越来越多的开发者喜欢采用RPM格式来发布自己的软件包。那么RPM软件包是怎样制作的呢?对大多数Linux开发工程师来说是比较陌生的。
其实,制作RPM软件包并不是一件复杂的工作,其中的关键在于编写SPEC软件包描述文件。要想制作一个rpm软件包就必须写一个软件包描述文件 (SPEC)。这个文件中包含了软件包的诸多信息,如软件包的名字、版本、类别、说明摘要、创建时要执行什么指令、安装时要执行什么操作、以及软件包所要 包含的文件列表等等。
描述文件说明如下:
(1) 文件头
一般的spec文件头包含以下几个域:
Summary:
用一句话概括该软件包尽量多的信息。
Name:
软件包的名字,最终RPM软件包是用该名字与版本号,释出号及体系号来命名软件包的。
Version:
软件版本号。仅当软件包比以前有较大改变时才增加版本号。
Release:
软件包释出号。一般我们对该软件包做了一些小的补丁的时候就应该把释出号加1。
Vendor:
软件开发者的名字。
Copyright:
软件包所采用的版权规则。具体有:GPL(自由软件),BSD,MIT,Public Domain(公共域),Distributable(贡献),commercial(商业),Share(共享)等,一般的开发都写GPL。
Group:
软件包所属类别,具体类别有:
Amusements/Games (娱乐/游戏)
Amusements/Graphics(娱乐/图形)
Applications/Archiving (应用/文档)
Applications/Communications(应用/通讯)
Applications/Databases (应用/数据库)
Applications/Editors (应用/编辑器)
Applications/Emulators (应用/仿真器)
Applications/Engineering (应用/工程)
Applications/File (应用/文件)
Applications/Internet (应用/因特网)
Applications/Multimedia(应用/多媒体)
Applications/Productivity (应用/产品)
Applications/Publishing(应用/印刷)
Applications/System(应用/系统)
Applications/Text (应用/文本)
Development/Debuggers (开发/调试器)
Development/Languages (开发/语言)
Development/Libraries (开发/函数库)
Development/System (开发/系统)
Development/Tools (开发/工具)
Documentation (文档)
System Environment/Base(系统环境/基础)
System Environment/Daemons (系统环境/守护)
System Environment/Kernel (系统环境/内核)
System Environment/Libraries (系统环境/函数库)
System Environment/Shells (系统环境/接口)
User Interface/Desktops(用户界面/桌面)
User Interface/X (用户界面/X窗口)
User Interface/X Hardware Support (用户界面/X硬件支持)
Source:
源程序软件包的名字。如 stardict-2.0.tar.gz。
%description:
软件包详细说明,可写在多个行上。
(2)%prep段
这个段是预处理段,通常用来执行一些解开源程序包的命令,为下一步的编译安装作准备。%prep和下面的%build,%install段一样, 除 了可以执行RPM所定义的宏命令(以%开头)以外,还可以执行SHELL命令,命令可以有很多行,如我们常写的tar解包命令。
(3)build段
本段是建立段,所要执行的命令为生成软件包服务,如make 命令。
(4)%install段
本段是安装段,其中的命令在安装软件包时将执行,如make install命令。
(5)%files段
本段是文件段,用于定义软件包所包含的文件,分为三类--说明文档(doc),配置文件(config)及执行程序,还可定义文件存取权限,拥有者及组别。
(6)%changelog段
本段是修改日志段。你可以将软件的每次修改记录到这里,保存到发布的软件包中,以便查询之用。每一个修改日志都有这样一种格式:第一行是:* 星期 月 日 年 修改人 电子信箱。其中:星期、月份均用英文形式的前3个字母,用中文会报错。接下来的行写的是修改了什么地方,可写多行。一般以减号开始,便于后续的查阅。
三、源代码打包
将源代码打包,如 stardict-2.0.tar.gz,并将文件放到spec文件Source段所描述的路径下,通常为/usr/src/redhat /SOURCES/目录下(不同的Linux发布版本略有不同,如OpenSUSE为 /usr/src/packages/SOURCES/)
四、rpm打包
rpmbuild -ba ‘spec文件路径’
(rpmbuild常用参数: -bb 只编译二进制rpm包 -bs 只编译源码rpm包 -ba 同时编译二进制和源码rpm包)
build完后,可以在/usr/src/redhat/RPMS/下找到二进制rpm包,rpm包按照其对应的cpu体系结构分类,通常在/usr/src/redhat/RPMS/i386目录下
/usr/src/redhat/SRPMS/下找到源码rpm包,此时由于是源代码,所以无须按体系结构分类。 -
2011-07-30
总结下这半年开过的紧凑型车 - [折腾]
全是主流紧凑型车,开过超过200km的,按照时间顺序简单总结下
POLO1.6,好开,据mm说后排空间下,出来容易磕到头
科鲁兹1.6,起步肉,车重,方向盘仪表盘造型一般,高速上方向盘稳,新手应该合适。车重够重,同级别碰撞应该很有优势。。。
POLO1.4,肉,在国道超大货需要地板油
307 1.6,方向盘调校的太轻,高速飘, 新手不好掌控
世嘉1.6,好车啊,全数字仪表盘,动力挺好,可惜就是4AT,在60码速度的时候变档导致顿挫感。
朗逸1.6,油耗挺好,300公里全程空调才20个。起步也挺肉,起步轰油门声音挺大,速度上不去。
总结,10来万的紧凑型畅销家用车就别挑了,选个外形顺眼的就出手吧。本质都一样。
-
2011-07-26
mysql 用户相关命令 zz
1.新建用户。- //登录MYSQL
- @>mysql -u root -p
- @>密码
- //创建用户
- mysql> insert into mysql.user(Host,User,Password) values("localhost","phplamp",password("1234"));
- //刷新系统权限表
- mysql>flush privileges;
- 这样就创建了一个名为:phplamp 密码为:1234 的用户。
- 然后登录一下。
- mysql>exit;
- @>mysql -u phplamp -p
- @>输入密码
- mysql>登录成功
- 2.为用户授权。
- //登录MYSQL(有ROOT权限)。我里我以ROOT身份登录.
- @>mysql -u root -p
- @>密码
- //首先为用户创建一个数据库(phplampDB)
- mysql>create database phplampDB;
- //授权phplamp用户拥有phplamp数据库的所有权限。
- >grant all privileges on phplampDB.* to phplamp@localhost identified by '1234';
- //刷新系统权限表
- mysql>flush privileges;
- mysql>其它操作
- /*
- 如果想指定部分权限给一用户,可以这样来写:
- mysql>grant select,update on phplampDB.* to phplamp@localhost identified by '1234';
- //刷新系统权限表。
- mysql>flush privileges;
- */
- 3.删除用户。
- @>mysql -u root -p
- @>密码
- mysql>DELETE FROM user WHERE User="phplamp" and Host="localhost";
- mysql>flush privileges;
- //删除用户的数据库
- mysql>drop database phplampDB;
- 4.修改指定用户密码。
- @>mysql -u root -p
- @>密码
- mysql>update mysql.user set password=password('新密码') where User="phplamp" and Host="localhost";
- mysql>flush privileges;
-
1 坑爹的海航,靠窗的座位没窗户。但是起飞还是准点
2 湿热的三亚,给力的8路公交
3人均100,海鲜水果吃撑到
4前两晚下榻三亚国际饭店,市区,离第一市场近,设施不错,交通方便,离海远。期待周一搬到天域去
-
2011-05-04
ubuntu10.10 安装systemtap - [技术]
1 apt-get install systemtap
2
wget http://www.domaigne.com/download/tools/get-dbgsym3 run ./get-dbgsym
4
stap -v -e 'probe vfs.read {printf("read > performed\n"); exit()}' -
2011-03-23
ssh tunnel命令,你懂得 - [技术]
- Remote Port Forwarding
- ssh -R kfdev3.corp.alimama.com:3333:localhost:22 -CNf kfdev3 // Connect to localhost 22 from kfdev3:3333
- Local Port Forwarding
- ssh -L 3333:kfdev3.corp.alimama.com:22 kfdev3 -CNf // Connect to kfdev3:22 from localhost 3333
- Dynamic Port Forwarding
- ssh -D 6666 -CNf kfdev3 // Open an localhost:6666 proxy for all applications through kfdev3
- Remote Port Forwarding
-
折腾了好久,总算把gerrit搭好了。
懒得写step by step了,把关键点说一下
备忘,将来有兴趣一次性搭trac/git/gerrit 的时候再补上sbs
java -jar gerrit.war init -d /home/sp/gerrit/myproj
创建一个gerrit工程
1) ssh -p 29418 localhost gerrit create-project --name Crete
2) web上配置属性(重要,否则会出you are not commiter xxxx错误)Forge Identity
Administrators
refs/* +2: Forge Committer or Tagger Identity
replication配置,只有这样gerrit在submit之后才会复制到git,而git才会调post-receive跟trac的ticket关联!
[remote "host-one"]
url = code@localhost:${name}.git
receivepack = /usr/bin/git-receive-pack
[reference]
http://gerrit.googlecode.com/svn/documentation/2.1.6/install.html
-
2011-03-13
一个简单的autoconf和automake应用 - [技术]
项目很简单
两个.h,三个.cpp
===mod.h===
#ifndef _MOD_H
#define _MOD_H
namespace MY
{
int mod(int, int);
}
#endif===mod.cpp===
#include "mod.h"
namespace MY
{
int mod(int a, int b)
{
return a % b;
}
}===plus.h====
#ifndef _PLUS_H
#define _PLUS_H
namespace MY
{
int plus(int, int);
}
#endif====plus.cpp====
#include "plus.h"
namespace MY
{
int plus(int a, int b)
{
return a + b;
}
}===main.cp===
#include <iostream>
#include "mod.h"
#include "plus.h"
using namespace std;
int main(int argc, char **argv)
{
int a , b;
cin >> a;
cin >> b;
cout << "a = " << a << endl;
cout << "b = " << b << endl;
cout << "a mod b = " << MY::mod(a,b) << endl;
cout << "a plus b = " << MY::plus(a,b) << endl;
return 0;
}
==============================源码分割线================================1 $ autoscan
此处会生成configure.scan文件,在这个文件中将下行编辑
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
编辑为:
AC_INIT([myapp], [1.0], [you@email.com])
删除多余的如下行
AC_CONFIG_HEADERS([config.h])
加入如下行
AM_INIT_AUTOMAKE([1.9 foreign])
然后将configure.scan 重命名为configure.in
再编辑Makefile.am,加入如下两行:bin_PROGRAMS = myapp
myapp_SOURCES = main.cpp mod.cpp plus.cpp自此autoconf/automake的两个输入文件(configure.in和Makefile.am)都有了
运行如下命令
$aclocal
$autoconf
$automake --add-missing
然后就能make(install, clean, distclean)了
-
2011-03-12
ubuntu10.10下搭建trac+git服务 - [技术]
关于git的搭建已经在上一篇日志中给出,请点这里 查看。
ubuntu10.10下搭建trac+git服务
trac是本人用过的最好的项目管理工具,它提供了wiki+ticket+repoview的功能。
wiki可以用来做文档管理,ticket做bug管理,repoview做代码view (代码改动的review可以用gerrit实现,gerrit的安装会在另外的一篇文章提到)
==step by step==
1 $apt-get install -y trac trac-git //这里我们用git而不用svn,因为git已经取代svn成为了最流行的代码版本管理工具,而且git+gerrit的code review功能是我用过的最强大的code review工具
2 $trac-admin /home/git/trac/Crete initenv //ubutun10.10目前的trac版本是0.11
在step2中需要回答几个问题,提供我们的repo路径和选择git就行了
3 修改/etc/trac.ini,加入如下语句:
[components]
tracext.git.* = enabled
4 修改/home/git/trac/Crete/conf/trac.ini加入如下几句:
[components]
tracext.git.* = enabled
tracopt.ticket.commit_updater.committicketreferencemacro = enabled
tracopt.ticket.commit_updater.committicketupdater = enabled
5 并且注意trac.ini有以下配置
repository_dir = /home/git/repositories/Crete.git
repository_type = git
6 $htpasswd -c ./.htpasswd fred //利用htpasswd给trac系统创建用户
7 创建一个run_trac.sh脚本,方便以后启动
#!/bin/bash
tracd --port 8000 --basic-auth=Crete,/home/git/trac/Crete/.htpasswd,hello /home/git/trac/Crete
8 Almost Done! 现在只要给/home/git/repositories/Crete.git/hooks下加一个post-receive的脚本,那么
我们commit到git的时候,注释里面加上fixes #ticket-id 和 refs #ticket-id就能和该ticket关联上了。
trac-0.11的脚本这里:http://trac-hacks.org/attachment/wiki/GitPlugin/trac-post-receive-hook.3.py
别的版本trac的可以在这里找到:http://trac-hacks.org/wiki/GitPlugin
9 Done! 现在就可以看浏览器通过http://localhost:8000来使用trac了。enjoy强大的wiki、codeview和ticket功能。
另外,commit到git的时候,只要在注释里面加上fixes #id和refs #id就能和ticket自动关联上了,很方便===3.20日补充,用fastcgi+apache服务trac====
sudo apt-get install libapache2-mod-fcgid
trac-admin ./myproj deploy /tmp/trac
mv /tmp/trac/* ~/trac
htdigest /somewhere/trac.htpasswd trac admin
23
24 ###### for trac ######
25 # Enable fcgi
26 ScriptAlias /trac /home/code/trac/cgi-bin/trac.fcgi/
27
28 # Alias
29 <Location "/trac">
30 SetEnv TRAC_ENV "/home/code/trac/kuafu"
31 </Location>
32
33 # Authentication
34 <Location "/trac/login">
35 LoadModule auth_digest_module /usr/lib/apache2/modules/mod_auth_digest.so
36 AuthType Digest
37 AuthName "trac"
38 AuthDigestDomain /trac
39 AuthUserFile /home/code/trac/kuafu/trac.htpasswd
40 Require valid-user
41 </Location>
42 ###### End for trac ######
[reference]
http://trac-hacks.org/wiki/GitPlugin -
2011-03-12
利用gitosis搭建git服务 - [技术]
git内建的daemon工具,使用简单,可惜在权限管理方面较弱
gitosis是kernel.org推荐的搭建secure git server方案之一(另外一种是gitolite)
==step by step==
1 $sudo apt-get install -y gitosis
2 $sudo useradd git
3 $ssh-keygen -t rsa -C "you@email.com" // Create your own ssh key
4 $sudo -H -u git gitosis-init < ~/.ssh/id_rsa.pub //Where magic happens
至此git server配置结束,下面开始加入自己的项目
5 $git clone git@localhost:gitosis-admin.git
6 $cd gitosis-admin
7 $vim gitosis.conf //add following three lines
[group Crete]
members = fred
writable = Crete8 $git commit -s -m"add my own project" && git push
9 $cd && mkdir Crete && cd Crete
10 $git init
11 git remote add origin git@localhost:Crete.git
12 $echo "hello world" >> test.cpp
13 $git add test.cpp && git commit -s -m"first version"
14 git push origin master:refs/heads/master
15 Done!
[reference]
https://git.wiki.kernel.org/index.php/GitFaq#How_to_set_up_a_git_server.3F
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way -
2011-02-20
t61升级t9500成功 - [折腾]
t61接dock会挡住背后的出风口,对散热有比较严重的影响。
65mn的t7300发热量又比较大,于是会经常出现由于温度过高t61自动休眠。
痛下决心决定上45nm的t9500了,淘宝上850淘了一个qs板的t9500,
顺赞一下顺丰,昨天下午从深圳发货今天早上就到北京了
拆机,上u,装好,点亮。机器亮了,屏幕确是黑的。。。
只好换回t7300,刷bios到最新版本,再换回t9500,这下好了。
就是开机需要按Esc键跳过一个告警,这个据说可以通过刷定制化的bios或者改主板电阻位置跳过。
算了,不折腾了,暂且这样用吧。
改过之后温度下降还算明显(10度左右),性能提高暂时感觉不太出来,,,
-
爸爸的妈妈,好像北方人叫奶奶,南方人叫婆婆。
我17岁离家求学,如今在外工作,基本上每两年才能回老家一次,今天看到她老人家了,身体尚好,精神也不错。
基本上每次回家,她都会念叨:她的腿摔断的那年,四五岁的我,就是她的手。
她要什么,只要说一声,四五岁的我就会屁颠屁颠的跑去帮她取回来。
而我对这段记忆已经完全没有印象了。有印象的是如下几件事。
1) 很小的时候,一大家子人吃柴火烧的大锅饭。她是掌勺的,每次开火的时候,她都会往炉膛里面
扔个红薯。等到大家都吃过饭散了,她从炉膛灰里面扒出一个香喷喷的烤红薯递给我。
2)忘记为了啥,跟她吵架了。我俩我都属于脾气掘的那种,隔了好久我和她都不说话。
后来她终于忍不住了,在许久之后的某天,拿了一个食物给我,说:“你跟我闹的好阿”
从此和解。。。
3)在她还能做的动饭菜的时候,只要我吃的不多。她就会埋怨她自己,说火候过了,
或者是不合我口味。而现在想吃顿她亲手做的饭菜都吃不到了。
今天离开老家的时候,眼睛已经基本看不清的她,一小步一小步吃力的挪到巷子口。
“看着”我离开,可我知道其实她什么也看不清,她只是心里清楚我要从这个巷子出门离开她
祝愿她长寿~~~。。。
-
2011-01-29
[转载]fedora下安装fcitx输入法 - [技术]
原文链接:http://hi.baidu.com/lyb1900/blog/item/120f64808cb935dd9123d99a.html
好倒霉,昨天fedora11自动更新。今天ibus的五笔输入法就不能用了.....
我感觉fedora更新太频繁了,经常是很稳定的系统更新到出问题
没法上网搜原因,还有不少人和我一样呢!!说是ibus-table的版本和ibus-table-wubi的版本更新到不相容了。要自己去下个ibus-table的低版本
下了个ibus-table-1.1.0.20090316-1.fc11.noarch
编译安装还是没用,无语了...
换输入法吧,网上一搜有个fcitx好像不错
马上安装,接下的步骤来自http://hi.baidu.com/dongfengxiao/blog/item/d7a15ff463dbaed0f2d385da.html
1. 编译前的准备
去http://www.fcitx.org下载fcitx.然后解压,在终端中进入解压后的目录
2. 编译安装fcitx:
$ ./autogen.sh
$ ./configure
$ make(这一步只要有错误就缺少必要的编译环境.这个就是我为什么说要安装环境要全面)
$ make check
$ su
# make install
3.建立fcitx的配置文件:
# gedit /etc/X11/xinit/xinput.d/fcitx.conf
(复制以下内容后保存)
XIM=fcitx
XIM_PROGRAM=/usr/local/bin/fcitx
XIM_ARGS=""
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS="@im=fcitx"
4.为系统配置工具alternatives安装fcitx输入法(给系统-首选项-输入法看到的)
# alternatives --install /etc/X11/xinit/xinputrc xinputrc /etc/X11/xinit/xinput.d/fcitx.conf 70
5.如果将fcitx作为系统输入法
# alternatives --config xinputrc
输入后出现这样的提示,因为是安装的fcitx,所以就选择此输入法前面的数字后回车
共有 3 个程序提供“xinputrc”。
选择 命令
-----------------------------------------------
1 /etc/X11/xinit/xinput.d/none.conf
2 /etc/X11/xinit/xinput.d/xim.conf
*+ 3 /etc/X11/xinit/xinput.d/fcitx.conf
按 Enter 来保存当前选择[+],或键入选择号码:
6.假如你的系统是英文环境,又想使用fcitx:
# vi /etc/gtk-2.0/x86_64-redhat-linux-gnu/gtk.immodules "xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh" # 前面加上一个en
到这里输入法就已经安装结束了.但是此时,输入法仅仅只是能够调出来,但是还是不能输入.怎么办呢?运行下面的语句:
# yum install gtk2-immodule-xim
然后你就可以重启你的计算机了.当然,你也可以直接的运行下面的语句:
# ps aux |grep fcitx(有输出.自己在输出里面看下fcitx的进程ID)
# kill -9进程ID
然后Alt+F2后输入fcitx就可以调用输入法了.
这时候.我们就可以卸载系统自带的ibus输入法平台或者是后换的scim平台了(假如你不想要了)
# yum remove ibus* scim*
按上述步骤,不行啊!不会又要用回拼音吧
系统重启完就弹出一大堆英文,大概是说fcitx的进程一直死,系统关闭了什么输入。。反正是不能用
有和我一样问题的人注意了,这样解决:
原文"这时候.我们就可以卸载系统自带的ibus输入法平台或者是后换的scim平台了(假如你不想要了)"
我一看,想着以后更新完ibus可以又能用了,所就没删ibus,
要能用fcitx还是要把ibus删了,我就是删了ibus才能用的。
撤底删除ibus用如下命令
yum remove ibus
yum remove imsettings-lib
还有个小问题,fcitx不能正常自启动,只能手动运行
不过fcitx的五笔输入法,比ibus强多了,发现花了个上午装fcitx还是值得的。 -
2011-01-28
windows7 + fedora14双系统折腾成功 - [技术]
工作需要加折腾需要,无聊折腾下双系统成功,记录一下。
1 首先是320G硬盘没分区,只装了一个win7
2 Windows磁盘管理,从C盘的320G Shrink出一个80G的分区。
3 fedora官网下fedora14和官网推荐的liveusb creator,创建一个fedora14的usb启动盘
4 用step3创建的启动盘启动卡住了,报错no root device found,万能的google找到解决方案
- 4.1 When the Fedora boot screen appears telling you that the system will start in 10 seconds, press Enter to access the boot menu.
- 4.2 Press Tab to open the boot options
- 4.3 Change: root=live:UUID=1390-4D09 (the UID will be different, derived from your USB stick) to root=live:LABEL=FEDORA
- 4.4 Press Enter to boot.
5 启动成功,发现fedora14就是一个usb上跑的linux,大赞,不过继续折腾。
6 安装在step2分出来的80G磁盘上,并且从80G的磁盘又创建了一个4G的Swap分区。此时如果偷懒把grub安装在mbr上可以一路回车。但是这样如果因为重装windows导致mbr丢失的话,那就比较悲剧。所以把Grub装在fedora同一个分区,用windows的bootloader启动grub。方法在这里
- 6.1 给硬盘分区,一个给 Windows,一个给 Linux,一个做 Swap,剩下的随便。
- 6.2 在第一个分区上装 Windows 7
- 6.3 在第二个分区上装 Debian。光盘安装,注意装 grub 的时候不要装在 MBR,要装在
- Linux 所在的分区,我这里是 /dev/sda2。安装完成后,别着急重启,重启就杯具了。
- 6.4 返回安装步骤,选择 "Excute a shell",执行如下命令:
- dd if=/dev/sda2 of=/mnt/linux.bin bs=512 count=1
- mount 上 Windows 的分区,将 linux.bin 拷过去。
- 6.5 重启到 Windows 下,执行如下命令:
- bcdedit /create /d “Linux” /application BOOTSECTOR
- bcdedit /set {ID} device partition=c:
- bcdedit /set {ID} path \linux.bin
- bcdedit /displayorder {ID} /addlast
- bcdedit /timeout 30
- 注意,ID 在执行完第一条命令后可以看到。
- 6.6 重新启动,会看到两个启动选项。
大功告成,尽情折腾吧。。。
-
2011-01-11
发博客庆祝J20首飞成功
发信人: TimothyPY (OMG), 信区: MilitaryTech
标 题: ☆今朝天府飘丝带,他日东海戏猛禽☆ (已有图)
发信站: 水木社区 (Tue Jan 11 09:48:46 2011), 站内
丝带/舞带首飞实况直播:这一刻,世界的目光聚焦在中国! 同志们!祖国万岁!!
09:36:59
一架K8在停机坪,2个歼10(1个单座1个双座)
09:43:29
更正:是两个双座10,一个带着吊舱
09:38:06
四辆探照灯车也在外面
09:38:15
高空云 很薄
09:38:35
地勤人员都穿着黑黄制服
09:38:57
J20边上有空调车 电源车
09:39:38
观礼台有人站着
09:39:46
J20仍旧是亮菊花的...
09:40:14
减速伞伞舱打开 可以看到减速伞
09:40:44
围观的人现在不多
09:44:02
塔台三层窗帘都开着(以前只是最顶层开着)
09:58:47
现场工作人员正在往桌子上摆茶杯
09:59:26
维护团队都在屋里,飞机在外面,人都回屋了
10:13:27
CD观察员注意到成飞宾馆爆满了,周围的宾馆也是爆满
10:22:15
地勤团队出来了,走向J-20
10:24:48
地勤围上J-20
10:36:44
飞行员的车出来了
10:43:45
维护人员排队
10:45:17
J20发动机点火
10:45:22
喷出火苗
10:49:19
收油
10:49:22
菊花打开
10:52:45
J-20已经滑到跑道
10:53:07
本次滑行到位速度很快 不像平时慢悠悠过去..
10:53:11
菊花收缩 轰油
10:53:28
松开刹车
10:53:34
往前滑
10:53:35
加速
10:53:37
放伞
10:57:52
回到原位停下
10:58:05
J20前面架上三脚架
座舱盖打开
10:58:45
飞行员摆姿势拍照
10:59:52
飞行员下来了
午前11时开始。
11:00:17
一群人围上飞行员
11:00:32
围得很紧
11:01:24
热烈拥抱...
11:01:30
飞行员上车
11:01:32
座驾开走了
11:03:39
装伞包
11:07:11
保障车到了J-10边上
11:07:35
保障车靠上带着吊舱的J-10
11:07:40
座舱盖打开
11:11:39
来了很多小车
11:12:47
安保人员来清场了
11:14:15
看来CD观察员又要爬树了……
11:16:14
10和20,都各有两辆保障车围上
11:16:23
消防车进场
11:21:09
歼10飞行员登机
11:21:15
穿着绿色连体飞行符
11:21:20
飞行服
11:21:40
是带吊舱的220
11:22:14
贵宾席还没有人
11:22:52
J20进气口塞上了
地勤把两个枕形塞子塞进了进气口
11:25:13
来了一辆金杯 一辆轿车 一辆考斯特
11:25:23
后面还有几个小车
11:25:28
然后又一个考斯特
11:26:09
估计还没有领导到场
红色布座椅还有个工作人员坐在上面休息
11:26:44
J10开始暖车
11:26:48
鸭翼扇动
11:27:00
电源车离开J10
11:27:55
一个维护人员直接从J10主翼跳下来
11:27:58
又一个考斯特
11:28:07
几个警车轿车陆续入场
11:28:47
J10收油
11:29:00
一个GL8开了过去
11:29:18
挡前轮的三角块被地勤拿走
11:30:09
220号的J10停在了跑道的起点
11:30:24
左翼下挂着吊舱
11:30:27
菊花收缩
11:30:30
轰油
11:30:34
松刹车 起步
11:30:42
看到明显的蓝色火苗
11:30:48
200米左右飞了起来
11:30:57
大坡度爬升 大于45度
11:31:11
直冲云霄...(CD观察员:搞表演啊?)
11:31:35
车队到了
11:31:39
7个大巴
11:32:02
后面6个小车 开着双闪
11:35:40
J10目测400米左右高度从跑道上空通场
12:08:39
737专机降落
12:11:59
专机编号4018 滑到了跑道北端机库旁
12:14:26
专机机门打开 人下飞机
12:18:28
接专机的车到了停机坪
12:22:07
第二架编号为4020的专机降落
12:24:26
4020滑到北面的停机坪
12:29:33
J20发动机试车
12:31:21
考斯特车队朝停机坪开去
12:33:48
J10第二次起飞
12:38:10
J10中空通场
12:42:01
第三次中空通场 确认为带吊舱那架
12:43:25
J20发动机试车
12:48:57
J20缓慢的滑向跑道
12:49:08
发动机开机
12:49:16
测试尾翼和鸭翼
12:50:08
开始滑
12:50:09
加速
12:50:16
J-20起飞!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12:50:54
10伴飞
12:56:15
在上空盘旋
13:02:37
J20仍在盘旋
13:08:05
鞭炮准备好了
13:08:07
降落了
13:08:23
放伞!!!
13:08:25
轻盈落地
13:08:27
完美的降落!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
13:08:34
放鞭炮了现场
13:08:40
现场欢呼声一片
13:09:10
全场人高呼 鞭炮响了起来
13:09:13
都在欢呼
13:10:09
滑到起飞点了
13:10:23
围观群众也在放鞭炮... 一个接一个
13:10:55
滑向停机坪
13:13:48
伴飞的10也下来了
J-20首飞完美成功!!!!感谢广大网友与我们一起见证历史时刻!!!!诸君,一
起高呼祖国万岁吧!!!!!
————————————————————————————————————————————————————————————————
有消息,
经询问在机场附近人员,今天现场安保非常严格,五十米就有一固定哨并配合预备役巡
逻。视频和图片大家要耐心等待了。
感谢提供图片的网友与大牛同学~非常感谢!

-
x60s/L2400/320G/2G
-
check-out
git clone ssh://<yourname>@10.32.126.76:29418/mip
git checkout –b dev
git commit –a –s –m “log”
git checkout master
git pull
git co dev
git rebase master
git push(origin push)
for each modification
git commit –a –s –m “log”
git checkout master
git pull
git rebase master
git push(changes push)
if it doesn't work, you may need to restart the port mapping
1. ssh to 10.32.126.69
2. $ cd /usr/local/bin
3. sudo ./restart-xxx-29418 (note: if you forget your 69's password, you can ask Xie,Pin to help you reset)
check-in
1. git config --global user.email <decho user>@decho.com
Git config –global user.email yuz@
2. modify your local repo...
3. git add <what you want to be committed>
4. git commit -m "log" –s (git commit -a, it will commit all your local change s)
5. git push origin HEAD:refs/for/master, you will get a <revision id>
6. what if you want to continue push changes:
(1) git commit --amend
(2) git push origin HEAD:refs/changes/<revision id>
gerrit(code review)
each reviewer can mark the score:
(1)if one of the reviewer give the +2, thus he/she and the code author can submit to merge the code
(2)if and only if all the reviewer give the +1 score, the code can be submitted
(3)if someone give the -2 score, this means the code is useless... so be care to give this score
(4)if you think the code has some detects, you can give -1 score and add some comments in the code
-
嗯
-
-
2010-08-09
人民有没有庸俗的权利? - [左右]
郭德纲被封杀有感。
在这个国家,你们懂得
-
2010-08-06
在sks买了台t61 - [折腾]
03年的t30到现在还能使用,这个事实使得俺不能不对thinkpad情有独钟……
水木上某id的签名档密密麻麻的列了几十台tp,给俺留下了深刻的印象
俺入的t61是T7300集显高分,啥时候有空去x东升级到4G内存和500G硬盘应该就很好了
再来个dock和24 LCD就完美了……
嗯
现在手头有三台tp了……
-
发信人: Vcup (让公平正义比太阳光灰), 信区: NewExpress
标 题: 2003年新闻,三峡大坝可以抵挡万年一遇洪水
发信站: 水木社区 (Tue Jul 20 16:58:25 2010), 站内
2003年新闻,三峡大坝可以抵挡万年一遇洪水
http://news.sina.com.cn/c/2003-06-01/0854176837s.shtml
2007 年新闻,三峡大坝今年起可防千年一遇洪水
http://news.sina.com.cn/c/2007-05-08/085711774700s.shtml
2008 年新闻,三峡大坝可抵御百年一遇特大洪水
http://news.sohu.com/20081021/n260148246.shtml
2010 年新闻,三峡蓄洪能力有限,勿把希望全寄托在三峡大坝上
http://news.qq.com/a/20100720/000013_1.htm -
懒得自己拍了,上个网图
只是yy下就实现了,谢谢大手笔的株株同学……
带了一个礼拜没人问一句,一群混it的挫男……bs

-










-
2010-04-28
水木网友,有才。。。 - [搞笑]
【 以下文字转载自 RealEstate 讨论区 】
发信人: registerWu (nick), 信区: RealEstate
标 题: Re: 我想出一个绝对制止炒房的办法,只一条政策
发信站: 水木社区 (Wed Apr 28 12:31:33 2010), 站内
很好的办法,顺便说一下你的id,1和2写反了
【 在 welcom123 (雨夜) 的大作中提到: 】
: 房子出售价格要与房子买入价格相同
: 也就是房子买来多少钱,卖的话就必须卖多少钱
: 只一条政策,绝对没有炒房的
: ................... -
2010-04-16
Enable memory leak detection in vs2008 - [技术]
Visual Studio DebuggerMemory Leak Detection EnablingThis topic applies to:
Visual Studio Edition
Visual Basic
C#
C++
J#
Express
No
No
Native
No
Standard
No
No
Native
No
Pro/Team
No
No
Native
No
The primary tools for detecting memory leaks are the debugger and the C Run-Time Libraries (CRT) debug heap functions. To enable the debug heap functions, include the following statements in your program:
Note The #include statements must be in the order shown here. If you change the order, the functions you use may not work properly.
By including crtdbg.h, you map the malloc and free functions to their debug versions, _malloc_dbg and _free_dbg, which keep track of memory allocation and deallocation. This mapping occurs only in a debug build (in which _DEBUG is defined). Release builds use the ordinary malloc and free functions.
The #define statement maps the base versions of the CRT heap functions to the corresponding debug versions. You do not absolutely need this statement, but without it, the memory leak dump will contain less useful information.
Once you have added the previous statements, you can dump memory leak information by including the following statement in your program:
When you run your program under the debugger, _CrtDumpMemoryLeaks displays memory leak information in the Output window. The memory leak information looks like this:
Detected memory leaks!
Dumping objects ->
C:\PROGRAM FILES\VISUAL STUDIO\MyProjects\leaktest\leaktest.cpp(20) : {18}
normal block at 0x00780E80, 64 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.If you do not use the #define _CRTDBG_MAPALLOC statement, the memory leak dump would look like this:
Detected memory leaks!
Dumping objects ->
{18} normal block at 0x00780E80, 64 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.Without _CRTDBG_MAP_ALLOC defined, the display shows:
-
The memory allocation number (inside the curly braces).
-
The block type, which is normal, client, or CRT.
-
The memory location in hexadecimal form.
-
The size of the block in bytes.
-
The contents of the first 16 bytes, also in hexadecimal form.
With _CRTDBG_MAP_ALLOC defined, the display also shows you the file where the leaked memory was allocated. The number in parentheses following the file name (20, in this example) is the line number within the file.
To go to the line in the source file where the memory is allocated
-
Double-click on the line in the Output window that contains the file name and line number.
-or-
Select the line in the Output window that contains the file name and line number, and press F4.
_CrtSetDbgFlag
Calling _CrtDumpMemoryLeaks is easy enough if your program always exits in the same place. If your program can exit from multiple locations, instead of putting a call to _CrtDumpMemoryLeaks at each possible exit, you can include the following call at the beginning of your program:
This statement automatically calls _CrtDumpMemoryLeaks when your program exits. You must set both bit fields, _CRTDBG_ALLOC_MEM_DF and _CRTDBG_LEAK_CHECK_DF, as shown previously.
Setting the CRT Report Mode
By default, _CrtDumpMemoryLeaks dumps memory leak information to the Debug pane of the Output window, as described previously. You can reset this to dump to another location using _CrtSetReportMode. If you use a library, it may reset the output to another location. In that case, you can set the output location back to the Output window using the following statement:
For more information, see _CrtSetReportMode.
See Also
Concepts
-
-
磁盘上已经是编码之后的multibyte流
要在程序里面用的话,必须
MultiByteToWideChar(CP_UTF8,0,input,-1,output,50);
写回磁盘应该要WideCharToMultiByte(CP_UTF8, 0, a.c_str(), a.size(), tmp, 50,NULL,NULL);
-
2010-04-14
几个linux命令,备忘 - [技术]
1 搭svn服务器
svn create /repo
最后需要 svn import code_path file:///svn/code_path
2 格式化硬盘
mkfs.ext3 -j -F /dev/sdb







