介绍享元模式之前,来聊聊Java中的String类型特性:String类型的 1、对象一旦被创造就不可改变; 2、当两个String对象所包含的内容相同的时候,JVM只会创建一个String对象对应着两个不同的对象引用。 验证一下2的特性1 public class TestPattern...
分类:
其他好文 时间:
2014-12-02 20:44:48
阅读次数:
143
P01: 01背包问题题目有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使这些物品的费用总和不超过背包容量,且价值总和最大。基本思路这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。用子问题定义状态:即f[i][v]表示前i件物品...
分类:
其他好文 时间:
2014-12-02 20:44:28
阅读次数:
180
我的工程包括:struct.h create.c next.c main.cstruct.h#ifndef _STRUCT_H_#define _STRUCT_H_#include #include #include struct person{ int r; int s; ...
分类:
其他好文 时间:
2014-12-02 20:44:24
阅读次数:
226
整数划分问题是将一个正整数n拆成一组数连加并等于n的形式,且这组数中的最大加数不大于n。 如6的整数划分为 6 5 + 1 4 + 2, 4 + 1 + 1 3 + 3, 3 + 2 + 1, 3 + 1 + 1 + 1 2 + 2 + 2, 2 + 2 + 1 + 1, 2 + 1 + 1 + 1...
分类:
其他好文 时间:
2014-12-02 20:44:34
阅读次数:
268
1相关介绍功能描述RegOpenKeyEx()函数功能描述:打开一个指定的注册表键原型1234567LONGRegOpenKeyEx(HKEYhKey,// 需要打开的主键的名称LPCTSTRlpSubKey,//需要打开的子键的名称DWORDulOptions,// 保留,设为0REGSAM sa...
分类:
其他好文 时间:
2014-12-02 20:41:41
阅读次数:
192
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2014-12-02 20:43:38
阅读次数:
190
在我们创建一个新的.h 和 .m文件时,我们会看到.h:@implementation TestViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loadin...
分类:
其他好文 时间:
2014-12-02 20:42:38
阅读次数:
122
fromhttp://blog.csdn.net/frankiewang008/article/details/12832239//多字节编码转为UTF8编码boolMBToUTF8(vector&pu8,constchar*pmb,int32mLen){//convertanMBCSstringt...
分类:
其他好文 时间:
2014-12-02 20:42:16
阅读次数:
298
fromhttp://www.cnblogs.com/lancidie/default.html?page=1序言:转型手游,问题比想象要复杂。一些问题是研发阶段就能预见的,但是有些问题上线后才发现远超出我们的想象。从端游转型做手游变化远没有想象简单 可能和公司内很多手游研发团队一样,我们也是从传....
分类:
其他好文 时间:
2014-12-02 20:42:10
阅读次数:
207
电商接口 京东获取单个商品价格接口: http://p.3.cn/prices/mgets?skuIds=J_商品 ID&type=1 ps:商品 ID 这么获取:http://item.jd.com/954086.html 物流接口 快递接口: http://www.kuaidi1...
分类:
其他好文 时间:
2014-12-02 20:42:06
阅读次数:
249
C正确初始化方式无论是int 还是 char 初始化方式都是一样(指定初始值或者用指针指向所开辟的内存)int num[] = {1,22,333}; int *p = num; int *num2 = new int[3]; char c[] = {'aaa','a'}; char *cp = c...
分类:
其他好文 时间:
2014-12-02 20:40:55
阅读次数:
126
1 for( int i=0;i p.Field("DN").ToString()).Distinct().ToList();6 cbbDn.Items.AddRange(DnList.ToArray());7 }View Code
分类:
其他好文 时间:
2014-12-02 20:42:34
阅读次数:
108
C++的字符串转换函数mbstowcs使用时容易产生bug。。。rapidxml_utils.hpp 的file(const char*filename)函数内会异常宕机。。。需要在函数最开始添加locale::global(locale(""));from http://blog.sina.com...
分类:
其他好文 时间:
2014-12-02 20:41:51
阅读次数:
197
效果图:使用jQuery插件---multiselect2side做法:123456789101112131415161718192021222324252627282930313233343536373839404142434445无标题文档 解析:head头部导入jquery.multisel....
分类:
其他好文 时间:
2014-12-02 20:41:09
阅读次数:
206
内容提要(本页面):介绍教程将覆盖的内容要点。加载静态内容:此节主要介绍控制器(Controllers),视图(Views)和路由(Routing)的基础知识。读取新闻条目:此节开始介绍数据模型(Models)的相关知识,以及在数据模型(Models)中执行基本数据库操作。创建新闻条目:此节主要介绍...
分类:
其他好文 时间:
2014-12-02 20:39:41
阅读次数:
156
前言Content Provider——Android四大组件之一。本文要点1.Content Provider简介2.URI简介3.如何访问Content Provider中数据一、Content Provider简介Content Provider,Android四大组件之一。它是Android...
分类:
其他好文 时间:
2014-12-02 20:39:58
阅读次数:
245