This file contains hidden or 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
(defgroup u-nya nil | |
"Showing u-nya on mode-line." | |
:prefix "u-nya-" | |
:group 'frames) | |
(defface u-nya:face | |
nil | |
"Face for modeline" | |
:group 'u-nya) |
This file contains hidden or 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
Platform i386 Ubuntu 10.04 | |
[GMP 5.0.5] | |
% CPPFLAGS=-fexceptions ../configure \ | |
--prefix=/home/syohei/local --enable-cxx | |
% make | |
% make check | |
% make install | |
[MPFR 3.1.0] |
This file contains hidden or 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
--- orig_cdr.zsh 2012-06-13 13:02:54.283074133 +0900 | |
+++ cdr.zsh 2012-06-13 13:03:06.091074311 +0900 | |
@@ -14,7 +14,8 @@ | |
} | |
function zaw-src-cdr-cd () { | |
- BUFFER="cd $1" | |
+ VAR=`echo -n $1 | awk '{ print \$2 }'` | |
+ BUFFER="cd $VAR" | |
zle accept-line |
This file contains hidden or 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
# | |
# zaw-src-gitdir | |
# | |
# zaw source for git command | |
# | |
function zaw-src-gitdir () { | |
_dir=$(git rev-parse --show-cdup 2>/dev/null) | |
if [ $? -eq 0 ] | |
then |
This file contains hidden or 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
#!perl | |
use strict; | |
use warnings; | |
sub merge_sort { | |
my $target_array_ref = shift; | |
my $len = scalar @{$target_array_ref}; | |
if ($len <= 1) { | |
return $target_array_ref; |
This file contains hidden or 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/env ruby | |
# -*- coding:utf-8 -*- | |
def merge_sort(a) | |
if a.length <= 1 | |
a | |
else | |
(b, c) = split(a) | |
merge( merge_sort(b), merge_sort(c)) | |
end |
This file contains hidden or 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
#!perl | |
use strict; | |
use warnings; | |
use Furl; | |
use XML::RSS::LibXML; | |
use Encode; | |
my $rss_url = shift or die "Usage: $0 rss_url"; | |
my $ua = Furl->new(); |
This file contains hidden or 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
/* | |
arm-linux-gnueabi-gcc-4.6 -O2 -march=armv7-a -mtune=cortex-a9 -ftree-vectorize -mhard-float -mfloat-abi=softfp -mfpu=neon -ffast-math -mvectorize-with-neon-quad -S neon_test.c | |
*/ | |
void NeonTest(short int * __restrict a, short int * __restrict b, short int * __restrict z) | |
{ | |
int i; | |
for (i = 0; i < 200; i++) { | |
z[i] = a[i] * b[i]; | |
} | |
} |
This file contains hidden or 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
(defun kill-buffer-and-dired () | |
(interactive) | |
(let (dir (file-name-directory (buffer-file-name (current-buffer)))) | |
(kill-buffer (current-buffer)) | |
(dired dir))) | |
(global-set-key (kbd "C-x C-k") 'kill-buffer-and-dired) |
This file contains hidden or 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
all' :: (a -> Bool) -> [a] -> Bool | |
all' _ [] = True | |
all' f (x:xs) = if f x then all' f xs else False | |
any' :: (a -> Bool) -> [a] -> Bool | |
any' _ [] = False | |
any' f (x:xs) = if f x then True else any' f xs | |
takeWhile' :: (a -> Bool) -> [a] -> [a] | |
takeWhile' _ [] = [] |