I 'm fleshing out some of these ideas here: https://github.com/lynaghk/todoFRP/tree/master/todo/angular-cljs
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
| import scala.language.experimental.macros | |
| import scala.reflect.macros.blackbox.Context | |
| trait Mappable[T] { | |
| def toMap(t: T): Map[String, Any] | |
| def fromMap(map: Map[String, Any]): T | |
| } | |
| object Mappable { | |
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
| // | |
| // __SINGLETON_HPP__ | |
| // | |
| // The MIT License (MIT) | |
| // Copyright (c) <2013> <Jiang Bian jbian@uams.edu> | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights |
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
| # Create background noise profile from mp3 | |
| /usr/bin/sox noise.mp3 -n noiseprof noise.prof | |
| # Remove noise from mp3 using profile | |
| /usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21 | |
| # Remove silence from mp3 | |
| /usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5% | |
| # Remove noise and silence in a single command |
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
| # BASH function to get the result | |
| # of a ^ b when a, b are in the | |
| # following hexadecimal string | |
| # form: AF396463D8705 ... | |
| # Obtained from here: | |
| # http://www.codeproject.com/Tips/470308/XOR-Hex-Strings-in-Linux-Shell-Script | |
| # Author is Sanjay1982 (see http://www.codeproject.com/Members/Sanjay1982) | |
| # Usage: |
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
| var demoApp = angular.module('demoApp', ['ngResource'], function($locationProvider) { | |
| $locationProvider.hashPrefix(''); | |
| }); | |
| function MainCtrl($scope, Serv) { | |
| $scope.selectedItem = { | |
| value: 0, | |
| label: '' | |
| }; | |
| $scope.Wrapper = Serv; |
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
| (use '[clojure.core.match :only [match]]) | |
| (defn evaluate [env [sym x y]] | |
| (match [sym] | |
| ['Number] x | |
| ['Add] (+ (evaluate env x) (evaluate env y)) | |
| ['Multiply] (* (evaluate env x) (evaluate env y)) | |
| ['Variable] (env x))) | |
| (def environment {"a" 3, "b" 4, "c" 5}) |
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
| digraph G { | |
| ranksep=1.0; | |
| ratio=0.6; | |
| LISP [color=Blue, shape=box, label="LISPs"]; | |
| ALGOL [color=Blue, shape=box, label="ALGOL-like\nLanguages"]; | |
| Modula [color=Blue, shape=box, label="Wirth's\nPascal-likes"]; | |
| Smalltalk [color=Blue, shape=box, label="Smalltalk-like\nLanguages"]; | |
| FP [color=Blue, shape=box, label="Functional\nProgramming\nLanguages"]; | |
| P [label="Prototype-based\nLanguages", color=Blue, shape=box]; |
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
| digraph G { | |
| ranksep=1.0; | |
| ratio=0.6; | |
| APL [color=Blue, shape=box]; | |
| Simula [color=Blue, shape=box]; | |
| LISP [color=Blue, shape=box]; | |
| ALGOL [color=Blue, shape=box]; | |
| Planner [color=Blue, shape=box]; | |
| ACTOR [shape=hexagon]; |
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
| name := "DES and AES encryption in Scala" | |
| version := "1.0" | |
| scalaVersion := "2.9.1" | |
| libraryDependencies += "commons-codec" % "commons-codec" % "1.6" |
NewerOlder