There's not much you need to know. It supports nesting and offsetting.
The idea is, you start with a row and add columns with a certain span to that row.
Here's a simple example.
/* | |
* The Hello World of tomorrow | |
* Copyright (C) 2012 Scruffy | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
#!/usr/bin/env ruby -W | |
FF = lambda do;return'F'end; UU = lambda do return'U'end | |
ff=[];f=FF[]; uu = Array.new ;u=UU.call() | |
ff << f; uu << u; uu << u; | |
ff << f; uu << u; uu << u; | |
ff << f; uu << u; uu << u; | |
ff << f; uu << u; uu << u; | |
ff << f; uu << u; uu << u; |
Fork it, use it, break it, fix it, | |
Comm it, push it, pull - request it, | |
Fetch it, branch it, patch it, fake it, | |
Merge it, git: it, never - https: it. | |
Write it, cut it, paste it, save it, | |
Build it, check it, quick - rewrite it, | |
Clone it, crack it, crop it, comp it, | |
Drag and drop it, gzlib - gzip it. |
So, you want to send a motherfucking XMLHttpRequest (XHR, or commonly and falsly known as AJAX.) Too bad, just ran out of motherfucking XMLHttpRequests; but I still have one regular. XHR is not magic. It does not autofuckinmagically send things the way you want them do be sent. It does not do the thinking for you. It just sends an Http Request.
You get a hold on such a prime beast like this:
function isAnimatedGif(src, cb) { | |
var request = new XMLHttpRequest(); | |
request.open('GET', src, true); | |
request.responseType = 'arraybuffer'; | |
request.addEventListener('load', function () { | |
var arr = new Uint8Array(request.response), | |
i, len, length = arr.length, frames = 0; | |
// make sure it's a gif (GIF8) | |
if (arr[0] !== 0x47 || arr[1] !== 0x49 || |
[{ | |
"posts": ["2522423","2522465"] | |
}] |
var FragBuilder = (function() { | |
var applyStyles = function(element, style_object) { | |
for (var prop in style_object) { | |
element.style[prop] = style_object[prop]; | |
} | |
}; | |
var generateFragment = function(json) { | |
var tree = document.createDocumentFragment(); | |
json.forEach(function(obj) { | |
for (part in obj) { |