Skip to content

Instantly share code, notes, and snippets.

View cocoatomo's full-sized avatar
🐧
Translating

cocoatomo cocoatomo

🐧
Translating
View GitHub Profile
@cocoatomo
cocoatomo / gist:2259087
Created March 31, 2012 03:51 — forked from yusuke/gist:2136681
twitter name card
<%@ page language="java" import="twitter4j.*,java.util.List" contentType="text/html; charset=UTF-8" session="false" %>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
</head>
<style>
.username {
font-size: 12pt;
}
.description{
@cocoatomo
cocoatomo / stderr
Created February 5, 2012 12:25
error occurred when installing sphinxjp.themes.impressjs
$ pip install sphinxjp.themes.impressjs
Downloading/unpacking sphinxjp.themes.impressjs
Downloading sphinxjp.themes.impressjs-0.1.0.tar.gz
Running setup.py egg_info for package sphinxjp.themes.impressjs
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/tomohiko/MyWorks/Python/bloggart/build/sphinxjp.themes.impressjs/setup.py", line 7, in <module>
open(os.path.join("src", "README.txt")).read(),
IOError: [Errno 2] No such file or directory: 'src/README.txt'
Complete output from command python setup.py egg_info:
# LaTeX
LATEX = platex --kanji=utf8
DVIPDFM = dvipdfmx
LaTeXDocument(TAPL_Chap11, TAPL_Chap11)
.DEFAULT: TAPL_Chap11.pdf TAPL_Chap11.dvi
@cocoatomo
cocoatomo / cast.c
Created May 14, 2011 13:32
PyObject の基礎: ソースコード2
#include <stdio.h>
#include <stdlib.h>
struct base {
int basic_field;
};
struct extended {
struct base base;
int extended_field;
@cocoatomo
cocoatomo / rect.c
Created May 14, 2011 13:03
PyObject の基礎: ソースコード
#include <stdio.h>
struct rect {
int height;
int width;
void (*rotate)(struct rect *);
};
void rect_rotate(struct rect *);
# OMakefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
SRCDIR = source
BUILDDIR = build
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: hello.rb
package ruby.jit;
import org.jruby.Ruby;
import org.jruby.RubyInstanceConfig;
import org.jruby.ast.executable.AbstractScript;
@cocoatomo
cocoatomo / ArrayInit.java
Created April 19, 2011 02:55
配列の初期化
public class ArrayInit {
public static void main(String[] args) {
Integer[] integerArray = new Integer[] {1, 2, 3};
// String[] stringArray = new String[] {"hoge", "fuga", "piyo"};
String[] stringArray = {"hoge", "fuga", "piyo"}; // こっちで良かった.
int[] intArray = {1, 2, 3};
// Integer[] integerArray = {1, 2, 3}; # compile error
myPrintArray(new Integer[] {1, 1, 2, 3, 5});
@cocoatomo
cocoatomo / 76E.c
Created April 16, 2011 03:43
Python は通ったが, C と Java が通らない.
#include <stdio.h>
int main()
{
char buf[64];
int N;
int i;
int x, y;
long sum_x=0, sum_y=0, sum_x2=0, sum_y2=0;
int n;
enum DataType {
// primitive
BOOLEAN(true),
CHARACTER(true),
INTEGER(true),
DECIMAL(true),
STRING(true),
// non-primitive
TYPE_HASH(false),