有时我们有一个带着文件名的路径如“/home/user/file.py” 我们不要“/file.py”,只要“/home/user”这个路径。 我想到的办法 1.用.rfind()和.replace() 注意:.rfind("/")是指从字符串最后开始查找找到第一个“/”的位置,也就是该字符串最后一 ...
分类:
编程语言 时间:
2021-04-21 12:30:42
阅读次数:
0
环境: 服务器 CentOS6.7 + git(version 1.7.1) 客户端 Windows7 + git(version 2.8.4.windows.1) 1.安装 Git #yum install -y git 安装完后,查看 Git 版本 [root@localhost ~]# git ...
分类:
系统相关 时间:
2021-04-21 12:29:49
阅读次数:
0
Spring Boot:The field file exceeds its maximum permitted size of 1048576 bytes. 解决方法一: 根据spring boot 版本不同在application文件添加不同的配置 Spring Boot 1.3 或之前的版本: ...
分类:
编程语言 时间:
2021-04-21 11:47:02
阅读次数:
0
#文件操作 #打开一个文件: # open("文件名","打开模式") # with open("文件名",'打开模式") as 给文件定义变量名: #文件方法: # file.closes() 关闭文件 # file.closed 判断文件是否关闭 # file.seek(移动字节数) 以字节形式 ...
分类:
其他好文 时间:
2021-04-20 15:37:39
阅读次数:
0
一、词频统计: 1.读文本文件生成RDD lines lines = sc.textFile('file:///home/hadoop/word.txt') 2.将一行一行的文本分割成单词 words flatmap() words=lines.flatMap(lambda line:line.sp ...
分类:
其他好文 时间:
2021-04-20 15:02:06
阅读次数:
0
微信搜索??「程序员小熊」,关注这个写干货的程序员,回复「算法」或「python」,即可获取经典算法或 python 电子书籍~ ...
分类:
其他好文 时间:
2021-04-20 14:42:03
阅读次数:
0
1.simple_php ?<?php show_source(__FILE__); include("config.php"); $a=@$_GET['a']; $b=@$_GET['b']; if($a==0 and $a){ echo $flag1; } if(is_numeric($b)){ ...
分类:
其他好文 时间:
2021-04-20 14:34:36
阅读次数:
0
一、词频统计: 读文本文件生成RDD lines lines=sc.textFile("file:///usr/local/spark/mycode/rdd/word.txt") lines.foreach(print) 将一行一行的文本分割成单词 words flatmap() words=lin ...
分类:
其他好文 时间:
2021-04-20 14:04:55
阅读次数:
0
生成RSA密钥 1. 制作密钥对 [root@host ~]$ ssh-keygen <== 建立密钥对 Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): ...
分类:
系统相关 时间:
2021-04-19 15:54:27
阅读次数:
0
通过nginx -t获得 nginx=`nginx -t 2>&1 | grep configuration` if [ ! -z "$nginx" ];then nginxtmp="${nginx#*file}" nginxf="${nginxtmp%test*}" echo $nginxf fi ...
分类:
系统相关 时间:
2021-04-19 15:38:16
阅读次数:
0