This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var isArray = require('x-is-array'); | |
// START Cycle.js-specific code >>>>>>>> | |
var h = require('@cycle/dom').h; | |
// END Cycle.js-specific code <<<<<<<<<< | |
var SVGAttributeNamespace = require('virtual-dom/virtual-hyperscript/svg-attribute-namespace'); | |
var attributeHook = require('virtual-dom/virtual-hyperscript/hooks/attribute-hook'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ | |
"class": "sidebar_label", | |
"color": [135, 145, 165], | |
}, | |
{ | |
"class": "sidebar_label", | |
"parents": [{"class": "tree_row", "attributes": ["expandable"]}], | |
"color": [145, 165, 175], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
file_put_contents(__DIR__ . '/test.txt', "Hello World"); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (anfangskurs A B D) | |
(define alpha (my-acos (/ (- (sin B) (* (cos D) (sin A))) (* (cos A) (sin D))))) | |
(cond | |
[(< 180 alpha) (- 360 alpha) alpha])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (degree->cardinal degree) | |
(case (modulo (inexact->exact (round (* 32 (/ degree 360)))) 32) | |
((0) "N") | |
((1) "NbE") | |
((2) "NNE") | |
((3) "NEbN") | |
((4) "NE") | |
((5) "NEbE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (helper dir1 dir2 sub) | |
(cond | |
[(= sub 1) dir1] | |
[(= (modulo sub 4) 0) (string-append "b" dir1)] | |
[(= (modulo sub 2) 0) (string-append "b" dir2)] | |
)) | |
(define directions "NESESWNW") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (degree->radian degree) | |
(* (/ (* 2 pi) 360) degree)) | |
(define (radian->degree radian) | |
(* (/ 360 (* pi)) radian)) | |
(define (my-acos alpha) | |
(if (= alpha 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Is this possible in php5.4 using traits? | |
*/ | |
trait Hashmap { | |
public function set($key, $val) { | |
$this->data[$key] = $val; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ app.php [QSA,L] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setup : function(ed) { | |
ed.onKeyPress.addToTop(function(ed, e) { | |
if(e.keyIdentifier =='Enter' && ed.selection) | |
{ | |
var element = ed.selection.getNode(), | |
tagname = element.tagName.toLowerCase(), | |
contentLength = element.textContent.length; | |
if( contentLength==0 && (tagname=='dt' || tagname=='dd')) | |
{ | |
ed.execCommand("formatBlock",false, 'p'); |