Skip to content

Instantly share code, notes, and snippets.

if(methods) {
Object.keys(methods).forEach(function (key) {
prototype[key] = methods[key];
});
}
var http = require('http');
var s = http.createServer(function(req, res) {
res.writeHead(200, {'content-type' : 'text/plain'});
res.write("hello");
setTimeout(function () {
res.end("world");
},2000);
});
var http = require("http");
var s = http.createServer(function(req, res) {
res.writeHead(200, {'content-type' : 'text/plain'});
res.write("hello \n");
setTimeout(function () {
res.end("world \n");
},2000);
});
git checkout [-q] [-f] [-m] [<branch>]
git checkout [-q] [-f] [-m] [--detach] [<commit>]
git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
git checkout [-p|--patch] [<tree-ish>] [--] [<paths>...]
private void insertStockInTableLayout(String stock, int arrayIndex) {
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View newStockRow = inflater.inflate(R.layout.stock_qoute_row, stockTableTableLayout, true);
TextView newStockTextView = (TextView) newStockRow.findViewById(R.id.stockSymbolTextView);
newStockTextView.setText(stock);
System.out.println(stock);
private void insertStockInScrollView(String stock, int arrayIndex) {
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View myRootTableLayout = inflater.inflate(R.layout.stock_qoute_row, stockTableL);
System.out.println(myRootTableLayout);
TextView newStockTextView = (TextView) myRootTableLayout.findViewById(R.id.stockSymbolTextView);
newStockTextView.setText(stock);
06-03 21:50:22.529: I/System.out(1596): android.widget.TableLayout@40511978
06-03 21:50:22.529: I/System.out(1596): tyuu
06-03 21:50:49.565: I/System.out(1596): android.widget.TableLayout@40511978
06-03 21:50:49.565: I/System.out(1596): itzh
06-03 21:50:53.209: I/System.out(1596): android.widget.TableLayout@40511978
06-03 21:50:53.219: I/System.out(1596): ggdffdsvj
06-03 21:50:53.389: D/dalvikvm(1596): GC_CONCURRENT freed 242K, 49% free 2895K/5639K, external 412K/520K, paused 5ms+9ms
06-03 21:50:56.832: I/System.out(1596): android.widget.TableLayout@40511978
06-03 21:50:56.832: I/System.out(1596): cfeey
06-03 21:52:01.035: I/dalvikvm(1596): Jit: resizing JitTable from 512 to 1024
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<style name="MyThemeOverride">
<item name="android:windowNoTitle">true</item>
<item name="android:background">#FF00FF</item>
<item name="android:windowBackground">@android:color/white</item>
</style>
private List<Double> threeGrades = new ArrayList<Double>();
private List<Double> twoGrades = new ArrayList<Double>();
private List<Double> oneGrades = new ArrayList<Double>();
private List<Double>[] actualListOfGrades = new List<Double>[3]();