2010年1月19日星期二

some good sentences for paper writing

1 precision and recall experiment should be conducted to see whether this method can actually improve the quality of the final ranking list
2 about the similarity threshold, the threshold is relied on the user to set it. However, how such threshold should be set is not clearly illustrated.
3 The authors of this paper tried to address a new problem, of developing a new distance measure for subtrees, which has not been proposed / solved before

4 and avoided the drawbacks of total mapping

5 there is just one sentence mentioning a very important information, and no further illustration is presented later

6 the authors claimed that

7 However, such claim is not convincing, and more details and illustration are needed to convince the reader that the efficiency of the PPI is really OK, and this should also be demonstrated in the later experiment section

8 This paper identified two critical problems/drawbacks of previous works

9 decreasing the page rank of spam sites could be directly achieved by using previous work

10 We three reviewers agree with some weak points of the paper, such as unavailability of category tags for most of the pages, the to-be-improved presentation and in-comprehensive experiment.

the which is not significant.



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
some points in writing the
1 Do NOT start a sentence with “AND”. I have said this many times, and hope this is the last time.also not add the First
2 A paper must be consistent, so does a review.Not enough pages should not count as a weak point to reject paper
3 author+"proposed to"
4 "presents" should be "represent"
5 be concise
6 explain that why
7 method->technique

////////////////////////////////////////////////
major problem:
1

2 's and in the begining

////////////////////////////////////////////
question: to merge them?

2009年11月3日星期二

c++ Precedence

http://www.cppreference.com/wiki/operator_precedencet

2009年10月27日星期二

C# string processing

trim-> only deal with the case related to the beginning and the end
replace-> can deal with the case in the middle

2009年7月8日星期三

Java' List +template

ArrayList m =new ArrayList();
List minPath =m.subList(0, 0);


Java' s List class even can not initialize with the templete, feeling weird about it.

2009年7月1日星期三

my sql database population

1 add bar as the database or table name
SQL_MODE=ANSI_QUOTES
2

2007年5月29日星期二

ASP.NET调用DLL(C#)

首先建立一个bin文件夹,然后将dll文件拷贝到该bin文件夹下,
然后在程序里使用
using namespace;
或者
<%@ import namespace="your-namespace" %>
的方式导入该命名空间,接下来就可以使用dll里面的函数了。


、创建C# 类库 (Dll)
以前在VC++中创建一个dll文件不能说简单,但在Visual C# 中,这将同样是轻而易举的事情。下面的介绍分成两部分:1、创建DLL,2、在客户端测试dll。
(1)创建DLL
首先创建一个空的类库工程。在VS.NET集成环境(IDE)中选择“文件->新建->工程文件->Visual C# 工程->类库”,点击Browse(浏览)按钮选择工程文件名和相应的目录,再点击 OK。
接着看看工程和它的相关文件。Solution Explorer(解决方案探测器)向工程中增加两个C# 类,第一个是 AssemblyInfo.cs ,第二个是Class1.cs。我们不讨论AssemblyInfo,重点介绍 Class1.cs。


双击Class1.cs,就能看到一个名称空间mcMath。我们将在客户机引用这个名称空间以使用这个类库:
namespace mcMath
{
using System;
///
/// Summary description for Class1.
///

public class Class1
{
public Class1()
{
//
// TODO: Add Constructor Logic here
//
}
}
}
现在就可以Build(构造)这个工程了。Build(构造)完毕后,就会在工程文件的bin/debug 目录中生成mcMath.dll文件。
增加一个方法
从View (视图)菜单中打开ClassView(类视图),开始只显示Class1,没有方法和属性。现在来增加一个方法和一个属性。
用鼠标右键单击“Class1”,选择“Add(增加)-> Add Method(增加方法)”,这时将弹出C# 方法生成向导:


在这个窗口中增加方法名、存取类型、返回类型、参数以及注释信息。使用Add(增加)和Remove(取消)按钮可分别从参数列表中增加和取消参数。这里增加了一个方法long Add( long val1, long val2 ),它负责将两个数字相加并返回和。
增加一个属性
同理可以通过C#属性生成向导,向类中增加一个属性:


增加了一个方法和一个属性后, Class1变成下图所示的样子:


仔细观察这个 Class1,你会发现C#的向导程序向类中增加了如下两个函数:
public long Add (long val1, long val2)
{
return 0;
}

public bool Extra
{
get
{
return true;
}
set
{
}
}
向类中增加代码
这里把Class1修改成为 mcMathComp ,因为 Class1是个容易造成混淆的名字,当想将这个类用在一个客户应用程序中时会造成问题。下面的代码对上面的做了些调整:
namespace mcMath
{
using System;
public class mcMathComp
{
private bool bTest = false;
public mcMathComp()
{
}
public long Add (long val1, long val2)
{
return val1 + val2;
}
public bool Extra
{
get
{
return bTest;
}
set
{
bTest = Extra ;
}
}
}
}
构造 dll
选择Build菜单创建dll文件,如果一切OK,就会在工程文件的 bin\debug目录生成dll文件。
(2)在客户端测试 dll
在客户端调用dll的方法和属性也是非常简单的工作,请遵照下面的步骤执行:
① 创建控制台应用程序
在VS.NET IDE集成环境中选择“文件-> 新建->工程文件->Visual C#工程文件->控制台应用程序”,最终将在这个控制台应用程序中测试dll。
② 增加名称空间的引用
选择“工程->添加引用”(Project->Add reference),然后浏览文件找到dll,点击 Ok:




引用添加向导程序将向当前工程文件中增加对相关库的引用:


③ 调用mcMath名称空间,创建 mcMathComp 的对象,并调用其方法和属性。
现在距离调用组件的方法和属性只有一步之遥了。请按照以下步骤进行:
●引用名称空间:using mcMath
●创建一个 mcMathComp的对象:mcMathComp cls = new mcMathComp();
●调用方法和属性
mcMathComp cls = new mcMathComp();
long lRes = cls.Add( 23, 40 );
cls.Extra = false;
以下是完整的工程文件代码:
namespace mcClient
{
using System;
using mcMath;
///
/// Summary description for Class1.
///

public class Class1
{
public Class1()
{
//
// TODO: Add Constructor Logic here
//
}
public static int Main(string[] args)
{
mcMathComp cls = new mcMathComp();
long lRes = cls.Add( 23, 40 );
cls.Extra = false;
return 0;
}
}

IIS报Service Unavailable错的解决方案

过检测,发现我的windows2003的应用程序池被改成DefaultAppPool了!改成原来的MsSharePointAppPool就可以了。

转载一篇详细的文章:

浏览 Windows SharePoint Services Web 站点时收到“Service Unavailable”(服务不可用)错误信息

症状
当您浏览一个 Windows SharePoint Services Web 站点时,您可能会收到下面的错误信息:
Service Unavailable
原因
如果 Microsoft Internet 信息服务 (IIS) 6.0 中没有正确地配置用于虚拟服务器的应用程序池,就可能会发生此问题。此问题可能会在存在下列一种或多种情况时发生: •应用程序池没有运行。
•应用程序池帐户使用的密码不正确。
•应用程序池帐户不是服务器上的 IIS_WPG 和 STS_WPG 这两个组的公共成员。

解决方案
要解决此问题,请按照下列步骤操作: 1.验证是否已为虚拟服务器配置了应用程序池。默认的应用程序池是 MSSharePointPortalAppPool。

请按照下列步骤来确定虚拟服务器正在使用的应用程序池。 a. 单击“开始”,指向“管理工具”,然后单击“Internet 信息服务 (IIS) 管理器”。
b. 展开“ServerName”,展开“Web 站点”,右键单击虚拟服务器,然后单击“属性”。
c. 单击“主目录”选项卡。

为虚拟服务器配置的应用程序池列在“应用程序池”框中。
d. 单击“确定”。

2.验证应用程序池帐户使用的密码是否正确。IIS 不会自动轮询 Active Directory 目录服务中的密码更改。如果应用程序池帐户是一个域帐户,其密码已过期,则在为此帐户重新指定一个新密码后,您可能会收到本文“症状”部分所描述的错误信息。

请按照下列步骤来验证应用程序池帐户所用的密码是否正确: a. 在 Internet 信息服务 (IIS) 管理器中,展开“应用程序池”。
b. 右键单击为虚拟服务器配置的应用程序池(例如,右键单击“MSSharePointPortalAppPool”),然后单击“属性”。
c. 单击“标识”选项卡。
d. 在“密码”框中,键入列在“用户名”框中的应用程序池帐户所用的密码,然后单击“确定”。
e. 在“确认密码”对话框中,再次键入密码,然后单击“确定”。

3.验证应用程序池帐户是服务器上的 IIS_WPG 组和 STS_WPG 组的成员。

根据您的具体情况选用下列方法之一。 a. 在成员服务器上安装了 SharePoint Portal Server 的情况下: 1.单击“开始”,指向“管理工具”,然后单击“计算机管理”。
2.展开“本地用户和组”,然后展开“用户”。
3.右键单击虚拟服务器的应用程序池使用的帐户,然后单击“属性”。
4.单击“成员属于”选项卡。

验证 IIS_WPG 和 STS_WPG 是否都出现在“成员属于”列表中。如果其中之一没有列出或者两者均未列出,请根据具体情况将 IIS_WPG 组、STS_WPG 组或者这两个组添加到列表中。

b. 在域控制器上安装了 SharePoint Portal Server 的情况下: 1.启动“Active Directory 用户和计算机”。
2.展开“用户”。
3.右键单击虚拟服务器的应用程序池使用的帐户,然后单击“属性”。
4.单击“成员属于”选项卡。

验证 IIS_WPG 和 STS_WPG 都出现在“成员属于”列表中。如果其中之一没有列出或者两者均未列出,请根据具体情况将 IIS_WPG 组、STS_WPG 组或者这两个组添加到列表中。


4.重新启动 IIS 以回收应用程序池: a. 在 Internet 信息服务 (IIS) 管理器中,右键单击“ServerName”,指向“所有任务”,然后单击“重新启动 IIS”。
b. 单击“在 ServerName 上重新启动 Internet 信息服务”,然后单击“确定”。