709. To Lower Case Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Example 2: E ...
分类:
其他好文 时间:
2018-12-21 21:18:17
阅读次数:
179
Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati ...
分类:
其他好文 时间:
2018-12-21 13:16:09
阅读次数:
214
#python版本3.7 import re, collections #将语料库里的单词全部转换为小写def words(text): return re.findall('[a-z]+', text.lower()) #词频统计def train(features): model = colle ...
分类:
其他好文 时间:
2018-12-20 22:14:53
阅读次数:
227
Given a sorted integer array nums, where the range of elements are in the inclusive range [lower, upper], return its missing ranges. 这题应该是实现的细节处理,最大整数 ...
分类:
其他好文 时间:
2018-12-19 01:13:27
阅读次数:
152
一、算法介绍https://www.cnblogs.com/love528/p/10125089.html 二、实现过程 实验步骤 (1)收集数据:提供文本文件。 (2)准备数据:将文本文件解析成词条向量。 (3)分析数据:检查词条确保解析的正确性。 (4)训练算法:计算不同的独立特征的条件概率。 ...
分类:
编程语言 时间:
2018-12-17 20:12:07
阅读次数:
265
information_schema系列四(跟踪,列约束,表和列) 这个系列的文章主要是为了能够让自己了解MySQL5.7的一些系统表,统一做一下备注和使用,也希望分享出来让大家能够有一点点的受益。 1:KEY_COLUMN_USAGE 按照官方的解释,这个表描述的是关于有约束的列。也就是没有约束的 ...
分类:
其他好文 时间:
2018-12-15 18:48:43
阅读次数:
186
不管是react还是vue,父级组件与子组件的通信都是通过props来实现的,在vue中父组件的props遵循的是单向数据流,用官方的话说就是,父级的props的更新会向下流动到子组件中,反之则不行。也就是说,子组件不应该去修改props。但实际开发过程中,可能会有一些情况试图去修改props数据: ...
分类:
Web程序 时间:
2018-12-14 17:35:20
阅读次数:
203
Python简单字符串函数形式介绍 1.capitalize() 首字母大写变化 2.lower() / upper() 字符串全变成小写/大写模式 3.casefold(): 转为小写(用途比lower更广,如可识别法语等别的语言) 4.center(数字参数,“设置插入的形式”)用途如下: a ...
分类:
编程语言 时间:
2018-12-14 17:17:40
阅读次数:
232
####################### 整理 ################# # 一、数字# int(..) # 二、字符串# replace(替换)/find/join/strip(移除)/startswith/split(分割)/upper(转换为大写的)/lower(转换为小写)/ ...
分类:
编程语言 时间:
2018-12-14 15:00:13
阅读次数:
185
基本数据类型 数字 整形 int int 将字符串转换为数字 print(type(a)) 查看是什么类型的 、 bit_length 当前数字的二进制,表示至少用几位来二进制 字符串 str capitalize作用:首字母大写 casefold 和 lower 作用:casefold 更牛逼,把 ...
分类:
编程语言 时间:
2018-12-13 01:23:15
阅读次数:
237