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
-- | |
-- 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 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 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 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 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 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 com.example.anvil.empty; | |
import android.app.Activity; | |
import android.hardware.Camera; | |
import android.os.Bundle; | |
import android.view.SurfaceHolder; | |
import android.view.SurfaceView; | |
import android.view.View; | |
import android.widget.FrameLayout; |
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
// ==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'); |
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
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 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
gridLayout() | |
space() | |
foregroundLinearLayout() | |
navigationMenuItemView() | |
navigationMenuView() | |
scrimInsetsFrameLayout() | |
appBarLayout() | |
collapsingToolbarLayout() | |
coordinatorLayout() |
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
// | |
// A simple SCTP echo client to demonstrate wrapping low-level socket file descriptor into a net.Conn. | |
// Should work fine on linux, darwin, freebsd, dragonfly and solaris (where syscalls are available for SCTP sockets). | |
// | |
package main | |
import ( | |
"errors" | |
"fmt" |
OlderNewer