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
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) */ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, |
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
#!/usr/bin/python | |
# TODO make range command line arguments | |
import sys, codecs | |
sys.stdout = codecs.getwriter('utf-8')(sys.stdout) # if your terminal can't do utf-8, well... | |
import time | |
import urllib2 | |
import BeautifulSoup |
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
#!/usr/bin/python | |
# TODO make range command line arguments | |
import sys, codecs | |
sys.stdout = codecs.getwriter('utf-8')(sys.stdout) # if your terminal can't do utf-8, well... | |
import time | |
import urllib2 | |
import BeautifulSoup |
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
class MJPOPSpring: POPSpringAnimation { | |
init(view:NSView, | |
propertyName : String? = nil, | |
toValue _toValue : AnyObject? = nil, | |
repeatForever _repeatForever:Bool? = nil, | |
repeatCount _repeatCount: Int? = nil, | |
springBounciness _springBounciness: CGFloat? = nil, | |
springSpeed _springSpeed : CGFloat? = nil, | |
dynamicsTension _dynamicsTension: CGFloat? = nil, | |
dynamicsFriction _dynamicsFriction: CGFloat? = nil, |
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 sendNotification(){ | |
// set up notification | |
int NOTIFICATION_ID = 0; | |
PendingIntent activityPendingIntent = getActivityPendingIntent(); | |
Notification n = new NotificationCompat.Builder(this) | |
.setContentTitle("You won!") | |
.setContentText("A trip to the neighbors") | |
.setSmallIcon(R.drawable.abc_btn_radio_material) | |
.setContentIntent(activityPendingIntent) | |
.build(); |
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 com.example.testSingleton; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
public class ActivityA extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { |
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
// Add the following expression for Source Text (Copy the expression, Alt-Click the Source Text Stopwatch, Paste, click outside the box): | |
// http://www.motionscript.com/design-guide/counter.html | |
numDecimals = 0; | |
commas = true; | |
dollarSign = false; | |
beginCount = 0; | |
endCount = 130000; | |
dur = 4; |
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 class GridActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.grid); | |
final GridViewPager mGridPager = (GridViewPager) findViewById(R.id.pager); | |
mGridPager.setAdapter(new SampleGridPagerAdapter(this, getFragmentManager())); | |
} |
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
Runnable runnable = new Runnable() { | |
@Override | |
public void run() { | |
start(); | |
Log.d(TAG, "run: runner executed after " + delay); | |
toggleHandler.removeCallbacks(this); | |
} | |
}; | |
Log.d(TAG, "start: running runner now"); |
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
Toast.makeText(getActivity().getApplicationContext(), "text", Toast.LENGTH_LONG).show(); |