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 <stdio.h> | |
int main(void) | |
{ | |
int x = 10; | |
if(x > 5) { | |
puts("x is greater than 5."); | |
} else { | |
puts("x is not greater than 5."); | |
} |
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 <stdio.h> | |
int main(int argc, char *argv[], char *envp[]) | |
{( | |
**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/ | |
*/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/* | |
/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/** | |
**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/ | |
*/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/* | |
/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/**/** |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
#include <sys/time.h> | |
#include <unistd.h> | |
#include <err.h> | |
#include <errno.h> | |
static struct timeval starttime, endtime; | |
static int started = 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
/* | |
* This source code is a template code to make a simple GUI program like a game with JFC/Swing. | |
*/ | |
import java.awt.*; | |
import java.awt.geom.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import javax.swing.event.*; |
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 org.acikelabo; | |
import java.lang.reflect.Array; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; | |
import java.util.Set; | |
public class RubyInspect { | |
private static HashMap<Class<?>, InspectMethod> inspectMethods; | |
static { |
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
#::::zsh setting file:::: | |
#I think it would not work well in zsh version 4.3.2 | |
# ::set key bind | |
bindkey -v | |
# ::prompt setting | |
PROMPT='%B%F{blue}%n@%m:%b%f%~ | |
%(?.%f.%S%F{red})%#%f%s ' |
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
#!/usr/bin/ruby -Ku | |
# -*- coding: utf-8 -*- | |
$><<$<.read.gsub(/[^※…「」、。!?ー〜一-鿿㐀-䷿𠀀-]/,"") |
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
/** | |
* dvector.h | |
* | |
* #include "dvector.h" | |
* | |
* then std::vector::operator[] seems to become checking the range of index. | |
* | |
* If you aren't using default allocator, I think it may not work. | |
* | |
*/ |
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
public class Fib { | |
public static void main(String[] args) { | |
long[] js = new long[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,50,100,300,1000,10000,1000000,10000000L}; | |
for(long j : js) { | |
long st = System.nanoTime(); | |
String result = fib(j); | |
long tm = System.nanoTime() - st; | |
System.out.println("fib("+j+") == "+result+";time="+tm/1000000000+"s+"+(tm/1000000)%1000+"ms"); | |
System.gc(); | |
} |
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
#hypersl for zsh | |
#usage: | |
#. hypersl.sh | |
function sl { | |
PROMPT='$' | |
PROMPT2='' | |
PROMPT3='' | |
PROMPT4='' | |
RPROMPT='' |