Skip to content

Instantly share code, notes, and snippets.

Tsuyoshi Arai taraijpn

Block or report user

Report or block taraijpn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View urandtest.c
#include<stdio.h>
#include<stdlib.h>
#define FMAX 12
#define RNUM 10000
double randnnA(int ir)
{
return ir / (RAND_MAX + 1);
}
View check_listxattr.c
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/xattr.h>
main(int ac, char *av[])
{
int eno = 0;
ssize_t rv = 0;
@taraijpn
taraijpn / test.rb
Created Oct 16, 2014
wrong ruby code
View test.rb
a=[1, 2, 3], b=[4, 5, 6], c=[7, 8, 9]
p a[1]
p b[1]
p c[1]
View gradation2.pde
size(200, 200);
colorMode(HSB, 100);
background(99);
noStroke();
int i;
for (i = 0; i <= 3; i = i + 1) {
fill(45, 80 - 20 * i, 99);
rect(0, 0, 200 - 50 * i, 200 - 50 * i);
}
@taraijpn
taraijpn / testcsv.csv
Last active Feb 21, 2017
CSVファイルフォーマットについて
View testcsv.csv
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 2.
test1,A,0120000000,=0120000000
test2,B,"0120000000",="0120000000"
test3,C,none,=none
test4,D,"none",="none"
@taraijpn
taraijpn / furikaekyujitsu_list.csv
Last active Feb 21, 2017
日本の祝日(ちょっと書き換えた版)
View furikaekyujitsu_list.csv
平成28年(2016年)の月日 平成28年(2016年)の理由 平成29年(2017年)の月日 平成29年(2017年)の理由 平成30年(2018年)の月日 平成30年(2018年)の理由
2017/1/2 元日の振替休日 2018/2/12 建国記念の日の振替休日
@taraijpn
taraijpn / intpp.c
Last active Apr 13, 2017
int ++ てすと。
View intpp.c
#include<stdio.h>
int main()
{
int n = 0;
double x = 0.0;
for (n = 0; n <= 30; n++) {
x = 0.1 * n;
printf("%.16e %d\n", x, n);
}
return 0;
@taraijpn
taraijpn / doublepp.c
Created Apr 13, 2017
double ++ てすと。
View doublepp.c
#include<stdio.h>
int main()
{
double n = 0.0;
double x = 0.0;
for (n = 0; n <= 30; n++) {
x = 0.1 * n;
printf("%.16e %.16g\n", x, n);
}
return 0;
@taraijpn
taraijpn / e2ps-4.34.patch
Last active May 13, 2019
e2ps-4.34修正パッチ (p190513)
View e2ps-4.34.patch
diff -urN e2ps-4.34.orig/e2ps.c e2ps-4.34/e2ps.c
--- e2ps-4.34.orig/e2ps.c 2002-08-21 17:50:02.000000000 +0900
+++ e2ps-4.34/e2ps.c 2019-05-14 00:12:35.434084200 +0900
@@ -32,6 +32,7 @@
float gfFontSize, gfNlRate;
float gfAsciiWidth, gfAsciiHeight;
float gfKanjiWidth, gfKanjiHeight;
+float gfDXscale=SQRT, gfDYscale=SQRT;
char gsNowTime[STRMAX], gsHeadStr[STRMAX], gsPageStr[STRMAX];
uchar guJapanese = 1;
@taraijpn
taraijpn / modcheck.c
Created Oct 23, 2017
剰余計算覚え書き(C言語)
View modcheck.c
#include<stdio.h>
#include<stdlib.h>
int main()
{
int a[4] = {3, -3, 3, -3};
int b[4] = {8, 8, -8, -8};
int i = 0;
div_t r, rx;
You can’t perform that action at this time.