(一)什么是观察者模式 发布-订阅,这两个词语是对观察者的最好解释,现实生活中,这样的案例有很多,比如在篮球比赛过程中教练,喊一个暂停,然后球员和裁判都做相关的响应,还有比如OA里面发布的放假通知等等。无论是篮球比赛,还是OA的通知,都存在一个角色,它的作用就是保持对相关问题的关注,在问题发生变化的 ...
分类:
其他好文 时间:
2017-06-06 18:39:01
阅读次数:
261
RootViewController.m #import "ModalViewController.h" @interface RootViewController () @end @implementation RootViewController { ModalViewController *m ...
分类:
其他好文 时间:
2017-06-06 18:23:59
阅读次数:
112
.h文件 #import <UIKit/UIKit.h> @interface UILabel (ContentSize) - (CGSize)contentSize; @end .m文件 #import "UILabel+ContentSize.h" @implementation UILabel ...
分类:
移动开发 时间:
2017-06-06 15:53:27
阅读次数:
206
cd /etc/network sudo vi interfaces 在文件中输入如下内容: auto eth0 iface eth0 inet static address 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.254 auto e ...
分类:
系统相关 时间:
2017-06-06 15:52:52
阅读次数:
210
搭建SpringMVC的-->传送门<-- 一、环境搭建: 目录结构: 引用的JAR包: 如果是Maven搭建的话,pom.xml的配置如下: 二、数据库的搭建: 三、配置文件的编写: web.xml: jdbc.properties文件的配置: spring-mvc.xml文件的配置: Sprin ...
分类:
编程语言 时间:
2017-06-05 22:11:12
阅读次数:
275
转自:https://juejin.im/post/5933c65d0ce463005717cbe9 前言 Banner广告位是APP 中的一个非常重要的位置,为什么呢?因为它能带来money。是一个公司很重要的一个营收点。像那种用户数基数特别大的产品,如facebook、twitter、QQ、微信 ...
分类:
其他好文 时间:
2017-06-05 19:25:38
阅读次数:
497
1、Thrift简单介绍 Thrift是一款由Fackbook开发的可伸缩、跨语言的服务开发框架,该框架已经开源而且增加的Apache项目。Thrift主要功能是:通过自己定义的Interface Definition Language(IDL)。能够创建基于RPC的client和服务端的服务代码。 ...
分类:
其他好文 时间:
2017-06-05 14:17:10
阅读次数:
166
What is OWIN? OWIN defines a standard interface between .NET web servers and web applications. The goal of the OWIN interface is to decouple server an ...
1、导入CoreLocation.frameWork 2,到Plist文件中增加: NSLocationWhenInUseDescription//使用app时是否允许app使用定位的提示语NSLocationAlwaysUsageDescription//不使用app时是否允许app使用定位的提示 ...
分类:
移动开发 时间:
2017-06-05 11:32:55
阅读次数:
239
C++ has a second means of implementing the has-a relationship: private inheritance.With private inheritance, public and protected members of the base ...
分类:
编程语言 时间:
2017-06-05 10:35:01
阅读次数:
129