工厂模式一般我们分:普通工厂模式、静态工厂、抽象工厂普通工厂不方便扩展,若要扩展就需要修改源代码,不适用;静态工厂:工厂方法模式里的方法置为静态的,不需要创建实例,直接调用即可,大多数情况下,我们会选用静态工厂方法模式抽象工厂模式:public interface Sender { pub...
分类:
其他好文 时间:
2014-10-21 11:53:28
阅读次数:
156
顺序表///<summary>///逆序输出///</summary>publicvoidReverse(){if(length<=1){return;}for(inti=0;i<length/2;i++){Ttmp=dataset[i];dataset[i]=dataset[length-i-1];dataset[length-i-1]=tmp;}}2.单链表///<summary>///逆序///</summary>pub..
分类:
其他好文 时间:
2014-10-20 17:31:01
阅读次数:
228
进入一台ubuntu服务器ubuntu12ssh-keygen-trsa#一直回车3cd.ssh4catid_rsa.pub>>authorized_keys5#将生成的公钥传到ubuntu2机器scpid_rsa.pububuntu@ubuntu2:/home/ubuntu/opt/id_rsa.pub6#进入ubuntu2机器cd~7ssh-keygen-trsa#一直回车8cd.ssh9catid_rsa.pub>>aut..
分类:
其他好文 时间:
2014-10-20 15:17:13
阅读次数:
176
1、环境centos 6.5 64 bitglusterfs-3.52、配置yum源http://download.gluster.org/pub/gluster/glusterfs/repos/YUM/glusterfs-3.5/LATEST/CentOS/glusterfs-epel.repow...
分类:
其他好文 时间:
2014-10-20 13:06:05
阅读次数:
259
因为C++不想直接用boost,有些已经和C++最新标准合并的就打算直接用C++里面的好了。所以需要编译gcc4.9。最新的版本是4.9.1,从ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.1/gcc-4.9.1.tar.bz2下载。本来已经通过yum安装了不少依赖,发现isl和cloog无法通过yum安装,下载并安..
分类:
其他好文 时间:
2014-10-20 10:11:48
阅读次数:
445
1、统一JSON格式处理方式,同时指定ContentType类型,解决低版本浏览器获取json时ContentType为application/json提示下载的问题. public abstract class CustomResult : ActionResult { pub...
分类:
Web程序 时间:
2014-10-18 19:35:03
阅读次数:
209
<?php
class encrypt{
var $pub_key;
function redPukey()
{
$pubKey = "MIIDhzCCAm+gAwIBAgIGASYISh96MA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYTAkNOMSkwJwYDVQQKDCBBbGxpbnBheSBOZX...
分类:
编程语言 时间:
2014-10-17 15:32:51
阅读次数:
247
以编译libiconv-1.13.1为例1,安装 NDK 设置安装NDK环境变量 ANDROID_NDK_ROOT (自行定义)2,获取源码 $ mkdir libiconv $ cd libiconv $ wget http://ftp.gnu.org/pub/gnu/lib...
分类:
移动开发 时间:
2014-10-17 10:06:01
阅读次数:
368
(1)工具下载地址:
There is also a public GIT tree
at git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git containing the current development
code. You can also view the shortlog of
the development...
分类:
其他好文 时间:
2014-10-17 01:15:43
阅读次数:
824
Oracle JDK 版本:? wget?http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.tar.gz\?AuthParam\=1413444038_57c11ebacd07d2252b6288d3e1b6f85f 将其解压安装好。...
分类:
编程语言 时间:
2014-10-16 18:40:33
阅读次数:
170