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
find . -name .svn -print0 | xargs -0 rm -rf |
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)ChangeImage{ | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
[UIView beginAnimations:nil context:context]; | |
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; | |
[UIView setAnimationDuration:0.5]; //动画长度,单位为秒 | |
[self.view setAlpha:1]; | |
[myimageview setAlpha:1]; |
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
<!-- Grab Google CDN's jQuery. fall back to local if necessary --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script>!window.jQuery && document.write('<script src="js/jquery-1.4.2.min.js"><\/script>')</script> |
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
NSString *dateStr = @"20081122"; | |
// Convert string to date object | |
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; | |
[dateFormat setDateFormat:@"yyyyMMdd"]; | |
NSDate *date = [dateFormat dateFromString:dateStr]; | |
// Convert date object to desired output format | |
[dateFormat setDateFormat:@"EEEE MMMM d, YYYY"]; | |
dateStr = [dateFormat stringFromDate:date]; |
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
NSDate *date = [NSDate date]; | |
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; | |
[dateFormat setDateFormat:@"EEEE MMMM d, YYYY"]; | |
NSString *dateString = [dateFormat stringFromDate:date]; | |
[dateFormat release]; |
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
//The setup code (in viewDidLoad in your view controller) | |
UITapGestureRecognizer *singleFingerTap = | |
[[UITapGestureRecognizer alloc] initWithTarget:self | |
action:@selector(handleSingleTap:)]; | |
[self.view addGestureRecognizer:singleFingerTap]; | |
[singleFingerTap release]; | |
//The event handling method | |
- (void)handleSingleTap:(UITapGestureRecognizer *)recognizer { | |
CGPoint location = [recognizer locationInView:[recognizer.view superview]]; |
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
-(UIImage *)addText:(UIImage *)img text:(NSString *)text1{ | |
int w = img.size.width; | |
int h = img.size.height; | |
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | |
CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst); | |
CGContextDrawImage(context, CGRectMake(0, 0, w, h), img.CGImage); | |
char* text= (char *)[text1 cStringUsingEncoding:NSASCIIStringEncoding]; | |
CGContextSelectFont(context, "Arial",20, kCGEncodingMacRoman); | |
CGContextSetTextDrawingMode(context, kCGTextFill); |
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
var jsContext = new IronJS.Hosting.CSharp.Context(); | |
jsContext.ExecuteFile("myDlr.js"); | |
var fun = jsContext.GetFunctionAs<Func<double, double, double>>("cacl"); | |
double a = Double.Parse(this.tbxA.Text); | |
double b = Double.Parse(this.tbxB.Text); | |
var result = fun.Invoke(a,b); | |
this.tbxResult.Text = result.ToString(); |
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 [email protected] 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
/* | |
* Copyright (C) 2013 Square, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
OlderNewer