设计模式:解决某一类问题最行之有效的方法,java中有23种设计模式一、单例设计模式概述: 1、解决一个类在内存中只有一个对象(保证一个类仅有一个实例,并提供一个访问他的全局访问点) 2、要保证对象的唯一: 1.为了避免其他程序过多的建立该类对象,先禁制其他程序建立该类对象 ...
分类:
编程语言 时间:
2015-04-07 23:05:05
阅读次数:
252
从今天模仿《从零单排》系列,菜鸡单刷LeetCode!...
分类:
其他好文 时间:
2015-04-07 19:44:12
阅读次数:
100
Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the e...
分类:
其他好文 时间:
2015-04-07 07:09:42
阅读次数:
441
一些初学者经常在使用autoLayout时,做得效果不太理想,经常会出现界面错乱的情况。本文章用一个小实例说明autoLayout的使用非常的简单,只要记住 规则就可以使界面适屏布局,适配各种iphone手机的屏幕1.新建一个swift项目(以Single View Application模板新建项...
分类:
编程语言 时间:
2015-04-06 23:12:01
阅读次数:
237
题目:
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 digit. Add the two numbers and return it ...
分类:
其他好文 时间:
2015-04-06 15:42:46
阅读次数:
108
题目链接:https://leetcode.com/problems/single-number-ii/题意表明有一个数字出现了一次,其他数字出现了三次,那么实现一个模3的计数器即可。 1 class Solution 2 { 3 public: 4 int singleNumber(int...
分类:
其他好文 时间:
2015-04-06 12:49:26
阅读次数:
152
将原有的eth0的那一行注释掉,然后将生成的eth1改为eth0(如果没有这个文件,可以新增这个文件解决)[root@localhost~]#cat/etc/udev/rules.d/70-persistent-net.rules#Thisfilewasautomaticallygeneratedbythe/lib/udev/write_net_rules#program,runbythepersistent-net-gener..
分类:
系统相关 时间:
2015-04-05 19:03:06
阅读次数:
210
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-04-05 18:53:07
阅读次数:
110
Given an array of integers, every element appears three times except for one. Find that single one.Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using ex...
分类:
其他好文 时间:
2015-04-05 14:42:18
阅读次数:
138
一、实例上下文模式(InstanceContextMode)可以简单地理解为服务端的服务实例与客户端的服务代理之间的关联方式。WCF具有单调(Per-Call)、会话(Per-Session)、和单例(Single)
单调(Per-Call)
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]...
分类:
其他好文 时间:
2015-04-05 13:23:13
阅读次数:
141