1 bool IsChineseChr(char ch)2 {3 var reg = new Regex("^[\u4E00-\u9FA5]{0,}$");4 if (reg.IsMatch(ch.ToString()))5 return true;6 ret...
分类:
其他好文 时间:
2014-09-22 23:35:53
阅读次数:
195
directShow 属性页的制作,为CBall filter加了一个属性页具体为分以下步骤: 1.在要显示属性的类中继承现ISpecifyPropertyPages类,并实现此类的GetPages()函数。如下所示:HRESULT STDMETHODCALLTYPE CBouncingBall::GetPages(CAUUID *pPages){ if (pPages == NULL) ret...
分类:
其他好文 时间:
2014-09-22 19:43:53
阅读次数:
229
题目不难,关键是边界条件要想清楚。先写一个时间复杂度为O(K)的解法。#include<iostream>
usingnamespacestd;
//a[]increase
//b[]decrease
//useret_valuetoreturntheresult
//functionretreprsenttheerrorifnot0
intfind_k(inta[],intb[],intm,intn,intk,int&ret..
分类:
其他好文 时间:
2014-09-20 19:54:10
阅读次数:
250
作为开源的虚拟化技术,对比Xen和KVM可以看到,Xen以6个无与伦比的优势领先:更好的可用资源、平台支持、可管理性、实施、动态迁移和性能基准。可用资源:Xen的问世要比KVM早4年之久(两者分别是2003年和2007年)。随着Citrix、Novell、Oracle、Sun、Ret Hat和Vir...
分类:
其他好文 时间:
2014-09-17 13:37:02
阅读次数:
233
http://blog.csdn.net/shahdza/article/details/6317011 该帖的改进版本无返回值,非负整数输入template inline void input(T &ret){ char c; ret=0; while(c=getchar(),c'9'...
分类:
其他好文 时间:
2014-09-16 10:40:30
阅读次数:
237
创建一个静态class和静态方法
public static class Class1
{
public static MvcHtmlString allenTry(this HtmlHelper helper, string id)
{
var html = "ddd";
ret...
分类:
Web程序 时间:
2014-09-15 13:00:18
阅读次数:
166
Jquery解析json字符串、json数组
解析json字符串、json数组
{"ret": 0, "msg": "", "is_lost":0, "nickname": "小米", "gender": "男", "province": "广东", "city": "广州", "yea...
分类:
Web程序 时间:
2014-09-13 18:48:45
阅读次数:
253
1 线程创建
#include
#include
#include
void thread(void)
{
int i;
for(i=0;i<3;i++)
{
printf("this is a pthread\n");
}
}
int main(void)
{
pthread_t id;
int i,ret;
ret = pthread_create(&id,N...
分类:
编程语言 时间:
2014-09-10 17:49:00
阅读次数:
276
读入优化:
int get_val()
{
int ret=0;
char c;
while((c=getchar())!=' '&&c!='\n')
ret=ret*10+c-'0';
return ret;
}...
分类:
其他好文 时间:
2014-09-09 18:23:09
阅读次数:
239
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:
其他好文 时间:
2014-09-09 12:23:58
阅读次数:
176