- Singleton
- Abstract Factory - |NSWindow| (Theme, Style)
- Builder - WebKit Document Representation
- Prototype - |NSCollectionViewItem|, Cell
- FactoryMethod - |NSDocument|, ClassCluster
- Adapter - Delegate, CocoaBinding
- Bridge - |NSImageRep|, Wrapper
- Composite - View Hierarchy, Tree
- Decorator - |NSBox|, |NSScrollView|
- Facade - |NSTextView|
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
<?php | |
/** | |
* iPhoneのアイコンみたいな画像を作るよ | |
* | |
* @author riaf<riafweb@gmail.com> | |
*/ | |
if(!class_exists('Imagick')){ | |
throw new Exception('Imagick required.'); | |
return -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
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: CjulERsDeqhhjSme66ECg
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
// http://cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html has a nice breakdown of the syntax--it helps to think of the ^ as similar to a pointer dereference symbol * | |
// block typedef: | |
typedef void(^Block)(); | |
typedef void(^ConditionalBlock)(BOOL); | |
typedef NSString*(^BlockThatReturnsString)(); | |
typedef NSString*(^ConditionalBlockThatReturnsString)(BOOL); | |
// block property with typedef: |
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 java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.Locale; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.database.AbstractCursor; | |
import android.database.Cursor; | |
import android.support.v4.app.FragmentActivity; | |
import android.text.TextUtils; |
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
curl -X POST --data-binary @payload.yaml -H "Content-type: text/x-yaml" http://localhost:4200/some-url/1024 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<View | |
android:id="@+id/emptyView" | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:layout_alignParentBottom="true" |
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
package co.uk.myapp.beachroidtest; | |
import android.app.Fragment; | |
import android.app.Instrumentation; | |
import android.test.ActivityInstrumentationTestCase2; | |
import android.test.TouchUtils; | |
import android.test.ViewAsserts; | |
import android.view.View; | |
public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> { |
OlderNewer