请问如何做像google那样的搜索引擎 请问如何做像google那样的搜索引擎 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!-- Search Google --><center><FORM method=GET action="http://www.google.com/search"><TABLE bgcolor="#FFFFFF"><tr><td><A HREF="http://www.google.com/intl/zh-CN/"><IMG SRC="http://www.google.com/logos/Logo_40wht.gif" border="0" ALT="Google" align="absmiddle"></A><INPUT TYPE=text name=q size=31 maxlength=255 value=""><INPUT TYPE=hidden name=hl value=zh-CN><INPUT type=submit name=btnG value="Google 搜索"></td></tr></TABLE></FORM></center><!-- Search Google --> 前段时间我用vc做了个搜索引擎,发布了几个地方了,你google一下“vc搜索引擎”就可以找到源代码了 算了吧,类似文章中文的不多,但即使把英文的看完了你也做不下去,涉及到的技术关键字太多。我建议你不妨做一个站内的搜索引擎,搜索的原理差不多,要搜全世界,其中的技术问题比前面还要多。html引擎,蜘蛛,忽略词,全文索引 private void InitializeComponent() { this.TextBox1.TextChanged += new System.EventHandler(this.TextBox1_TextChanged); this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click); this.cmdPrev.Click += new System.EventHandler(this.cmdPrev_Click); this.cmdNext.Click += new System.EventHandler(this.cmdNext_Click); this.Load += new System.EventHandler(this.Page_Load); } #endregion void BindList() { ICollection collectionSource = this.CreateDataSource(); PagedDataSource objPds = new PagedDataSource(); objPds.DataSource = collectionSource; objPds.AllowPaging = true; objPds.PageSize = 8; objPds.CurrentPageIndex = CurrentPage; lblCurrentPage.Text = "页次: " + (CurrentPage + 1).ToString() + " of " + objPds.PageCount.ToString(); cmdPrev.Enabled = !objPds.IsFirstPage; cmdNext.Enabled = !objPds.IsLastPage; DataList1.DataSource= objPds; DataList1.DataBind(); } ICollection CreateDataSource() { sKey="R1SnlcZQFHIBYlBCYdip3j1ERCvueU2Z"; localhost.GoogleSearchService s=new localhost.GoogleSearchService(); localhost.GoogleSearchResult r=s.doGoogleSearch(sKey, TextBox1.Text, 0, 10, true, "", false, "", "", ""); localhost.ResultElement[] re=r.resultElements; DataTable dt = new DataTable(); DataRow dr; dt.Columns.Add(new DataColumn("title", typeof(string))); dt.Columns.Add(new DataColumn("url", typeof(string))); for (int j = 0; j <re.Length; j++) { dr = dt.NewRow(); dr[0] = re[j].title; dr[1] = re[j].URL; dt.Rows.Add(dr); } DataView dv = new DataView(dt); return dv; } public int CurrentPage { get { object o = this.ViewState["_CurrentPage"]; if (o == null) return 0; else return (int) o; } set { this.ViewState["_CurrentPage"] = value; } } private void cmdPrev_Click(object sender, System.EventArgs e) { CurrentPage -= 1; BindList(); } private void cmdNext_Click(object sender, System.EventArgs e) { CurrentPage += 1; BindList(); } private void TextBox1_TextChanged(object sender, System.EventArgs e) { } private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { BindList() ; this.cmdNext.Visible=true; this.cmdPrev.Visible=true; this.lblCurrentPage.Visible=true; } }} 引用FCKEDITER报错 急!!!! 哪位前辈可以推荐一个AJAX教程 网页视频器读取FLV文件问题 连续报了7个这样的错 代码 重分提问,很简单,关于第一次访问页面的字体默认总是大字体的问题 用C#语言怎么写删除D盘文件夹updote下的uplode.txt文档。 提交数据的问题? 哪位大侠知道什么地方有介绍关于.NET类库方面的文档 如何使用asp.net编写发送邮件的程序(服务器要求发送邮件密码验证) webForm上的控件为何都是protected而不是private ?
<center>
<FORM method=GET action="http://www.google.com/search">
<TABLE bgcolor="#FFFFFF"><tr><td>
<A HREF="http://www.google.com/intl/zh-CN/">
<IMG SRC="http://www.google.com/logos/Logo_40wht.gif"
border="0" ALT="Google" align="absmiddle"></A>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=hl value=zh-CN>
<INPUT type=submit name=btnG value="Google 搜索">
</td></tr></TABLE>
</FORM>
</center>
<!-- Search Google -->
我建议你不妨做一个站内的搜索引擎,搜索的原理差不多,要搜全世界,其中的技术问题比前面还要多。html引擎,蜘蛛,忽略词,全文索引
{
this.TextBox1.TextChanged += new System.EventHandler(this.TextBox1_TextChanged);
this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);
this.cmdPrev.Click += new System.EventHandler(this.cmdPrev_Click);
this.cmdNext.Click += new System.EventHandler(this.cmdNext_Click);
this.Load += new System.EventHandler(this.Page_Load); }
#endregion void BindList()
{
ICollection collectionSource = this.CreateDataSource();
PagedDataSource objPds = new PagedDataSource();
objPds.DataSource = collectionSource;
objPds.AllowPaging = true;
objPds.PageSize = 8; objPds.CurrentPageIndex = CurrentPage; lblCurrentPage.Text = "页次: " + (CurrentPage + 1).ToString() + " of "
+ objPds.PageCount.ToString(); cmdPrev.Enabled = !objPds.IsFirstPage;
cmdNext.Enabled = !objPds.IsLastPage; DataList1.DataSource= objPds;
DataList1.DataBind();
}
ICollection CreateDataSource()
{
sKey="R1SnlcZQFHIBYlBCYdip3j1ERCvueU2Z";
localhost.GoogleSearchService s=new localhost.GoogleSearchService();
localhost.GoogleSearchResult r=s.doGoogleSearch(sKey, TextBox1.Text,
0, 10, true, "", false, "", "", "");
localhost.ResultElement[] re=r.resultElements;
DataTable dt = new DataTable();
DataRow dr; dt.Columns.Add(new DataColumn("title", typeof(string)));
dt.Columns.Add(new DataColumn("url", typeof(string))); for (int j = 0; j <re.Length; j++)
{
dr = dt.NewRow(); dr[0] = re[j].title;
dr[1] = re[j].URL; dt.Rows.Add(dr);
}
DataView dv = new DataView(dt);
return dv;
} public int CurrentPage
{
get
{
object o = this.ViewState["_CurrentPage"];
if (o == null)
return 0;
else
return (int) o;
} set
{
this.ViewState["_CurrentPage"] = value;
}
} private void cmdPrev_Click(object sender, System.EventArgs e)
{
CurrentPage -= 1;
BindList();
} private void cmdNext_Click(object sender, System.EventArgs e)
{
CurrentPage += 1;
BindList();
} private void TextBox1_TextChanged(object sender, System.EventArgs e)
{
} private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
BindList() ;
this.cmdNext.Visible=true;
this.cmdPrev.Visible=true;
this.lblCurrentPage.Visible=true; }
}
}