转载:http://blog.csdn.net/tianlesoftware/article/details/8435670

一.  OHASD 说明

Oracle 的Restart 特性是Oracle 11g里的新特性,在讲这个特性之前先看一下Oracle 11g RAC的进程。之前的Blog 有说明。

Oracle 11gR2RAC 进程说明

http://blog.csdn.net/tianlesoftware/article/details/6009962

Oracle 11gR2 中对CRSD资源进行了重新分类: Local Resources 和 Cluster Resources。

[grid@rac2 ~]$ crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE       SERVER                  STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.FRA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.LISTENER.lsnr

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.OCRVOTING.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.asm

ONLINE  ONLINE      rac1                    Started

ONLINE  ONLINE      rac2                    Started

ora.gsd

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.net1.network

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.ons

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1        ONLINE  ONLINE      rac1

ora.cvu

1        ONLINE  ONLINE      rac1

ora.oc4j

1        ONLINE  ONLINE      rac1

ora.rac1.vip

1        ONLINE  ONLINE      rac1

ora.rac2.vip

1        ONLINE  ONLINE      rac2

ora.scan1.vip

1        ONLINE  ONLINE      rac1

ora.sdd.db

1        ONLINE  ONLINE      rac1                     Open

2        ONLINE  ONLINE      rac2                     Open

[grid@rac2 ~]$

在之前的Blog中,提到Oracle 的命令有分层。

Oracle RAC 常用维护工具和命令

http://blog.csdn.net/tianlesoftware/article/details/5358573

对应起来:

Local Resources 属于应用层,

Cluster Resources 属于集群层。

我们这里要说的Oracle Restart 就是对Cluster Resource的一个管理。

在Oracle 10g RAC 安装时,在运行root.sh时,会在/etc/inittab文件的最后加入ora.crs,ora.cssd,ora.evmd 三个进程。 这样以后每次系统启动时,Clusterware 也会自动启动,其中EVMD和CRSD 两个进程如果出现异常,则系统会自动重启这两个进程,如果是CSSD 进程异常,系统会立即重启。

而在Oracle 11gR2中,只会将ohasd 写入/etc/inittab 文件。

官网对OHASD 的说明:

Oracle High Availability Services Daemon(OHASD) :This process anchors the lower part of the Oracle Clusterwarestack, which consists of processes that facilitate cluster operations.

可以使用如下命令查看OHASD管理的资源:

[grid@rac2 ~]$ crsctl stat res -init -t

[grid@rac2 ~]$ ps -ef|grep ohasd

root     1057     1  0 Dec21 ?        00:00:00 /bin/sh /etc/init.d/init.ohasdrun

root     2274     1  0 Dec21 ?        00:22:53/u01/app/grid/11.2.0/bin/ohasd.bin reboot

二.  Oracle Restart 说明

2.1 说明

官网的文档如下:

About Oracle Restart

http://docs.oracle.com/cd/E11882_01/server.112/e10595/restart001.htm

Oracle Restartimproves the availability of your Oracle database. When you install OracleRestart, various Oracle components can be automatically restarted after ahardware or software failure or whenever your database host computer restarts.

--Oracle Restart 能提高数据库的可用性,当安装了Oracle Restart 之后,在系统出现硬件或者软件问题,或者主机重启之后,OracleRestart 管理的组件都能自动的进行启动。

Oracle Restart 管理的组件如下表:

Component

Notes

Database instance

Oracle Restart can accommodate multiple databases on a single host computer.

Oracle Net listener

-

Database services

Does not include the default service created upon installation because it is automatically managed by Oracle Database, and does not include any default services created during database creation.

Oracle Automatic Storage Management (Oracle ASM) instance

-

Oracle ASM disk groups

Restarting a disk group means mounting it.

Oracle Notification Services (ONS)

In a standalone server environment, ONS can be used in Oracle Data Guard installations for automating failover of connections between primary and standby database through Fast Application Notification (FAN). ONS is a service for sending FAN events to integrated clients upon failover.

OracleRestart 会周期性的检查和监控这些组件的状态,如果发现某个组件fail,那么就会shutdown并restart 该组件。

Oracle Restart 只能用于not-cluster的环境。 对于Oracle RAC 环境,Oracle Clusterware 会提供automatically restart的功能。

对于非集群环境,只需要安装OracleGrid Infrastructure,在安装的时候选择“仅安装网格基础结构软件”,然后运行如下脚本来安装Oracle Restart:

$GRID_HOME/crs/install/roothas.pl

如果是先安装了Oracle Restart,然后使用dbca创建了实例,那么DBCA会自动的把Oracle 添加到OracleRestart的配置里。 当DBCA启动数据库时,数据库会和其他组件(如disk group)之间建立依赖关系,然后Oracle Restart 开始管理数据库。

当安装了Oracle Restart 后,一些Create操作会自动的创建Oracle 的Compents并将其自动的添加到Oracle Restart configuration中。 这类操作如下表所示:

Create Operation

Created Component Automatically Added to Oracle Restart Configuration?

Create a database with OUI or DBCA

Yes

Create a database with the CREATE DATABASE SQL statement

No

Create an Oracle ASM instance with OUI, DBCA, or ASMCA

Yes

Create a disk group (any method)

Yes

Add a listener with NETCA

Yes

Create a database service with SRVCTL

Yes

Create a database service by modifying the SERVICE_NAMES initialization parameter

No

Create a database service with DBMS_SERVICE.CREATE_SERVICE

No

Create a standby database

No

同样,一些delete/drop/remove操作也会自动的从Oracle Restart Configuration中进行更新,具体如下表:

Operation

Deleted Component Automatically Removed from Oracle Restart Configuration?

Delete a database with DBCA

Yes

Delete a database by removing database files with operating system commands

No

Delete a listener with NETCA

Yes

Drop an Oracle ASM disk group (any method)

Yes

Delete a database service with SRVCTL

Yes

Delete a database service by any other means

No

Oracle Restart 由OHASD 进程来管理。 这个就是第一节介绍OHASD的原因。 对于standalone server,使用OHASD 来管理Oracle Restart ,并且不需要CRSD进程的支持。 可以使用OHASD管理的组件如下:

1.CSSD: This is used for Group Services as it was inprevious releases (when it was installed using “localconfig add“)

2.ASM Instance :if Automatic Storage Management is used.

3.ASM Disk Groups: if Automatic Storage Management is used.

4.Listeners

5.Database Instances

6.Database Services

7.ONS/EONS :Used for automatic failover of connections  usingFast Application Notification (FAN) in a Data Guard environment

OHASD  是一个后台的守护进程,其可用来启动和监控OracleRestart 进程。 该进程由/etc/init.d/ohasd 脚本来初始化,并有root用户来执行ohasd.bin 来启动。

使用Oracle Restart 有如下好处:

1.  Automatic resource startup atboot time without using shell scripts or the Oracle supplied dbstart and dbshut scripts.

2.  Resources are started in thecorrect sequence based on dependencies in the OLR(Oracle Local Resource).

3.  Resources are also monitored by ohasd foravailability and may be restarted in place if they fail.

4.  Role managed services for DataGuard.

5.  Consistency of command lineinterfaced tools using crsctl and srvctl as is done withclusters.

2.2 使用CRSCTL 命令管理Oracle Restart Stack

官网的说明如下:

Stopping and Restarting Oracle Restart forMaintenance Operations

http://docs.oracle.com/cd/E11882_01/server.112/e10595/restart004.htm

CRSCTL Command Reference

http://docs.oracle.com/cd/E11882_01/server.112/e25494/restart006.htm

CRSCTL 命令可选参数:

Command

Description

check

Displays the Oracle Restart status.

config

Displays the Oracle Restart configuration.

disable

Disables automatic restart of Oracle Restart.

enable

Enables automatic restart of Oracle Restart.

start

Starts Oracle Restart.

stop

Stops Oracle Restart.

注:

以下操作需要已root用户执行

2.2.1 手工停止Oracle Restart: crsctl stop has [-f]

注意:该命令只争对当前服务器有效。
 

[root@rac1 bin]# ./crsctl stop has

CRS-2791: Starting shutdown of Oracle HighAvailability Services-managed resources on 'rac1'

CRS-2673: Attempting to stop 'ora.crsd' on'rac1'

CRS-2790: Starting shutdown of ClusterReady Services-managed resources on 'rac1'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr'on 'rac1'

CRS-2673: Attempting to stop'ora.OCRVOTING.dg' on 'rac1'

CRS-2673: Attempting to stop 'ora.sdd.db'on 'rac1'

CRS-2673: Attempting to stop'ora.LISTENER.lsnr' on 'rac1'

CRS-2673: Attempting to stop 'ora.oc4j' on'rac1'

CRS-2673: Attempting to stop 'ora.cvu' on'rac1'

CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr'on 'rac1' succeeded

CRS-2673: Attempting to stop'ora.scan1.vip' on 'rac1'

CRS-2677: Stop of 'ora.LISTENER.lsnr' on'rac1' succeeded

CRS-2673: Attempting to stop 'ora.rac1.vip'on 'rac1'

CRS-2677: Stop of 'ora.rac1.vip' on 'rac1'succeeded

CRS-2672: Attempting to start'ora.rac1.vip' on 'rac2'

CRS-2677: Stop of 'ora.scan1.vip' on 'rac1'succeeded

CRS-2672: Attempting to start 'ora.scan1.vip'on 'rac2'

CRS-2676: Start of 'ora.scan1.vip' on'rac2' succeeded

CRS-2676: Start of 'ora.rac1.vip' on 'rac2'succeeded

CRS-2672: Attempting to start'ora.LISTENER_SCAN1.lsnr' on 'rac2'

CRS-2677: Stop of 'ora.sdd.db' on 'rac1'succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg'on 'rac1'

CRS-2673: Attempting to stop 'ora.FRA.dg'on 'rac1'

CRS-2676: Start of'ora.LISTENER_SCAN1.lsnr' on 'rac2' succeeded

CRS-2677: Stop of 'ora.FRA.dg' on 'rac1'succeeded

CRS-2677: Stop of 'ora.DATA.dg' on 'rac1'succeeded

CRS-2677: Stop of 'ora.oc4j' on 'rac1'succeeded

CRS-2672: Attempting to start 'ora.oc4j' on'rac2'

CRS-2677: Stop of 'ora.cvu' on 'rac1'succeeded

CRS-2672: Attempting to start 'ora.cvu' on'rac2'

CRS-2676: Start of 'ora.cvu' on 'rac2'succeeded

CRS-2677: Stop of 'ora.OCRVOTING.dg' on'rac1' succeeded

CRS-2673: Attempting to stop 'ora.asm' on'rac1'

CRS-2677: Stop of 'ora.asm' on 'rac1'succeeded

CRS-2676: Start of 'ora.oc4j' on 'rac2'succeeded

CRS-2673: Attempting to stop 'ora.ons' on'rac1'

CRS-2677: Stop of 'ora.ons' on 'rac1'succeeded

CRS-2673: Attempting to stop'ora.net1.network' on 'rac1'

CRS-2677: Stop of 'ora.net1.network' on'rac1' succeeded

CRS-2792: Shutdown of Cluster ReadyServices-managed resources on 'rac1' has completed

CRS-2677: Stop of 'ora.crsd' on 'rac1'succeeded

CRS-2673: Attempting to stop 'ora.mdnsd' on'rac1'

CRS-2673: Attempting to stop 'ora.ctssd' on'rac1'

CRS-2673: Attempting to stop 'ora.evmd' on'rac1'

CRS-2673: Attempting to stop 'ora.asm' on'rac1'

CRS-2677: Stop of 'ora.evmd' on 'rac1'succeeded

CRS-2677: Stop of 'ora.mdnsd' on 'rac1'succeeded

CRS-2677: Stop of 'ora.ctssd' on 'rac1'succeeded

CRS-2677: Stop of 'ora.asm' on 'rac1'succeeded

CRS-2673: Attempting to stop'ora.cluster_interconnect.haip' on 'rac1'

CRS-2677: Stop of'ora.cluster_interconnect.haip' on 'rac1' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on'rac1'

CRS-2677: Stop of 'ora.cssd' on 'rac1'succeeded

CRS-2673: Attempting to stop 'ora.crf' on'rac1'

CRS-2677: Stop of 'ora.crf' on 'rac1'succeeded

CRS-2673: Attempting to stop 'ora.gipcd' on'rac1'

CRS-2677: Stop of 'ora.gipcd' on 'rac1'succeeded

CRS-2673: Attempting to stop 'ora.gpnpd' on'rac1'

CRS-2677: Stop of 'ora.gpnpd' on 'rac1'succeeded

CRS-2793: Shutdown of Oracle HighAvailability Services-managed resources on 'rac1' has completed

CRS-4133: Oracle High Availability Serviceshas been stopped.

[root@rac1 bin]#

注意:

我这里测试的是Oracle11gR2的环境,我们在节点1上执行该命令,只把节点1上的进程停了,而把相关的资源转移到我们的节点2上了,因此也证实了我们上面的说的,该命令只争对当前服务器有效。

2.2.2 启动HAS

[root@rac1 bin]# ./crsctl start has

CRS-4123: Oracle High Availability Serviceshas been started.

[root@rac1 bin]#

从上面看只是启动了HAS。实际上后面会把Oracle Restart 管理的资源都会启动。这个可以使用crs_stat 命令来进程验证,不过Oracle 11g的进程启动过程比较慢,需要耐心等待。

[root@rac1 u01]# shcrs_stat.sh

Name                           Target     State     Host

------------------------------ -------------------  -------

ora.DATA.dg                    ONLINE     ONLINE    rac1

ora.FRA.dg                     ONLINE    ONLINE     rac1

ora.LISTENER.lsnr              ONLINE     ONLINE    rac1

ora.LISTENER_SCAN1.lsnr        ONLINE     ONLINE    rac2

ora.OCRVOTING.dg               ONLINE     ONLINE    rac1

ora.asm                        ONLINE     ONLINE    rac1

ora.cvu                        ONLINE     ONLINE    rac2

ora.gsd                        OFFLINE    OFFLINE

ora.net1.network               ONLINE     ONLINE    rac1

ora.oc4j                       ONLINE     ONLINE    rac2

ora.ons                        ONLINE     ONLINE    rac1

ora.rac1.ASM1.asm              ONLINE     ONLINE    rac1

ora.rac1.LISTENER_RAC1.lsnr    ONLINE    ONLINE     rac1

ora.rac1.gsd                   OFFLINE    OFFLINE

ora.rac1.ons                   ONLINE     ONLINE    rac1

ora.rac1.vip                   ONLINE     ONLINE    rac1

ora.rac2.ASM2.asm              ONLINE     ONLINE    rac2

ora.rac2.LISTENER_RAC2.lsnr    ONLINE    ONLINE     rac2

ora.rac2.gsd                   OFFLINE    OFFLINE

ora.rac2.ons                   ONLINE     ONLINE    rac2

ora.rac2.vip                   ONLINE     ONLINE    rac2

ora.scan1.vip                  ONLINE     ONLINE    rac2

ora.sdd.db                     ONLINE     ONLINE    rac2

2.2.3 禁用HAS(Restart)在server 重启后的自动启动

[root@rac1 bin]# ./crsctl disable has

CRS-4621: Oracle High Availability Servicesautostart is disabled.

[root@rac1 bin]#

2.2.4 查看HAS(Restart)的状态

[root@rac1 bin]# ./crsctl config has

CRS-4621: Oracle High Availability Servicesautostart is disabled.

2.2.5 启用HAS(Restart)在server 重启后的自启动

[root@rac1 bin]# ./crsctl enable has

CRS-4622: Oracle High Availability Servicesautostart is enabled.

--查看has的状态,验证刚才命令的效果:

[root@rac1 bin]# ./crsctl config has

CRS-4622: Oracle High Availability Servicesautostart is enabled.

[root@rac1 bin]#

2.2.6 查看Restart 当前状态

[root@rac1 bin]# ./crsctl check has

CRS-4638: Oracle High Availability Servicesis online

2.2.7 查看Oracle Restart 中由OHASD管理的resource 状态

[root@rac1 bin]# ./crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE       SERVER                  STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.FRA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.LISTENER.lsnr

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.OCRVOTING.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.asm

ONLINE  ONLINE      rac1                    Started

ONLINE  ONLINE      rac2                    Started

ora.gsd

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.net1.network

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.ons

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1        ONLINE  ONLINE      rac2

ora.cvu

1        ONLINE  ONLINE      rac2

ora.oc4j

1        ONLINE  ONLINE      rac2

ora.rac1.vip

1        ONLINE  ONLINE      rac1

ora.rac2.vip

1        ONLINE  ONLINE      rac2

ora.scan1.vip

1        ONLINE  ONLINE      rac2

ora.sdd.db

1        ONLINE  ONLINE      rac1                     Open

2        ONLINE  ONLINE      rac2                     Open

[root@rac1 bin]#

2.3 使用SRVCTL 命令管理Restart(OHASD)

可以手工的使用SRVCTL 命令来管理Oracle Restart。从Oracle Restart 配置里添加或者删除一些组件。当我们手工的添加一个组件到到Oracle Restart,并使用SRVCTL启用该组件,那么Oracle Restart 就开始管理该组件,并根据需要决定是否对该组件进行重启。

官方文档的说明如下:

SRVCTL Command Reference for Oracle Restart

http://docs.oracle.com/cd/E11882_01/server.112/e25494/restart005.htm

Configuring OracleRestart

http://docs.oracle.com/cd/E11882_01/server.112/e10595/restart002.htm

SRVCTL命令主要有如下选项:

Command

Description

add

Adds a component to the Oracle Restart configuration.

config

Displays the Oracle Restart configuration for a component.

disable

Disables management by Oracle Restart for a component.

enable

Reenables management by Oracle Restart for a component.

getenv

Displays environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.

modify

Modifies the Oracle Restart configuration for a component.

remove

Removes a component from the Oracle Restart configuration.

setenv

Sets environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.

start

Starts the specified component.

status

Displays the running status of the specified component.

stop

Stops the specified component.

unsetenv

Unsets environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.

--This example adds thedatabase with the DB_UNIQUE_NAME dbcrm:

srvctl add database -d dbcrm -o/u01/app/oracle/product/11.2.0/dbhome_1

--This example adds thesame database and also establishes a dependency between the database and thedisk groups DATA and RECOVERY.

srvctl add database -d dbcrm -o/u01/app/oracle/product/11.2.0/dbhome_1  -a "DATA,RECOVERY"

--The following commandadds a listener (named LISTENER) running out of the database Oracle homeand listening on TCP port 1522:

srvctl add listener -p TCP:1522 -o /u01/app/oracle/product/11.2.0/dbhome_1

注意srvctl命令中的config 选项,其是用来限制相关Resource 信息的:

[grid@rac1 ~]$ srvctl config asm -a

ASM home: /u01/app/grid/11.2.0

ASM listener: LISTENER

ASM is enabled.

[grid@rac1 ~]$

这里srvctl 命令是非常常用的。在2.1 节里也说明了,有些操作会自动的把相关的resource 添加到Restart里,从而来进行监控,但有些操作不会添加到Restart里,这就需要我们手工的来进行添加。

最后一天,如果已经安装过了Restart,如果机器名称发生了改变,就需要重新配置Oracle Restart,具体参考MOS 文档:[ID986740.1]

Oracle 11g 新特性 -- Oracle Restart 说明(转载)的更多相关文章

  1. Oracle 11g 新特性 --SQL Plan Management 说明

    Oracle 11g 新特性 --SQL Plan Management 说明 参见大神博主文章: http://blog.csdn.net/tianlesoftware/article/detail ...

  2. Oracle 11g 新特性 – HM(Hang Manager)简介

    在这篇文章中我们会对oracle 11g 新特性—hang 管理器(Hang Manager) 进行介绍.我们需要说明,HM 只在RAC 数据库中存在. 在我们诊断数据库问题的时候,经常会遇到一些数据 ...

  3. 使用Oracle 11g新特性 Active Database Duplication 搭建Dataguard环境

    Duplication Database 介绍 Duplicate database可以按照用途分为2种: duplicate database(复制出一个数据库) duplicate standby ...

  4. Oracle 11g 新特性 -- 自适应游标共享(Adaptive Cursor Sharing: ACS) 说明(转载)

    一.自适应游标共享(Adaptive Cursor Sharing) 说明 1.1 ACS概述绑定变量使Oracle DB 可以为多条SQL 语句共享单个游标,以减少分析SQL 语句所使用的共享内存量 ...

  5. Oracle 11g新特性direct path read引发的系统停运故障诊断处理

    黎俊杰 | 2016-07-28 14:37 声明:部分表名为了脱敏而用XX代替 1.故障现象 (1)一个业务系统输入用户名与密码后无法进入首页,表现为一直在运行等待,运行缓慢 (2)整个系统无法正常 ...

  6. Oracle 11g新特性延迟段创建和truncate的增强

    下面测试Oracle 11g开始的新特性truncate的增强和延迟段空间创建. Oracle从11g开始,当用户创建一张空表的时候不会先分配段和空间,只有当对这张表插入第一行数据的时候才分配段和空间 ...

  7. Oracle 11g新特性

    文章转自网络 Oracle 11g于2007年7月11日美国东部时间11时(北京时间11日22时)正式发布,11g是甲骨文公司30年来发布的最重要的数据库版本,根据用户的需求实现了信息生命周期管理(I ...

  8. Oracle 11g新特性 -- 延迟段

    11gR2之前的版本中,当创建一张表时,会自动分配段空间,这样做有几个弊端: 1. 初始创建表时就需要分配空间,自然会占用一些时间,如果初始化多张表,这种影响就被放大. 2. 如果很多表开始的一段时间 ...

  9. Oracle 11g 新特性(一)-- 虚拟列

    数据库版本: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Oracle11g 增加了虚拟列的新特性, 具体说明如 ...

随机推荐

  1. 使用javascript模拟常见数据结构(三)

    六.字典和散列表 我们已经知道,集合表示一组互不相同的元素(不重复元素).在字典中,存储的是键值对,其中键值是用来查询特定的元素的.字典和集合是很相似的,集合采用[值,值]的方式存储,而字典则是以[键 ...

  2. 安装lua 环境

    lua下载地址:https://www.lua.org/download.html curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz tar zxf ...

  3. 前端jsp页面script引入url项目名使用${appName}

    <script src="/${appName}/commons/jslib/CommonValue.js"></script> 新建一个com.autum ...

  4. iOS开发之 - 键盘处理神器 IQKeyboardManager

    平常在开发中,用到输入框的地方不胜其数,当输入框位于屏幕底部时,弹起的键盘很可能覆盖输入框,导致用户看不到输入结果,体验较差...... IQKeyboardManager 可以很简单快捷的解决键盘遮 ...

  5. New Concept English Two 14 34

    recently  busy  a lot ,just  practices   every   morning. $课文32  购物变得很方便 324. People are not so hone ...

  6. Go安装一些第三方库

    原文链接:https://javasgl.github.io/go-get-golang-x-packages/ 侵权联系删除! go在go get 一些 package时候的会由于众所周知的原因而无 ...

  7. Kotlin Reference (十) Interfaces

    most from reference 接口 Kotlin中的接口非常类似于Java8,它们可以包含抽象方法的声明以及方法实现.与抽象类不同的是接口不能存储状态.它们可以具有属性,但这些需要是抽象的或 ...

  8. iOS KVC 和 KVO 区别简单总结

    KVC: key value coding,键值编码.是一种通过使用属性的名称(key)来间接访问对象属性的方法.这个方法可以不用通过 setter/getter 方法来访问对象的属性.该方法使用的实 ...

  9. 细思极恐-你真的会写java吗?

    文章核心 其实,本不想把标题写的那么恐怖,只是发现很多人干了几年java以后,都自认为是一个不错的java程序员了,可以拿着上万的工资都处宣扬自己了,写这篇文章的目的并不是嘲讽和我一样做java的同行 ...

  10. LOJ2316. 「NOIP2017」逛公园【DP】【最短路】【思维】

    LINK 思路 因为我想到的根本不是网上的普遍做法 所以常数出奇的大,而且做法极其暴力 可以形容是带优化的大模拟 进入正题: 首先一个很显然的思路是如果在合法的路径网络里面存在零环是有无数组解的 然后 ...