Daily Scrum6

今天我们小组开会内容分为以下部分:

      part 1: Anti-spam and anti-abuse module模块总结;

      part 2: 部分优化代码的展示于交流;

      part 3:针对用户积分模块的任务分配;

◆Part 1


      Anti-spam and anti-abuse module模块的优化我们已经完成了一大部分,但由于无法打开UI工程,所以测试不得不延迟进行,整合与连接工作也在进行中,通过这一模块的优化,我们分工越来越明确,合作也越来越默契了。

◆Part 2


 以下是我们优化的部分代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Collections;
using System.Text.RegularExpressions;
namespace do_regex
{
    class Program
    {
        static void Main(string[] args)
        {
            List<string> name = new List<string>();
            string[] mingan = { "赵骞" };//从数据库获取敏感词数组
            name.AddRange(mingan);//将敏感词加入name
            string source = " 陈大伟曲乐黄剑锟龚少波周辰光赵 骞";//source暂假设为用户搜索的字符串
            source = source.Replace(" ", "");//过滤搜索字符串中的空格
            /*string b = "";
            string a = "asdf asdfasdf asdf";
           foreach (char c in a.ToCharArray(0, a.Length))
            {
                if (c != Convert.ToChar(" "))
                {
                    b += c;
                }
            }
            Console.Write(a);*/
            foreach (string tmp in name)//对于每一个敏感词进行匹配
            {
                Regex regex = new Regex(tmp, RegexOptions.IgnoreCase);
                if (regex.IsMatch(source))
                {
                    Console.WriteLine("字符串中包含有敏感词");
                    Console.ReadLine();
                }
            }
        }
    }
}

      这个代码只是我们的单独测试部分,设置了一些敏感词,能够正常运行,并且能够滤过敏感词中的特殊符号,例如fuck是敏感词,那么我们认为f-u-c-k也是敏感词,这个是我们优化的一个方面,我们还新增了用户举报敏感词这一模块,使得敏感词的范围变的更加灵活。

◆Part 3


      结束了Anti-spam and anti-abuse module模块,我们进入用户积分模块,现将任务分配如下:

       

小组成员 明日任务
周辰光 阅读用户积分模块代码
彭佟 为用户积分模块写注释
顾泽鹏 写用户积分模块新增功能
黄剑锟 为用户积分模块写优化代码
孙时 美化用户积分模块界面
赵骞 参与模块的整合与连接
龚少波 写用户积分模块优化文档中的优化目标部分
原文地址:https://www.cnblogs.com/ruanjiangc/p/3407198.html