上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 70 下一页
摘要: 迁移。 如果 你的 云 系统 正在 使用 共享 存储, 使用 nova live- migration 命令 就可以。 首先, 要 获得 需要 被 迁移 的 实例 列表: # nova list --host c01. example. com --all- tenants 接下来, 把 它们 一个 阅读全文
posted @ 2018-06-05 21:35 littlevigra 阅读(288) 评论(0) 推荐(0)
摘要: 查询用户对应主机 mysql> select a.display_name instnace from nova.instances a, keystone.user b where b.id=a.user_id and a.vm_state in ('active', 'building', 's 阅读全文
posted @ 2018-06-04 15:26 littlevigra 阅读(343) 评论(2) 推荐(0)
摘要: 2、用python实现统计一篇英文文章内每个单词的出现频率,并返回出现频率最高的前10个单词及其出现次数,并解答以下问题?(标点符号可忽略) (1) 创建文件对象f后,解释f的readlines和xreadlines方法的区别? (2) 追加需求:引号内元素需要算作一个单词,如何实现? cat /r 阅读全文
posted @ 2018-06-01 16:30 littlevigra 阅读(1344) 评论(3) 推荐(0)
摘要: #!/usr/bin/python#5!+4!+3!+2!+1! #give 3 return 3*2*1def jiechen(n): N = map(lambda x:x+1,range(n)) f = reduce(lambda x,y:x*y,N) return f #give 5 retu 阅读全文
posted @ 2018-05-31 11:39 littlevigra 阅读(226) 评论(3) 推荐(0)
摘要: #python3 #product new data into the queue #comsume data from the queue from queue import Queue import time , threading class product_data(threading.Th 阅读全文
posted @ 2018-05-27 16:35 littlevigra 阅读(267) 评论(1) 推荐(0)
摘要: join() 在调用结束前,主线程不会结束 不加的话,主线程会在子线程结束前继续执行(并行);加了join(),主线程会等待子线程结束后在继续执行下去(串行) #python3 #main print number ,stop after son thread stop #son thread pr 阅读全文
posted @ 2018-05-26 11:05 littlevigra 阅读(178) 评论(1) 推荐(0)
摘要: 报错: com.cloud.exception.ResourceUnavailableException: Resource [DataCenter:1] is unreachable: Unable to apply dhcp entry on router at com.cloud.networ 阅读全文
posted @ 2018-05-24 17:46 littlevigra 阅读(273) 评论(0) 推荐(0)
摘要: 所谓工厂函数就是指这些内建函数都是类对象(实际上是类), 当你调用它们时,实际上是创建了一个类实例。 type():查看类型 阅读全文
posted @ 2018-05-24 17:01 littlevigra 阅读(696) 评论(0) 推荐(0)
摘要: 1.rsync -avz 172.16.2.61:~/vs/program/elasticsearch-5.0.0 --exclude=elasticsearch-5.0.0/data/* ./ 从其他节点的机器拷贝elasticsearch目录并忽略data目录 2、备份后直接压缩写入磁盘 备份m 阅读全文
posted @ 2018-05-23 15:10 littlevigra 阅读(167) 评论(2) 推荐(0)
摘要: 异常信息的获取对于程序的调试非常重要,可以有助于快速定位有错误程序语句的位置。 这里获取异常(Exception)信息采用try...except...程序结构。如下所示: Python中获取异常(Exception)信息 - klchang - 博客园https://www.cnblogs.com 阅读全文
posted @ 2018-05-22 00:07 littlevigra 阅读(8731) 评论(1) 推荐(0)
上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 70 下一页