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
This is a test gits. |
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
require 'net/http' | |
require 'uri' | |
# /api/v1/:format/new | |
# /api/v1/:format/gists/:user | |
# /api/v1/:format/:gist_id | |
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'), | |
{ 'files[file1.ab]' => 'CONTNETS', | |
'files[file2.ab]' => 'contents' }) |
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
MouseAdapter handler = new MouseAdapter() { | |
//Override methods | |
} | |
// Get all children of the combobox | |
Component c[] = combobox.getComponents(); | |
for (int i =0; i < c.length; i++) { | |
// add event listener to all of the child components | |
c[i].addMouseListener(handler); | |
} |
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
Intent sharingIntent = new Intent(Intent.ACTION_SEND); | |
Uri screenshotUri = Uri.parse(path); | |
sharingIntent.setType("image/png"); | |
sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri); | |
startActivity(Intent.createChooser(sharingIntent, "Share image using")); |
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); |
OlderNewer