单表查询的语法 关键字的执行优先级(重点) 优先级顺序 1.找到表:from 2.拿着where指定的约束条件,去文件/表中取出一条条记录 3.将取出的一条条记录进行分组group by,如果没有group by,则整体作为一组 4.将分组的结果进行having过滤 5.执行select 6.去重 ...
分类:
数据库 时间:
2018-05-10 15:35:16
阅读次数:
182
先声明,本人菜鸟一个,写博客是为了记录学习的过程,以及自己的理解和心得,可能有的地方写的不好,希望大神指出。。。 抛出问题 给定一个文本串test_str(被匹配的字符串)和模式串pat_str(需要从文本串中匹配的字符串),从文本串test_str中找出模式串pat_str第一次出现的位置,没有的 ...
分类:
编程语言 时间:
2018-05-09 20:51:43
阅读次数:
217
好久没写kmp都不会写了…… 开两个栈,s存当前串,c存匹配位置 用t串在栈s上匹配,栈每次入栈一个原串字符,用t串匹配一下,如果栈s末尾匹配了t则弹栈 cpp include include include using namespace std; const int N=1000005; int ...
分类:
其他好文 时间:
2018-05-09 12:10:32
阅读次数:
109
1.3.6 匹配多个字符串(2018-05-08) 我们在正则表达式 bat|bet|bit 中使用了择一匹配(|)符号。如下为在 Python中使用正则表达式的方法。 运行结果:肯定是成功匹配到对象 运行结果:对于‘blt’没有匹配,所以结果肯定是匹配失败的 运行结果:不能匹配字符串,所以肯定是匹 ...
分类:
编程语言 时间:
2018-05-08 16:41:35
阅读次数:
272
数据加密处理: package MD5; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; i ...
分类:
其他好文 时间:
2018-05-07 21:09:54
阅读次数:
196
【原理】 (1)next数组原理 (2)特殊情况的处理(巧妙增设哨兵) (3)递推法构造next[]表 【实现代码】 #include<iostream> #include<cstdio> #include<cstring> using namespace std; const int maxn = ...
分类:
编程语言 时间:
2018-05-05 21:13:14
阅读次数:
207
[抄题]: Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. The matching should cover the e ...
分类:
其他好文 时间:
2018-05-05 10:22:46
阅读次数:
169
原文:https://mp.weixin.qq.com/s/rbaPmBejID8-rYui35Snrg 学习任何算法都要了解该算法解决什么问题?我们看看KMP算法主要解决什么问题。我们举一个例子,已知字符串1(ABCABBABAABBA)中查找字符串2(ABCAAB)是否存在,如果存在,字符串2在 ...
分类:
编程语言 时间:
2018-05-02 21:10:57
阅读次数:
178
一、简单的模式匹配算法(BF) 思路如下: Java实现: C++实现: include include using namespace std; int indexBF(string S, string T){ if (S.size() ...
分类:
其他好文 时间:
2018-05-01 20:33:30
阅读次数:
131
题目描述: Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when ...