# Author rendelei#_*_coding:utf-8_*_import osimport datetimedef fetch(data): # backend www.oldboy.org # server 100.1.7.9 100.1.7.9 weight 20 maxconn 3 ...
分类:
其他好文 时间:
2017-04-09 13:49:00
阅读次数:
267
一、项目需求 1、查询:根据输入指定域名,查看haproxy.conf配置文件内backend的详细信息 2、修改:根据输的域名和backend内的IP地址,修改每条backend的权值和最大连接数 3、增加:根据谁的域名,在该域名的backend下增加一条server记录 4、删除:根据输入的域名 ...
分类:
编程语言 时间:
2017-04-08 11:17:27
阅读次数:
257
$ sudo update-alternatives --config java Selection Path Priority Status ------------------------------------------------------------ 0 ... ...
分类:
编程语言 时间:
2017-04-06 22:20:35
阅读次数:
181
1、让我们把在上一篇教程中编写的 poll 的 detail 模板更新下,在模板中包含 HTML 的 组件: 简单的总结下: 上面的模板中为每个投票选项设置了一个单选按钮。每个单选按钮的 value 是投票选项对应的 ID 。每个单选按钮的 name 都是 “choice”。这意味着,当有人选择了一 ...
分类:
其他好文 时间:
2017-04-06 09:22:23
阅读次数:
232
作业 三级菜单程序 history =[menu] while True: for item in history[-1]: print(item) choice = input("input your choice :").strip() if choice == 'b' and len(hist ...
分类:
编程语言 时间:
2017-04-04 20:10:58
阅读次数:
194
声明:详细内容请看>这本书 这里没对自定义选择器作介绍 因为我感觉jQuery已经为我们定义足够的选择器已经满足使用 编写jquery插件 姓名性别暂住地 张山 男 浙江宁波 ... ...
分类:
Web程序 时间:
2017-04-01 11:42:44
阅读次数:
188
random 模块包含许多随机数生成器,用于生成随机数使用 random 模块获得随机数字1. random.random()用于生成一个0到1的随机符点数: 0 <= n < 1.0 import random print random.random() # 0.403805661236 2. r ...
分类:
其他好文 时间:
2017-03-31 00:06:03
阅读次数:
211
#!/usr/bin/env python#coding:utf8 count = 0while (count < 9): print 'the count is:',count count +=1 print 'good bye!' i = 1while i < 10: i +=1 if i%2 ...
分类:
其他好文 时间:
2017-03-28 19:24:19
阅读次数:
206
#!/usr/bin/envpython#coding:utf8#随机生成8位、20位、10位密码importrandomimportstringall_chs=string.letters+string.digitsdefgen_pass(num=8):pwd=‘‘#num=int(raw_input(‘numer:‘))foriinrange(num):mima=random.choice(all_chs)pwd+=mimareturnpwdif__name__==‘__main__..
分类:
编程语言 时间:
2017-03-21 13:21:25
阅读次数:
179
Scanner s = new Scanner(System.in); int choice = 0; if(s.hasNextInt()) { choice = s.nextInt(); } s.close();//关闭scanner ...
分类:
编程语言 时间:
2017-03-10 10:59:09
阅读次数:
162