01 2021 档案
摘要:Oracle的体系结构大体上分为两部分: Instance(实例) 和 Database(数据库) 。 如图1所示: 图1 Oracle 数据库体系结构 我们平时说的 Oracle Server (Oracle服务器)就是由 Oracle Instance 和 Oracle Database 组成的
阅读全文
摘要:原因:pip源超时了,安装不上 pip install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技
阅读全文
摘要:[oracle@unspaydb1 ~]$ toptop - 10:16:52 up 263 days, 23:42, 6 users, load average: 13.11, 10.55, 8.19Tasks: 1111 total, 7 running, 1103 sleeping, 0 st
阅读全文
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- import json numbers = [2,3,4,7,11,13] filename = 'numbers.json' with open(filename,'w') as f: json.dump(numb
阅读全文
摘要:使用 try-except代码块来处理异常。
阅读全文
摘要:人生苦短,我用Python 博客园精华区01-15 23:46 (一)认识Python Python背景介绍 Python的格言: Life is short,use python. (人生苦短,我用Python。) 由Guido van Rossum于1989年圣诞节为打发无聊时间,而开发的一个新
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 lst = ['hongkong','xiantyk','chinat','guangdong','z'] lst2 = [] lst3 = [] lst4 = [] def get_num(): for i in
阅读全文
摘要:#(1)临时关闭swap分区, 重启失效; swapoff -a #(2)永久关闭swap分区 sed -ri 's/.*swap.*/#&/' /etc/fstab 也可以在sysctl.conf中进行限制。 vm.swappiness=10
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 class Car: """一次模拟汽车的简单尝试""" def __init__(self,make,model,year): """初始化汽车的属性""" self.make = make self.model
阅读全文
摘要:① 物理CPU 实际Server中插槽上的CPU个数 物理cpu数量,可以数不重复的 physical id 有几个 ② 逻辑CPU Linux用户对 /proc/cpuinfo 这个文件肯定不陌生. 它是用来存储cpu硬件信息的 信息内容分别列出了processor 0 – n 的规格。这里需要注
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 class Dog: """一次模拟小狗的简单尝试""" def __init__(self,name,age): """初始化属性名字和年龄""" self.name = name self.age = age
阅读全文
摘要:导入整个模块: import 模块名 导入特定函数: from module_name import function_name 通过逗号可以分割函数名,如果需要导入多个则 from a import b,c,d,e View Code
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 def make_pizza(*toppings): print("\nmaking a pizza with the following toppings:") for topping in toppings:
阅读全文
摘要:此时测试表中有7条数据,做个全备。 全备: mongodump --host=192.168.43.43 --port=37017 --oplog --out=/opt/mongo/fullbackup 在插入一条: 此时做增备,找出oplog中最近新增数据的ts时间:并记录下这个时间:157484
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 def describe_pet(type,name): print(f"i have a {type};") print(f"my {type}'s name is {name}!") describe_pet(
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 def describe_pet(type,name): print(f"i have a {type};") print(f"my {type}'s name is {name}!") describe_pet(
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 def user(username): """显示用户名""" print(f"hello,{username.title()}!") user("tiger")
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 a = 1 while a <= 6: print(a) a = a + 1 #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 a = 1 while a <= 6: a = a
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 number = input("please enter a number:") number=int(number) if number % 2 ==0: print(f"the number {number}
阅读全文
摘要:函数 input() 让程序暂停运行,等待用户输入值,之后再把值赋给变量,输出.
阅读全文
摘要:free是完全没有占用的空闲内存,Available 减 free是操作系统为了优化运行速度拿来调用的内存, 程序需要的话操作系统会进行释放。所以一般看Available即可。 free+buffer+cache
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 age=12 if age<4: price=0 elif age<18: price=40 elif age>66: price=40 else: price=20 print(f"your admmssion
阅读全文
摘要:#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 cars=['audi','bmw','toyota','subaru'] for car in cars: if car == 'bmw': print(car.upper()) else: print(car.
阅读全文