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
<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; |
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
setTimeout((function(obj) { | |
var obj = obj; | |
var opacity = 0; | |
return function() { | |
if (opacity < 100) { | |
obj.style.MozOpaticy = opacity; | |
opacity += 5; | |
setTimeout(arguments.callee, 100); | |
} | |
} |
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
--- 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 */ |
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
#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 |
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
use IO::AIO; | |
aio_open "/temp/passwd", O_RDONLY, 0, sub { | |
my $fh = shift | |
or die "/temp/passwd: $!"; | |
warn <$fh>; | |
}; |
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
#ifndef __JSONL__ | |
#define __JSONL__ | |
#include <string> | |
#include <vector> | |
#include <map> | |
namespace jsonl { | |
class Array; |
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 <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)); |
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
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) |
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 <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\"}}"; |
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 <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* |