前言本文记录一些日常使用linux的一些点。系统负载评估理解Linux系统负荷查看 ps -ef[root@deployer ~]# ps -efUID PID PPID C STIME TTY TIME CMDroot 1 0 0 2018 ? 00:00:29 /usr/lib/systemd/... ...
分类:
系统相关 时间:
2019-12-14 09:51:47
阅读次数:
95
方法一: import sys,os os.getcwd()#然后就可以看见结果了 方法二: import os os.path.dirname(os.path.realpath('__file__'))#注意:添加单引号 python中的os.path.dirname(__file__)的使用 ( ...
分类:
编程语言 时间:
2019-12-12 13:31:41
阅读次数:
122
1 package org.test.com; 2 3 import java.sql.Connection; 4 import java.sql.Date; 5 import java.sql.DriverManager; 6 import java.sql.ResultSet; 7 import ...
分类:
数据库 时间:
2019-12-11 21:36:04
阅读次数:
111
注意:sed中调用变量是‘"$HOSTIP"‘,单引号加双引号脚本如下:#!/bin/bash##查看文件系统,并在每行添加主机名、IP#gainipHOSTIP=ipro|grepeth0|grepsrc|awk‘{print$9}‘#gainhostnamehost_name=$(hostname)tody=date+%Y%m%dpath=/
分类:
其他好文 时间:
2019-12-11 13:11:27
阅读次数:
86
var str="<>"; str=str.replace(/\'/g,"’");//替换半角单引号为全角单引号 str=str.replace(/\"/g,"”");//替换半角双引号为全角双引号 str=str.replace(/</g,"《").replace(/>/g,"》"); ...
分类:
Web程序 时间:
2019-12-10 13:10:11
阅读次数:
133
一、变量定义,访问变量 注意点: 变量名只能使用英文字母,数字和下划线,首个字符不能以数字开头,不能使用标点 中间不能加空格,如果=右边有空格,需要使用单引号或双引号 用$var 或 ${var}访问,后者更严谨 echo 直接输出 echo -n 换行/不换行输出;echo -e 输出转义字符 \ ...
分类:
其他好文 时间:
2019-12-10 11:37:51
阅读次数:
109
将__file__加上单引号就解决了: # 获取当前文件名,用于创建模型及结果文件的目录 file_name = os.path.basename('__file__').split('.')[0] 参考网址:https://blog.csdn.net/m0_37544464/article/det ...
分类:
编程语言 时间:
2019-12-09 18:50:49
阅读次数:
77
python中单引号和双引号是等效的 字符串过长需要换行时,使用\,如 helloworld\ helloworld 或者是直接使用'''(也可以用来注释),如 '''hello world''' 输出let's go的方法 >>> 'let\'s go' "let's go" >>> "let's... ...
分类:
其他好文 时间:
2019-12-08 23:40:21
阅读次数:
136
# 注释 # 单行注释 使用# 之后空一格写入内容 # 这是一个注释 print("Hello, World!") # 注释放到语句的后边 空2个格 写入# 然后空一格写入内容 print("Hello, World!") # 这是一个注释 # 单引号(''')使用单引号 ''' 这是一段注释内容 ...
分类:
编程语言 时间:
2019-12-07 16:32:48
阅读次数:
81
字符串是以单引号或双引号括起来的任意文本 创建字符串 str1 = "shaoge is a good man!" 字符串运算 字符串连接 str6 = "shaoge is a" str7 = "good man" str8 = str7 +str6 输出重复字符串 str9 = "good" s ...
分类:
其他好文 时间:
2019-12-07 12:13:20
阅读次数:
282