我的思路:循环遍历输入的单词,每次获取一组符合 fullJustify(vector &words, int L) { 2 // Note: The Solution object is instantiated only once. 3 vector res; 4 ...
分类:
其他好文 时间:
2014-08-08 01:35:44
阅读次数:
239
积累一些代码片段在这里,作为备忘录。
+ (DRClass *)sharedDR{ //创建小黑,正常ap模式只有一个小黑,so
static DRClass *aDR = nil;
static dispatch_once_t onceToken;
dispatch_once(& onceToken, ^{
aDR = [...
分类:
其他好文 时间:
2014-08-07 19:08:30
阅读次数:
228
设计根据标示符全局只运行一次的类全局只运行一次的代码,第一个想到的绝对是dispatch_once,这是不二的选择嘛,dispatch_once还是线程安全的.这里我将提供一种非线程安全但也可以使用的全局只运行一次的代码,设计很简单:现在提供类如下:StaticFlag.h + StaticFlag...
分类:
其他好文 时间:
2014-08-06 22:49:12
阅读次数:
261
能够承载10w个timer通信执行,说关闭就关闭,里面用了一个比較巧妙的线程处理,呵呵10W个timer就10多个线程,请大牛不要笑话,供新手学习之用#pragma once#include typedef void (CALLBACK* UXTIMERCALLBACK)(DWORD,void*);...
分类:
编程语言 时间:
2014-08-06 14:21:41
阅读次数:
262
Description
Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.
The shores of Rellau Creek in central Loowater had always been a prime breeding ground for g...
分类:
其他好文 时间:
2014-08-06 10:37:41
阅读次数:
257
数据库crm_province(AUTOid,TypeName)、crm_city(ID,province_id,city_title)、crm_area(ID,province_id,city_id,area_title)注:MYSQL数据库连接正确(即:include_once("../inc/...
分类:
其他好文 时间:
2014-08-05 13:31:39
阅读次数:
183
Paths on a Grid
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 21439
Accepted: 5259
Description
Imagine you are attending your math lesson at school. Once...
分类:
其他好文 时间:
2014-08-04 18:06:27
阅读次数:
298
Problem DescriptionTIANKENG managers a pan fried rice shop. There are n kinds of fried rice numbered 1-n. TIANKENG will spend t time for once frying. ...
分类:
其他好文 时间:
2014-08-04 14:13:37
阅读次数:
259
// C# Example // Builds an asset bundle from the selected objects in the project view. // Once compiled go to "Menu" -> "Assets" and select on...
分类:
其他好文 时间:
2014-08-03 22:50:16
阅读次数:
272
c++构造函数初始化成员变量列表: 1 #pragma once 2 class Node 3 { 4 public: 5 int data; // 权值 6 Node *parent; // 父节点 7 Node *left; // 左子节...
分类:
编程语言 时间:
2014-08-02 01:35:02
阅读次数:
263