- 博客(22)
- 资源 (1)
- 收藏
- 关注
原创 String容器C++
// 创建String#include<string>string str;string str2 = "abc";str = str2;string str3(6, "a"); // str3="aaaaaa"string str4 = "abcde"string str5;str5.assgin(str4, 3); // str5 = "abc"string str6;str6.assgin(str4, 2, 3) // str6 = "cde".
2020-05-18 08:08:36
146
原创 遍历int、对象数组
int array[5] = [1,2,3,4,5]int *p = array // 指向数组首地址 &array[0]// 1for(int i = 0; i<5; i++) { cout << array[i] << endl;}// 2for (int i = 0; i<5; i++) { cout << *(p++) << endl;}// 3#include<vector>.
2020-05-17 20:42:20
1220
转载 C语言中关于const int和int const,const int *和int const *,int *const的理解
原文连接:https://blog.youkuaiyun.com/qq_33575901/article/details/98659122
2020-05-17 16:18:04
371
原创 spark计算总和,mapValues、欧氏距离、filter用法
计算文件中男性身高最大值取出身高最高的女性信息计算文件中第二列数字的平均值返回出现频次最高的前三个单词或者=====》返回文件中一组数字的中位数将第一列作升序排序,第二列作降序排序这样运行会报 未序列化错误,需要在Ssort类...
2020-04-20 08:33:05
917
原创 学习scala的List基本的声明和使用
/*** 学习scala的List基本的声明和使用* 知识点* 1.List分为定长和变长* Array和List通用而且重要的方法:* 1.take* 2.takRight* 3.drop* 4.dropRight* 5.head* 6.last* 7.max* 8.min* 9.sum* 10.distinct(去重)* 11.fo...
2020-04-18 14:29:59
448
原创 教育大系统后台搭建文档
搭建开始创建数据库表字段在主包下创建数据库表相关包pojo,在包下创建相关类,比如:Category表,即按照表字段写入代码: import lombok.Data;import java.util.Date;@Datapublic class Category { private Integer id; private Integer parentId;...
2020-04-08 16:04:37
272
原创 linux中sqoop从mysql中传输数据遇到如下问题 :
linux中sqoop从mysql中传输数据遇到如下问题 :19/02/10 10:50:34 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Cannot initialize Cluster. Please check your configuration...
2020-04-04 23:45:36
189
原创 关于引擎tez遇到的问题,十分痛心!!!
当执行bin/hive时,报错(主要):Container killed on request. Exit code is 143Container exited with a non-zero exit code 143Failing this attempt. Failing the application. at org.apache.tez.client.TezClien...
2020-04-03 21:58:03
1973
1
原创 如果hadoop被重新格式化,那么datanode会找不到namenode的集群id,解决办法
进入路径hadoop-xx.xx/data/tmp/dfs/这里边应该有个data文件,里面存放了datanode日志,将其删除,即 rm -rf data,重新执行 hadoop-daemon.sh start datanode再输入jps,就可以看到创建的datanode了...
2020-03-31 19:04:10
433
原创 虚拟机配置后打不开Hadoop:50070
因为在win下没有配置映射,需要进入文件夹C:\Windows\System32\drivers\etc的hosts文件下,在最后一行添加你所需要映射的主机名和ip比如:192.168.111.131 hadoop...
2020-03-28 20:42:15
831
原创 selenium设置代理IP
设置代理ip:有时候频繁爬取一些网页。服务器发现你是爬虫后会封掉你的ip地址。这时候我们可以更改代理ip。更改代理ip,不同的浏览器有不同的实现方式。这里以Chrome浏览器为例来讲解:from selenium import webdriveroptions = webdriver.ChromeOptions()options.add_argument("--proxy-serv...
2020-03-27 17:02:12
3707
原创 selenium中的切换页面
selenium中的切换页面:有时候窗口中有很多子tab页面。这时候肯定是需要进行切换的。selenium提供了一个叫做switch_to_window来进行切换,具体切换到哪个页面,可以从driver.window_handles中找到。示例代码如下:# 打开一个新的页面self.driver.execute_script("window.open('"+url+"')")# 切换...
2020-03-27 16:54:46
353
原创 Selenium中的Cookie操作:
Selenium中的Cookie操作:获取所有的cookie: for cookie in driver.get_cookies(): print(cookie) 根据cookie的key获取value: value = driver.get_cookie(key) 删除所有的cookie: driver.delete_all_cookies()...
2020-03-27 16:40:07
133
原创 selenium的行为链
from selenium import webdriverfrom selenium.webdriver.common.action_chains import ActionChains# chromedriver的绝对路径driver_path = r'D:\chromedriver_win32\chromedriver.exe'# 初始化一个driver,并且指定chromed...
2020-03-27 16:28:34
360
原创 selenium安装出错解决办法
selenium包安装出错,出错提示如下,反正就是一大堆:需要进入python文件夹下:添加文件sitecustomize.py , 内容如下:import syssys.setdefaultencoding('gb2312')然后重启cmd, 再次运行pip install selenium, 即可成功!...
2020-03-27 15:43:12
1432
1
原创 使用matplotlib绘制直方图
使用matplotlib绘制直方图from matplotlib import pyplot as pltx = range(2, 26, 2)y = [15, 13, 14, 5 ,17, 20 ,25, 26, 26, 24, 22, 18, 15]plt.plot(x,y)plt.show()然后系统报错说x和y 不在一个维度,是因为y列表多了一个值,去掉即可生...
2020-03-27 06:49:58
266
原创 2019/11/21
2019/11/21八皇后redis的数据结构今天学了算法(八皇后\回溯法),redis的新的数据结构八皇后int max=8;int[] array=new int[max];/* * check函数放置皇后 * */public void check(int t){ if(t==max){ print(); return; } for(int i=0;i&...
2019-11-21 22:10:46
99
原创 IDEA报错java.sql.SQLException: The server time zone value '?й???????' is unrecognized or represents mo
进入数据库,设置时区时间吧好像,反正执行一行命令,叫set global time_zone=’+8:00’;显示执行成功了,就行了。
2019-10-05 12:48:20
286
原创 关于springboot中的前端页面传值出现乱码
关于springboot中的前端页面传值出现乱码将java文件的file-encoding改变为GBK,选择后点击“convert”即可。“针对 IDEA有效”
2019-10-04 20:52:21
1372
原创 redis make安装出错
redis make安装出错如果make出错, 那么在make后加上这一串,“make CFLAGS="-march=x86-64"
2019-10-04 13:03:00
318
jxl-2.6.jar
2018-03-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人