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
@import <Foundation/CPString.j> | |
@implementation CPStringTest : OJTestCase | |
- (void)testStringByReplacingOccurrencesOfStringWithString | |
{ | |
var expectedString = @"hello world. A new world!"; | |
var dummyString = @"hello woold. A new woold!"; | |
var actualString = [dummyString stringByReplacingOccurrencesOfString:@"woold" withString:@"world"]; | |
[self assertTrue:(expectedString === actualString) |
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
@import "../Extensions/CPViewController/CPViewController.j" | |
@import "../Extensions/CPActiveRecord/CPActiveRecord.j" | |
@implementation TableViewController : UIViewController | |
{ | |
CPArray data; | |
CPActiveRecord record @accessors; | |
@outlet CPTableView tableView; | |
} |
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
//Methode zum berechnen der absoluten Position | |
- (NSInteger)realRowNumberForIndexPath:(NSIndexPath *)indexPath inTableView:(UITableView *)tableView | |
{ | |
NSInteger retInt = 0; | |
if (!indexPath.section) | |
{ | |
return indexPath.row; | |
} | |
for (int i=0; i<indexPath.section;i++) |
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)viewDidLoad { | |
//Editier Button des UIViewControllers auf die Rechte Seite der Navigationbar hinzufügen | |
self.navigationItem.rightBarButtonItem = self.editButtonItem; | |
} | |
- (void)setEditing:(BOOL)editing animated:(BOOL)animated | |
{ | |
//Hier einfach das Wechseln der Anzeige zwischen Editieren & Normaler Anzeige programmieren |
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
Process: WebKitPluginHost [233] | |
Path: /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app/Contents/MacOS/WebKitPluginHost | |
Identifier: com.apple.WebKit.PluginHost | |
Version: 6533 (6533.13) | |
Build Info: WebKitPluginHost-75331300~2 | |
Code Type: X86 (Native) | |
Parent Process: WebKitPluginAgent [232] | |
PlugIn Path: /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player | |
PlugIn Identifier: com.macromedia.Flash Player.plugin |
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
NSMutableArray* points = [[NSMutableArray alloc] initWithCapacity:coordinates.count]; | |
for(int idx = 0; idx < coordinates.count; idx++) | |
{ | |
Koordinate* coord = (Koordinate*)[coordinates objectAtIndex:idx]; | |
CLLocation* currentLocation = [[[CLLocation alloc] initWithLatitude:coord.coordinate.latitude longitude:coord.coordinate.longitude] autorelease]; | |
[points addObject:currentLocation]; | |
} |
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
protected string GetMD5HashFromFile(string fileName) | |
{ | |
if (!File.Exists(fileName)) | |
return String.Empty; | |
FileStream file = new FileStream(fileName, FileMode.Open); | |
MD5 md5 = new MD5CryptoServiceProvider(); | |
byte[] retVal = md5.ComputeHash(file); | |
file.Close(); |
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
// | |
// Xcode324iOS41TestSuiteWorkaround.m | |
// | |
// This source file provides a work-around to enable running unit tests | |
// against the iPhone Simulator in Xcode 3.2.4 with iOS SDK 4.1. | |
// | |
// This work-around is only needed when using Xcode 3.2.4 to target iOS 4.1. | |
// | |
// Copyright 2010 Apple Inc. All rights reserved. | |
// |
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
// | |
// Xcode324iOS41TestSuiteWorkaround.m | |
// | |
// This source file provides a work-around to enable running unit tests | |
// against the iPhone Simulator in Xcode 3.2.4 with iOS SDK 4.1. | |
// | |
// This work-around is only needed when using Xcode 3.2.4 to target iOS 4.1. | |
// | |
// Copyright 2010 Apple Inc. All rights reserved. | |
// |
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
public class Test | |
{ | |
public void test(string test) | |
{alert "Test";} | |
} |
OlderNewer