match

cisco 2811 Qos

社会主义新天地 提交于 2020-01-08 07:06:30
cisco 2811 Qos 一、某公司QoS策略配置实例 Current configuration : 3568 bytes ! ! version 12.2 service timestamps debug datetime service timestamps log datetime service password-encryption ! hostname xxxxxx ! enable secret 5 $1$uJPt$/Uh ! clock timezone China 8 ip subnet-zero no ip source-route ip cef ! ! ip name-server x.x.x.x ip name-server x.x.x.x ! no ip bootp server ! class-map match-any premium_class description For premium match protocol fasttrack match protocol http match protocol icmp match protocol napster match protocol netshow match protocol pcanywhere match protocol realaudio match protocol

python 正则表达式

旧巷老猫 提交于 2020-01-07 20:35:23
基本语法 # 1. 一般字符: 匹配字符的本身 print(re.match("abc","abcdefg")) print("abc" in "abcdefg") # 2 【.】 --匹配一个除\n 外所有的字符 # 需求: 三个字母,第一个是a print(re.match("^a..$","a35")) # 3 【\】 --转义字符 print(re.match("a\...","a.1#")) print(re.match("a[.]..","a.123")) print(re.match("a[.]..$","a.1#asdfasdf")) # 4 【】 --字符集中的任意一个字符 print(re.match("^a[bdc]e$","abe")) print(re.match("^a[bdc]e$","ade")) print(re.match("^a[bdc]e$","ace")) # 5 开头: ^ 结尾: $ --- 完全匹配 print(re.match("^a[bdc]f$","acf")) <re.Match object; span=(0, 3), match='abc'> True <re.Match object; span=(0, 3), match='a35'> <re.Match object; span=(0, 4), match='a.1#

匹配所有出现的正则表达式

烈酒焚心 提交于 2020-01-07 17:22:03
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 有没有一种快速的方法来查找Ruby中正则表达式的每个匹配项? 我浏览了Ruby STL中的Regex对象,并在Google上搜索都没有用。 #1楼 为了找到所有匹配的字符串,请使用 String 类的 scan 方法。 str = "A 54mpl3 string w1th 7 numb3rs scatter36 ar0und" str.scan(/\d+/) #=> ["54", "3", "1", "7", "3", "36", "0"] 如果您想使用 MatchData 作为 Regexp 类的 match 方法返回的对象的类型,请使用以下代码 str.to_enum(:scan, /\d+/).map { Regexp.last_match } #=> [#<MatchData "54">, #<MatchData "3">, #<MatchData "1">, #<MatchData "7">, #<MatchData "3">, #<MatchData "36">, #<MatchData "0">] 使用 MatchData 的好处是您可以使用 offset 方法 match_datas = str.to_enum(:scan, /\d+/).map { Regexp.last_match }

教育系统APP(三)

守給你的承諾、 提交于 2020-01-07 15:36:35
挑战任务回顾教育系统APP(二)以及教育系统APP(三) 检验登录和注册模块。请修改MainActivity和LoginActivity,欢迎界面调转入主界面后,自动跳转入登录界面,登录成功后,返回主界面,在主界面的Hello World位置显示:用户名 “登录成功”。 解决方法 解决任务看看一下AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="cn.edu.gdmec.android.boxuegu"> <!--原为android:theme="@style/AppTheme"--> <!--去除ActionBar标题栏--> <!--添加应用图标,app_icon--> <application android:allowBackup="true" android:icon="@drawable/app_icon" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="

2019 SDN大作业

二次信任 提交于 2020-01-07 15:15:27
简单的负载均衡 1.分组情况 组名:蓝蓝的大白牙 学号 姓名 贡献度 031702507 黄皓 13% 031702508 石晓楠 24% 031702511 古力亚尔 13% 031702525 周鑫煌 20% 031702532 陈聪(组长) 30% 2.作业内容 Github仓库 视频链接 3.实现关键 以如下拓扑为基础 搭建拓扑的代码如下: from mininet.topo import Topo class MyTopo( Topo ): def __init__( self ): # initilaize topology Topo.__init__( self ) # add hosts and switches host1 = self.addHost( 'h1' ) host2 = self.addHost( 'h2' ) host3 = self.addHost( 'h3' ) switch1 = self.addSwitch( 's1' ) switch2 = self.addSwitch( 's2' ) switch3 = self.addSwitch( 's3' ) # add links self.addLink(host1,switch1) self.addLink(switch1,switch2) self.addLink(switch1

2019 SDN大作业

ぐ巨炮叔叔 提交于 2020-01-07 07:54:57
视频链接 建议把清晰度调到最高 队名 不想取名 本组成员 学号 姓名 031702422 朱宏(组长) 031702419 姚彬锟 031702420 张庆焰 031702425 吴永铭 041602630 张周伟 负载均衡代码如下 # -*- coding: utf-8 -*- import httplib2 import time import json class OdlUtil: url = '' def __init__(self, host, port): self.url = 'http://' + host + ':' + str(port) def install_flow(self, container_name='default',username="admin", password="admin"): http = httplib2.Http() http.add_credentials(username, password) headers = {'Accept': 'application/json'} flow_name = 'flow_' + str(int(time.time()*1000)) #s3流表 #在检测h4发包的时候s3的1口流量空闲时发的流表 h4_to_s3_1 ='{"flow": [{"id": "0","match": {

2019 SDN大作业

☆樱花仙子☆ 提交于 2020-01-07 06:18:04
视频链接 建议把清晰度调到最高 队名 不想取名 本组成员 学号 姓名 031702422 朱宏(组长) 031702419 姚彬锟 031702420 张庆焰 031702425 吴永铭 041602630 张周伟 负载均衡代码如下 # -*- coding: utf-8 -*- import httplib2 import time import json class OdlUtil: url = '' def __init__(self, host, port): self.url = 'http://' + host + ':' + str(port) def install_flow(self, container_name='default',username="admin", password="admin"): http = httplib2.Http() http.add_credentials(username, password) headers = {'Accept': 'application/json'} flow_name = 'flow_' + str(int(time.time()*1000)) #s3流表 #在检测h4发包的时候s3的1口流量空闲时发的流表 h4_to_s3_1 ='{"flow": [{"id": "0","match": {

2019 SDN大作业

拟墨画扇 提交于 2020-01-07 03:59:03
视频链接 建议把清晰度调到最高 队名 不想取名 本组成员 学号 姓名 031702422 朱宏(组长) 031702419 姚彬锟 031702420 张庆焰 031702425 吴永铭 041602630 张周伟 负载均衡代码如下 # -*- coding: utf-8 -*- import httplib2 import time import json class OdlUtil: url = '' def __init__(self, host, port): self.url = 'http://' + host + ':' + str(port) def install_flow(self, container_name='default',username="admin", password="admin"): http = httplib2.Http() http.add_credentials(username, password) headers = {'Accept': 'application/json'} flow_name = 'flow_' + str(int(time.time()*1000)) #s3流表 #在检测h4发包的时候s3的1口流量空闲时发的流表 h4_to_s3_1 ='{"flow": [{"id": "0","match": {

使用 Python 中 re 模块对测试用例参数化,进行搜索 search、替换 sub

天大地大妈咪最大 提交于 2020-01-06 21:17:52
  参数化的目的:运行自动化测试用例的时候参数都不需要改变,直接使用封装好的类进行参数化,发起请求时直接使用替换后参数;   自动化测试用例,如果一百个接口要在Excel写100个sheet表单,每个接口有10个字段,里面有5个都可能是变化的,需要使用参数化,先试用特定的字符在用例中进行站位,在发起请求构造参数时在进行替换占位符;----------我们可以每个接口分别创建一个参数化; 一、用力中手机号的替换,以字符串中的方法,使用 replace (译:瑞破类似) 进行替换 # 原始字符串:{"mobilephone": "${not_existed_tel}", "pwd":"123456"} # json 字符串 src_str = '{"mobilephone": "${not_existed_tel}", "pwd":"123456"}' # 替换 json 字符串中 ${not_existed_tel} 为 18845820369 print(src_str.replace("${not_existed_tel}", "18845820369")) # 结果:{"mobilephone": "18845820369", "pwd":"123456"} 二、使用 re 模块进行替换   re 正则表达式,是一个查找、搜索、替换文本的一种格式语言 搜索方法一,re 模块中的

How to arrange table data differently by using if, match, and index?

扶醉桌前 提交于 2020-01-06 21:05:52
问题 As shown in the attached image, I need to convert A2:D10 to the format of A12:E17. The 4 tables from F1 to AB12 are my experiments using if, match, and index. Same formula gets different results and it seems to be dependent on the row position of the tables. In My previous question, I was trying to pinpoint the problem to the if function. What am I doing wrong here? Thanks, Lu enter image description here 回答1: Again, as I said in your last question: The formula has not been array entered.