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 | |
session_start(); | |
$db = mysql_connect("localhost", "bdag", "bdag") or die("Could not connect."); | |
if(!$db) | |
die("no db"); | |
if(!mysql_select_db("bdaginventory",$db)) |
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
(defn xls-report | |
[headers rows] | |
(str | |
(join "\t" headers) | |
(apply str | |
(for [r rows] | |
(str "\n" | |
(join "\t" r)))))) | |
(defn employee-display [emp] |
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
(defn lower-key [x] | |
(if (or (string? x) (keyword? x)) | |
(-> x name .toLowerCase keyword) | |
x)) | |
(defn map-keys | |
"applies f to each key of m. also to keys of m's vals and so on." | |
[f m] | |
(zipmap |
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
Assert failed: (string? q-title) | |
[Thrown class java.lang.AssertionError] | |
Restarts: | |
0: [QUIT] Quit to the SLIME top level | |
Backtrace: | |
0: qa.setup$make_client.invoke(setup.clj:40) | |
1: clojure.lang.AFn.applyToHelper(AFn.java:180) | |
2: clojure.lang.AFn.applyTo(AFn.java:151) |
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
(defn in-range [start end d] | |
(not (or (.before d start) | |
(.after d end)))) |
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
;before | |
(ns slideshow.core | |
(:use [slideshow.images] | |
[slideshow.utils] | |
[net.cgrand.moustache :only [app]] | |
[hiccup.core :only [html]] | |
[hiccup.page-helpers :only [include-js include-css]] | |
[ring.adapter.jetty :only [run-jetty]] | |
[ring.middleware | |
[params :only [wrap-params]] |
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
(defembedded Grade | |
[:scored | |
:possible | |
:percentage]) | |
(defentity Scorecard | |
[#_ :questionnaire-id ;not needed? use client's questionnaire-id | |
#_ :questionnaire-title ;also not needed? | |
:operator {:type Employee} | |
:evaluator {:type Employee} |
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 qa.deaf | |
(:use [clojure.contrib | |
[server-socket :only [create-server]] | |
[duck-streams :only [reader writer]]])) | |
(def port 6662) |
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
(defn get-files [dir] | |
(let [data (filter #(.isFile ^File %) | |
(file-seq (java.io.File. dir)))] | |
(sort-by #(.lastModified %) < data))) | |
(defn image? [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
(defn home [req] | |
(let [path (get (:params req) "path-input" "") | |
imgs (del-copy-get-imgs path)] | |
(base {:pagetitle "Slideshow" | |
:pagename "Start" | |
:content (html [:p | |
"Enter a full path to a directory of images" | |
(path-form path)] | |
[:div.images]) | |
:scripts [:script {:type "text/javascript"} |