首页 > 其他
【转】设计模式六大原则(6):开闭原则
定义:一个软件实体如类、模块和函数应该对扩展开放,对修改关闭。问题由来:在软件的生命周期内,因为变化、升级和维护等原因需要对软件原有代码进行修改时,可能会给旧代码中引入错误,也可能会使我们不得不对整个功能进行重构,并且需要原有代码经过重新测试。解决方案:当软件需要变化时,尽量通过扩展软件实体的行为来...
分类:其他   时间:2015-12-06 12:49:45    收藏:0  评论:0  赞:0  阅读:202
直接设置UIView的x,y,width,height...
// 为UIView写分类//UIView+Extension.h#import @interface UIView (Extension)@property (nonatomic, assign) CGFloat x;@property (nonatomic, assign) CGFloat y;...
分类:其他   时间:2015-12-06 12:49:35    收藏:0  评论:0  赞:0  阅读:113
1072. Gas Station (30)
dij适合计算单源最短路径,计算一个源到各个点的距离比较快dfs不适合算每个点到每个点的距离,迭代次数太多、时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA gas station has to be built at such ...
分类:其他   时间:2015-12-06 12:48:55    收藏:0  评论:0  赞:0  阅读:238
1081. Rational Sum (20)
Given N rational numbers in the form "numerator/denominator", you are supposed to calculate their sum.Input Specification:Each input file contains one...
分类:其他   时间:2015-12-06 12:48:45    收藏:0  评论:0  赞:0  阅读:204
【作文】高考之外
这是语文作业,但想到这题目除了OI也没啥好写的,就写了个电子稿放上来,语文不好,勿喷。高考之外一直以来,关于高考制度有这两种观点:一是在高中阶段,“两耳不闻窗外事,一心只读圣贤书”,全力以赴,备战高考,“一举成名天下知”;二是在保证正常功课的条件下,开展课外活动,丰富生活,拥有快乐的青春。而我,一名...
分类:其他   时间:2015-12-06 12:48:15    收藏:0  评论:0  赞:0  阅读:257
可控硅调光总结
最近一周开发一个LED球泡灯可控硅调光项目,现总结如下:项目要求:1、使用RCC调光方案2、输入电压Ui=120V(60HZ),输出电压Uo=66V,输出电流Io=120mA(恒流)什么是可控硅:单向可控硅由4层半导体组成,有3个PN结:阳极A,阴极K,控制极G,如下图:单向可控硅文字符号:SCR(...
分类:其他   时间:2015-12-06 12:48:05    收藏:0  评论:0  赞:0  阅读:534
1080. Graduate Admission (30)
It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if ...
分类:其他   时间:2015-12-06 12:47:35    收藏:0  评论:0  赞:0  阅读:218
1090. Highest Price in Supply Chain (25)
时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- every...
分类:其他   时间:2015-12-06 12:47:05    收藏:0  评论:0  赞:0  阅读:204
1067. Sort with Swap(0,*) (25)
Given any permutation of the numbers {0, 1, 2,..., N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation tha...
分类:其他   时间:2015-12-06 12:46:45    收藏:0  评论:0  赞:0  阅读:216
1073. Scientific Notation (20)
Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-...
分类:其他   时间:2015-12-06 12:46:35    收藏:0  评论:0  赞:0  阅读:157
1054. The Dominant Color (20)
挺简单的,多占内存,少用循环Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an ima...
分类:其他   时间:2015-12-06 12:45:55    收藏:0  评论:0  赞:0  阅读:406
1066. Root of AVL Tree (25)
时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAn AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two c...
分类:其他   时间:2015-12-06 12:45:45    收藏:0  评论:0  赞:0  阅读:201
1078. Hashing (25)
挺坑的,现百度的二次探测法。The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the i...
分类:其他   时间:2015-12-06 12:45:15    收藏:0  评论:0  赞:0  阅读:125
1084. Broken Keyboard (20)
On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on sc...
分类:其他   时间:2015-12-06 12:45:05    收藏:0  评论:0  赞:0  阅读:164
1076. Forwards on Weibo (30)
输入需要稍作变换,变为一个每个人和他的关注者的map 而不是他和他的关注人、然后bfs搜索。注意搜索层数的要求。Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, a...
分类:其他   时间:2015-12-06 12:44:55    收藏:0  评论:0  赞:0  阅读:122
1062. Talent and Virtue (25)
About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theor...
分类:其他   时间:2015-12-06 12:44:45    收藏:0  评论:0  赞:0  阅读:95
1064. Complete Binary Search Tree (30)
根据中序遍历建立完全二叉树。时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA Binary Search Tree (BST) is recursively defined as a binary tree which has t...
分类:其他   时间:2015-12-06 12:44:25    收藏:0  评论:0  赞:0  阅读:120
信息安全系统设计基础第十二周学习总结—20135227黄晓妍
第十二章 并发编程 操作系统提供了三种基本的构造并发程序的方法: 1、进程。每个逻辑控制流都是一个进程,由内核来调度和维护; 2、I/O多路复用。 3、线程。 一、基于进程的并发编程 在接受连接请求之后,服务器派生出一个子进程,这个子进程获得服务器描述表完整的拷贝。子进程关闭它的拷贝中监听...
分类:其他   时间:2015-12-06 11:31:15    收藏:0  评论:0  赞:0  阅读:114
1052. Linked List Sorting (25)
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key ...
分类:其他   时间:2015-12-06 11:31:05    收藏:0  评论:0  赞:0  阅读:198
1049. Counting Ones (30)
The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. F...
分类:其他   时间:2015-12-06 11:30:55    收藏:0  评论:0  赞:0  阅读:133
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!