- A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
- lengths are in any unit (ex: pixels)
- code snippets are in JavaScript
angleRad = angleDeg * Math.PI / 180;
[globals] | |
foo=bar | |
baz={{@foo}} | |
ENV_VALUE={{ getenv('ENV_VALUE') }} |
<?php | |
/** | |
* The following example combines Fat-Free Framework | |
* with the PHP Debugger (Toolbar) Tracy. | |
* | |
* @see https://github.com/bcosca/fatfree/issues/999 | |
*/ | |
use Tracy\Debugger; |
<?php | |
/** | |
* This snippet is part of an answer to a StackOverflow question | |
* and is executable as soon as line 11 gets corrected | |
* to include Fat-Free Framework's `base.php` file. | |
* | |
* @see http://stackoverflow.com/questions/41840876/using-computed-properties-on-fatfree-mapper-object-not-retrieved-from-database | |
*/ |
<repeat group="{{ @articles }}" value="{{ @article }}"> | |
<h1>{{ @article->title }}</h1> | |
</repeat> |
<?php | |
require 'base.php'; | |
$f3 = Base::instance(); | |
$f3->DEBUG = 3; | |
$f3->UI = 'UI/'; | |
$f3->CACHE = 'folder=tmp/cache/'; | |
$f3->TEMP = 'tmp/temp/'; |
<h2>somefile.html</h2> | |
<p>{{ time() }}</p> |
<?php | |
require 'base.php'; | |
$f3 = Base::instance(); | |
/** | |
* @see https://github.com/bcosca/fatfree/issues/878 | |
*/ | |
$f3->route('GET /session/@backend', function(Base $f3, array $args){ |
<?php | |
require_once "../vendor/autoload.php"; | |
class ExtTemplate extends Template { | |
public function date($timestamp) { | |
return date('d-m-Y' , $timestamp); | |
} | |
} |