如何从搜索结果中剔除不良单词 [英] how to bolock bad words from the searching result

查看:59
本文介绍了如何从搜索结果中剔除不良单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

兄弟们,我正在做我的最后一年项目,我在2012年1月20日星期五的演讲.我的系统是个人防火墙,并且我具有阻止孩子搜索不良单词的功能,并且该功能不适用于我,因此我希望您对此提供帮助.当我在系统中插入不良词时,它的工作意味着已将其保存在数据库中,但是当我打开浏览器并搜索将其插入数据库中的词时,它将出现在google结果中,我可以打开它,所以我需要将这些词插入到我的数据库中,这些词会在浏览器结果(例如Google结果)中消失.以下是我所做的代码.

Hi brothers i am doing my final year project and i have presentation on this Friday 20-1-2012. my system is personal firewall and i have function which is to block the children from searching about the bad words and this function doesn''t work with me so i want you to help me with this. when i insert the bad words in the system it''s work means it''s saved in the database but when i open the browser and i search about the word which in insert it to the database it is appear on the google result and i can open it, so i need those words i insert them to my database disappear on the browser result for example google result. below is the code which i did.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace MonitorNetwork
{
    public partial class AddWords : Form
    {
        public AddWords()
        {
            InitializeComponent();
        }

        private void AddWords_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection conn = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=MonitorNetworkDB;Integrated Security=True");
            SqlCommand cmd = conn.CreateCommand();
            cmd.CommandText = "Insert Into WordsTable (Words) Values (@Words)";

            // Fill our parameters

            cmd.Parameters.Add("@Words", SqlDbType.NVarChar, 50).Value = this.textBox1.Text;
            //cmd.Parameters.Add("@SourceMask", SqlDbType.NVarChar, 50).Value = this.txtIpMask.Text;
            //cmd.Parameters.Add("@SourcePort", SqlDbType.NVarChar, 50).Value = this.txtPort.Text;
            //cmd.Parameters.Add("@DestinatorIP", SqlDbType.NVarChar, 50).Value = this.txtIPAddress1.Text;
            //cmd.Parameters.Add("@DestinatorMask", SqlDbType.NVarChar).Value = this.txtIPMask1.Text;
            //cmd.Parameters.Add("@DestinatorPort", SqlDbType.NVarChar).Value = this.txtport1.Text;
            //cmd.Parameters.Add("@Protocol", SqlDbType.NVarChar).Value = this.comboBox1.Text;

            try
            {
                // Execute the command
                conn.Open();
                cmd.ExecuteNonQuery();
                conn.Close();

                MessageBox.Show("New Word Added Successfully!");
                textBox1.Clear();

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Clear();
        }
    }
}

推荐答案

如果您阻止孩子在互联网上说脏话,他们将会流落街头.您无法将孩子与生活隔离.但是,您可以通过教会他们,信任他们,赢得他们的信任,并通过行为来给他们正面的榜样,从而使他们成为正派的人.

没有人可以通过与坏人隔离来教育,而只有通过学习好人.

请原谅我这个完全不合主题的帖子.

—SA
If you block children from bad words in Internet, they will pick up even worse from street. You cannot isolate children from life. But you can try to raise them as decent people by teaching them, trusting them, earning their trust and giving them positive example not from your words but from your behavior.

No one can be educated by isolation from the bad, but only by learning the good.

Please forgive me for this totally off-topic post.

—SA


这篇关于如何从搜索结果中剔除不良单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆