-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathindex.php
More file actions
132 lines (129 loc) · 5.76 KB
/
index.php
File metadata and controls
132 lines (129 loc) · 5.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
$next = "index.php";
if ( isset($_REQUEST['next']) ) $next = $_REQUEST['next'];
if ( isset($_POST['secret']) && ($_POST['secret'] == '42' || $_POST['secret'] == ':wq') ) {
setCookie('secret', '42', time() + 15 * 3600 * 24);
header("Location: ".$next);
return;
} else if ( !isset($_COOKIE['secret']) || $_COOKIE['secret'] != '42' ) {
?>
<body style="font-family: Courier,monospace; width: 80%; max-width:500px;margin-left: auto; margin-right: auto;">
<center>
<h1>C Programming for Everybody</h1>
<form method="post">
<input type="text" name="secret" aria-label="The value for the secret is a two digit integer and is the result of multiplying 6 times 7. This number appears many times in Dr. Chuck's earlier courses.">
<input type="hidden" name="next" value="<?= htmlentities($next) ?>">
<input type="submit" value="Unlock">
<p>
The unlock code is a number. You won't be given the number. It is a puzzle
where you prove that you have the pre-requisite skills for this course.
You need to figure the number out yourself. There are clues in this page
and the links from this page.
</p>
<p>
It is not too long and has none of those funny hex (abcde) characters.
It is a very significant number with that
makes a regular appearance throughout Dr. Chuck's other online courses
(<a href="https://www.py4e.com" target="_blank" rel="noopener noreferrer">Python</a>,
<a href="https://www.dj4e.com" target="_blank" rel="noopener noreferrer">Django</a>,
<a href="https://www.wa4e.com" target="_blank" rel="noopener noreferrer">PHP</a>, and
<a href="https://www.pg4e.com" target="_blank" rel="noopener noreferrer">PostgreSQL</a>).
</p>
<p>
If you get tired of trying to guess the number, you can take
a fun break and look at some cool pictures of
<a href="https://www.sakaiger.com/sakaicar/" target="_blank" rel="noopener noreferrer">Dr. Chuck's Race Car</a>.
It is pretty awesome and he races in a series called
<a href="https://www.24hoursoflemons.com" target="_blank" rel="noopener noreferrer">24 Hours of Lemons</a>.
</p>
<p>
You can view the
<a href="privacy" target="_blank" rel="noopener noreferrer">Privacy policies</a> for this web site before you enter.
We take your privacy seriously.
</p>
</form>
<script language="javascript">
console.log('The code is a number that is central to the book "Hitchhiker\'s Guide to the Galaxy');
console.log('It is also the number of Dr. Chuck\'s race car');
</script>
</center>
<?php
return;
}
use \Tsugi\Core\LTIX;
use \Tsugi\UI\Output;
require_once "top.php";
require_once "nav.php";
?>
<div id="container">
<div style="margin-left: 10px; float:right">
<iframe width="400" height="225" src="https://www.youtube.com/embed/XteaWkvontg?list=PLlRFEj9H3Oj5NbaFb1b2n8lib01uNPWLa&rel=0" frameborder="0" allowfullscreen title="C Programming for Everybody introductory video"></iframe>
</div>
<h1>C Programming for Everybody</h1>
This material is dedicated to understanding computer architecture and low-level programming
by studying the "classic" version of
the
C Programming language
from the 1978 book written by
<a href="https://www.cs.princeton.edu/~bwk/" target="_blank" rel="noopener noreferrer">
Brian W. Kernighan
</a>
and Dennis M. Ritchie.
In this course we will be reflecting on how C provided an important foundation for the creation of
modern programming languages.
</p>
<p>
You can take this course and receive a certificate at:
<ul>
<li><a href="https://www.coursera.org/specializations/c-programming-for-everybody?utm_source=cc4e_com"
target="_blank" rel="noopener noreferrer">Coursera: C Programming for Everybody Specialization</a></li>
<li><a href="https://www.youtube.com/watch?v=PaPN51Mm5qQ" target="_blank" rel="noopener noreferrer">FreeCodeCamp</a></li>
<li><a href="https://online.umich.edu/series/c-programming-for-everybody/?utm_source=cc4e_com" target="_blank" rel="noopener noreferrer">Free Certificates for University of Michigan students and staff</a></li>
</ul>
</p>
You need to have a basic understanding of Python before starting this course.
The first lesson is a quick introduction to C by by leveraging your understanding of Python.
A suggested pre-requisite is:
<ul>
<li><a href="https://www.py4e.com" target="_blank" rel="noopener noreferrer">Python for Everybody</a></li>
</ul>
</p>
<p>
The K&R book places the reader in the middle of the 1970's transition from
a hardware-centered computer science to a focus on writing portable and efficient
software. C was used to develop operating systems like Unix, Minix, and Linux and
programming languages like C++, Java, JavaScript, and Python.
You can no longer purchase the 1978 edition and should
instead purchase the second edition (1988) of
<a href="https://www.cs.princeton.edu/~bwk/cbook.html" target="_blank" rel="noopener noreferrer">
The C Programming Language</a>.
</p>
<p>
This site uses <a href="http://www.tsugi.org" target="_blank" rel="noopener noreferrer">Tsugi</a>
framework to embed a learning management system into this site and
provide the autograders.
If you are interested in collaborating
to build these kinds of sites for yourself, please see the
<a href="http://www.tsugi.org" target="_blank" rel="noopener noreferrer">tsugi.org</a> website and/or
contact me.
</p>
<p>
And yes, Dr. Chuck actually has a race car - it is called the
<a href="https://www.sakaiger.com/sakaicar/" target="_blank" rel="noopener noreferrer">SakaiCar</a>.
He races in a series called
<a href="https://www.24hoursoflemons.com" target="_blank" rel="noopener noreferrer">24 Hours of Lemons</a>.
</p>
<p>
If you would like to help to develop the content of this site, please join us at
<a href="https://github.com/csev/cc4e" target="_blank" rel="noopener noreferrer">https://github.com/csev/cc4e</a>.
Thanks in advance.
</p>
<!--
<?php
echo(Output::safe_var_dump($_SESSION));
var_dump($USER);
?>
-->
</div>
<?php
require_once "footer.php";