Error Message:We cannot detect a running copy of GNOME on this system, so some parts of the interface may be disabled. See our troubleshooting entry f...
分类:
其他好文 时间:
2015-08-07 06:59:29
阅读次数:
390
220 Contains Duplicate III这道题用dic来记录上一次桶区间内的下标,唯一的trick是比较周边的一共三个桶class Solution: # @param {integer[]} nums # @param {integer} k # @param {in...
分类:
其他好文 时间:
2015-08-07 06:59:40
阅读次数:
102
StringIO经常被用来作为字符串的缓存,应为StringIO有个好处,他的有些接口和文件操作是一致的,也就是说用同样的代码,可以同时当成文件操作或者StringIO操作。比如:importstring,os,sysimportStringIOdefwritedata(fd,msg):fd.wri...
分类:
其他好文 时间:
2015-08-07 06:58:57
阅读次数:
134
更新说明:使用plist数据,隐藏电池状态栏等------------- ViewController.m -------------#import "ViewController.h"#import "CZCarGroup.h"#import "CZCar.h"@interface ViewCon...
分类:
其他好文 时间:
2015-08-07 06:57:50
阅读次数:
137
使用os.path.exists()方法可以直接判断文件是否存在。代码如下:>>> import os>>> os.path.exists(r'C:\1.TXT')False>>> os.path.exists(path)Return True if path refers to an existi...
分类:
其他好文 时间:
2015-08-07 06:59:54
阅读次数:
132
第一个项目已经基本落实了,再修修补补几天就可以正式投入使用了。感觉说难不难,说简单也不简单,毕竟都是新知识,一边学一边实践最后做出可以投入使用的产品,路途也是蛮坑坑洼洼的。 ????接下来就...
分类:
其他好文 时间:
2015-08-07 01:57:12
阅读次数:
144
Queuing
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3528 Accepted Submission(s): 1590
Problem Description
Queues and Priori...
分类:
其他好文 时间:
2015-08-07 01:54:32
阅读次数:
215
1.1 引言
所有的操作系统都为程序提供服务:执行新程序,打开文件,读文件,分配存储区以及获取当前时间
1.2 unix体系结构
内核的接口称之为系统调用
公共函数库构建再系统调用接口之上,应用程序既可以使用公共库函数也可以使用系统调用接口,shell 是一个特殊的应用程序,为其他应用程序提供一个接口
1.3 shell
shell是一个命令行解释器,shell的用户输入通常来自...
分类:
其他好文 时间:
2015-08-07 01:56:12
阅读次数:
175
Linux时间函数介绍;之后介绍了用于select/poll/epoll的timerfd;后面介绍了基于timerfd实现的定时器以及定时器队列。...
分类:
其他好文 时间:
2015-08-07 01:54:33
阅读次数:
195
有一种单一写线程,多个读线程并发的场景,比如测量数据的读取与更新,消费者会比较多,生产者只有一个。以下图为例:
左侧是一种经典的解法,对数据整个操作加锁。为了一个写数据线程,于将所有读线程也进行加锁显然有点浪费了。于是提出读写锁(Reader/Writer Lock), 即使是使用了读写锁,其本质也是一样的,而且在POSIX下的pthread它的内部实现是基于mutex,所以它的开销更大。如果...
分类:
其他好文 时间:
2015-08-07 01:52:29
阅读次数:
241
HDU - 1686
Oulipo
Time Limit: 1000MS
Memory Limit: 32768KB
64bit IO Format: %I64d & %I64u
Submit Status
Description
The French author Georges Perec (1936?1982) onc...
分类:
其他好文 时间:
2015-08-07 01:54:25
阅读次数:
164
//_DataStructure_C_Impl:链串
#include
#include
#include
#define ChunkSize 4
#define stuff '#'
//串的结点类型定义
typedef struct Chunk{
char ch[ChunkSize];
struct Chunk *next;
}Chunk;
//链串的类型定义
typedef struct{...
分类:
其他好文 时间:
2015-08-07 01:54:43
阅读次数:
136
#include
#include
#include
#include"SeqString.h"
/*函数的声明*/
int B_FIndex(SeqString S,int pos,SeqString T,int *count);
int KMP_Index(SeqString S,int pos,SeqString T,int next[],int *count);
void GetNext(...
分类:
其他好文 时间:
2015-08-07 01:53:36
阅读次数:
221
2015 HDU 多校联赛 5363 Key Set...
分类:
其他好文 时间:
2015-08-07 01:51:15
阅读次数:
239
本节自定义带有点击效果的圆角矩形Button。
功能:
1.button点击变色
2.上面文字也是点击变色
3.button形状为圆角矩形
4.button具有渐变效果主要分为五步:
首先你需要在layout目录下建立一个drawable目录。
1.设置按钮正常状态//button_shape_normal.xml<?xml version="1.0" encoding="utf-8"...
分类:
其他好文 时间:
2015-08-07 01:51:54
阅读次数:
173
题意:一个集合有元素1~n,求他的子集满足这样的条件:子集的所有元素的和是偶数,问有多少个这样的子集
分析:
一个排列组合问题。元素和为偶数,那么奇数肯定要调偶数个,偶数就无所谓了,所以偶数有2^(n/2)种选法,再乘以奇数有(C((n+1)/2,0)+C((n+1)/2,2).....)种选法,再减一,除去空集,注意,上面取奇数的时候用的是(n+1)/2(这里是向下取整的除法),是综合n为偶...
分类:
其他好文 时间:
2015-08-07 01:52:57
阅读次数:
216
Codeforces Round #Pi (Div. 2)
A - Lineland Mail
水题,拼手速。
/*
* @author Novicer
* language : C++/C
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include...
分类:
其他好文 时间:
2015-08-07 01:51:57
阅读次数:
127