Skip to content

Commit 7cab7c5

Browse files
committed
Resolving conflict.
2 parents a1aada0 + 57a4ca6 commit 7cab7c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+511
-320
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

source/Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ PANDOC_DOC:= $(PANDOC_OPTIONS_ALT)
240240
# --reference-doc=$(DOCX_TEMPLATES)custom-reference.docx
241241

242242
# Book build options
243-
PANDOC_BOOK_HTM:= $(PANDOC_HTM)
243+
PANDOC_BOOK_MD:= $(PANDOC_MD) --shift-heading-level-by=0 -M tags="book"
244244
PANDOC_BOOK_PDF:= $(PANDOC_PDF)
245245
PANDOC_BOOK_ODT:= $(PANDOC_ODT)
246246
PANDOC_BOOK_DOC:= $(PANDOC_DOC)
@@ -292,7 +292,6 @@ $(IMG_DIR)%.pdf:$(IMG_DIR)%.tex
292292
$(IMG_DIR)%.svg:$(IMG_DIR)%.pdf
293293
pdf2svg $< $@
294294

295-
296295
$(IMG_DIR)%.png:$(IMG_DIR)%.pdf
297296
pdftoppm $< $@ -png
298297
mv $@-1.png $@
@@ -418,6 +417,9 @@ $(EXO_DIR)%.md: $(SOL_DIR)%.md
418417
# process.
419418
# Refer to sortFn.ts and web-order.ts
420419
# in the quartz branch for more info
420+
421+
422+
# This is work in progress and need to be updated.
421423
$(BUILD_DIR)web-order.ts: order
422424
@mkdir -p $(dir $@)
423425
@echo -n "// This file was generated automatically by calling make web-order.ts.\n// Refer to the Makefile to read indications on how to generate and edit it.\nexport const nameOrderMap: Record<string, number> = {\n" > $@
@@ -583,10 +585,7 @@ $(PROJECT_DIR)%.zip: $(PROJECT_DIR)%/*/Program.cs | $(PROJECT_DIR)/%/*/*.cs
583585
# -------------------------------
584586

585587
$(BUILD_DIR)book.md:
586-
pandoc $(SOURCE_BOOK) $(PANDOC_MD) -o $@
587-
588-
#$(BUILD_DIR)book.html: $(BUILD_DIR)book.md
589-
# pandoc $(SOURCE_BOOK) $(PANDOC_BOOK_HTM) -o $@
588+
pandoc $(SOURCE_BOOK) $(PANDOC_BOOK_MD) -o $@
590589

591590
$(BUILD_DIR)book.pdf: | $(BUILD_DIR)book.md
592591
pandoc $(BUILD_DIR)book.md $(PANDOC_BOOK_PDF) -o $@

source/code/projects/ChemicalElements/ChemicalElements/ChemElem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ decimal meltParam
1818
}
1919

2020
/* To convert from Kelvin to Celsius
21-
* Cf. conversion rules at https://www.wikiwand.com/en/Kelvin
21+
* Cf. conversion rules at https://en.wikipedia.org/wiki/Kelvin
2222
* from kelvins to kelvins
2323
* Celsius [°C] = [K] − 273.15 [K] = [°C] + 273.15
2424
* Fahrenheit [°F] = [K] × ​9⁄5 − 459.67 [K] = ([°F] + 459.67) × ​5⁄9

source/code/snippets/complexity.cs

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
using System;
2+
using System.IO;
3+
4+
class Program
5+
{
6+
static int factorial(int n)
7+
{
8+
if (n == 0)
9+
return 1;
10+
else
11+
return checked(factorial(n - 1) * n);
12+
}
13+
14+
static void Main()
15+
{
16+
Console.WriteLine(int.MaxValue);
17+
18+
int x = int.MaxValue;
19+
int y = x + 1;
20+
Console.WriteLine(y);
21+
22+
try
23+
{
24+
y = checked(x + 1);
25+
}
26+
catch (System.OverflowException)
27+
{
28+
Console.WriteLine("An overflow exception was thrown.");
29+
}
30+
31+
int count0 = 0;
32+
int n0 = 3;
33+
try
34+
{
35+
while (true)
36+
{
37+
count0++;
38+
n0 = checked(n0 +1 );
39+
}
40+
}
41+
catch (System.OverflowException)
42+
{
43+
Console.WriteLine("An overflow exception was thrown after " + count0 + " iterations.");
44+
// An overflow exception was thrown after 2147483645 iterations.
45+
}
46+
47+
int count1 = 0;
48+
int n1 = 3;
49+
try
50+
{
51+
while (true)
52+
{
53+
count1++;
54+
n1 = checked(n1 * n1);
55+
}
56+
}
57+
catch (System.OverflowException)
58+
{
59+
Console.WriteLine("An overflow exception was thrown after " + count1 + " iterations.");
60+
// An overflow exception was thrown after 5 iterations.
61+
}
62+
63+
int count2 = 0;
64+
int n2 = 3;
65+
try
66+
{
67+
while (true)
68+
{
69+
count2++;
70+
n2 = factorial(n2);
71+
}
72+
}
73+
catch (System.OverflowException)
74+
{
75+
Console.WriteLine("An overflow exception was thrown after " + count2 + " iterations.");
76+
// An overflow exception was thrown after 3 iterations.
77+
}
78+
79+
int count3 = 0;
80+
int n3 = 100;
81+
try
82+
{
83+
while (true)
84+
{
85+
count3++;
86+
n3 = checked(n3 * (int)Math.Log(n3, 2));
87+
}
88+
}
89+
catch (System.OverflowException)
90+
{
91+
Console.WriteLine("An overflow exception was thrown after " + count3 + " iterations.");
92+
// An overflow exception was thrown after 7 iterations.
93+
}
94+
}
95+
}

source/docs/about/credits.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The first source of support is the constant stream of feedback we receive from s
2020

2121
This project has been monetarily supported by an [Affordable Learning Georgia](https://www.affordablelearninggeorgia.org/) [Transformation Grants](https://www.affordablelearninggeorgia.org/grants/overview/) ([Proposal 571](https://www.affordablelearninggeorgia.org/assets/documents/571-proposal.docx)) and a Continuous Improvement Grant (M260).
2222

23-
[!["Affordable Learning Georgia"](./img/ALG_Logo_hires.png){ width=80% }](https://www.affordablelearninggeorgia.org/)
23+
[!["Affordable Learning Georgia"](./img/ALG_Logo_hires.png)](https://www.affordablelearninggeorgia.org/)
2424

2525
This project also received the support of [Augusta University](https://www.augusta.edu/)'s [School of Computer and Cyber Sciences](https://www.augusta.edu/ccs/) and [Center for Instructional Innovation](https://www.augusta.edu/innovation/).
2626

@@ -48,14 +48,14 @@ Those fonts have been specially selected for their legibility and [lower impact
4848

4949
The source code and the website are graciously hosted and built by [github](https://github.com/).
5050

51-
## Licence
51+
## License
5252

5353
This work is under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/).
5454
Concretely, this means that you are free to:
5555

5656
- Save, print, copy and redistribute the entirety of the resources presented here,
5757
- Modify them as you see fit,
5858

59-
as long as you give proper credit and keep the same licence.
59+
as long as you give proper credit and keep the same license .
6060

61-
Please refer to [our licence file](https://github.com/princomp/princomp.github.io/blob/main/license.md) for the detail of this licence.
61+
Please refer to [our license file](https://github.com/princomp/princomp.github.io/blob/main/license.md) for the details of this license .

0 commit comments

Comments
 (0)