This file contains hidden or 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
defaults write org.vim.MacVim MMTextInsetTop '10' | |
defaults write org.vim.MacVim MMTextInsetLeft '10' | |
defaults write org.vim.MacVim MMTextInsetBottom '10' | |
defaults write org.vim.MacVim MMTextInsetRight '10' |
This file contains hidden or 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
// Core Animation Example: eggs falling out of a tree | |
// This was glommed from iphonedevsdk: http://www.iphonedevsdk.com/forum/iphone-sdk-development/65632-animation-sample-code-our-newest-app.html | |
// This is the main animation routine. | |
- (IBAction) doorEasterEggAction; | |
{ | |
//treeDoorImageView | |
CATransform3D theTransform; | |
UIImageView* anEgg; |
This file contains hidden or 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
NSFont *normalFont = [NSFont systemFontOfSize:12]; | |
CGRect renderFrame = CGRectMake(0, 0, 300, 50); // box to render the text into | |
static NSLayoutManager *layMan = nil; | |
if (!layMan) { | |
layMan = [NSLayoutManager new]; | |
} | |
CGFloat lineHeight = [layMan defaultLineHeightForFont:normalFont]; // calculate the expected height of a line | |
NSDictionary *attrDict = [NSDictionary dictionaryWithObject:normalFont andKey:NSFontAttributeName]; |
This file contains hidden or 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
""" | |
""" quickrun.vim | |
""" | |
" コンフィグを全クリア | |
let g:quickrun_config = {} | |
" 横分割をするようにする | |
let g:quickrun_config['*'] = {'split': ''} |
This file contains hidden or 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
diff --git a/ext/matrix_complex.c b/ext/matrix_complex.c | |
index 8a77ac1..1b1d8af 100644 | |
--- a/ext/matrix_complex.c | |
+++ b/ext/matrix_complex.c | |
@@ -1519,8 +1519,7 @@ static VALUE rb_gsl_matrix_complex_indgen_singleton(int argc, VALUE *argv, VALUE | |
return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, mnew); | |
} | |
- | |
-static int gsl_matrix_complex_equal(const gsl_matrix_complex *m1, |
This file contains hidden or 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
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
1.) Open any application | |
2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
3.) Release Power button | |
4.) Press and hold Home button Lightly | |
until screen returns to icon screen |
This file contains hidden or 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
# iOS builds for ARMv7 and simulator i386. | |
# Assumes any dependencies are in a local folder called libs and | |
# headers in a local folder called headers. | |
# Dependencies should already have been compiled for the target arch. | |
PROJ=untitled | |
ifeq ($(IOS), 1) | |
ARCH=armv7 | |
DEVICE=OS | |
CC_FLAGS=-arch $(ARCH) |
This file contains hidden or 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)scan { | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
ALAssetsGroupType sources = ALAssetsGroupLibrary | ALAssetsGroupSavedPhotos; | |
NSMutableArray *tags = [[NSMutableArray alloc] init]; | |
ALAssetsGroupEnumerationResultsBlock assetsEnumerator = ^(ALAsset *result, NSUInteger index, BOOL *stop){ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
if (result) { | |
if ([[result valueForProperty:ALAssetPropertyType] isEqual:ALAssetTypePhoto]) { |
This file contains hidden or 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
XCodeの'グループとファイル'画面でターゲット選択、新規ビルドフェーズ(新規スクリプト)を追加 | |
スクリプトフェーズを最初に持ってくる('バンドルリソースをコピー'の前に持ってくる) | |
YourProject-Info.plistにVersionValueとVersionValueForDisplayキーを追加。VersionValueに\d+.\d+.\d+な文字列を入れる | |
スクリプトに以下を書く | |
VERSION=`cat ./YourProject-Info.plist | tr -d '\n\t' | perl -nle 'print ($_ =~ /^.*?<key>VersionValue<\/key><string>(\d+\.\d+\.\d+)<\/string>.*$/) ? $1 : ""'` | |
VERSION_FOR_DISPLAY=$VERSION-$CONFIGURATION-$ARCHS | |
/usr/libexec/PlistBuddy -c "Set :VersionValueForDisplay $VERSION_FOR_DISPLAY" ./YourProject-Info.plist |