示例1: 1 #include 2 #include 3 4 void* clean(void* arg) 5 { 6 printf("cleanup:%s\n", (char*)arg); 7 return (void*)0; 8 } 9 10 void* thrd_fn1(...
分类:
其他好文 时间:
2015-06-14 19:53:01
阅读次数:
238
function detectFlash() {if (navigator.mimeTypes.length > 0) {return navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin != null;} else ...
分类:
Web程序 时间:
2015-06-14 19:47:32
阅读次数:
124
A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[i+1], find a peak element and return
its index.
The array may contain multiple peaks, i...
分类:
其他好文 时间:
2015-06-14 18:40:44
阅读次数:
108
自定义扩展方法: public static class EnumerableExtensions { public static bool IsEmpty(this IEnumerable source) { return !source.A...
分类:
其他好文 时间:
2015-06-14 18:09:09
阅读次数:
206
题目:如题所示思路:与上一题要求不一样的是,这里是整数的除法,而不仅仅是正整数,因此需要对输入的两个数的正负性进行判断代码:#include using namespace std;int myDiv(int a,int b){ if(a==0) return 0; if(...
分类:
其他好文 时间:
2015-06-14 16:36:09
阅读次数:
183
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2015-06-14 16:36:08
阅读次数:
119
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:
其他好文 时间:
2015-06-14 16:28:17
阅读次数:
79
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2015-06-14 16:24:41
阅读次数:
112
服务端代码void TCPServer()
{
//创建服务器socket
SOCKET socketServer = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (INVALID_SOCKET == socketServer)
{
return;
}
//绑定IP和端口
str...
分类:
其他好文 时间:
2015-06-14 13:47:46
阅读次数:
91
Description:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices o...
分类:
其他好文 时间:
2015-06-14 13:44:40
阅读次数:
119