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 Main where | |
| import System.Environment (getArgs) | |
| multiplesOf :: Int -> [Int] | |
| multiplesOf n = [n,2*n..] | |
| getBiggerThan x n = case dropWhile (< x) (multiplesOf n) of | |
| [] -> 0 | |
| (x:xs) -> x | |
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
| <?xml version="1.0" encoding="iso-8859-1"?> | |
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
| <xsl:template match="/"> | |
| <html> | |
| <xsl:apply-templates /> | |
| </html> | |
| </xsl:template> | |
| <xsl:template match="conference"> |
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
| .data | |
| .balign 4 | |
| count: | |
| .word 100000 | |
| .text | |
| .global main | |
| .func main |
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
| # put it through spamassassin | |
| # but only if it is smaller than 5MB, otherwise SA uses excessive RAM | |
| if ($SIZE < 5242880) | |
| xfilter "/usr/bin/spamassassin" |
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
| // app | |
| angular.module("phonecatServices", ["ngResource"]). | |
| factory("Namespace", function($resource) { | |
| $resource("clojure_core/:namespace", {}, {get: {method: "GET"}, params: {namespace: "namespace"}, isArray: true}); | |
| }); | |
| // controller | |
| function namespace_list($scope, $routeParams, Namespace) { | |
| $scope.functions = Namespace.get({namespace: $routeParams.namespace}); | |
| } |
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 cljdocs.cljdocs) | |
| (.write js/document "Hello, ClojureScript!") |
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
| 123873 | 12635 | TM_CZ | Kettle - create_clinical_data | GSE5 | Done | 0 | 0 | 2013-09-18 17:17:24.671701 | 0 | |
| 123875 | 12635 | GSE4382_raw_data.txt | Kettle - create_clinical_data | Input rows | Done | 167 | 1 | 2013-09-18 17:17:33.190891 | 8.51919 | |
| 123876 | 12635 | GSE4382_raw_data.txt | Kettle - create_clinical_data | Data columns per row | Done | 11 | 2 | 2013-09-18 17:17:33.198807 | 0.007916 | |
| 123877 | 12635 | GSE4382_raw_data.txt | Kettle - create_clinical_data | Aggregate input records | Done | 0 | 3 | 2013-09-18 17:17:33.199815 | 0.001008 | |
| 123878 | 12635 | GSE4382_raw_data.txt | Kettle - create_clinical_data | Aggregate output records | Done | 0 | 4 | 2013-09-18 17:17:33.201473 |
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
| 2013/09/18 15:58:39 - Spoon - Starting job... | |
| 2013/09/18 15:58:39 - create_clinical_data - Start of job execution | |
| 2013/09/18 15:58:39 - create_clinical_data - exec(0, 0, START.0) | |
| 2013/09/18 15:58:39 - START - Starting job entry | |
| 2013/09/18 15:58:39 - create_clinical_data - Starting entry [Validate parameters] | |
| 2013/09/18 15:58:39 - create_clinical_data - exec(1, 0, Validate parameters.0) | |
| 2013/09/18 15:58:39 - Validate parameters - Starting job entry | |
| 2013/09/18 15:58:39 - Validate parameters - Opening transformation: [file:///home/transmart/tranSMART-ETL/Postgres/GPL 1.0/Kettle/Kettle-ETL/validate_clinical_data_params.ktr] | |
| 2013/09/18 15:58:39 - Validate parameters - Loading transformation from XML file [file:///home/transmart/tranSMART-ETL/Postgres/GPL 1.0/Kettle/Kettle-ETL/validate_clinical_data_params.ktr] | |
| 2013/09/18 15:58:39 - Validate parameters - Starting transformation...(file=${Internal.Job.Filename.Directory}/validate_clinical_data_params.ktr, name=Validate parameters, repinfo=null) |
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
| (let [iden (fn [x] x)] | |
| (defmacro nested [x] `(iden ~x))) | |
| (macroexpand-1 '(nested 42)) | |
| ;;=> (user/iden 42) | |
| (nested 42) | |
| ;;=> CompilerException java.lang.RuntimeException: No such var: user/iden |
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
| ;; memorizing recursive macro | |
| ;; replace your recursive defn by defmemo and recursive calls get memorized | |
| (defmacro defmemo [name args & body] | |
| `(defn ~name ~args | |
| ; the call cache which stores results | |
| (let [cache# (ref {})] | |
| ; yes, this shadows the outer ~name definition, but it's fine | |
| (letfn [(~name ~args | |
| (if-let [[k# v#] (find @cache# ~args)] v# | |
| (let [res# ~@body] |