posted @ 2004-06-09 00:30 bestcomy 阅读(77748) 评论(259) 编辑
本人纯属LINUX菜鸟,因为要在opensuse 11.3上用rmp安装oracle 11gR2
首先需要到http://ftp.novell.com/partners/oracle/sles-11/下载安装orarun.rpm包, 但总提示缺少 sysstat 依赖项
找到sysstat的rpm安装文件安装成功
#rpm -ivh sysstat-9.0.4-6.1.x86_64.rpm
仍然提示缺少依赖项
google了不少功夫终于找到答案
http://www.redhat.com/archives/redhat-list/2007-June/msg00225.html
# rpm -ql sysstat
运行之后再次安装orarun成功
posted @ 2011-01-16 01:16 bestcomy 阅读(254) 评论(0) 编辑
在Server 2008上的MOSS 2007文档库不能通过"资源管理器"方式上传大文件,找到这篇文章解决了,记录一下。
http://www.sharepointboris.net/2009/02/upload-bug-in-moss-2007-windows-server-2008/
实际是IIS7的设置问题。因为我用代码写的Console程序在服务器上传大文件是可以成功的。
posted @ 2010-07-08 13:08 bestcomy 阅读(157) 评论(0) 编辑
最近工作中发现需要转换Excel列名,例如A列序号为0,Z列序号为25,ZB列则为27
发现字母列名实际为26进制,于是写了如下Helper Class来解决我的问题:
2 public class ExcelColumnTranslator
3 {
4 private ExcelColumnTranslator()
5 {
6 }
7
8 public static int ToIndex(string columnName)
9 {
10 if (!Regex.IsMatch(columnName.ToUpper(), @"[A-Z]+"))
11 throw new Exception("invalid parameter");
12 int index = 0;
13 char[] chars = columnName.ToUpper().ToCharArray();
14 for (int i = 0; i < chars.Length; i++)
15 {
16 index += ((int)chars[i] - (int)'A' + 1) * (int)Math.Pow(26, chars.Length - i - 1);
17 }
18 return index - 1;
19 }
20
21 public static string ToName(int index)
22 {
23 if (index < 0)
24 throw new Exception("invalid parameter");
25 List<string> chars = new List<string>();
26 do
27 {
28 if (chars.Count > 0) index--;
29 chars.Insert(0, ((char)(index % 26 + (int)'A')).ToString());
30 index = (int)((index - index % 26) / 26);
31 } while (index > 0);
32
33 return String.Join(string.Empty, chars.ToArray());
34 }
35 }
测试代码:
2 string[] cols = new string[] { "A", "AA", "AAA", "Z", "ZZ", "ZZZ", "ABC", "CBA", "XZB" };
3 for (int i = 0; i < cols.Length; i++)
4 {
5 Console.WriteLine("{0} == {1}", cols[i], ExcelColumnTranslator.ToName(ExcelColumnTranslator.ToIndex(cols[i])));
6 }
测试输出:
A == A
AA == AA
AAA == AAA
Z == Z
ZZ == ZZ
ZZZ == ZZZ
ABC == ABC
CBA == CBA
XZB == XZB
仅供参考
posted @ 2009-02-04 00:21 bestcomy 阅读(1473) 评论(2) 编辑
posted @ 2008-04-03 16:32 bestcomy 阅读(2258) 评论(12) 编辑
ScottGu 已宣布公开 ASP.NET Preview 2 Release源码,可到Codeplex下载。
posted @ 2008-03-22 08:27 bestcomy 阅读(4528) 评论(12) 编辑
posted @ 2008-03-18 22:58 bestcomy 阅读(1349) 评论(8) 编辑
posted @ 2007-10-19 22:34 bestcomy 阅读(1141) 评论(2) 编辑
posted @ 2006-11-14 23:23 bestcomy 阅读(3859) 评论(52) 编辑

