const http=require('http') const fs=require('fs') const path=require('path') const server=http.createServer(function(req,res){ const {url}=req console ...
分类:
Web程序 时间:
2021-05-04 15:44:00
阅读次数:
0
这里介绍两个常用的管理hadoop集群的脚本 hadoop集群启停脚本myhadoop.sh #!/bin/bash if [ $# -lt 1 ] then echo "No Args Input..." exit ; fi case $1 in "start") echo " 启动 hadoop ...
分类:
其他好文 时间:
2021-05-04 15:28:54
阅读次数:
0
Prefix and Suffix Search (H) 题目 Design a special dictionary which has some words and allows you to search the words in it by a prefix and a suffix. Im ...
分类:
其他好文 时间:
2021-05-03 12:54:25
阅读次数:
0
/* 写一个计算器,要求实现加减乘除功能, 并且能够循环接收新的数据,通过用户交互实现 分析:写四个方法加减乘除 利用循环加switch进行用户交互 传递需要操作的两个数 输出结果 */ public class Demo05 { //加法 public static double add(doub ...
分类:
编程语言 时间:
2021-05-03 12:41:29
阅读次数:
0
#!/bin/bash while read linedo echo $line txt=`echo $line |awk -F' ' '{print $1}'` id=`echo $line|awk -F' ' '{print $3}'` echo $txt echo $id sed "s/ws2 ...
分类:
系统相关 时间:
2021-05-03 12:39:24
阅读次数:
0
Mysql性能调优(三) 前言 最近的文章均是给大家介绍mysql的性能优化,前两篇文章我们分别介绍了索引的相关知识,主要包括:索引的基本概念、引用索引的优缺点、索引的底层结构、索引的分类以及应用索引的设计原则及其语法。接下来的文章又介绍了视图以及触发器,分别介绍视图以及触发器的概念、创建、修改以及 ...
分类:
数据库 时间:
2021-05-03 12:24:18
阅读次数:
0
govendor简介 golang工程的依赖包经常使用go get命令来获取,例如:go get github.com/kardianos/govendor ,会将依赖包下载到GOPATH的路径下。 常用的依赖包管理工具有godep,govendor等,在Golang1.5之后,Go提供了 GO15 ...
分类:
其他好文 时间:
2021-05-03 12:03:26
阅读次数:
0
crontab 用于设置定时任务,通过 cat /etc/crontab 可查看 crontab 示例: $ cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details s ...
分类:
其他好文 时间:
2021-05-03 11:54:27
阅读次数:
0
有时候需要做个某些服务的状态监控,用钉钉机器人发通知挺方便的。可以用shell脚本配合crontab检测状态,检测到异常就调用python脚本发起告警。 python内容 此处用的python3,需要先安装requests模块。pip install requests -i https://mirr ...
分类:
编程语言 时间:
2021-04-30 12:35:08
阅读次数:
0
11、题目要求 写一个脚本实现如下功能: 输入一个数字,然后运行对应的一个命令。 显示命令如下: *cmd meau** 1 - date 2 - ls 3 - who 4 - pwd 当输入1时,会运行date, 输入2时运行ls, 以此类推。 核心要点 case判断 参考答案 #!/bin/ba ...
分类:
系统相关 时间:
2021-04-29 12:01:03
阅读次数:
0