Skip to content

Instantly share code, notes, and snippets.

View mattn's full-sized avatar
🍛
I love curry 🍛

mattn mattn

🍛
I love curry 🍛
View GitHub Profile
<html>
<head>
<script type="text/javascript">
window.addEventListener('load', function() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
var canvas = document.createElement('canvas');
canvas.style.display = "none";
canvas.left = 0;
canvas.top = 0;
canvas.width = 300;
setTimeout((function(obj) {
var obj = obj;
var opacity = 0;
return function() {
if (opacity < 100) {
obj.style.MozOpaticy = opacity;
opacity += 5;
setTimeout(arguments.callee, 100);
}
}
--- Coro/State.xs.orig 2009-06-29 15:11:50.000000000 +0900
+++ Coro/State.xs 2009-07-01 10:25:15.203125000 +0900
@@ -172,7 +172,7 @@
#endif
static double (*nvtime)(); /* so why doesn't it take void? */
-static void (*u2time)(pTHX_ UV ret[2]);
+static int (*u2time)(pTHX_ UV *);
/* we hijack an hopefully unused CV flag for our purposes */
#ifdef USE_ITHREADS
# if CORO_PTHREAD
static void *coro_thx;
# endif
#endif
#ifdef __linux
# include <time.h> /* for timespec */
# include <syscall.h> /* for SYS_* */
# ifdef SYS_clock_gettime
use IO::AIO;
aio_open "/temp/passwd", O_RDONLY, 0, sub {
my $fh = shift
or die "/temp/passwd: $!";
warn <$fh>;
};
#ifndef __JSONL__
#define __JSONL__
#include <string>
#include <vector>
#include <map>
namespace jsonl {
class Array;
#include <iostream>
#include "picojson.h"
using namespace std;
using namespace picojson;
int main(void) {
value v;
const char *text = "{\"arr\": [1,2,3], \"obj\": {\"foo\": \"bar\"}}";
string err = parse(v, text, text + strlen(text));
Index: picojson.h
===================================================================
--- picojson.h (revision 36)
+++ picojson.h (working copy)
@@ -266,9 +266,9 @@
do {
value key, val;
if (in.match("\"") == input<Iter>::positive
- && _parse_string(key, in) == input<Iter>::positive
+ && _parse_string(key, in)
#include <stdlib.h>
#include <iostream>
#include "picojson.h"
using namespace std;
using namespace picojson;
int main(void) {
value v;
const char *text = "{\"val\":\"1\",\"arr\":[1,2,3],\"obj\":{\"foo\":\"bar\", \"bar\":\"baz\"}}";
#include <iostream>
#include <curl/curl.h>
#include "picojson.h"
typedef struct {
char* data; // response data from server
size_t size; // response size of data
} MEMFILE;
MEMFILE*