1月 2008

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…