软件开发是"抽象化"原则(Abstraction)的一种体现。 所谓"抽象化",就是指从具体问题中,提取出具有共性的模式,再使用通用的解决方法加以处理。 开发软件的时候,一方面,我们总是希望使用别人已经写好的代码,另一方面,又希望自己写的代码尽可能重用,以求减少工作量。要做到这两个目标,这需要"抽象 ...
分类:
其他好文 时间:
2017-06-01 12:04:45
阅读次数:
148
函数声明: function foo(arguments) statements end 1、函数调用 调用函数的时候,如果参数列表为空,必须使用()表明是函数调用,例如: os.date() 当函数只有一个参数并且这个参数是字符串或者table构造器的时候,可以省略函数调用操作符"()",例如: ...
分类:
其他好文 时间:
2017-05-31 14:24:47
阅读次数:
218
0) && (! is_null($num_chars))) { $password = ''; $accepted_chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; // Seed the generator if necessary. srand((... ...
分类:
其他好文 时间:
2017-05-29 21:09:22
阅读次数:
162
1、文件的创建和打开 HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreati ...
编写一个简单的内核驱动模块 Makefile文件: 报错 “/lib/modules/3.13.0-32-generic/bulid: 没有那个文件或目录。 停止。” 网上车了一下说是没安装内核安装包(类似于kernel-devel的名字)或者是链接出错,但问题是,我的内核安装包有,链接也没问题,可 ...
分类:
其他好文 时间:
2017-05-27 00:46:22
阅读次数:
2824
报错内容:nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='transferPersitionTime' ...
分类:
其他好文 时间:
2017-05-26 10:49:27
阅读次数:
1820
原文:http://www.infoq.com/interviews/Technology-Influences-DDD# 要实现DDD(domain drive design 领域驱动设计)原始意图,必须CQRS+Event Sourcing。 CQRS+Event Sourcing事实上不可是一 ...
分类:
其他好文 时间:
2017-05-26 10:45:17
阅读次数:
242
1. 列表、元组操作 列表是我们最以后最常用的数据类型之一,通过列表可以对数据实现最方便的存储、修改等操作 定义列表 1 names = ['Alex',"Tenglan",'Eric'] 1 names = ['Alex',"Tenglan",'Eric'] 1 names = ['Alex'," ...
分类:
其他好文 时间:
2017-05-24 23:55:49
阅读次数:
474
[java] view plain copy public static <T extends Comparable<? super T>> void sort(List<T> list) { Object[] a = list.toArray(); Arrays.sort(a); ListIter ...
分类:
其他好文 时间:
2017-05-23 22:37:40
阅读次数:
281
C#语言: Codee#2416 using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Net; using System.Windows.Forms; usi ...