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
setListAdapter(new ArrayAdapter<string>(this, R.layout.list_item, strings) { | |
@Override | |
public View getView(int position, View convertView, ViewGroup parent) { | |
View row; | |
if (null == convertView) { | |
row = mInflater.inflate(R.layout.list_item, null); | |
} else { | |
row = convertView; | |
} |
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
<html> | |
<head> | |
<title>YUI in YQL</title> | |
<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script> | |
<script type="text/javascript"> | |
YUI().use('node', 'yql', function(Y) { | |
Y.YQL('SELECT * FROM upcoming.events WHERE location = "Bangalore"', function(r) { | |
// process the result json object |
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
WebView wv = (WebView) findViewById(R.id.wv1); |
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
gpg --keyserver keys.gnupg.net --recv-key 89DF5277 | |
gpg -a --export 89DF5277 | sudo apt-key add - |
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
RedirectMatch permanent ^/blog/[0-9]{4}/[0-9]{2}/[0-9]{2}/([a-z0-9-/]+) http://sudarmuthu.com/blog/$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
AudioManager audioManager = (AudioManager) getApplicationContext().getSystemService(Context.AUDIO_SERVICE); |
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
/** | |
* The service connection class that allows you to talk to the MediaPlayer Service | |
* | |
* @author "Sudar Muthu (http://sudarmuthu.com)" | |
* | |
*/ | |
private class MediaPlayerServiceConnection implements ServiceConnection { | |
public com.htc.music.IMediaPlaybackService mServiceHtc; | |
public com.android.music.IMediaPlaybackService mServiceAndroid; |
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 | |
require_once('geoplugin.class.php'); | |
$geoplugin = new geoPlugin(); | |
$geoplugin->locate(); | |
echo get_posts_by_tag("{$geoplugin->city},$geoplugin->region}", 5); | |
?> |
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 class ConditionalCompile { | |
private static final Logger LOGGER = Logger.getLogger(ConditionalCompile.class); | |
private final static boolean doLogging = false; | |
public static void importantMethod( ) { | |
// Do some set up code. | |
if (doLogging) { | |
LOGGER.debug("Set up complete, beginning phases."); | |
} | |
// do first part. |
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
ADK demo start | |
ADK Init | |
ADK protocol rev. 1 | |
Accessory mode switch attempt | |
ADK Init | |
Acc.mode device detected | |
Endpoint Structure: | |
EP0: |