摘要:题目1384:二维数组中的查找题目描述:在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。思路:设需要查找的数为key,先二分查找最后一列不小于key的数的位置pos,然后二分查找pos行。 1 #include 2 int a[1001][1001]; 3 int n,m; 4 int binary1(int l,int r,int key,int col) 5 { 6 int mid = (l+r)/2; 7 if(l==r)return l; 8 ...
阅读全文
摘要:简单的单向链表 ElemType READ(); int LENGTH(LinkList list); int ISEMPTY(LinkList list); LinkList FIND(LinkList list,ElemType item); int INSERTLINK(LinkList list,int i,ElemType item); void DELETELIST(LinkList list); 1 1 #include 2 2 #include 3 3 #include 4 4 typedef int ElemType; 5 5 //链结点类型...
阅读全文
摘要:Getting Started with WebRTC原文RTCPeerConnection1.caller和callee互相发现彼此2.并且交换capabilities信息3.初始化session4.开始实时交换数据名词解释:信令:在客户端之间传递控制信息,通过控制信息处理客户端之间的发现、连接建立、连接维护和连接关闭等任务的机制。function initialize() { console.log("Initializing; room=99688636."); card = document.getElementById("card"); loc
阅读全文
摘要:传入指针参数 1 #include 2 #include 3 void READ(int *a) 4 { 5 scanf("%d",a); 6 } 7 int main() 8 { 9 int a;10 READ(&a);11 printf("a=%d\n",a);12 13 int b,*c,*d;14 scanf("%d",&b);15 //*c = b; //error,c还未分配空间16 c = &b;//right, c指向b17 print...
阅读全文
摘要:Example(摘) 1 /*When two peers decide they are going to set up a connection to each other, they both go through these steps. The STUN/TURN server configuration describes a server they can use to get things like their public IP address or to set up NAT traversal. They also have to send data for the si
阅读全文
摘要:index.ejsgetUserMedia()方法有三个参数:1.约束对象2.成功回调函数,传入参数:LocalMediaStream3.失败回调函数,传入参数:error object 1 2 3 4 5 75 View Code
阅读全文
摘要:安装Expressnpm install -g express建立工程express -e ejs FaceExpresscd FaceExpress && npm install运行node app.js
阅读全文