码迷,mamicode.com
首页 >  
搜索关键字:single    ( 5020个结果
day01_面向对象五大原则_1.单一职责原则&2.里氏替换原则
单一职责原则:Single Responsibility Principle (SRP) 一个类,只有一个引起它变化的原因。应该只有一个职责。每一个职责都是变化的一个轴线,如果一个类有一个以上的职责,这些职责就耦合在了一起。这会导致脆弱的设计。当一个职责发生变化时,可能会影响其它的职责。另外,多个职责耦合在一起,会影响复用性。例如:要实现逻辑和界面的分离。 T负责两个不同的职责...
分类:其他好文   时间:2015-07-13 12:11:53    阅读次数:127
UI线程异常处理方法
当应用程序启动,创建了一个叫“main”的线程,用于管理UI相关,又叫UI线程。其他线程叫工作线程(Work Thread)。Single Thread Model一个组件的创建并不会新建一个线程,他们的创建都在UI线程中进行,包括他们的回调方法,如onKeyDown()。当在UI线程中进行某些耗时...
分类:编程语言   时间:2015-07-12 21:40:10    阅读次数:175
C - The C Answer (2nd Edition) - Exercise 1-9
/* Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank. */ #include #define NONBLANK 'a' /* replace string of blanks with a single blank...
分类:其他好文   时间:2015-07-12 20:22:41    阅读次数:127
leetCode 44.Wildcard Matching (通配符匹配) 解题思路和方法
Wildcard Matching '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching should cover the entire input string (not partial). Th...
分类:其他好文   时间:2015-07-12 09:48:13    阅读次数:170
[UI组件基础] 制作一个带有底部导航以及顶部导航的single view application
最近开始写博客了,把我学习到的东西进行汇总和总结。 很多初学iOS手机应用程序开发的刚开始肯定是抓头的,搞不好,是大片大片的头发往下扯。 因为很迷茫啊,都不知道要怎么弄,有真机有大神帮忙的人还好说,没有机器又没有朋友的人就惨了,完全不知道从何开始。 其实我觉得把,如果是真想学,最次最次,你...
分类:移动开发   时间:2015-07-11 22:45:48    阅读次数:213
LeetCode:Single Number
Problems:Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtim...
分类:其他好文   时间:2015-07-11 21:17:42    阅读次数:116
java 单例模式
单例模式有以下特点:   1、单例类只能有一个实例。   2、单例类必须自己创建自己的唯一实例。   3、单例类必须给所有其他对象提供这一实例 方式一、懒汉式单例,线程不安全public class SingleOne { //懒汉式单例,线程不安全 private static SingleOne single = null; private SingleOne(){}//设置...
分类:编程语言   时间:2015-07-11 16:48:00    阅读次数:129
leetcode136 Single Number
题意:数组中每个数字都出现了两次,只有一个出现一次,找出这个数思路:很明显不能从头到位遍历来找,首先是超时的原因,再次就是这样很没意思·····但是却没想到什么好办法,因为不了解按位异或(XOR)。异或就是相同的两个数结果为0,不同的为1。根据交换律我们知道,数组中两两异或的结果就剩最后那一个落单的...
分类:其他好文   时间:2015-07-11 11:54:07    阅读次数:91
[原创] Xcode中使用sqlite3访问数据库
最近开始写博客了,把我学习到的东西进行汇总和总结,今天就说说怎么使用sqlite3来操纵数据库吧 数据库的相关知识我就不去说明了,毕竟只要会sql语言的人就大家都一样。 本案例是在Xcode环境下创建的single view application进行演示操作,如有不清楚的朋友可以找我...
分类:数据库   时间:2015-07-11 11:49:49    阅读次数:281
2.Add Two Numbers (List)
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2015-07-10 20:41:50    阅读次数:131
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!