This file contains hidden or 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
#include "protheus.ch" | |
/** | |
* Gramatica formal da analise de expressoes, dentro do parser, levando em conta | |
* a geracao de tokens. | |
* @author Marcelo Camargo | |
* @since 17/04/2015 | |
* | |
* expr := string | number | array | nil | codeblock | date | object | |
* string := <? T_STRING ?> |
This file contains hidden or 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
function curry$(f, bound){ | |
var context, | |
_curry = function(args) { | |
return f.length > 1 ? function(){ | |
var params = args ? args.concat() : []; | |
context = bound ? context || this : this; | |
return params.push.apply(params, arguments) < | |
f.length && arguments.length ? | |
_curry.call(context, params) : f.apply(context, params); | |
} : f; |
This file contains hidden or 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 | |
/** | |
* @package unilsc | |
* @author Marcelo Camargo | |
* @since 2015/06/08 | |
* @license GNU GPL v3 | |
* P.S.: NMTBR => Not Meant To Be Readable. | |
*/ | |
ini_set('display_startup_errors',1); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<textarea cols="50" rows="10" id="ide"></textarea> | |
</body> | |
<script type="text/javascript"> | |
/** |
This file contains hidden or 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 | |
function parse($file) | |
{ | |
$result_stack = []; | |
$tokens = token_get_all("<?php " . file_get_contents($file)); | |
for ($i = 0, $l = sizeof($tokens); $i < $l; $i++) { | |
// T_OPEN | |
if (is_open($tokens[$i])) { |
This file contains hidden or 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
{-# LANGUAGE UnicodeSyntax #-} | |
module Proof where | |
import System.Console.ANSI | |
import Prelude.Unicode | |
import Control.Monad.Unicode | |
{- | |
Calculations and mathematical proofs of circular computations. | |
@author Marcelo Camargo | |
-} |
This file contains hidden or 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
module Mortivacional where | |
import System.Console.ANSI | |
drawLine :: IO () | |
drawLine = putStrLn $ replicate 23 '-' | |
turnRed :: IO () | |
turnRed = setSGR [ SetConsoleIntensity BoldIntensity | |
, SetColor Foreground Vivid Red | |
] |
This file contains hidden or 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
(ns pack.core) | |
(enable-console-print!) | |
; Circle packing automator | |
; @author Marcelo Camargo | |
(defn translate [x y] | |
(str "translate(" x "," y ")")) | |
(def diameter 960) |
This file contains hidden or 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
(ns pack.updatedata) | |
; Set the dimensions of the canvas / graph | |
(def margin ( | |
js-obj "top" 30 | |
"right" 20 | |
"bottom" 30 | |
"left" 50)) | |
(def width (reduce - [600 (.-left margin) (.-right margin)])) | |
(def height (reduce - [270 (.-top margin) (.-right margin)])) |
This file contains hidden or 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
(ns json.core) | |
(def data JSONData) | |
(def format | |
(.. js/d3 | |
-time | |
(format "%a %b %d %Y"))) | |
(def amount-fn (fn [d] | |
(.-amount d))) | |
(def date-fn (fn [d] |