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 main | |
import ( | |
"bytes" | |
"encoding/csv" | |
"encoding/gob" | |
"encoding/json" | |
"math/rand" | |
"testing" | |
) |
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 trikita.anvil.demo; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.RelativeLayout; | |
import android.widget.Spinner; |
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 trikita.anvil.demo; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.RelativeLayout; | |
import android.widget.Spinner; |
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
/** A tiny benchmark class */ | |
public static class B { | |
private int count = 0; | |
private long start; | |
private long end; | |
private long min = Long.MAX_VALUE; | |
private long max; | |
private String label; |
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
/* | |
* Copyright 2013 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
-- | |
-- Let you write code like | |
-- chain(func1):next(func2):next(func3):go() | |
-- | |
function chain(cb) | |
local queue = {} | |
local n, go; | |
go = function() | |
local cb = table.remove(queue, 1) |
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 chain(callback) { | |
var queue = []; | |
function _next() { | |
var cb = queue.shift(); | |
if (cb) { | |
cb(_next); | |
} | |
} |
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
diff --git a/lposix.c b/lposix.c | |
index 03dcbe8..e0bd25c 100644 | |
--- a/lposix.c | |
+++ b/lposix.c | |
@@ -34,6 +34,8 @@ | |
#include <time.h> | |
#include <unistd.h> | |
#include <utime.h> | |
+#include <sys/ipc.h> | |
+#include <sys/msg.h> |
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
// ==UserScript== | |
// @match http://developer.android.com/* | |
// ==/UserScript== | |
var elem = document.getElementById('search-container'); | |
document.addEventListener("keypress", function(e) { | |
if (e.which == 47) { // '/', like in vim | |
if (document.createEvent) { | |
var ev = document.createEvent('MouseEvents'); |
NewerOlder