用NSFileManager类中方法:NSString *path=@"文件夹路径";NSFileManager * fm = [NSFileManager DefaultManager];NSArray *arr = [fmdirectoryContentsAtPath:path];枚举这个数组就...
分类:
移动开发 时间:
2014-06-28 22:16:07
阅读次数:
549
Group By/Having操作符适用场景:分组数据,为我们查找数据缩小 范围。说明:分配并返回对传入参数进行分组操作后的可枚举对象。分 组;延迟1.简单形式:var q = from p in db.Products group p by p.CategoryID into g selec...
分类:
数据库 时间:
2014-06-28 21:56:01
阅读次数:
225
关键代码: using System;using System.Collections;using System.Collections.Generic;using System.ComponentModel;using System.Reflection;namespace CSharpUtilH...
分类:
其他好文 时间:
2014-06-28 13:08:37
阅读次数:
297
15.1 枚举类型枚举类型定义了一组“符号名称/值”配对。例如,以下Color类型定义了一组符合,每个符号表示一种颜色。internal enum Color{ White, //赋值0 Red, //赋值1 Green, //赋值2 Blue, //赋值3 Or...
分类:
其他好文 时间:
2014-06-23 07:20:33
阅读次数:
203
①使用binary_search前要先保证有序②binary_search函数仅返回true或false③
分类:
其他好文 时间:
2014-06-21 12:49:50
阅读次数:
202
What?枚举变量就是我们自己定义的变量,除了int,char,double之外,我们肯定有自己想定义的变量,eg,我们想把Monday-Sunday每一天定义为Day,Day是一个变量,我们要根据不同的Day来输出不一样的东西。eg.(1)define a enumerated type:enum...
分类:
编程语言 时间:
2014-06-21 08:41:42
阅读次数:
239
#include#include#include#includeusing namespace std;#define N 2100#define M 11000int t[N];int n,m;int dp[N];int ru[N],op[N];int e[N],ne[M],v[M];int nn...
分类:
其他好文 时间:
2014-06-20 18:25:47
阅读次数:
191
下标脚本就是对一个东西通过索引,快速取值的一种语法,例如数组的a[0]。这就是一个下标脚本。通过索引0来快速取值。在Swift中,我们可以对类(Class)、结构体(structure)和枚举(enumeration)中自己定义下标脚本的语法
一、常规定义
class Student{
var scores:Int[] = Array(count:5,repeatedValue:0)
...
分类:
其他好文 时间:
2014-06-18 07:09:30
阅读次数:
209
适配器模式(adapter pattern) 枚举器和迭代器 详解本文地址: http://blog.csdn.net/caroline_wendy参考适配器模式(adapter pattern): http://blog.csdn.net/caroline_wendy/article/category/2281679Java早期版本的枚举器(Enumeration)和现在的迭代器(Iterato...
分类:
其他好文 时间:
2014-06-18 06:41:15
阅读次数:
259
一、 枚举
枚举定义了一种包含一组相关值的公共类型。枚举是Swift中的一种与类类似的类型,具有许多传统类才有的特征,例如计算属性、实例方法,能够通过扩展或协议增强功能等。
1.1 枚举定义
Swift 语言的枚举类型的定义语法如下:
enum
CompassPoint {
case
North...
分类:
移动开发 时间:
2014-06-18 00:50:25
阅读次数:
326