When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
In general, you will learn some markdown tricks combined with standard HTML tags. In more details what you will learn:
Kris Nuttycombe asks:
I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?
I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.
I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.
You don't really need a framework or fancy cutting-edge JavaScript features to do two-way data binding. Let's start basic - first and foremost, you need a way to tell when data changes. Traditionally, this is done via an Observer pattern, but a full-blown implementation of that is a little clunky for nice, lightweight JavaScript. So, if native getters/setters are out, the only mechanism we have are accessors:
var n = 5;
function getN() { return n; }
function setN(newN) { n = newN; }
console.log(getN()); // 5
setN(10);
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "#428bca", | |
"@brand-success": "#5cb85c", |
var sqlite3 = require('sqlite3').verbose(); | |
var db = new sqlite3.Database('data/demodb02'); | |
db.serialize(function() { | |
db.run("CREATE TABLE IF NOT EXISTS counts (key TEXT, value INTEGER)"); | |
db.run("INSERT INTO counts (key, value) VALUES (?, ?)", "counter", 0); | |
}); | |
<div class="DoingItRight">This is how it is done!</div> |
Do your part to resist Government surveillance and take back your privacy:
#include <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
#ifdef WIN32 | |
#define EXPORT __declspec(dllexport) | |
#else | |
#define EXPORT | |
#endif | |
static const char * lua_code = \ |