#pragma mark - 将图片转换成圆形-(UIImage*) circleImage:(UIImage*) image withParam:(CGFloat) inset { UIGraphicsBeginImageContext(image.size); CGContextRef co.....
分类:
移动开发 时间:
2015-02-04 12:34:36
阅读次数:
180
header header("Content-Type:application/vnd.ms-excel");
header("Content-Disposition:attachment;filename=sample.xls");
header("Pragma:no-cache");
header("Expires:0"); 2.PHPExcel http://www.codeplex....
分类:
Web程序 时间:
2015-02-03 23:13:37
阅读次数:
593
uva 10012 How Big Is It?
Ian's going to California, and he has to pack his things, including his collection of circles. Given a set of circles, your program must find the smallest rectangular box...
分类:
其他好文 时间:
2015-02-03 23:11:02
阅读次数:
359
//MyString.h
#pragma once
#include
using namespace std;
class MyString
{
private:
char *m_ptr;//内存空间
public:
MyString(const char *str=NULL);//构造函数
MyString(const MyString& obj); //拷贝构造函数
~MyS...
分类:
其他好文 时间:
2015-02-03 21:25:29
阅读次数:
311
1、导入类库#import #import 2、判断是否允许使用相机#pragma mark - 确认相机是否允许访问//返回 1(YES) 表示相机不可用。返回 0(NO) 表示相机可用+(BOOL )checkCameraCanUse{ BOOL flag = NO; //C...
分类:
移动开发 时间:
2015-02-03 17:02:41
阅读次数:
251
#pragma mark- 返回一张自由拉伸的图片+ (UIImage *)resizableImage:(NSString *)name{ UIImage *image = [self imageWithName:name]; CGFloat left = image.size.width *.....
分类:
其他好文 时间:
2015-02-03 16:48:40
阅读次数:
145
#include "stdafx.h"
#define WIN32_LEAN_AND_MEAN
#include
#include
#include
#include
#include
#include
#include
#pragma comment(lib, "Iphlpapi.lib")
#pragma comment(lib, "ws2_32.li...
分类:
Web程序 时间:
2015-02-03 11:04:47
阅读次数:
258
Given an array where elements are sorted in ascending order, convert it toa height balanced BST.
HideTags
Tree Depth-first
Search
#pragma once
#include
#include
using namespace std;...
分类:
其他好文 时间:
2015-02-02 23:14:33
阅读次数:
181
#definechSTR2(x) #x这个是串化,chSTR2(1+1==2)替换成"1+1==2"其他的都是M$的扩展,不需要搞明白..#pragmawarning(push,3)//3级警告设置入栈#pragmawarning(pop)//警告设置出栈#pragmawarning(push,4)...
分类:
其他好文 时间:
2015-02-02 19:37:45
阅读次数:
169
这是一道典型的强连通的题目。 所谓强连通,就是对于一个有向图,若一个集合内任意2点都能过互相达,于是这个几何就是一个强连通分量。 对于任意图,都可以分解 人多个不相交的强连通集合。 对于这题目,只要用著名的tarjin算法对原图进行一次强连通缩点,若说有点都在一个强连通分量,就是yes, 否者no。 这里可以用并查集。
VIEW CODE
//#pragma comment(linker...
分类:
其他好文 时间:
2015-02-02 18:19:02
阅读次数:
215