Skip to content

Instantly share code, notes, and snippets.

int sum_for() {
int x, result = 0;
for (x=0;x<1000;++x) {
result += x;
}
return result;
}
int sum_while() {
int x, result = 0;
x = 0;
.file "loop_while_for.c"
.text
.globl sum_for
.type sum_for, @function
sum_for:
pushl %ebp
movl %esp, %ebp
subl $16, %esp
movl $0, -8(%ebp)
movl $0, -4(%ebp)
class Test{
int sum_inc() {
int x, result = 0;
for (x=0;x<1000;++x) {
result += x;
}
return result;
}
int sum_dec() {
int x, result = 0;
Compiled from "loop_while_for.java"
class Test extends java.lang.Object{
Test();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return
int sum_inc();
Code:
class Test{
int sum_inc() {
int x, result = 0;
for (x=0;x<1000;++x) {
result += x;
}
return result;
}
int sum_dec() {
int x, result = 0;
Compiled from "loop_while_for.java"
class Test extends java.lang.Object{
Test();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return
int sum_inc();
Code:
require "yaml"
pit = {}
local home = os.getenv("HOME")
local editor = os.getenv("EDITOR")
function pit.switch(profile)
pit.path.profile = pit.path.pitdir .. profile .. ".yaml"
local file = io.open(pit.path.config, "w")
import java.io.*;class C{static{int c;try{InputStream i=new BufferedInputStream(System.in);OutputStream o=new BufferedOutputStream(System.out);while((c=i.read())!=-1)o.write(c);o.flush();}catch(Exception e){}}}
main(c){while(c=getchar())putchar(c);}
#!/usr/bin/env ruby
# vim: set fileencoding=utf-8:
require "kakasi"
require "MeCab"
class Cambridge
def initialize
@mecab_y = MeCab::Tagger.new("-Oyomi")
end