This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CLLocation+Sino.h | |
// | |
// Created by i0xbean@gmail.com on 13-4-26. | |
// 火星坐标系转换扩展 | |
// | |
// earth(国外 WGS84), mars(国内 GCJ-02), bearPaw(百度 BD-09) 坐标系间相互转换 | |
// 未包含 mars2earth. 需要这个可参考 http://xcodev.com/131.html | |
#import <CoreLocation/CoreLocation.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use "assignment1.sml"; | |
(* assert for test *) | |
fun assert (e: bool, message: string) = | |
let val prefix = "Testing [" ^ message ^ "]" | |
in if e then print( prefix ^ "----PASS\n") | |
else print(prefix ^ "----FAIL\n") | |
end | |
(* factroies for Q1-Q5 *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 把 图片 写入 沙盒 | |
-(void)photoFile { | |
//此处首先指定了图片存取路径(默认写到应用程序沙盒 中) | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); | |
//并给文件起个文件名 | |
NSString *uniquePath=[[paths objectAtIndex:0] stringByAppendingPathComponent:@"pin"]; | |
BOOL blHave=[[NSFileManager defaultManager] fileExistsAtPath:uniquePath]; | |
if (blHave) { |
NewerOlder