国产成人精品999视频&日本一区二区亚洲人妻精品&久久久精品国产99久久精&99热这里只有成人精品国产&精品国产剧情av一区二区&成人亚洲精品久久久久app&国产精品美女高潮抽搐A片

Categories


Tags


搶先式多線程網(wǎng)絡(luò)蜘蛛

  搶先式多線程網(wǎng)絡(luò)蜘蛛

整理自網(wǎng)絡(luò)ChatGPT產(chǎn)生之內(nèi)容,文本內(nèi)容不具備參考意義,程序內(nèi)容及代碼片段有且僅有借鑒意義。

  框架
//      Copyright(C) 2017 銘飛科技
//
#region 版權(quán)信息
/*
 * 此文件自 Copyright(C) 2008 - 2017 銘飛科技 Classification:無 開源網(wǎng)站:http://www.http://www. coding
 */
#endregion


using System;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;


namespace Web.Templates.UI
{
    /// 
    /// 標簽樹控件
    /// 
    public class Tree : System.Web.UI.WebControls.TreeView
    {
        private string _styleName = "";

        /// 
        /// 樣式
        /// 
        /// The name of the style.
        public string StyleName
        {
            get { return _styleName; }
            set { _styleName = value; }
        }

        private string _checkedValue = "";

        /// 
        /// 默認選中當前值
        /// 
        /// The checked value.
        public string CheckedValue
        {
            get { return _checkedValue; }
            set { _checkedValue = value; }
        }

        private string _checkBoxName = "";

        /// 
        /// 復選框名稱
        /// 
        /// The check box name.
        public string CheckBoxName
        {
            get { return _checkBoxName; }
            set { _checkBoxName = value; }
        }

        private int _checkParentType = -1;

        /// 
        /// 
        /// 
        /// The type of the check parent.
        public int CheckParentType
        {
            get { return _checkParentType; }
            set { _checkParentType = value; }
        }

        private int _checkChildType = -1;

        /// 
        /// 
        /// 
        /// The type of the check child.
        public int CheckChildType
        {
            get { return _checkChildType; }
            set { _checkChildType = value; }
        }

        private string _showLevel = "999";

        /// 
        /// 顯示層級
        /// 
        /// The show level.
        public string ShowLevel
        {
            get { return _showLevel; }
            set { _showLevel = value; }
        }

        private string _valueField = "id";

        /// 
        /// 編號字段名
        /// 
        /// The value field.
        public string ValueField
        {
            get { return _valueField; }
            set { _valueField = value; }
        }

        private string _textField = "title";

        /// 
        /// 顯示字段名
        /// 
        /// The text field.
        public string TextField
        {
            get { return _textField; }
            set { _textField = value; }
        }

        private string _fatherField = "parentid";

        /// 
        /// 父編號字段名
        /// 
        /// The father field.
        public string FatherField
        {
            get { return _fatherField; }
            set { _fatherField = value; }
        }

        private TreeNodeBindEventHandler _onBind;

        /// 
        /// 構(gòu)建事件
        /// 
        /// The on bind event.
        public event TreeNodeBindEventHandler OnBind
        {
            add { _onBind += value; }
            remove { _onBind -= value; }
        }

        private DataTable _dataSource;

        /// 
        /// 數(shù)據(jù)源
        /// 
        /// The data source.
        public DataTable DataSource
        {
            get { return _dataSource; }
            set { _dataSource = value; }
        }

        /// 
        /// 綁定數(shù)據(jù)
        /// 
        public override void DataBind()
        {
            this.Nodes.Clear();
            this.ShowCheckBox = this.CheckBoxName != "" && this.CheckBoxName != null;

            if (_dataSource != null)
            {
                TreeNode root_node = new TreeNode();
                root_node.Value = "-1";
                root_node.Text = "根目錄";
                Nodes.Add(root_node);

                List root_list = new List();
                for (int i = 0; i < _dataSource.Rows.Count; i++)
                {
                    TreeNode node = new TreeNode();
                    DataRow dr = _dataSource.Rows[i];

                    node.Value = dr[_valueField].ToString();
                    node.Text = dr[_textField].ToString();
                    node.SelectAction = TreeNodeSelectAction.None;
                    //node.Depth =int.Parse(_showLevel);
                    if (_onBind != null)
                    {
                        _onBind(node);
                    }

                    if (dr[_fatherField].ToString() == "-1" || dr[_fatherField].ToString() == "0")
                    {
                        Nodes.Add(node);
                        if (node.Value == _checkedValue)
                        {
                            node.Checked = true;
                        }

                        int has = 0;
                        for (int j = 0; j < root_list.Count; j++)
                        {
                            if (root_list[j] == int.Parse(node.Value))
                            {
                                has = 1;
                            }
                        }
                        if (has == 0)
                        {
                            root_list.Add(int.Parse(node.Value));
                        }
                    }
                    else
                    {
                        TreeNode father_node = GetNode(root_node, dr[_fatherField].ToString());
                        if (father_node != null)
                        {
                            father_node.ChildNodes.Add(node);
                            if (node.Value == _checkedValue)
                            {
                                node.Checked = true;
                            }
                        }
                    }
                }
                //綁定事件,自動勾選父級節(jié)點
                if (this.CheckParentType == 0 || this.CheckChildType == 0)
                {
                    string enterjvice = "";
                    if (this.CheckParentType == 0)
                    {
                        enterjvice += "FatherChecked";
                    }
                    if (this.CheckChildType == 0)
                    {
                        enterjvice += "ChildChecked";
                    }
                    if (enterjvice != "" && this.Nodes.Count > 0)
                    {
                        this.Attributes.Add("onclick", "JscAutoCheckedNode(this,'" + enterjvice + "');");
                    }
                }
            }
            base.DataBind();
        }

        /// 
        /// 構(gòu)建HTML
        /// 
        /// The  object that receives the server control content.
        protected override void Render(HtmlTextWriter writer)
        {
            string[] style_list = new string[] { "admin_tree", "data_tree", "input_tree", "menu_tree", "popmenu_tree" };
            switch (_styleName)
            {
                case "menu_tree":
                    this.ShowCheckBox = false;
                    this.CssClass += " menu";
                    break;
                case "popmenu_tree":
                    this.

Public @ 2023-02-24 22:24:01 整理自網(wǎng)絡(luò)ChatGPT產(chǎn)生之內(nèi)容,文本內(nèi)容不具備參考意義,程序內(nèi)容有且僅有借鑒意義。

百度蜘蛛IP段,如何查看百度真實蜘蛛

不要看所謂的IP段,IP也不是一沉不變的,過去開頭有220.181的 大家都知道,但是后面百度方面在不同的城市都建立了更多的服務器,總要有IP的增加,而IP段不可能一直是固定的那幾個。所以單純的以IP段來看,是非常不嚴謹?shù)?。那么如何查看呢?可以使用cmd命令: nslookup IP地址  的方式來進行查看,如果返回的信息中,有百度子域名,那么說明是百度的IP,如果無法返回,或者返回了諸

Public @ 2009-12-15 16:22:30

蜘蛛抓取有好多動態(tài)鏈接是否有影響?要怎么處理?

蜘蛛抓取動態(tài)鏈接可以影響搜索引擎的抓取和索引,因為動態(tài)鏈接可能會導致重復內(nèi)容和無效URL的存在。為了避免這種情況,建議采取以下措施: 1.合理使用參數(shù):在動態(tài)鏈接中使用參數(shù)時,確保它們是合理的,不能包含無意義的參數(shù)或重復的參數(shù)。 2.使用robots.txt文件:通過robots.txt文件來防止搜索引擎抓取某些動態(tài)鏈接。 3.使用canonical標簽:使用canonical標簽可以避免

Public @ 2023-05-31 23:50:19

哪些網(wǎng)站垃圾蜘蛛可以屏蔽?屏蔽無流量搜索引擎抓取

網(wǎng)站做的越大,蜘蛛越多??墒怯袝r候會發(fā)現(xiàn):網(wǎng)站被各種搜索引擎的蜘蛛抓的服務器都快崩潰了,嚴重的占用了服務器的資源。這個時候要怎么辦呢?百度蜘蛛:Baiduspider谷歌蜘蛛:Googlebot360蜘蛛:360SpiderSOSO蜘蛛:Sosospider神馬蜘蛛:YisouSpider微軟必應: BingBot在國內(nèi),我們不要把這幾個蜘蛛使用robots.txt屏蔽就可以了,至于其他的,都可以

Public @ 2020-10-09 16:22:29

蜘蛛抓取過程中涉及的網(wǎng)絡(luò)協(xié)議有哪些

搜索引擎通過站長們提供資源,來滿足用戶的搜索需求,而站長通過搜索引擎將網(wǎng)站的內(nèi)容傳播出去,獲得有效的流量和用戶。蜘蛛在抓取過程中雙方都要遵守一定的規(guī)范,便于搜索引擎抓取,不要使用過多對搜索引擎不友好的元素。蜘蛛抓取過程中涉及的網(wǎng)絡(luò)協(xié)議有以下四種:1、HTTP協(xié)議HTTP是超文本傳輸協(xié)議,在互聯(lián)網(wǎng)上被廣泛應用的一種網(wǎng)絡(luò)協(xié)議,客戶端和服務器端請求和應答的標準。用戶通過瀏覽器或蜘蛛等對指定端口發(fā)起一個請

Public @ 2012-07-29 16:22:31

更多您感興趣的搜索

0.525617s