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
#include <iostream> | |
template <typename V, typename N> | |
class Vector | |
{ | |
public: | |
const V value; | |
const N next; | |
Vector(const V& v, const N& n): value(v), next(n) {} |
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 path.to.pkg | |
import android.app | |
import android.os | |
import android.content | |
import android.hardware | |
import android.view | |
import android.hardware | |
import android.graphics |
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 path.to.pkg; | |
public final class Utils | |
{ | |
static void YUV422toARGB8888(byte[] src, int[] dest, int w, int h) | |
{ | |
final int fsize = w * h; | |
for (int y=0, p=0; y<h; ++y) | |
{ | |
int uvp = fsize + (y >> 1) * w, U = 0, V = 0; |
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
#-*- coding:utf-8 -*- | |
from wsgiref import simple_server | |
def teapot(environ, start_response): | |
start_response("418 I'm a teapot", []) | |
return "I'm a teapot" |
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
%% -*- coding:utf-8 -*- | |
-module(json). | |
-export([parseJson/1]). | |
%% 空白飛ばし | |
skipSpace([]) -> | |
[]; | |
skipSpace([X|XS]) when (X == $ ) or (X == $\n) or (X == $\r) or (X == $\t) -> | |
skipSpace(XS); |
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 net.shomah4a.utils.generator.continuation | |
import scala.util.continuations.{reset, shift, cpsParam} | |
object Generator | |
{ | |
type GenParam[T] = (Option[T], Option[GeneratorSupport[T]]) | |
type GenState[T] = cpsParam[GenParam[T], GenParam[T]] |
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 net.shomah4a.utils.generator.actor | |
import scala.actors | |
class GeneratorMessage | |
object StopIteration | |
class Yielder[T](postto: actors.Actor, msgobj: GeneratorMessage) | |
{ |
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
#-*- coding:utf-8 -*- | |
import wx | |
class Window(wx.Frame): | |
def __init__(self, *argl, **argd): | |
super(Window, self).__init__(*argl, **argd) |
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
;;; ikazuchi-mode.el --- ikazuchi, translate using web APIs, minor mode. | |
;;; | |
;;; Currently can use only Google. | |
;;; | |
(provide 'ikazuchi-mode) | |
;; set path to ikazuchi if you have not set PATH. | |
(defvar ikazuchi-path "ikazuchi") |
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
class StaticMethod(object): | |
def __init__(self, f): | |
self.function = f | |
def __get__(self, *args, **argd): | |
return self.function |
OlderNewer