题目一 代码实现 1 package class_03; 2 3 public class Code_07_ReverseList { 4 5 public static class Node { 6 public int value; 7 public Node next; 8 9 public ...
分类:
编程语言 时间:
2020-02-12 13:16:11
阅读次数:
70
今天把之前遗漏的内容补上,关于python字符串的基本操作 name="my \tname is {name},and I am {year} old"print(name)print(name.capitalize())print(name.count("n"))#查看字符数量print(name ...
分类:
编程语言 时间:
2020-02-11 14:48:36
阅读次数:
58
//传入一个数组进行p和一个以什么进行分割的str,返回切片后的值 void split(char * p,char * str){ char chQuery[10]; int i = 0, j = 0; char tmp[32][32] = {0}; char *p1 = (char *)mall ...
分类:
编程语言 时间:
2020-02-11 14:46:43
阅读次数:
96
词频统计: textFile包含了多行文本内容: textFile.flatMap(line => line.split(” “))会遍历textFile中的每行文本内容,当遍历到其中一行文本内容时,会把文本内容赋值给变量line,并执行Lamda表达式line => line.split(” “) ...
分类:
其他好文 时间:
2020-02-11 09:32:45
阅读次数:
65
网页交互效果的实现 滚动条高度的获取以及设置:document.body.scrollTop || document.documentElement.scrollTop .split() 把字符串分割成数组 .join() 把数组转为字符串 .replace( /\s+/g, " ") 正则全局替换 ...
分类:
其他好文 时间:
2020-02-10 18:23:24
阅读次数:
67
1 from sklearn import tree,datasets 2 from sklearn.model_selection import train_test_split 3 wine=datasets.load_wine() 4 X,y=wine.data[:,:2],wine.targ ...
分类:
其他好文 时间:
2020-02-10 13:52:59
阅读次数:
67
ALTER function [dbo].[GetStr]( @str varchar(1024), --要分割的字符串 @split varchar(10), --分隔符号 @index int --取第几个元素 ) returns varchar(1024) as begin declare @ ...
分类:
其他好文 时间:
2020-02-10 11:35:41
阅读次数:
45
如何通过Python读取文本,分割符号为逗号、空格,怎么操作?with open("housing.csv") as f: f.read().split(", ")如何通过pandas读取数据read_csv(filename, name=name, sep=" ")读取数据后,如何查看数据前几行d ...
分类:
其他好文 时间:
2020-02-10 11:26:18
阅读次数:
74
直接上代码: import jieba import pandas as pd import re from collections import Counter if __name__=='__main__': filehandle = open("news.txt", "r",encoding= ...
分类:
其他好文 时间:
2020-02-10 09:43:43
阅读次数:
80
python正则表达式模块,拆分字符串, re.split()eg:s = '1, 2, 3, 4' 拆分组成数字list:strs = re.split(', ', s); print(strs); 结果:['1', '2', '3', '4'] 转成int行list:strs = list(ma ...
分类:
编程语言 时间:
2020-02-08 19:21:34
阅读次数:
102