-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
467f2f5
commit e581008
Showing
9 changed files
with
475 additions
and
195,178 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
mutable struct Foo | ||
l_child::Union{Foo,Nothing} | ||
r_child::Union{Foo,Nothing} | ||
data::String | ||
|
||
#Here is also an inner constructor which is just the default inner constructor we would have had | ||
#unless we created the other one below | ||
Foo(l::Foo,r::Foo,d::String) = new(l,r,d) | ||
|
||
Foo(d::String) = new(nothing,nothing,d) | ||
|
||
function Foo() #Inner constructor can use the special keyword new() | ||
new(nothing,nothing,"") #call new in order of arguments | ||
end | ||
|
||
end | ||
|
||
#This is also a constructor but an outer constructor... it can use inner constructors | ||
function Foo(depth::Int) | ||
if depth == 0 | ||
return Foo("leaf") | ||
else | ||
return Foo(Foo(depth-1),Foo(depth-1),"inner node") | ||
end | ||
end | ||
|
||
test = Foo(10) | ||
|
||
test.l_child.r_child.data = "something else" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Weave | ||
cd(@__DIR__) | ||
using Pkg; Pkg.activate("..") | ||
cd("..") | ||
|
||
kwargs = (doctype = "md2html", out_path = "assessment_html", template = "math2504assessment.tpl") | ||
|
||
assesmentSubfolder = "2023Assessment" | ||
|
||
# weave("markdown/$(assesmentSubfolder)/bighw.jmd"; kwargs...) | ||
# weave("markdown/$(assesmentSubfolder)/project1.jmd"; kwargs...) | ||
# weave("markdown/$(assesmentSubfolder)/project2.jmd"; kwargs...) | ||
weave("markdown/$(assesmentSubfolder)/project3.jmd"; kwargs...)# | ||
|
||
|
||
### This is a temporary hack to add links to question numbers (it assumes questions are heading 2's) | ||
q = 0 | ||
lines = readlines("assessment_html/bighw.html"; keep=true) | ||
|
||
for (i, line) in enumerate(lines) | ||
if contains(line, "<h2>") | ||
global q = q + 1 | ||
lines[i] = replace(line, "<h2>" => "<h2 id=q$q>") | ||
end | ||
end | ||
|
||
open("assessment_html/bighw.html", "w") do f | ||
for line in lines | ||
write(f, line) | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ENV["GKSwstype"]="nul" # workaround for https://github.com/JunoLab/Weave.jl/issues/436 | ||
using Weave | ||
cd(@__DIR__) | ||
using Pkg; Pkg.activate("..") | ||
cd("..") | ||
@show pwd() | ||
|
||
kwargs_uc = (doctype = "md2html", out_path = "lectures_html", template = "math2504_under_const.tpl", mod = Main) #for "under construction | ||
kwargs_publish = (doctype = "md2html", out_path = "lectures_html", template = "math2504.tpl", mod = Main) | ||
kwargs_publish_b = (doctype = "md2html", out_path = "lectures_html", mod = Main) | ||
|
||
|
||
# weave("markdown/lecture-unit-1.jmd"; kwargs_publish...) | ||
# weave("markdown/lecture-unit-2.jmd"; kwargs_publish...) | ||
# weave("markdown/lecture-unit-3.jmd"; kwargs_publish...) | ||
# weave("markdown/lecture-unit-4.jmd"; kwargs_publish...) | ||
# weave("markdown/lecture-unit-5.jmd"; kwargs_publish...) | ||
# weave("markdown/lecture-unit-6.jmd"; kwargs_publish...) | ||
# weave("markdown/lecture-unit-7.jmd"; kwargs_publish...) | ||
# weave("markdown/lecture-unit-8.jmd"; kwargs_publish...) ; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!DOCTYPE html> | ||
<HTML lang = "en"> | ||
<HEAD> | ||
<meta charset="UTF-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> | ||
{{#:title}}<title>{{:title}}</title>{{/:title}} | ||
{{{ :header_script }}} | ||
|
||
<script type="text/x-mathjax-config"> | ||
MathJax.Hub.Config({ | ||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}, | ||
TeX: { equationNumbers: { autoNumber: "AMS" } } | ||
}); | ||
</script> | ||
|
||
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> | ||
</script> | ||
|
||
{{{ :highlight_stylesheet }}} | ||
|
||
<style type="text/css"> | ||
{{{ :stylesheet }}} | ||
</style> | ||
<link rel="icon" type="image/png" href="../ximg/favicon-32x32.png"> | ||
</HEAD> | ||
|
||
<BODY> | ||
<div class ="container"> | ||
<div class = "row"> | ||
<div class = "col-md-12 twelve columns"> | ||
<div class="title"> | ||
{{#:title}}<h1 class="title">{{:title}}</h1>{{/:title}} | ||
{{#:author}}<h5>{{{:author}}}</h5>{{/:author}} | ||
{{#:date}}<h5>{{{:date}}}</h5>{{/:date}} | ||
</div> | ||
|
||
<h1 class="my-3">UQ MATH2504<br>Programming of Simulation, Analysis, and Learning Systems<br>(Semester 2 2023)</h1> | ||
<br> | ||
<center> | ||
<a href="https://courses.smp.uq.edu.au/MATH2504/"> Main MATH2504 Page</a> | ||
</center> | ||
<br> | ||
<center> | ||
<a href = "lecture-unit-1.html"> Unit 1 </a> | | ||
<a href = "lecture-unit-2.html"> Unit 2 </a> | | ||
<a href = "lecture-unit-3.html"> Unit 3 </a> | | ||
<a href = "lecture-unit-4.html"> Unit 4 </a> | | ||
<a href = "lecture-unit-5.html"> Unit 5 </a> | | ||
<a href = "lecture-unit-6.html"> Unit 6 </a> | | ||
<a href = "lecture-unit-7.html"> Unit 7 </a> | | ||
<a href = "lecture-unit-8.html"> Unit 8 </a> | ||
</center> | ||
<br> | ||
|
||
{{{ :body }}} | ||
|
||
<HR/> | ||
<div class="footer"> | ||
<br> | ||
<center> | ||
<a href="https://courses.smp.uq.edu.au/MATH2504/"> Main MATH2504 Page</a> | ||
</center> | ||
<br> | ||
<center> | ||
<a href = "lecture-unit-1.html"> Unit 1 </a> | | ||
<a href = "lecture-unit-2.html"> Unit 2 </a> | | ||
<a href = "lecture-unit-3.html"> Unit 3 </a> | | ||
<a href = "lecture-unit-4.html"> Unit 4 </a> | | ||
<a href = "lecture-unit-5.html"> Unit 5 </a> | | ||
<a href = "lecture-unit-6.html"> Unit 6 </a> | | ||
<a href = "lecture-unit-7.html"> Unit 7 </a> | | ||
<a href = "lecture-unit-7.html"> Unit 8 </a> | ||
</center> | ||
<br> | ||
|
||
<p> | ||
Published from <a href="{{{:weave_source}}}">{{{:weave_source}}}</a> | ||
using <a href="http://github.com/JunoLab/Weave.jl">Weave.jl</a> {{:weave_version}} on {{:weave_date}}. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</BODY> | ||
|
||
</HTML> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<HTML lang = "en"> | ||
<HEAD> | ||
<meta charset="UTF-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> | ||
{{#:title}}<title>{{:title}}</title>{{/:title}} | ||
{{{ :header_script }}} | ||
|
||
<script type="text/x-mathjax-config"> | ||
MathJax.Hub.Config({ | ||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}, | ||
TeX: { equationNumbers: { autoNumber: "AMS" } } | ||
}); | ||
</script> | ||
|
||
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> | ||
</script> | ||
|
||
{{{ :highlight_stylesheet }}} | ||
|
||
<style type="text/css"> | ||
{{{ :stylesheet }}} | ||
</style> | ||
<link rel="icon" type="image/png" href="../img/favicon-32x32.png"> | ||
</HEAD> | ||
|
||
<BODY> | ||
<div class ="container"> | ||
<div class = "row"> | ||
<div class = "col-md-12 twelve columns"> | ||
<div class="title"> | ||
{{#:title}}<h1 class="title">{{:title}}</h1>{{/:title}} | ||
{{#:author}}<h5>{{{:author}}}</h5>{{/:author}} | ||
{{#:date}}<h5>{{{:date}}}</h5>{{/:date}} | ||
</div> | ||
|
||
<h1 class="my-3">UQ MATH2504<br>Programming of Simulation, Analysis, and Learning Systems<br>(Semester 2 2023)</h1> | ||
<br> | ||
<center> | ||
<a href="https://courses.smp.uq.edu.au/MATH2504/"> Main MATH2504 Page</a> | ||
</center> | ||
<br> | ||
<br> | ||
|
||
{{{ :body }}} | ||
|
||
<HR/> | ||
<div class="footer"> | ||
<br> | ||
<center> | ||
<a href="https://courses.smp.uq.edu.au/MATH2504/"> Main MATH2504 Page</a> | ||
</center> | ||
<p> | ||
Published from <a href="{{{:weave_source}}}">{{{:weave_source}}}</a> | ||
using <a href="http://github.com/JunoLab/Weave.jl">Weave.jl</a> {{:weave_version}} on {{:weave_date}}. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</BODY> | ||
|
||
</HTML> |
Oops, something went wrong.