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
<div class="pocket-button"> | |
<a href="https://getpocket.com/save" class="pocket-btn" data-lang="en" | |
data-save-url="{Permalink}" | |
data-pocket-count="none">Pocket</a> | |
<script type="text/javascript">!function(d,i){if(!d.getElementById(i)){var j=d.createElement("script");j.id=i;j.src="https://widgets.getpocket.com/v1/j/btn.js?v=1";var w=d.getElementById(i);d.body.appendChild(j);}}(document,"pocket-btn-js");</script> | |
</div> |
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
*.pbxproj binary merge=union |
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
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"key_name" ascending:YES comparator:^NSComparisonResult(id obj1, id obj2) { | |
NSStringCompareOptions comparisonOptions = NSCaseInsensitiveSearch | NSNumericSearch | NSWidthInsensitiveSearch | NSForcedOrderingSearch; | |
NSRange stringRange = NSMakeRange(0, ((NSString *)obj1).length); | |
return [(NSString *)obj1 compare:(NSString *)obj2 options:comparisonOptions range:stringRange locale:[NSLocale autoupdatingCurrentLocale]]; | |
}]; | |
sortedArray = [[NSMutableArray alloc] initWithArray:[arrayFromSQLite sortedArrayUsingDescriptors:@[sortDescriptor]]]; |
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
@implementation UIApplication (Logging) | |
+ (void)redirectConsoleLogToDocumentFolder:(NSString *)filename | |
{ | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; | |
NSString *logPath = [documentsDirectory stringByAppendingPathComponent:filename]; | |
freopen([logPath cStringUsingEncoding:NSASCIIStringEncoding], "a+", stderr); | |
} |
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
+ (UIImage *)imageNamed:(NSString *)name withColor:(UIColor *)color; | |
{ | |
UIImage *image = [UIImage imageNamed:name]; | |
CGRect rect = CGRectMake(0, 0, image.size.width, image.size.height); | |
UIGraphicsBeginImageContext(rect.size); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextClipToMask(context, rect, image.CGImage); | |
CGContextSetFillColorWithColor(context, color.CGColor); | |
CGContextFillRect(context, rect); |
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
package org.catchabug.ToastTest; | |
import android.app.*; | |
import android.os.*; | |
import android.view.*; | |
import android.widget.*; | |
public class ToastTest extends Activity { | |
Toast mToast = null; | |
int count; |
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
public void onDraw(Canvas canvas) { | |
Path path = new Path(); | |
canvas.drawColor(Color.WHITE); | |
Paint Pnt = new Paint(); | |
Pnt.setStrokeWidth(5); | |
Pnt.setColor(Color.RED); | |
Pnt.setStyle(Paint.Style.STROKE); | |
// 원, 사각형을 패스로 정의한 후 출력 |
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
public void onDraw(Canvas canvas) { | |
Paint Pnt = new Paint(); | |
canvas.drawColor(Color.WHITE); | |
String str = "Made in Korea"; | |
char[] arCh = {'a', 'b', 'c'}; | |
// 기본 문자열 출력. 안티 알리아싱을 적용했다. | |
Pnt.setAntiAlias(true); | |
Pnt.setColor(Color.BLACK); | |
canvas.drawText(str, 10, 10, Pnt); |
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
// | |
// UITextViewTutorialViewController.h | |
// UITextViewTutorial | |
// | |
// Created by chanju Jeon on 11. 5. 4.. | |
// Copyright 2011 Talk on :Play. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
public void onDraw(Canvas canvas) { | |
Paint Pnt = new Paint(); | |
canvas.drawColor(Color.WHITE); | |
/* 원론적인 방법 | |
Resources r=getResources(); | |
BitmapDrawable bd=(BitmapDrawable)r.getDrawable(R.drawable.eighty8); | |
Bitmap bit=bd.getBitmap(); | |
//*/ | |