yang's profileMyRealYesterdayPhotosBlogListsMore Tools Help

yang liu

Occupation
感谢访问!
Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.
Photo 1 of 1
More albums (1)

MyRealYesterday

June 04

小叙在校学生软件开发团队

在校学生组成的软件开发团队在软件开发队伍中属于一个特殊的群体,因为参与了很多这样的团队来作项目开发,有较多感触,很想针对这样一个特殊群体发表下自己的看法。
 
一、能力矩阵
在校学生组成的项目开发团队,团队成员在能力方面有很大差异且普遍水平不高(很客观的评价,一些成员加入的目的可能仅仅是为了学习),能力方面的欠缺会导致任务分配不能得到及时落实,从而导致项目进度不能正常推进,并且,能力的差异会直接导致项目的完成过度依赖于于个人英雄主义,从而使得团队某些成员独当一面,任务繁重异常。
 
二、责任心差异
学生开发团队因为在校期间其他任务繁杂,无硬性责任惩罚制度,且小组成员自律性等因素影响,会使大部分成员不能全身心投入(即使有报酬),这点和第一点也有某种联系,因为能力差异导致某些成员力不从心,最后会选择放弃,严重影响项目进度。
 
三、客观因素
学生团队因为平时上课、写作业等客观不可避免因素的影响,会导致项目进度推进困难。
 
我认为在校学生软件开发团队有很多弊端,来开发较大型项目很不合适!
 
 
May 20

"有一个无效 SelectedValue,因为它不在项目列表中"的解决方法

以前是这么写的
DropDownList1.SelectValue = "值";
这样的话,重新选择级联绑定就会出错,下面的写法则巧妙的避免了错误
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue("值"))

May 16

关于多所属关系的数据库设计的想法

最近在开发学校的一套管理系统,数据库设计采用了还算严格的第三范式设计,这是目前主流的数据库设计模式,不过却在此次开发中感觉到了些困惑。
 
这个系统关系不算复杂,但所属关系很多[父子关系],所以划分了很多表,料想以后开发所属关系更多更复杂的系统,照这样做肯定会有更多的表。
 
以后开发此类系统决定采用关系数据字典的做法,尽管数据冗余,尽管程序设计上会有些麻烦,但不失为一种解决此类问题的好方法。
May 09

FCKeditor编辑器使用札记

一直很喜欢FCKeditor,不过在使用过程中有很多问题需要注意,不然确实又很烦人哈。大笑
下面是一些使用心得,希望对大伙有用哈
[FCKeditor可以在我的共享http://cid-f60b7b311e1fff0a.skydrive.live.com/下载,非常不错的简化版]


调用:
注意:调用的时候注意文件夹位置等问题。。。
<script type="text/javascript" src="editor/fckeditor.js"></script>
<script type="text/javascript">
<!--调出编辑器的主程序
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('index.html')); //index.html为当前页面文件名
//这个路径要是虚拟主机的路径,所以如果是子目录还需要再处理
var sBasePath = sBasePath.substring(0,document.location.pathname.lastIndexOf('目录文件夹名'));

var oFCKeditor = new FCKeditor( 'editor' );
oFCKeditor.BasePath  = sBasePath;
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + 'editor/fckconfig.js';
oFCKeditor.ToolbarSet = 'Basic' ;
oFCKeditor.Value = 'aaa';
oFCKeditor.Create();
//-->
</script>

获取、修改FCKeditor的值
var oEditor = FCKeditorAPI.GetInstance('editor') ;
var content = oEditor.GetXHTML(true);  //获取
oEditor.SetHTML("修改过的值");  //修改

PS:POST提交后获取的值需要作处理才能够往数据库中写,不然读取编辑时会出错,不用对<等符号做处理,因为FCKeditor会自动转义。
thecontent = thecontent.Trim().Replace("'","&#39;").Replace("\r\n","");

 

May 02

Excel连接备注

@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""

"HDR=Yes;" indicates that the first row contains columnnames, not data

"IMEX=1;" tells the driver to always read "intermixed" data columns as text

TIP! SQL syntax: "SELECT * FROM [sheet1$]" - i.e. worksheet name followed by a "$" and wrapped in "[" "]" brackets.

如果第一行是数据而不是标题的话, 应该写: "HDR=No;"

"IMEX=1;" tells the driver to always read "intermixed" data columns as text

April 25

SQL Server数据查询结果生成Excel表格的方法

将要开发的项目会用到这个,所以提前作了准备。
原理:新建一个与Excel的连接,Data Source为要生成的Excel文件的路径,然后利用sql语句创建一个表结构,再对表进行插入操作,插入的数据为SQL Server查询到的数据。
 
新建与Excel的连接:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=要生成的Excel文件的物理路径";Extended Properties=Excel 8.0;"
 
其余省略...
 
April 24

VS2005使用AJAX控件时的“Sys 未定义”错误解决办法

(转)在.net中可以下载ASPAJAXExtSetup.msi(也就是atlas 控件)控件, 然后以一个例子说明:

安装atlas 控件后在.net框架里就有了ajax的工具条。

添加一个aspx文件,在这个文件里,托入ScriptManager控件,然后托人UpdatePanel容器控件,在UpdatePanel里面放入Timer控件和label。再在UpdatePanel外面放一个label。

双击Timer,在事件里写:
protected void Timer1_Tick(object sender, EventArgs e)
{
      Label1.Text = "Panel refreshed at: " +
      DateTime.Now.ToLongTimeString();
}
 
然后在page_laod里写:
Label2.Text = "Panel refreshed at: " + DateTime.Now.ToLongTimeString();
 
噢可,现在可以一睹ajax的优点了,保存后在浏览器里查看这个aspx文件,

叮咚...出错了!??

Sys未定义?怎么回事?

问题很简单,你的配置文件错了,快在你的配置文件的 <system.web>里加入:
 <httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
April 22

javascript实现trim函数

trim方法比较好用,但是javascript本身没有提供这个函数,我们可以通过正则表达式替换来实现
 
function trim(text)
{
 if(typeof(text)=='undefined'||!text.toString)
 {
  return '';
 }
 else
 {
  return text.toString().replace(/^\s*|\s*$/g,'');
 }
}
 
解释下这个正则
\s 匹配空格
^\s* 匹配以空格开头
\s*$  匹配以空格结尾
g  全局匹配,假设文字前后有多个空格,就会全部匹配了
 
g:    全局匹配
i:    忽略大小写
gi:   以上组合
m     多行查找