Simple flat file NoSQL database.
$db = database('blog.json');
#include <windows.h> | |
void main() { | |
SendMessage(0xFFFF, 0x112, 0xF170, 2); | |
} |
@echo off | |
tcc echo_server.c | |
tcc echo_client.c |
var neighbors = [ | |
[ 0, 1, 0], | |
[ 1, 0, 0], | |
[ 0, -1, 0], | |
[-1, 0, 0], | |
[ 0, 0, 1], | |
[ 0, 0, -1] | |
] | |
var cornerTopLeftFront = [-0.5, 0.5, 0.5] |
let { Window } = require('./happy-dom') | |
let window = new Window() | |
let document = window.document | |
test( | |
'No change', | |
['A', 'B', 'C', 'D'], | |
['A', 'B', 'C', 'D'] | |
) |
[ | |
{ | |
"id": "1", | |
"title": "Post A", | |
"category": { | |
"id": "1", | |
"name": "Category A" | |
}, | |
"comments": [ | |
{ |
port = 3000 | |
express = require 'express' | |
serveStatic = require 'serve-static' | |
serveIndex = require 'serve-index' | |
router = require './router' | |
express() | |
.use router | |
.use serveStatic('.') | |
.use serveIndex('.') |
<?php | |
function kvstore ($file, $init = NULL) { | |
static $stores = []; | |
$store = @$stores[$file]; | |
if (!$store) { | |
$prev = @file_get_contents($file); | |
if (!$prev) { | |
if ($init) { | |
$prev = json_encode((object) $init()); |
package sketch; | |
import java.awt.Rectangle; | |
import java.util.HashMap; | |
public class Ui { | |
//////////////////////////////////// STATE ///////////////////////////////////// | |
private static class State { |
Alignment Formula: | |
itemLocation = containerLocation + containerSize * alignmentFactor - itemSize * alignmentFactor | |
item.x = container.x + container.width * alignment.x - item.width * alignment.x | |
item.y = container.y + container.height * alignment.y - item.height * alignment.y |