File install/INSTALL.md changed (mode: 100644) (index 3ab0f8f..18ea7f0) |
... |
... |
Type: `git clone https://github.com/poonamveeral/GeneralRepo` |
192 |
192 |
16) Test pandoc-citeproc |
16) Test pandoc-citeproc |
193 |
193 |
* In the same install folder, type: |
* In the same install folder, type: |
194 |
194 |
|
|
195 |
|
`pandoc --filter pandoc-citeproc test_pandoc-citeproc.md -o test_pandoc-citeproc.html` |
|
|
195 |
|
`pandoc --citeproc test_pandoc-citeproc.md -o test_pandoc-citeproc.html` |
196 |
196 |
|
|
197 |
197 |
* In the install folder, you should see a file called "test_pandoc-citeproc.html" containing |
* In the install folder, you should see a file called "test_pandoc-citeproc.html" containing |
198 |
198 |
|
|
|
... |
... |
Type: `git clone https://github.com/poonamveeral/GeneralRepo` |
208 |
208 |
|
|
209 |
209 |
17) Test pandoc-include-code |
17) Test pandoc-include-code |
210 |
210 |
* In the same install folder, type: |
* In the same install folder, type: |
211 |
|
`pandoc --filter pandoc-include-code -o test_pandoc-include-code.pdf test_pandoc-include-code.md` |
|
|
211 |
|
` ` |
212 |
212 |
* In the install folder, you should see a file called "test_pandoc-include-code.html" containing |
* In the install folder, you should see a file called "test_pandoc-include-code.html" containing |
213 |
213 |
|
|
214 |
214 |
```{html} |
```{html} |
|
... |
... |
For our example, in your terminal, while in the directory of where your markdown |
285 |
285 |
or |
or |
286 |
286 |
|
|
287 |
287 |
``` |
``` |
288 |
|
pandoc --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code \ |
|
|
288 |
|
pandoc --toc --filter pandoc-numbering --citeproc --filter pandoc-include-code \ |
289 |
289 |
--top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \ |
--top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \ |
290 |
290 |
--pdf-engine=xelatex --pdf-engine-opt=-shell-escape -V links-as-notes \ |
--pdf-engine=xelatex --pdf-engine-opt=-shell-escape -V links-as-notes \ |
291 |
291 |
--default-image-extension=pdf -o example.pdf example.md |
--default-image-extension=pdf -o example.pdf example.md |
|
... |
... |
For our example, in your terminal, while in the directory of where your markdown |
301 |
301 |
or |
or |
302 |
302 |
|
|
303 |
303 |
``` |
``` |
304 |
|
pandoc --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code \ |
|
|
304 |
|
pandoc --toc --filter pandoc-numbering --citeproc --filter pandoc-include-code \ |
305 |
305 |
--top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \ |
--top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \ |
306 |
306 |
--default-image-extension=svg -o example.odt example.md |
--default-image-extension=svg -o example.odt example.md |
307 |
307 |
``` |
``` |
|
... |
... |
For our example, in your terminal, while in the directory of where your markdown |
317 |
317 |
or |
or |
318 |
318 |
|
|
319 |
319 |
``` |
``` |
320 |
|
pandoc --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code \ |
|
|
320 |
|
pandoc --toc --filter pandoc-numbering --citeproc --filter pandoc-include-code \ |
321 |
321 |
--top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \ |
--top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \ |
322 |
322 |
--css=style/style.css --toc-depth=1 --self-contained --default-image-extension=svg \ |
--css=style/style.css --toc-depth=1 --self-contained --default-image-extension=svg \ |
323 |
323 |
-o example.html example.md |
-o example.html example.md |
File notes/Makefile changed (mode: 100644) (index 5e25416..788da61) |
13 |
13 |
|
|
14 |
14 |
MAKEFLAGS:= -j |
MAKEFLAGS:= -j |
15 |
15 |
# Maximize parallel execution whenever possible |
# Maximize parallel execution whenever possible |
16 |
|
OPTIONSPANDOC:= --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code --top-level-division=chapter -M date="$$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" --lua-filter filters/default-code-class.lua -M default-code-class=sqlmysql |
|
|
16 |
|
OPTIONSPANDOC:= --toc --filter pandoc-numbering --citeproc --filter pandoc-include-code --top-level-division=chapter -M date="$$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" --lua-filter filters/default-code-class.lua -M default-code-class=sqlmysql |
17 |
17 |
# Options common to all invokations of pandoc. Cf https://pandoc.org/MANUAL.html to understand them. |
# Options common to all invokations of pandoc. Cf https://pandoc.org/MANUAL.html to understand them. |
18 |
18 |
OPTIONSPANDOCODT:= $(OPTIONSPANDOC) --default-image-extension=svg |
OPTIONSPANDOCODT:= $(OPTIONSPANDOC) --default-image-extension=svg |
19 |
19 |
OPTIONSPANDOCHTML:= $(OPTIONSPANDOC) --css=style/style.css -B style/foldable_toc.html -B style/anchors_header.html -A style/anchors_footer.html --section-divs --toc-depth=2 --self-contained --default-image-extension=svg |
OPTIONSPANDOCHTML:= $(OPTIONSPANDOC) --css=style/style.css -B style/foldable_toc.html -B style/anchors_header.html -A style/anchors_footer.html --section-divs --toc-depth=2 --self-contained --default-image-extension=svg |
File notes/code/java/CallProcedure.java added (mode: 100644) (index 0000000..d772f1d) |
|
1 |
|
// code/java/CallProcedure.java |
|
2 |
|
|
|
3 |
|
import java.sql.*; |
|
4 |
|
|
|
5 |
|
public class CallProcedure { |
|
6 |
|
public static void main(String[] args) { |
|
7 |
|
try ( |
|
8 |
|
Connection conn = |
|
9 |
|
DriverManager.getConnection( |
|
10 |
|
"jdbc:mysql://localhost:3306/HW_CALL_TEST" |
|
11 |
|
+ "?user=testuser" |
|
12 |
|
+ "&password=password" |
|
13 |
|
+ "&allowMultiQueries=true" |
|
14 |
|
+ "&createDatabaseIfNotExist=true" |
|
15 |
|
+ "&useSSL=true"); |
|
16 |
|
Statement stmt = conn.createStatement(); ) { |
|
17 |
|
stmt.execute( |
|
18 |
|
"DROP SCHEMA IF EXISTS HW_CALL_TEST;" + "CREATE SCHEMA HW_CALL_TEST;" + "USE HW_CALL_TEST;"); |
|
19 |
|
|
|
20 |
|
stmt.execute( |
|
21 |
|
"CREATE TABLE Test1 (" |
|
22 |
|
+ "A VARCHAR(25) PRIMARY KEY, " |
|
23 |
|
+ "B INTEGER);"); |
|
24 |
|
|
|
25 |
|
stmt.execute("INSERT INTO Test1 VALUES ('Bob', 1), ('Crystal', 2), ('Jack', 1);"); |
|
26 |
|
// To create a procedure, we don't need to change the delimiter! |
|
27 |
|
// Cf. https://stackoverflow.com/a/5314879/ for instance. |
|
28 |
|
stmt.execute(" CREATE PROCEDURE List () " |
|
29 |
|
+ " BEGIN " |
|
30 |
|
+ " SELECT * " |
|
31 |
|
+ " FROM Test1; " |
|
32 |
|
+ " END; "); |
|
33 |
|
// We create a CallabaleStatement object |
|
34 |
|
// https://docs.oracle.com/javase/7/docs/api/java/sql/CallableStatement.html |
|
35 |
|
// that extends PreparedStatements and allow to call procedures. |
|
36 |
|
CallableStatement cs = conn.prepareCall("{call List}"); |
|
37 |
|
ResultSet rset = cs.executeQuery(); |
|
38 |
|
while(rset.next()){ |
|
39 |
|
System.out.println("The value of A is " + rset.getString("A") + " and the value of B is " + rset.getInt("B") + "."); |
|
40 |
|
} |
|
41 |
|
|
|
42 |
|
conn.close(); |
|
43 |
|
} catch (SQLException ex) { |
|
44 |
|
ex.printStackTrace(); |
|
45 |
|
} |
|
46 |
|
} |
|
47 |
|
} |