Skip to content

Instantly share code, notes, and snippets.

View moriyoshi's full-sized avatar
😎
I do what to do.

Moriyoshi Koizumi moriyoshi

😎
I do what to do.
View GitHub Profile
ifneq ($(KERNELRELEASE),)
obj-m := my_vfs.o
my_vfs-objs := my_vfs_module.o
else
KVER = $(shell uname -r)
KDIR = /lib/modules/$(KVER)/build
modules::
$(MAKE) -C $(KDIR) M=$(shell pwd) modules
Index: ext/mbstring/mbstring.c
===================================================================
RCS file: /repository/php-src/ext/mbstring/mbstring.c,v
retrieving revision 1.224.2.22.2.47
diff -u -r1.224.2.22.2.47 mbstring.c
--- ext/mbstring/mbstring.c 15 Mar 2009 20:44:17 -0000 1.224.2.22.2.47
+++ ext/mbstring/mbstring.c 30 Apr 2009 13:36:09 -0000
@@ -329,6 +329,25 @@
};
/* }}} */
import urllib2
import os
import sys
from getopt import getopt
from getpass import getpass
def encode_query(*args):
retval = ''
for pairs in args:
for k, v in pairs:
CC = gcc
CFLAGS = -m32
LDFLAGS =
all: test
clean:
rm -f test
test: test.c test.f
#include <stdio.h>
int main(int argc, char **argv)
{
long a = 0, b = 1, c = 0;
for (;;) {
asm("lea %0, %%rdx\nlea %1, %%rsi\nlea %2, %%rdi\ncall add_":"=mp"(c):"mp"(a),"mp"(b));
printf("%ld\n", a);
a = b, b = c;
}
#include <stdio.h>
#include <math.h>
int main(int argc, char **argv)
{
double c, s, r;
for (r = 0.0; r < 2 * M_PI; r += 0.1) {
asm("fsincos": "=t"(c), "=u"(s): "0"(r));
printf("%lf %lf\n", sin(r), s);
printf("%lf %lf\n", cos(r), c);
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.SAXException;
import org.xml.sax.ContentHandler;
import org.xml.sax.Attributes;
import org.xml.sax.XMLReader;
import org.xml.sax.InputSource;
import javax.xml.parsers.SAXParserFactory;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.SAXException;
import org.xml.sax.ContentHandler;
import org.xml.sax.Attributes;
import org.xml.sax.XMLReader;
import org.xml.sax.InputSource;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import javax.xml.parsers.SAXParserFactory;
import java.util.Stack;
#include <linux/futex.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/syscall.h>
#include <stddef.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <linux/futex.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/syscall.h>
#include <stddef.h>
#include <stdint.h>
#include <unistd.h>
#include <fcntl.h>