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
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> | |
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
<Resource name="jdbc/quoteDB" auth="Container" type="javax.sql.DataSource" | |
maxActive="50" maxIdle="30" maxWait="10000" | |
username="SA" password="" | |
driverClassName="org.hsqldb.jdbc.JDBCDriver" | |
url="jdbc:hsqldb:hsql://localhost:9001/"/> |
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
<sql:query var="results" | |
sql="select quotation, author from quote" | |
dataSource="jdbc/quoteDB"> | |
</sql:query> | |
<c:forEach items="${results.rows }" var="row"> | |
<p>${row.quotation } -- ${row.author }</p> | |
</c:forEach> |
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
<table class="table table-striped"> | |
<c:forEach items="${theQuotes }" var="aQuote"> | |
<tr> | |
<td> | |
<blockquote class="blockquote"> | |
<p>${aQuote.quote }</p> | |
<footer> | |
<c:out value="${aQuote.author }"/> | |
</footer> | |
</blockquote> |
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
Windows - Run HSQLDB | |
NOTE: Assumes your hsqldb is installed at c:\ on your PC | |
java -cp c:\hsqldb-2.3.2\hsqldb\lib\hsqldb.jar org.hsqldb.server.Server |
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
Mac - Run HSQLDB | |
NOTE: Assumes your hsqldb is installed at the top level of your home directory. | |
java -cp ~/hsqldb-2.3.2/hsqldb/lib/hsqldb.jar org.hsqldb.server.Server |
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
create table quote ( | |
id identity, | |
quotation varchar(1000) not null, | |
author varchar(100) not null, | |
); | |
insert into quote (quotation, author) values ('The hardest thing in the world to understand is the income tax.', 'Albert Einstein'); | |
insert into quote (quotation, author) values ('The only thing that interferes with my learning is my education.', 'Albert Einstein'); | |
insert into quote (quotation, author) values ('I am convinced that He (God) does not play dice.', 'Albert Einstein'); |
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
(defn section-button-view [title-and-symbol-vector owner] | |
(om/component | |
(sab/html | |
[:div {:style {:color "black" | |
:border "1px solid grey" | |
:border-radius "4px" | |
:padding "5px" | |
:margin "5px" | |
:text-align "center" |
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
;; Assumes a Datomic DB where an Entity is defined that has attribute | |
;; :park.amenity/label of type string. Subsitute your query in place | |
;; of this example. | |
(let [vec-str (->> | |
(d/q '[:find ?amenity-name | |
:where [?e :park.amenity/label ?amenity-name]] | |
(db)) | |
(sort-by first))] | |
(doseq [x vec-str] |
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
http://app.klipse.tech/?container&cljs_in.gist=viebel/69a7c0cdf289bad342fefe82fdeb7179 |
OlderNewer