高中同学聚会时想起的一个笑话

一次上化学课,老师讲钢那部分时说,锰钢就是钢里有锰,有抗冲击等等的特性,然后又说钨钢,就是钢里有钨,有比较坚硬等等的特性,最后老师说还有一种特殊的钢:不锈钢时,刘同学在下面说:就是钢里有不锈!

cvs server: sticky tag `xxx’ for file ‘xxx’ is not a branch…

貌似是cvs的一个经典问题,今天在修改的时候取了一个历史版本,好像就自动给加上了个版本号的tag,然后在commit的时候就出现了这个问题,提示修正后才能commit。
google一下果然是经典问题,很快找到了答案:对出这个错的文件执行update -A后清掉当前的tag就可以了。

[ZT]如何把string解析为int?

Q:如何把string解析为int?
A:简单的方法有三种:
string source = “1412”;
int result = 0;
// 使用Convert.ToInt32(string value);
result = Convert.ToInt32(source);
// 使用Int32.Parse(string value);
result = Int32.Parse(source);
// 使用Int32.TryParse(string s, out int result);
Int32.TryParse(source, out result);

Continue reading…

[ZT]All PSP Error Codes

First 4 digits indicate the functional area that reported an error : 8002 is the kernel, 8001 is the standard libc (and the error numbers correspond to the POSIX errno.h constants). Others are less well known, but you can see the wifi range from your list, for instance.

Continue reading…

[ZT]PSP program formats

The PSP uses ELF (Executable and Linking Format) as the executable format. These are packaged into a EBOOT.PBP along with other files for easy distribution and loading. When loaded, the MIPS cpu can run the code in kernel or user mode. Most of the XMB and drivers for the hardware boot in kernel mode. Most of the kernel code and device drivers for the PSP are coded in a relocateable executable format with the extension .prx. This format is a proprietary format made by Sony. Note that .prx format code need not run in kernel mode, but a vast majority of them are because Sony provided them to control the PSP hardware.

Continue reading…

如何使MFC的MDI默认不创建空child窗口

[color=#008000]// Parse command line for standard shell commands, DDE, file open[/color]
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
[color=#008000]// 防止开启后自动创建child[/color]
[color=#0000D0]if[/color] (cmdInfo.m_nShellCommand==CCommandLineInfo::FileNew)
{
[color=#0000D0]if[/color] (cmdInfo.m_strFileName==[color=#808080]””[/color])
{
cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;
}
}
[color=#008000]// Dispatch commands specified on the command line[/color]
[color=#0000D0]if[/color] (!ProcessShellCommand(cmdInfo))
[color=#0000D0]return[/color] [color=#0000D0]FALSE[/color];
本代码由xTiNt自动着色 http://kbadboy.yeah.net