mysql 数据的备份和恢复
摘要:MySQL Tutorial - Import or Export A DatabaseThis tutorial section deals with mysqldump which is a tool to import and export MySQL databases.It can be used to back up a database or to move database inf...
阅读全文
posted @
2010-05-25 17:02
lbsx
阅读(379)
推荐(0)
MFC读写配置文件
摘要:DWORD WINAPI GetPrivateProfileString( __in LPCTSTR lpAppName, __in LPCTSTR lpKeyName, __in LPCTSTR lpDefault, __out LPTSTR lpReturnedString, __in DWORD nSize, __in LPCTSTR lpFileName);DWORD WINAPI Get...
阅读全文
posted @
2010-05-21 16:24
lbsx
阅读(898)
推荐(0)
C语言中的宏#和##
摘要:#的功能是将其后面的宏参数进行字符串化操作(Stringizing),简单说就是在对它所引用的宏变量通过替换后在其左右各加上一个双引号。Causes the corresponding actual argument to be enclosed in double quotation marks##被称为连接符(concatenator),用来将两个Token连接为一个Token。注意这里连接的...
阅读全文
posted @
2010-05-21 16:08
lbsx
阅读(254)
推荐(0)
aptitude 的 hold 和 keep
摘要:一直用命令行,没弄明白它俩的区别。原来keep只在当前aptitude会话期间禁止升级。因此在命令行直接 aptitude keep <package>是没有用的,马上会话就结束了。需要进到aptitude图形前端,然后按":",然后再升级,本次就不会升级它了;退出aptitude之后,下次依然会对这个包升级。而hold是一直禁止它升级。
阅读全文
posted @
2010-05-14 08:59
lbsx
阅读(454)
推荐(0)
Windows下C++计算代码段运行时间
摘要:LARGE_INTEGER BeginTime; LARGE_INTEGER EndTime; LARGE_INTEGER Frequency; QueryPerformanceFrequency(&Frequency); QueryPerformanceCounter(&BeginTime);//要测试的代码放在这里 QueryPerformanceCounter(&En...
阅读全文
posted @
2010-05-13 20:15
lbsx
阅读(609)
推荐(0)
C#计算代码段运行时间
摘要:Stopwatch sw= new Stopwatch(); sw.Start(); //do something sw.Stop(); Console.WriteLine(sw.Elapsed.TotalMilliseconds);参考:http://www.cnblogs.com/ajax-cn/archive/2007/04/14/713179.html
阅读全文
posted @
2010-05-12 19:45
lbsx
阅读(359)
推荐(0)
eieio-persistent-read: End of file during parsing: srecode-map.elc
摘要:突然出现这个错误:eieio-persistent-read: End of file during parsing: /path/cedet/srecode/srecode-map.elc原来是在~/.srecode下面有一个空的srecode-map文件,它会造成emacs加载的时候出错,重新编译cedet也会出错。删除就OK。
阅读全文
posted @
2010-05-08 18:19
lbsx
阅读(601)
推荐(0)
制作iso
摘要:从文件mkisofs -r -o myiso.iso /path一般都用-r选项,将uid和guid都设为0,因为这个系统上的uid guid对别的系统往往没用,还会设置其他一些读写权限。直接从光驱#dd if=/dev/cdrom if=/path/to/image.iso挂载:mount -t iso9660 -o loop xxx.iso /path 烧录:用cdrecord,现在在debi...
阅读全文
posted @
2010-05-03 10:40
lbsx
阅读(207)
推荐(0)
flip 转换换行符
摘要:flip, toms, toix - do newline conversions between **IX and MS-DOS
阅读全文
posted @
2010-05-02 16:38
lbsx
阅读(164)
推荐(0)
sed的地址表示
摘要:man sedAddresses Sed commands can be given with no addresses, in which case the command will be executed for all input lines; with one address, in which case the command will only be executed for inpu...
阅读全文
posted @
2010-05-01 13:42
lbsx
阅读(460)
推荐(0)
rsync scp rcp
摘要:rsync相比于scp有性能优势,会对文件进行检验,决定哪些文件需要拷贝,哪些已经存在不用拷贝。scp比rcp更安全。rsync was originally written as a replacement for rcp and scp.参考:http://en.wikipedia.org/wiki/Rsync
阅读全文
posted @
2010-05-01 10:49
lbsx
阅读(1004)
推荐(0)
用ssh-copy-id安装public key
摘要:以前用的rsync自己拷贝,用ssh-copy-id就可以直接安装到远程主机上。
阅读全文
posted @
2010-05-01 10:43
lbsx
阅读(980)
推荐(0)