Thursday, January 21, 2010

I am busy everyday


AssemblyInfo.cs

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// 有关程序集的常规信息通过下列属性集
// 控制。更改这些属性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("YYTetris.Web")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("uitv")]
[assembly: AssemblyProduct("YYTetris.Web")]
[assembly: AssemblyCopyright("Copyright © uitv 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型的 ComVisible 属性设置为 true。
[assembly: ComVisible(false)]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]

// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 内部版本号
// 修订号
//
// 可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值,
// 方法是按如下所示使用“*”:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Class1.cs

#region 版权信息
//======================================================================
//
// Copyright (C) 2008-2001 海口网博软件工作室
// All rights reserved
//
// filename :Class1
// description :
// created by webabc at 04/02/2008 17:46:53
// http://www.webabc.com.cn

//======================================================================
#endregion
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

///
/// Class1 的摘要说明
///

public class Class1
{
public Class1()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
}

google and bing


Bing is simply a new name for Live which now has some new features. It produces bettter results for images at this point in time. And if your love prono well the videos autoplay for you. Big deal! The relevance of search results from Google is far better. It won't take long for the blackhats and other search engine gamers to get up to their tricks and diminish the search results relevance on Bing.I don't use SEO to "fool" Google and I can't imagine why you would even say that. You have that backwards. I use whitehat SEO so I can work harmoniously with search engines, Google included.


Better blog posts are built on a foundation of comprehensive research. Better bloggers are intelligent enough to know that limiting themselves to use of a single search engine will be reflected in the quality or lack thereof found in the content in their posts.Setting aside opinions about these two companies and their search engines, I find it weird to continually experience bloggers who state they only use one search engine, usually Google. There's almost a brand loyalty thing going on that I find to be extremely odd.Granted that Google tends to produce the most relevant search results over all, but it does seem to me that bloggers who claim they use only a single search engine cannot claim to have done comprehensive research. So if you do intend to become a better blogger and/or to become a paid writer you may want to consider expanding your thinking and your search engine use.There are many search engines aside from Google and Bing and I use them all. As a paralegal, a librarian, and a researcher doing contracted work I am aware of numerous specialized niche search engines that out perform Google, Yahoo and Bing in specific niche related results.

fun.cs

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
///
/// fun 的摘要说明
///

public class fun
{
public fun()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public static string Left(string sSource, int iLength)
{
return sSource.Substring(0, iLength > sSource.Length ? sSource.Length : iLength);
}
///
/// encrypting string
///

/// encrypting string
/// format,0 is SHA1,1 is MD5
///
public static string Encrypt(string Password, int Format)
{
string str = "";
switch (Format)
{
case 0:
str = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "SHA1");
break;
case 1:
str = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "MD5");
break;
}
return str;
}
public static string GenerateMix(int CodeLength)
{
int number;
StringBuilder result = new StringBuilder();

System.Random random = new Random();

for (int i = 0; i < CodeLength; i++)
{
number = random.Next();

if (number % 2 == 0)
result.Append(((char)('0' + (char)(number % 10))).ToString());
else
result.Append(((char)('A' + (char)(number % 26))).ToString());

}
return result.ToString();
}
public string GenerateMixNo(int CodeLength)
{
int number;
StringBuilder result = new StringBuilder();

System.Random random = new Random();

for (int i = 0; i < CodeLength; i++)
{
number = random.Next();
if ((i+1) % 6 == 0 && i!=0 && i!=CodeLength)
result.Append("-");
else
result.Append(((char)('0' + (char)(number % 10))).ToString());
}
return result.ToString();
}

public static string CreateValidateNumber(int length)
{
int[] randMembers = new int[length];
int[] validateNums = new int[length];
string validateNumberStr = "";
//生成起始序列值
int seekSeek = unchecked((int)DateTime.Now.Ticks);
Random seekRand = new Random(seekSeek);
int beginSeek = (int)seekRand.Next(0, Int32.MaxValue - length * 10000);
int[] seeks = new int[length];
for (int i = 0; i < length; i++)
{
beginSeek += 10000;
seeks[i] = beginSeek;
}
//生成随机数字
for (int i = 0; i < length; i++)
{
Random rand = new Random(seeks[i]);
int pownum = 1 * (int)Math.Pow(10, length);
randMembers[i] = rand.Next(pownum, Int32.MaxValue);
}
//抽取随机数字
for (int i = 0; i < length; i++)
{
string numStr = randMembers[i].ToString();
int numLength = numStr.Length;
Random rand = new Random();
int numPosition = rand.Next(0, numLength - 1);
validateNums[i] = Int32.Parse(numStr.Substring(numPosition, 1));
}
//生成验证码
for (int i = 0; i < length; i++)
{
validateNumberStr += validateNums[i].ToString();
}
return validateNumberStr;
}

}