View timer-c++03.cpp
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 <ctime> | |
class Timer | |
{ | |
public: | |
Timer() { clock_gettime(CLOCK_REALTIME, &beg_); } | |
double elapsed() { | |
clock_gettime(CLOCK_REALTIME, &end_); |
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body { | |
font-family: sans-serif; |
View gist:5763101
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
From e3e7aa2249984e409f077732ee8cd95ff656f2a5 Mon Sep 17 00:00:00 2001 | |
From: Ian Link <Ian@Angler.(none)> | |
Date: Mon, 10 Jun 2013 23:19:07 -0700 | |
Subject: [PATCH 1/3] added separate limit for fastgin memory | |
--- | |
src/backend/access/gin/ginfast.c | 3 ++- | |
src/backend/utils/init/globals.c | 1 + | |
src/backend/utils/misc/guc.c | 12 ++++++++++++ | |
src/include/miscadmin.h | 1 + |
View fastgin_performance_workmem.sql
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
-- create and populate a table with a GIN-indexable column | |
-- we pre-populate it to a large size; autovacuum kicks in when more than | |
-- a configured proportion of the table is newly inserted, and we want to | |
-- model the case where that doesn't happen often | |
drop table gtst; | |
create table gtst as | |
select array[i,j,i*j] as a | |
from generate_series(1,1000) i, generate_series(1,1000) j; |
View gist:5758629
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
From e3e7aa2249984e409f077732ee8cd95ff656f2a5 Mon Sep 17 00:00:00 2001 | |
From: Ian Link <Ian@Angler.(none)> | |
Date: Mon, 10 Jun 2013 23:19:07 -0700 | |
Subject: [PATCH] added separate limit for fastgin memory | |
--- | |
src/backend/access/gin/ginfast.c | 3 ++- | |
src/backend/utils/init/globals.c | 1 + | |
src/backend/utils/misc/guc.c | 12 ++++++++++++ | |
src/include/miscadmin.h | 1 + |
View multipass.js
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
window.addEventListener('load', function() { | |
var section = document.querySelector('div.main'), | |
args = document.querySelector('div.arguments'), | |
controls = document.querySelector('.controls'), | |
image = args.querySelector('img'), | |
video = args.querySelector('video'), | |
log = $('log'), | |
useBloomX = true, | |
useBloomY = true, | |
useBlending = true; |
View multipass.js
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
window.addEventListener('load', function() { | |
var section = document.querySelector('div.main'), | |
args = document.querySelector('div.arguments'), | |
controls = document.querySelector('.controls'), | |
image = args.querySelector('img'), | |
video = args.querySelector('video'), | |
log = $('log'), | |
useBloomX = true, | |
useBloomY = true, | |
useBlending = true; |
View rotation.js
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
function setup_orientation(){ | |
function is_landscape(){ | |
if($(window).width() >= $(window).height()){ | |
return true; | |
} else { | |
return false; | |
} | |
} | |
var landscape = false; |
View make_hsl.js
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
function make_hsl(h,s,l){ | |
return "hsl("+h+","+s+"%,"+l+"%)"; | |
} |
View bind_from_json.js
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
/*------------------------------------------------------------------------------------ | |
* | |
* Bind from JSON - uses JSON to set up UI bindings. Utilizes jquery's 'bind' | |
* | |
* Usage: | |
* Supply JSON file formatted like this: | |
* var json = [{ | |
* 'selector' : '#id', | |
* 'bind_to' : 'click', | |
* 'func' : [ |