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
// Uses an AsyncTask to download a Twitter user's timeline | |
private class DownloadTwitterTask extends AsyncTask<String, Void, String> { | |
final static String CONSUMER_KEY = "MY CONSUMER KEY"; | |
final static String CONSUMER_SECRET = "MY CONSUMER SECRET"; | |
final static String TwitterTokenURL = "https://api.twitter.com/oauth2/token"; | |
final static String TwitterStreamURL = "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name="; | |
@Override | |
protected String doInBackground(String... screenNames) { | |
String result = null; |
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
<style> | |
ol { | |
font-weight:bolder; | |
} | |
ol li span { | |
font-weight: normal; | |
} | |
</style> |
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
<div id="wrapper"> | |
<div id="splitter"> | |
<div id="left"> | |
<div class="inner"> | |
<h3>Create</h3> | |
<dl> | |
<dt>Name:</dt> | |
<dd><input type="text" id="create-name" /></dd> | |
<dt>Description</dt> | |
<dd><textarea rows="5" cols="20" id="create-description"></textarea></dd> |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http') | |
, path = require('path'); | |
var app = express(); |
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
<section id="page1" data-role="page" data-theme="b"> | |
<!-- panel --> | |
<div data-role="panel" id="page1Panel" data-theme="a"> | |
<ul data-role="listview" data-inset="true" data-divider-theme="b" data-theme="d"> | |
<li data-role="list-divider">Pages</li> | |
<li><a href="#page2">Page 2</a></li> | |
<li><a href="#page3">Page 3</a></li> | |
<li data-role="list-divider">System</li> | |
<li data-icon="gear"><a href="#settings">Settings</a></li> | |
<li data-icon="info"><a href="#about">About</a></li> |
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
<link href="content/jquery.mobile-1.3.0.min.css" rel="stylesheet" type="text/css" /> | |
<!--<script src="libs/require.js" data-main="scripts/app.js"></script>--> | |
<script src="libs/jquery-1.9.1.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// Prevent jQM from handling <a> clicks and # changes | |
// IMPORTANT: This must be hooked before loading jQM | |
$(document).on("mobileinit", function () { | |
$.mobile.linkBindingEnabled = false; | |
$.mobile.hashListeningEnabled = false; | |
}); |
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
(function () { | |
window.App = { | |
Models:{}, | |
Views: {}, | |
Router:{}, | |
Event:_.extend({}, Backbone.Events) | |
}; | |
})(); |
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
(function () { | |
App.Router = Backbone.Router.extend({ | |
routes:{ | |
"":'page1', | |
"page2":"page2", | |
"page3":"page3", | |
"settings":"settings", | |
"about":"about" | |
}, | |
page1:function () { |
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
<h1>Live DOM Objects</h1> | |
<button onclick="runTest()">Run Test</button> | |
<div>#1</div> | |
<div>#2</div> | |
<script type="text/javascript"> | |
function runTest() { | |
var div, ndx, divs = document.getElementsByTagName("div"); | |
/* |
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
RocknCoder.Pages.page1 = (function () { | |
return { | |
pagebeforeshow: function () { | |
$('#panel').slidePanel({side: 'left', speed: 500}); | |
}, | |
pageshow: function () { | |
} | |
}; | |
}()); |