I hereby claim:
- I am bteitelb on github.
- I am bteitelb (https://keybase.io/bteitelb) on keybase.
- I have a public key ASALSgAMxdtejHLiNouxCuKmBGCo9dvp_G69Qz1X3KJqrAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Convert array of objects (as array or JSON) into HTML table rows and insert them into the given tbody | |
function json2table(tbody_id, json_or_array, array_of_column_keys) { | |
var tr, td, tbody = document.getElementById(tbody_id); | |
var objs = typeof(json_or_array) == 'string' ? JSON.parse(json_or_array) : json_or_array; | |
for (var i = 0; i < objs.length; i++) { | |
tr = tbody.insertRow(tbody.rows.length); | |
for (var j = 0; j < array_of_column_keys.length; j++) { | |
td = tr.insertCell(tr.cells.length); | |
td.innerHTML = objs[i][array_of_column_keys[j]]; | |
} |
// Step 1: | |
// Retrieve test image: | |
// wget http://s3.amazonaws.com/tastrix/440/large_orig/shiso_trans.png | |
// | |
// Step 2: | |
// Then, run this through node.js | |
// | |
// Step 3: | |
// Inspect shade_test.png; the overlayed squares have drop shadow with Gaussian blur, the circle of leaves does not | |
var Canvas = require('canvas') |