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
#include <stdio.h> | |
int main (int argc, char** argv) | |
{ | |
printf("How do I delete gists?\n"); | |
} |
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
/* | |
System.getProperty() | |
Key Description of Associated Value | |
java.version Java Runtime Environment version | |
java.vendor Java Runtime Environment vendor | |
java.vendor.url Java vendor URL | |
java.home Java installation directory | |
java.vm.specification.version Java Virtual Machine specification version |
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
#! /usr/bin/ruby | |
# A script to watch files and build Android NDK projects | |
interrupted = false | |
trap("INT") { interrupted = true } | |
def print_separator | |
puts "=============================================" | |
end |
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
describe Preferences, "what I'd rather have" do | |
it "should be a bottle in front of me" do | |
end | |
it "should not be a frontal lobotomy" do | |
end | |
end | |
describe Truck, "while in possession" do |
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
describe Preferences, "what I'd rather have" do | |
it "should be a bottle in front of me" do | |
end | |
it "should not be a frontal lobotomy" do | |
end | |
end | |
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
tell application "System Events" | |
if exists file ".xcpushpop.plist" of home folder then | |
-- pop/restore | |
set plist to property list file "~/.xcpushpop.plist" | |
set xcList to value of property list item "xc" of plist | |
set ibList to value of property list item "ib" of plist | |
repeat with xcItem in xcList | |
tell application "Xcode" to open xcItem | |
end repeat |
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"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_pressed="true" > | |
<shape> | |
<gradient | |
android:startColor="@color/blue1" | |
android:endColor="@color/blue2" | |
android:angle="270" /> | |
<stroke | |
android:width="3dp" |
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://marakana.com/forums/android/examples/42.html | |
package com.marakana; | |
import java.util.List; | |
import android.app.Activity; | |
import android.location.Criteria; | |
import android.location.Location; | |
import android.location.LocationListener; |
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 TouchImageView extends ImageView { | |
public TouchImageView(Context context) { | |
int mode = NONE; | |
setOnTouchListener(new OnTouchListener() { | |
@Override | |
public boolean onTouch(View v, MotionEvent event) { | |
switch(event.getAction()) { | |
case MotionEvent.ACTION_POINTER_DOWN: | |
if (twoFingerTouch(event)) { | |
setPinchMidpoint(event); |
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 TouchImageActivity extends Activity { | |
TouchImageView imageView; | |
PinchGestureDetector pinchDetector = PinchGestureDetector.newInstance(this, | |
new OnGestureListener() { | |
public void onScale(float scaleFactor, float pivotX, float pivotY) { | |
imageView.zoomToPivot(scaleFactor, pivotX, pivotY); | |
} | |
public void onDrag(float dx, float dy) { | |
imageView.translate(dx, dy); |
OlderNewer