上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页
摘要: > a = system("ls aaaaa;echo $?", intern = TRUE)ls: 无法访问aaaaa: 没有那个文件或目录> a[1] "2" 更多:https://stat.ethz.ch/R-manual/R-devel/library/base/html/system.ht 阅读全文
posted @ 2021-04-26 11:54 船长博客 阅读(586) 评论(0) 推荐(0)
摘要: Linux meld命令比较两个文件的内容是否相同 meld 是一款图形化的文本比较编辑工具,适合不同版本文件的合成。 安装: sudo apt-get install meld 比较文件: meld a.py b.py 阅读全文
posted @ 2021-04-25 20:22 船长博客 阅读(450) 评论(0) 推荐(0)
摘要: 查看端口被哪个进程占用:netstat -tnulp | grep 8080tcp 2 0 192.168.1.2:8080 0.0.0.0:* LISTEN 859048/node -t这里是tcp,其它选项,参考netstat --help查看哪个程序占用启动了该进程ps -aux | grep 阅读全文
posted @ 2021-04-21 11:52 船长博客 阅读(382) 评论(0) 推荐(0)
摘要: 构造一个dataframe import org.apache.spark.sql._ import org.apache.spark.sql.types._ val data = Array(List("Category A", 100, "This is category A"), List(" 阅读全文
posted @ 2021-04-13 19:48 船长博客 阅读(1304) 评论(0) 推荐(1)
摘要: 思路:从s1的第0位开始切片len(s2)个字符串进行比较,相同则计数加1,依次后移,直到最后. def search_substr(s1, s2): if len(s2) > len(s1): return 0 cnt = 0 for i in range(len(s1)): print(i) t 阅读全文
posted @ 2021-04-08 19:44 船长博客 阅读(675) 评论(0) 推荐(0)
摘要: git log #查看commit id git reset --hard 74b6210ec0b #这里是commit id git push -f # 强制推上去 阅读全文
posted @ 2021-04-06 18:29 船长博客 阅读(608) 评论(0) 推荐(0)
摘要: 问题原因:使用存储的旧账户访问新的git仓库 1. Linux 检查~/.git-credentials 修改或删除其中的旧的账户密码,新打开命令行窗口重新push 2. MAC 是cmd + space 搜索钥匙串访问,找到github能看到保存的账户和密码 3. WINDOWS 控制面板->所有 阅读全文
posted @ 2021-04-06 18:26 船长博客 阅读(524) 评论(0) 推荐(0)
摘要: def getString(aString): restult = '' substr = '' for i in range(len(aString)): if aString[i] in substr: if len(substr) > len(restult): restult = subst 阅读全文
posted @ 2021-04-04 13:11 船长博客 阅读(253) 评论(0) 推荐(0)
摘要: 方法一: $ for i in `ls -B` for> do for> fn=${i%.log} for> mv $fn.log $fn.error for> done $ ls abc.error 方法二: $ ls *.error | sed -r -n 's/(.*)error/mv & \ 阅读全文
posted @ 2021-03-29 19:34 船长博客 阅读(151) 评论(0) 推荐(0)
摘要: 查找出那些已经删除但是继续占用内存空间的文件: lsof -n | grep deleted 或者直接查找删除的大文件 lsof -n | grep deleted |grep debug rsyslogd 5154 root 7w REG 8,3 94263283712 6030228 /var/ 阅读全文
posted @ 2021-03-29 19:32 船长博客 阅读(2437) 评论(0) 推荐(1)
摘要: lsof error.log 杀掉进程 kill -9 17636 阅读全文
posted @ 2021-03-29 19:26 船长博客 阅读(1296) 评论(0) 推荐(1)
摘要: 查找rserver安装的位置: $ which rserver /usr/lib/rstudio-server/bin/rserver 检查rserver所属用户:(如果当前用户没有rserver执行权限,启动后会报Error occurred during transmission错误) $ ll 阅读全文
posted @ 2021-03-29 19:24 船长博客 阅读(1797) 评论(0) 推荐(0)
摘要: 查看linux版本: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal 查看内核版本: 阅读全文
posted @ 2021-03-29 19:22 船长博客 阅读(368) 评论(0) 推荐(0)
摘要: du -hs * | sort -hr | head 70M chapter04 30M chapter02 580K chapter03 48K chapter06 48K chapter01 36K chapter05 16K README.md 8.0K chapter07 0 require 阅读全文
posted @ 2021-03-25 19:51 船长博客 阅读(5195) 评论(0) 推荐(1)
摘要: Cast(字段名 as 转换的类型),其中类型可以为: BINARY[(N)]CHAR[(N)]DATEDATETIMEDECIMAL[(M[,D])]SIGNED [INTEGER]TIMEUNSIGNED [INTEGER] 用法: SELECT CAST(ctime AS char) as n 阅读全文
posted @ 2021-03-12 19:53 船长博客 阅读(1410) 评论(0) 推荐(1)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页
永远相信美好的事情即将发生!