码迷,mamicode.com
首页 >  
搜索关键字:using    ( 53562个结果
【剑指offer 面试题17】合并两个排序的链表
思路: 比较两个链表端点值的大小,通过递归的方式排列。 1 #include 2 using namespace std; 3 4 struct ListNode 5 { 6 int val; 7 ListNode *next; 8 ListNode(int v = 0...
分类:编程语言   时间:2015-06-22 16:11:07    阅读次数:123
Define Functions: Keyword Arguments
Functions can also be called using keyword arguments of the form kwarg=value. For instance, the following function:def parrot(voltage, state='a stiff'...
分类:其他好文   时间:2015-06-22 14:53:31    阅读次数:107
排序算法
冒泡排序冒泡排序思想:把任意两个相邻的大小相反的位置交换、最多进行N趟、// 黑白算法之冒泡排序 #include #include #include using namespace std; const int maxn = 1005; int a[maxn]; i...
分类:编程语言   时间:2015-06-22 13:43:20    阅读次数:141
Entity Framework 连接字符串
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data.Entity;namespace Code...
分类:其他好文   时间:2015-06-22 13:40:16    阅读次数:138
我的代码转风格了
以后开始用宏定义与缩行了缺省原:#include#include#include#include#include#define rep(s,t) for(int i=s;i<=t;i++)#define ren for(int i=first[x];i!=-1;i=next[i])using nam...
分类:其他好文   时间:2015-06-22 13:38:05    阅读次数:103
List of RGBD datasets
This is an incomplete list of datasets which were captured using a Kinect or similar devices. I initially began it to keep track of semantically label...
分类:其他好文   时间:2015-06-22 13:37:33    阅读次数:265
后台音乐播放
步骤1:info.plist文件中添加:Required background modes字段,里面的item 值选择:App plays audio or streams audio/video using AirPlay步骤二:在Appdelegate.m中:- (BOOL)applicatio...
分类:其他好文   时间:2015-06-22 13:36:30    阅读次数:152
二分查找:在有序数组中搜索大于等于x的数的最小下标
标准的二分查找,大家可能都已经能记在脑海里了,但是稍微变形一下,可能就会出问题。本文写了一个二分查找算法,并且做了一个测试的脚手架,用二分查找和普通算法的结果进行比较来验证算法的正确性。 1 #include 2 #include 3 using namespace std; 4 int find(...
分类:编程语言   时间:2015-06-22 12:22:40    阅读次数:154
C++静态链表
//静态链表,我觉得删除,排序,插入有意思。 #include #define _MAX_ 0x7fffffff using namespace std;template struct Node { Type data;//保存的值 int cour;//下标,只用一个下标来解决问题。 };template<typename Typ...
分类:编程语言   时间:2015-06-22 11:11:51    阅读次数:147
STL之string
string构造函数,很多重载函数; 1 #include 2 #include 3 4 using namespace std; 5 int main() 6 { 7 string s1; 8 cout << s1 << endl; 9 10 string s2(5...
分类:其他好文   时间:2015-06-22 09:50:42    阅读次数:130
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!