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
@implementation NSString(hoge) | |
- (NSMutableString*)stringByEliminatingHTMLTag { | |
int i = 0; | |
NSMutableString* str = [NSMutableString string]; | |
UniChar *p = (UniChar*)CFStringGetCharactersPtr((CFStringRef)self); | |
int length = [self length]; | |
BOOL isCopied = NO; |
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 *sample = @"<font size=+1 color=#FF0000><b>書きこみ&クッキー確認</b></font><ul><br><br><b> </b><br>名前: <br>E-mail: sage<br>内容:<br>sage<br><br></ul><b>投稿確認<br>・投稿者は、投稿に関して発生する責任が全て投稿者に帰すことを承諾します。<br>・投稿者は、話題と無関係な広告の投稿に関して、相応の費用を支払うことを承諾します<br>21条ないし第28<br>対して再許諾する権利を含みます)を許諾しないことを承諾します。<br>投稿者は、掲示板運営者あるいはその指定する者に対して、著作者人格権を一切行使しないことを承諾します。<br><br></b><form method=POST action=\"../test/bbs.cgi?guid=ON\"><input type=hidden name=subject value=\"\"><input TYPE=hidden NAME=FROM value=\"\"> <input TYPE=hidden NAME=mail value=\"sage\"><input type=hidden name=MESSAGE value=\"sage\"><input type=hidden name=bbs value=newsplus><input type=hidden name=time value=1318941809><input type=hidden name=key value=1318932938><input type=hidden name=\"kibi\" value=\"dango\"><br><input type=submit value=\"上記全てを承諾して書き込む\" name=\"submit\"><br></form><br><br>現在、荒らし対策でクッキーを設定していないと書きこみできないようにしています。<br><font size=-1>(cookieを設定するとこの画面はでなくなります。)</font><br>"; | |
NSLog(@"%@", sample); |
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
svn update . | |
revisionNumber=$(svnversion -n) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleSubversionRevision $revisionNumber" "$INFOPLIST_FILE" | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" |
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
# make iPhone's storyboard file for Japanese | |
ibtool --generate-stringsfile $SRCROOT/Resources/Japanese.lproj/MainStoryboard_iPhone.storyboard.string --import-strings-file $SRCROOT/Resources/Japanese.lproj/MainStoryboard_iPhone.storyboard.string $SRCROOT/Resources/English.lproj/MainStoryboard_iPhone.storyboard | |
ibtool --write $SRCROOT/Resources/Japanese.lproj/MainStoryboard_iPhone.storyboard -d $SRCROOT/Resources/Japanese.lproj/MainStoryboard_iPhone.storyboard.string $SRCROOT/Resources/English.lproj/MainStoryboard_iPhone.storyboard |
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
json = JSON.parse(`plutil -convert json -o - "#{filename}"`) |
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
# update subversion revision | |
svn update . | |
revisionNumber=$(svnversion -n) | |
revisionNumber=$(echo $revisionNumber | sed 's/:[0-9M]*//') | |
revisionNumber=$(echo $revisionNumber | sed 's/M//') | |
/usr/libexec/PlistBuddy -c "Set :CFBundleSubversionRevision $revisionNumber" "$INFOPLIST_FILE" | |
# update build number | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=$(($buildNumber + 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
# update github revision | |
hash=$(git rev-parse HEAD) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleGithubRevision $hash" "$INFOPLIST_FILE" | |
shorthash=$(git rev-parse --short HEAD) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleGithubShortRevision $shorthash" "$INFOPLIST_FILE" | |
# update build number | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" |
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
#if TARGET_IPHONE_SIMULATOR | |
#import <objc/objc-runtime.h> | |
#else | |
#import <objc/runtime.h> | |
#endif | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/time.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
NSString *input = @"Sun Mar 18 06:42:26 +0000 2007"; | |
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | |
[formatter setDateFormat:@"EEE MMM dd HH:mm:ss Z yyyy"]; | |
[formatter setLocale:[NSLocale systemLocale]]; | |
NSDate *date = [formatter dateFromString:input]; | |
NSLog(@"String = %@", input); |
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
Common subdirectories: ./evernote-sdk-ios/3rdParty and ./Evernote/3rdParty | |
Common subdirectories: ./evernote-sdk-ios/EDAM and ./Evernote/EDAM | |
diff -c ./evernote-sdk-ios/EvernoteSession.h ./Evernote/EvernoteSession.h | |
*** ./evernote-sdk-ios/EvernoteSession.h 2012-09-05 21:47:00.000000000 +0900 | |
--- ./Evernote/EvernoteSession.h 2012-11-08 06:07:05.000000000 +0900 | |
*************** | |
*** 66,71 **** | |
--- 66,74 ---- | |
// Shared dispatch queue for API operations. | |
@property (nonatomic, readonly) dispatch_queue_t queue; |
OlderNewer