valid和enable有valid什么意思区别

SELECT value FROM v$parameter_valid_values WHERE name = 'optimizer_features_enable';
--------------------------------------------------------------------------------
11.2.0.3.1
31 rows selected.
系统设计时应尽量避免出现left outer join, right outer join
/*+ optimizer_features_enable('10.1.0') */
SQL& show parameter optimizer
------------------------------------ ----------- ------------------------------
optimizer_capture_sql_plan_baselines boolean
optimizer_dynamic_sampling
optimizer_features_enable
optimizer_index_caching
optimizer_index_cost_adj
optimizer_mode
optimizer_secure_view_merging
optimizer_use_invisible_indexes
optimizer_use_pending_statistics
optimizer_use_sql_plan_baselines
Oracle优化器
Oracle优化器的优化方式和优化模式
没有更多推荐了,ORACLE使索引变成不可用的状态:alter index index_
执行成功后,如果后续需要再用到该索引的话,就必须重建。重建后会自动变成usable。
根据ORACLE官方文档的说法(An unusable index must be rebulit , or dropped and re-created , before it can be used.)
重建有两种方式
1. rebuild
alter index index_
2. drop掉该索引,然后再重建。
drop index index_
create index index_
实际上这两种操作的结果是一样的,都是删除再重新启用,不过rebulid方式更为快捷和简单。
另外,还有两种修改INDEX状态的语句,叫disable和
1. enable index
alter index index_
2. disable index
alter index index_
两者的区别是:enable和disable仅仅只针对函数索引。
ORACLE官方文档提供的说法是:
ENABLE Clause
Enable applies only to a function-based index that has been disabled because a user-defined function used by the index was dropped or replaced. This clause enables such an index if these conditions are true:
The function is currently valid
The signature of the current function matches the signature of the function when the index was created
The function is currently marked asDETERMINISTIC
Restriction on Enabling Function-based Indexes You cannot specify any other clauses of ALTER INDEX in the same statement with ENABLE.
DISABLE Clause
DISABLE applies only to a function-based index. This clause lets you disable the use of a function-based index. You might want to do so, for example, while working on the body of the function. Afterward you can either rebuild the index or specify another
ALTER INDEX statement with the ENABLE keyword.
UNUSABLE Clause
Specify UNUSABLE to mark the index or index partition(s) or index subpartition(s) UNUSABLE. An unusable index must be rebuilt, or dropped and re-created, before it can be used. While one partition is marked UNUSABLE, the other partitions of the index are
still valid. You can execute statements that require the index if the statements do not access the unusable partition. You can also split or rename the unusable partition before rebuilding it.
Restriction on Marking Indexes Unusable You cannot specify this clause for an index on a temporary table.
如果发现一个索引失效以后,对其使用enable命令,可能会引发ORA-02243的错误,这是由于ENABLE只针对函数索引有效,可以试试rebuild,如果对一个索引执行失效命令,也可能会遇到这个错误,原因是一样的。
因此,修改你的命令就可以啦~~
unusable index
and invisible index 的区别
Oracle alter index
disable/unusable的区别
oracle 脚本(2)-修复 status 为 unusable 的 index(ORA-01502)
Oracle index unusable和invisible的区别
oracle 索引 状态
unusable,usable ,disable,enable
Oracle索引(index)
没有更多推荐了,RIL_EnableNotifications
MSDN Library
此内容没有您的语言版本,但有英语版本。
RIL_EnableNotifications
Windows Mobile 6.5
A version of this page is also available for
This function enables additional classes of notifications for a client.
HRESULT RIL_EnableNotifications(
HRIL hRil,
DWORD dwNotificationClasses
Handle to the RIL instance returned by .
dwNotificationClasses
Specifies the classes of notifications to enable. Valid values are listed in the topic .
Positive HRESULT values indicate success and are used as command identifications for matching the asynchronous call result. Negative HRESULT values indicate an error. Errors are defined in the Ril.h file.
This function is synchronous.
Headerril.hLibraryRil.libWindows Embedded CEWindows CE .NET 4.2 and later
此页面有帮助吗?
更多反馈?
1500 个剩余字符
我们非常感谢您的反馈。H3C WP2000系列无线PoE注入器 配置指导-Release _ARP和IP攻击防御操作-新华三集团-H3C
无线PoE注入器配置配置指导
H3C WP2000系列无线PoE注入器 配置指导-Release
41-ARP和IP攻击防御操作
docurl=/cn/Service/Document_Software/Document_Center/Wlan/PoE/H3C_WP2000/Configure/Operation_Manual/H3C_WP2000_PoE_CG-Release_/462_30005_0.htm
41-ARP和IP攻击防御操作
和IP攻击防御特性配置
的ARP报文过滤配置
的ARP报文过滤功能简介
按照ARP协议的设计,网络设备收到目的IP地址是本接口IP地址的ARP报文(无论此ARP报文是否为自身请求得到的),都会将其IP地址和MAC地址的对应关系添加到自身的ARP映射表中。这样可以减少网络上过多的ARP数据通信,但也为“ARP欺骗”创造了条件。
实际网络环境,特别是校园网中,最常见的ARP攻击方式是“仿冒网关”攻击。即:攻击者伪造ARP报文,发送源IP地址为网关IP地址,源MAC地址为伪造的MAC地址的ARP报文给被攻击的主机,使这些主机更新自身ARP表中网关IP地址与MAC地址的对应关系。这样一来,主机访问网关的流量,被重定向到一个错误的MAC地址,导致该用户无法正常访问外网。
图1-1 “仿冒网关”攻击示意图
为了防御“仿冒网关”的ARP攻击,本系列无线PoE注入器支持基于网关IP/MAC的ARP报文过滤功能。
(1)将接入无线PoE注入器下行端口(通常与用户直接相连的端口)和网关IP进行绑定。绑定后,该端口接收的源IP地址为网关IP地址的ARP报文将被丢弃,其他ARP报文允许通过。
(2)将接入无线PoE注入器级联端口或上行端口和网关IP地址、网关MAC地址进行绑定。绑定后,该端口接收的源IP地址为指定的网关IP地址,源MAC地址为非指定的网关MAC地址的ARP报文将被丢弃,其他ARP报文允许通过。
1.1.2& 配置基于网关IP/MAC的ARP报文过滤功能
表1-1 配置基于网关IP/MAC的ARP报文过滤功能
进入系统视图
system-view
进入以太网端口视图
interface interface-type interface-number
配置基于网关IP地址的ARP报文过滤功能
arp filter
source ip-address
缺省情况下,没有配置基于网关IP地址的ARP报文过滤功能
配置基于网关IP地址、MAC地址绑定的ARP报文过滤功能
arp filter
binding ip-address mac-address
缺省情况下,没有配置基于网关IP地址、MAC地址绑定的ARP报文过滤功能
以太网端口上的arp filter source命令与arp filter binding命令互斥,即同一个以太网端口上只能配置基于网关IP地址的ARP报文过滤功能,或基于网关IP地址、MAC地址绑定的ARP报文过滤功能;不可同时配置。
接口学习动态ARP表项的最大数目配置
接口学习动态ARP表项的最大数目功能简介
为了防御ARP洪泛攻击,本系列无线PoE注入器作为网关设备时,支持根据VLAN限定ARP表项学习数量。即:在设备的指定VLAN接口,配置允许学习动态ARP表项的最大个数。当该VLAN接口动态学习到的ARP表项超过限定的最大值后,将不进行动态地址表项的学习,从而防止某一VLAN内的恶意用户发动ARP泛洪攻击造成的危害。
接口学习动态ARP表项的最大数目
接口学习ARP表项的最大数目
进入系统视图
system-view
进入VLAN接口视图
interface Vlan-interface vlan-id
配置VLAN接口学习动态ARP表项的最大数目
arp max-learning-num number
缺省情况下,没有配置VLAN接口允许学习动态ARP表项的最大个数。
1.3& 基于802.1x的ARP/IP攻击防御配置
的ARP/IP攻击防御特性简介
基于DHCP snooping安全特性的APR入侵检测功能和IP过滤功能,可以有效防御用户DHCP方式动态获取IP地址环境下的各种ARP攻击和IP攻击。但是当网络中大部分用户为静态IP地址分配方式时,上述功能需要逐条配置IP静态绑定表项,工作量比较大,配置容易出错。
为了适应网络中有大量用户使用静态IP地址分配的环境,本系列无线PoE注入器支持基于802.1x的ARP和IP攻击防御特性。对于通过802.1x认证的客户端(无论是DHCP动态获取IP地址或手工配置静态IP地址),接入无线PoE注入器记录其IP地址和MAC地址对应关系:
l当开启802.1x认证通过的信息用于ARP入侵检测功能后,可以将802.1x认证通过的信息在手工配置的IP静态绑定表项和DHCP Snooping表项之后进一步用于ARP入侵检测功能。
l当开启802.1x认证通过的信息用于IP过滤功能后,仅将802.1x认证通过的信息用于IP过滤功能。
基于802.1x的ARP和IP攻击防御特性,作为原有ARP入侵检测和IP过滤的补充,利用原有防攻击机制,实现了静态用户不通过手工配置大量静态的绑定表项也能进行防攻击检查。
lARP入侵检测相关介绍请参见操作手册“ARP”模块。
lIP过滤、IP静态绑定表项,相关介绍请参见操作手册“DHCP”模块。
l802.1x认证相关介绍请参见操作手册“802.1x及System-Guard”模块。
的ARP/IP攻击防御功能
表1-3 配置基于802.1x的ARP/IP攻击防御功能
进入系统视图
system-view
开启802.1x认证通过的信息用于ARP入侵检测的安全检查功能
ip source static import dot1x
缺省情况下,关闭802.1x认证通过的信息用于ARP入侵检测的安全检查功能
进入以太网端口视图
interface-type interface-number
开启802.1x认证通过的信息用于IP过滤功能
ip check dot1x enable
缺省情况下,关闭802.1x认证通过的信息用于IP过滤功能
l802.1x认证通过的信息用于ARP入侵检测功能需要和无线PoE注入器基于MAC地址的802.1x功能以及ARP入侵检测功能一起配合使用。
l802.1x认证通过的信息用于IP过滤功能需要和无线PoE注入器基于MAC地址的802.1x功能一起配合使用,且与基于DHCP snooping安全特性的IP过滤功能互斥。
l802.1x认证通过的信息用于IP过滤功能不支持端口汇聚。
l802.1x认证通过的信息用于IP过滤功能需要对每个802.1x认证通过的表项下发ACL,如果下发ACL失败,会强制认证通过的用户下线。
l802.1x认证通过的信息用于IP过滤功能必须配合802.1x的客户端上传IP地址,否则无法获取认证用户的IP地址。同时,在使用DHCP动态申请IP地址的环境中,为了使认证通过的用户申请到的IP地址能够正确刷新到IP-MAC对应表项中,建议开启802.1x认证的握手功能;如果不开启握手功能,则需要关闭802.1x的DHCP触发认证功能,确保认证的组播报文能够正常接收和发送。
报文源MAC一致性检查配置
报文源MAC一致性检查功能简介
恶意用户可能通过工具软件,伪造网络中其他设备(或主机)的源IP或源MAC地址的ARP报文,进行发送,从而导致途径网络设备上的ARP表项刷新到错误的端口上,网络流量中断。
为了防御这一类ARP攻击,增强网络健壮性,本系列无线PoE注入器作为网关设备时,支持配置ARP报文源MAC一致性检查功能。通过检查ARP报文中的源MAC地址和以太网报文头中的源MAC地址是否一致,来校验其是否为伪造的ARP报文。
l如果一致,则该ARP报文通过一致性检查,无线PoE注入器进行正常的表项学习;
l如果不一致,则认为该ARP报文是伪造报文,无线PoE注入器不学习动态ARP表项的学习,也不根据该报文刷新ARP表项。
ARP报文源MAC一致性检查功能
表1-4 配置ARP报文源MAC一致性检查
进入系统视图
system-view
开启ARP报文源MAC一致性检查功能
arp anti-attack valid-check enable
缺省情况下,无线PoE注入器ARP报文源MAC一致性检查功能处于关闭状态
攻击防御典型配置举例一
Host A和Host B通过接入无线PoE注入器(WP)与网关(Gateway)相连。网关的IP地址为192.168.100.1/24,MAC地址为000D-88F8-528C。为了防止Host A和Host B进行“仿冒网关”的ARP攻击,可以在接入无线PoE注入器上配置基于网关IP/MAC的ARP过滤功能。
图1-2 ARP攻击防御组网图一
# 进入系统视图。
&WP& system-view
# 在上行端口Ethernet1/0/1上配置基于网关IP地址、MAC地址绑定的ARP报文过滤功能。
[WP] interface Ethernet 1/0/1
[WP-Ethernet1/0/1] arp filter binding 192.168.100.1 000d-88f8-528c
[WP-Ethernet1/0/1] quit
# 在下行端口Ethernet1/0/2上配置基于网关IP地址的ARP报文过滤功能。
[WP] interface Ethernet 1/0/2
[WP-Ethernet1/0/2] arp filter source 192.168.100.1
[WP-Ethernet1/0/2] quit
# 在下行端口Ethernet1/0/3上配置基于网关IP地址的ARP报文过滤功能。
[WP] interface Ethernet 1/0/3
[WP-Ethernet1/0/3] arp filter source 192.168.100.1
[WP-Ethernet1/0/3] quit
攻击防御典型配置举例二
Host A和Host B通过二层交换设备(Device)与网关(无线PoE注入器WP)相连。为了防御ARP泛洪等ARP攻击。
l在WP上开启ARP报文源MAC一致性检查功能,过滤掉源MAC地址和以太网报文头中的源MAC地址不一致的伪造ARP报文。
l在WP的Vlan-interface1上配置允许学习动态ARP表项的最大数目功能,实现根据VLAN限定ARP表项学习数量。
图1-3 ARP攻击防御组网图二
# 进入系统视图。
&WP& system-view
# 开启无线PoE注入器的ARP报文源MAC一致性检查功能。
[WP] arp anti-attack valid-check enable
# 进入Vlan-interface1接口视图。
[WP] interface Vlan-interface 1
# 配置Vlan-interface1接口的IP地址。
[WP-Vlan-interface1] ip address 192.168.1.1/24
# 配置Vlan-interface1接口允许学习的ARP数量最大为256条。
[WP-Vlan-interface1] arp max-learning-num 256
[WP-Vlan-interface1] quit
1.7& &攻击防御典型配置举例三
l接入用户Host A使用手工配置的静态IP地址。且安装了802.1x客户端。
l服务器采用H3C公司的CAMS认证、授权、计费服务器。
l在接入无线PoE注入器WP上开启802.1x认证通过的信息用于ARP入侵检测与IP过滤功能,防御接入用户的ARP攻击。
图1-4 基于802.1x的ARP/IP攻击防御组网图
# 进入系统视图。
&WP& system-view
# 全局开启802.1x认证功能。
[WP] dot1x
# 在VLAN1内开启ARP入侵检测功能。
[WP] vlan 1
[WP-vlan1] arp detection enable
[WP-vlan1] quit
# 设置端口Ethernet1/0/2,Ethernet1/0/3为ARP入侵检测信任端口。
[WP] interface Ethernet1/0/2
[WP-Ethernet1/0/2] arp detection trust
[WP-Ethernet1/0/2] quit
[WP] interface Ethernet1/0/3
[WP-Ethernet1/0/3] arp detection trust
[WP-Ethernet1/0/3] quit
# 在WP上开启802.1x认证通过的信息用于ARP Detection的安全检查功能。
[WP] ip source static import dot1x
# 端口Ethernet 1/0/1上开启802.1x功能。
[WP] interface Ethernet1/0/1
[WP-Ethernet1/0/1] dot1x
# 端口Ethernet 1/0/1上开启802.1x认证通过的信息用于IP过滤功能。
[WP-Ethernet1/0/1] ip check dot1x enable
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!ios - Using RxSwift, How To Enable UIButton Based on Valid Text? - Stack Overflow
to customize your list.
This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our , , and our .
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.
Join Stack Overflow to learn, share knowledge, and build your career.
or sign in with
In RxSwift/RxCocoa 2.0.0- beta 3, I have a ViewModel with:
let someString = Variable("")
func isValidSomeString() -& Observable&Bool&
if someString.value.characters.count == 0 {
return just(false)
return just(true)
I have the someString bound already to a text field in the ViewController.
Whenever the someString (or perhaps the text field if that's a better way) changes, I want a button enabled based on if someString is valid.
I tried using the "Observable& Bool >", but started going down another path. I could do this in the ViewController:
someViewModel.someString.subscribeNext { text -& Void in
// could just someUIButton.enabled = someViewModel.isValidSomeString(text)
}.addDisposableTo(disposeBag)
Isn't there another way that is less verbose than the isValidSomeString(text) approach? We already have had nice success with a isValidLogin that returns Observable& Bool > which used combineLatest.
4,75894064
Sounds like
is the perfect tool to use in this case. You'll want to create an Action in your ViewModel, let its enabledIf observable be the result of changes to the string, and connect this action to your UIButton. This way the button will be auto-enabled.
In your ViewModel, you'll need to add this:
var buttonAction: CocoaAction {
let hasString = self.someString.map { !$0.isEmpty }
return CocoaAction(enabledIf: hasString) {
// do something when button tapped
return empty()
And when binding your ViewController to your ViewModel, you'll do:
myButton.rx_action = viewModel.buttonAction
Looks like you just need to map your someString to Obserable&Bool& and then bind it to rx_enabled of UIButton
Something like this:
someViewModel.someString
.asObservable()
.map { (str) -& Bool in
return someViewModel.isValidSomeString(text)
.bindTo(someUIButton.rx_enabled)
.addDisposableTo(disposeBag)
but I think it whould be simpler if you would
have Variable&Bool& in your viewmodel kind of
struct ViewModel {
canLogIn = Variable(false)
In this case you will be able bind it to rx_enabled like this:
let userNameValidation = loginTextField
.map({!$0.isEmpty})
.shareReplay(1)
let passwordValidation = passwordTextField
.map({!$0.isEmpty})
.shareReplay(1)
let loginEnabled = combineLatest(userNameValidation, passWordValidation) { (username, password) in
return username && password
loginEnabled
.bindTo(loginViewModel.canlogIn)
.addDisposableTo(disposeBag)
loginViewModel.canlogIn
.bindTo(loginButton.rx_enabled)
.addDisposableTo(disposeBag)
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Post as a guest
Post as a guest
Post Your Answer
By clicking &Post Your Answer&, you acknowledge that you have read our updated ,
and , and that your continued use of the website is subject to these policies.
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled

我要回帖

更多关于 validthru 的文章

 

随机推荐