3. Longest Substring Without Repeating Characters Medium 7205424Add to ListShare Given a string, find the length of the longest substring without repe ...
分类:
其他好文 时间:
2019-12-25 12:53:25
阅读次数:
75
编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 1: 输入: ["flower","flow","flight"]输出: "fl"示例 2: 输入: ["dog","racecar","car"]输出: ""解释: 输入不存在公共前缀。说明: 所有输入 ...
分类:
其他好文 时间:
2019-12-23 00:10:40
阅读次数:
107
取文件短名称: shortname= Path.GetFileNameWithoutExtension(filename); 无扩展名 shortname = filename.Substring(filename.LastIndexOf('\\') + 1); 有扩展名 取执行文件路径: stri ...
给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。 '.' 匹配任意单个字符'*' 匹配零个或多个前面的那一个元素所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。 说明: s 可能为空,且只包含从 a-z 的小写字母。p 可能为空,且只包含从 ...
分类:
其他好文 时间:
2019-12-14 20:46:33
阅读次数:
96
let str = 'abcdef'; // 0 str = str.slice(0);//返回整个字符串 abcdef str = str.substring(0);//返回整个字符串 abcdef str = str.substr(0);//返回整个字符串 abcdef // 使用一个参数 st ...
分类:
其他好文 时间:
2019-12-14 11:51:00
阅读次数:
85
需改变form中的enctype="multipart/form-data"和提交方式必须为"post" <form action="/reg_login/RegistServlet" method="post" enctype="multipart/form-data"> 数据的接收: // 定义 ...
分类:
Web程序 时间:
2019-12-10 00:56:26
阅读次数:
147
原题链接在这里:https://leetcode.com/problems/swap-for-longest-repeated-character-substring/ 题目: Given a string text, we are allowed to swap two of the charac ...
分类:
其他好文 时间:
2019-12-08 10:58:19
阅读次数:
129
传送门 题意: 给你K个模式串, 然后,再给你 n 个字符, 和它们出现的概率 p[ i ], 模式串肯定由给定的字符组成。 且所有字符,要么是数字,要么是大小写字母。 问你生成一个长度为L的串,不包含任何模式串的概率是多少。 解: 记忆化搜索 + AC自动机。 对模式串建一个AC自动机, 不需要l ...
分类:
其他好文 时间:
2019-12-08 01:03:06
阅读次数:
92
认证:登录和认证是 两个概念,比如你两周、一个月,可能只登录了一次,但认证却是每次访问都要经过的步骤。 对于图中的认证不成功,也要继续处理,这个我觉得得看业务,比如管理系统,不登录就不让你访问,但对于比如电商的商品信息,不登录,也是可以访问的。 一、写一个用户注册服务 数据库user表: User类 ...
分类:
编程语言 时间:
2019-12-07 20:55:54
阅读次数:
112
1 自定义 多语言加载 ,加载中间件 2. IStringLocalizer 3 IStringLocalizerFactory 4 HomeController 5 view ...
分类:
编程语言 时间:
2019-12-06 19:52:49
阅读次数:
110