Skip to content

Commit

Permalink
one more try on positioning anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
brianharvey committed Jun 9, 2021
1 parent 7b44c3c commit 09fd226
Show file tree
Hide file tree
Showing 15 changed files with 221 additions and 372 deletions.
Binary file modified cur/programming/summaries/index
Binary file not shown.
104 changes: 0 additions & 104 deletions cur/programming/summaries/index-presort

Large diffs are not rendered by default.

60 changes: 0 additions & 60 deletions cur/programming/summaries/index-sorted

Large diffs are not rendered by default.

Binary file modified cur/programming/summaries/index.dSYM/Contents/Resources/DWARF/index
Binary file not shown.
Binary file modified cur/programming/summaries/vocab
Binary file not shown.
61 changes: 7 additions & 54 deletions cur/programming/summaries/vocab-index.html

Large diffs are not rendered by default.

28 changes: 19 additions & 9 deletions cur/programming/summaries/vocab.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,9 @@ int main(int argc, char **argv) {
firstpage=0;
(void)write(fout,h3,strlen(h3));
}
/*
if (vocab) {
sprintf(h2,"\n<a name=\"box%d\">&nbsp;</a>\n%c",++boxnum,'\0');
(void)write(fout,h2,strlen(h2));
}
*/
if (vocab) {
sprintf(divtextp,"name=\"box%d\"%c",++boxnum,'\0');
}
// if (vocab) {
// sprintf(divtextp,"name=\"box%d\"%c",++boxnum,'\0');
// }
(void)write(fout,divtext,strlen(divtext));
if (foop > bazp) {
(void)write(fout,bazp,foop+1-bazp);
Expand All @@ -171,9 +165,25 @@ int main(int argc, char **argv) {
(void)write(fout,"<strong> ",9);
(void)write(fout,link,strlen(link));
(void)write(fout,"</strong>",9);
/*
if (vocab) {
sprintf(h2,"\n<a name=\"box%d\">&nbsp;</a>\n%c",++boxnum,'\0');
(void)write(fout,h2,strlen(h2));
}
*/
startp = foop+1;
depth=1;
endp=nextp=startp;
if (vocab) {
foop=strstr(startp,"\n");
if (foop != NULL) {
(void)write(fout,startp,foop-startp);
startp = foop+1;
endp=nextp=startp;
sprintf(h2,"\n<a name=\"box%d\">&nbsp;</a>\n%c",++boxnum,'\0');
(void)write(fout,h2,strlen(h2));
}
}
while (depth) {
endp=strstr(nextp,"</div");
if ((foop=strstr(nextp,"<div"))!=NULL && foop < endp) {
Expand Down
36 changes: 24 additions & 12 deletions cur/programming/summaries/vocab1.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,25 @@
<body>
<h2>Unit 1: Introduction to Programming</h2>
<h3>Lab 1: Click Alonzo Game</h3>
<div class="vocabSummary" name="box1"><strong> <a href="/bjc-r/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html">1.1.4</a></strong><strong>: Sprites and Costumes</strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html">1.1.4</a></strong><strong>: Sprites and Costumes</strong>
<a name="box1">&nbsp;</a>
<p>The Alonzo character is named after Alonzo Church, a major contributor to early computer science. In this project, there are three objects related to Alonzo:
<ul>
<li>One is a <em><strong>sprite</strong></em>, which is like an actor on the stage who knows how to do many different things, such as walk around the stage and speak the lines of the play.</li>
<li>The other two are <em><strong>costumes</strong></em>, picture that can be &quot;worn&quot; by a sprite.</li>
</ul>
</p>
</div>
<div class="vocabSummary" name="box2"><strong> <a href="/bjc-r/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html">1.1.4</a></strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/1-building-an-app/4-keeping-score.html">1.1.4</a></strong>
<a name="box2">&nbsp;</a>
<p>
The <strong>transparency</strong> of an image is how much you can see what's behind it. For example, here is the Alonzo sprite shown with three different transparencies (which have been set using the <code>ghost effect</code> block).<br />
<img class="indent" src="/bjc-r/img/1-introduction/transparency2.png" title="three pictures of Alonzo, with ghost effect 0%, 25%, and 50%, on a background of a brick wall" alt="three pictures of Alonzo, with ghost effect 0%, 25%, and 50%, on a background of a brick wall" />
</p>
</div>
<h3>Lab 2: Gossip</h3>
<div class="vocabSummary" name="box3"><strong> <a href="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html">1.2.3</a></strong>: <strong>Lists</strong>, <strong>Strings</strong>, and <strong>Concatenation</strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html">1.2.3</a></strong>: <strong>Lists</strong>, <strong>Strings</strong>, and <strong>Concatenation</strong>
<a name="box3">&nbsp;</a>
<ul>
<div class="index-term" id="report</code>"></div>
<div class="comment">AAP-1.C.1 first sentence</div>
Expand All @@ -40,10 +43,12 @@ <h3>Lab 2: Gossip</h3>
<li>To <strong>concatenate</strong> strings means to make a bigger string by connecting two or more smaller strings. In Snap<em>!</em>, the <img class="inline nopadtb" src="/bjc-r/img/blocks/join()().png" alt="join () ()" title="join () ()" /> block lets you concatenate strings.</li>
</ul>
</div>
<div class="vocabSummary" name="box4"><strong> <a href="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html">1.2.3</a></strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/3-customizing.html">1.2.3</a></strong>
<a name="box4">&nbsp;</a>
<p>The process of testing, finding problems, and fixing them is called <strong>debugging</strong>.</p>
</div>
<div class="vocabSummary" name="box5"><strong> <a href="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/4-making-a-new-block.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/4-making-a-new-block.html">1.2.4</a></strong>: <strong>Procedures</strong>, <strong>Reporters</strong>, and <strong>Commands</strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/4-making-a-new-block.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/4-making-a-new-block.html">1.2.4</a></strong>: <strong>Procedures</strong>, <strong>Reporters</strong>, and <strong>Commands</strong>
<a name="box5">&nbsp;</a>
<div class="comment">AAP-3.A.1, AAP-3.A.2</div>
<p>
A <strong>procedure</strong> is a named sequence of instructions that may take inputs and may report a value. Some languages call procedures <em>methods</em> or <em>functions</em>. Here are two types of procedures you have seen in Snap<em>!</em>:
Expand All @@ -63,20 +68,23 @@ <h3>Lab 2: Gossip</h3>
</ul>
</p>
</div>
<div class="vocabSummary" name="box6"><strong> <a href="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/5-if-else.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/5-if-else.html">1.2.5</a></strong>: <strong>Expressions</strong> and <strong>Values</strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/5-if-else.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/2-gossip-and-greet/5-if-else.html">1.2.5</a></strong>: <strong>Expressions</strong> and <strong>Values</strong>
<a name="box6">&nbsp;</a>
<div class="comment">AAP-2.B.3, AAP-2.B.4</div>
<ul>
<li>An <strong>expression</strong> is a either a constant value (such as "4" or "winter") or a call to a reporter block with any input slots filled in (such as <img class="inline" src="/bjc-r/img/2-complexity/number.png" alt="number" title="number" />, <img class="inline nopadtb" src="/bjc-r/img/1-introduction/5+(4x3).png" alt="5 + (4 * 3)" title="5 + (4 * 3)" />, or <img class="inline" src="/bjc-r/img/2-complexity/join-who-doeswhat-who.png" alt="join (who) ( ) (does what) ( ) (who)" title="join (who) ( ) (does what) ( ) (who)" />).</li>
<li>Expressions are evaluated to produce a <em>single</em> <strong>value</strong> (a value can be a number, a string, a sprite, a costume, a script, a list&mdash;anything). For example, <img class="inline nopadtb" src="/bjc-r/img/1-introduction/5+(4x3).png" alt="5 + (4 * 3)" title="5 + (4 * 3)" /> will be evaluated to 17.</li>
</ul>
</div>
<h3>Lab 3: Modern Art with Polygons</h3>
<div class="vocabSummary" name="box7" AP-only"><strong> <a href="/bjc-r/cur/programming/1-introduction/3-drawing/1-exploring-motion.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/3-drawing/1-exploring-motion.html">1.3.1</a></strong><strong>: Algorithm</strong> and <strong>Pseudocode</strong>
<div class="vocabSummary" AP-only"><strong> <a href="/bjc-r/cur/programming/1-introduction/3-drawing/1-exploring-motion.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/3-drawing/1-exploring-motion.html">1.3.1</a></strong><strong>: Algorithm</strong> and <strong>Pseudocode</strong>
<a name="box7">&nbsp;</a>
<div class="comment">AAP-2.A.1, AAP-2.A.2, AAP-2.A.3</div>
<p>An <strong>algorithm</strong> is a sequence of steps that are usually performed by a computer. The algorithm doesn't have to be written in any particular programming language or even in a programming language at all; you can write your algorithm in English or any other human language. Some people call an algorithm written in human language <strong>pseudocode</strong>. Once you know the steps that the computer will take, you can code your algorithm in the programming language of your choice.</p>
<div class="endnote">What's the purpose of "pseudocode"? Why write an algorithm vaguely in English when you could write it precisely in Snap<em>!</em>? If you were programming in a punctuation-heavy language, designing your program in pseudocode would help you focus on the important ideas instead of on details like quotation marks and semicolons. But pseudocode isn't as necessary with a language like Snap<em>!</em>, and pseudocode can make it easy for you to fall into wishful thinking about what the computer is capable of (such as writing "Pick tomorrow's winning lottery numbers" or "Here's the melody; write the harmony").</div>
</div>
<div class="vocabSummary" name="box8"><strong> <a href="/bjc-r/cur/programming/1-introduction/3-drawing/3-blocks-with-inputs.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/3-drawing/3-blocks-with-inputs.html">1.3.3</a></strong>: What's an input? <strong>Parameter</strong> vs. <strong>Argument</strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/3-drawing/3-blocks-with-inputs.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/3-drawing/3-blocks-with-inputs.html">1.3.3</a></strong>: What's an input? <strong>Parameter</strong> vs. <strong>Argument</strong>
<a name="box8">&nbsp;</a>
<div class="comment">AAP-3.A.3</div>
<p>
<ul>
Expand All @@ -92,7 +100,8 @@ <h3>Lab 3: Modern Art with Polygons</h3>
We use the word "input" both for parameters (input names) and for arguments (input values).
</p>
</div>
<div class="vocabSummary" name="box9"><strong> <a href="/bjc-r/cur/programming/1-introduction/3-drawing/6-the-for-block.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/3-drawing/6-the-for-block.html">1.3.6</a></strong>: <strong>Iteration</strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/3-drawing/6-the-for-block.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/3-drawing/6-the-for-block.html">1.3.6</a></strong>: <strong>Iteration</strong>
<a name="box9">&nbsp;</a>
<div class="comment">AAP-2.J.1</div>
<p>Computer scientists describe a repeating program structure as <em>looping</em>, <em>repetition</em>, or <strong>iteration</strong>.</p>
<div class="comment">AAP-2.K.1</div>
Expand All @@ -111,15 +120,18 @@ <h3>Lab 3: Modern Art with Polygons</h3>
</p>
</div>
<h3>Lab 4: Protecting Your Privacy</h3>
<div class="vocabSummary" name="box10"><strong> <a href="/bjc-r/cur/programming/1-introduction/4-privacy/1-your-image-in-the-cloud.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/4-privacy/1-your-image-in-the-cloud.html">1.4.1</a></strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/4-privacy/1-your-image-in-the-cloud.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/4-privacy/1-your-image-in-the-cloud.html">1.4.1</a></strong>
<a name="box10">&nbsp;</a>
<div class="comment">IOC-2.A.1</div>
<p><strong>Personally identifiable information</strong> (PII) is information that can let others figure out who you are and possibly get more information like your Social Security number, age, race, phone number(s), medical information, financial information, or biometric data (such as your thumbprint or face scan).</p>
</div>
<h3>Lab 5: Follow the Leader</h3>
<div class="vocabSummary" name="box11"><strong> <a href="/bjc-r/cur/programming/1-introduction/5-follow-the-leader/2-sprite-interaction.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/5-follow-the-leader/2-sprite-interaction.html">1.5.2</a></strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/5-follow-the-leader/2-sprite-interaction.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/5-follow-the-leader/2-sprite-interaction.html">1.5.2</a></strong>
<a name="box11">&nbsp;</a>
<p>When a program keeps running forever, that's called an <strong>infinite loop</strong>.</p>
</div>
<div class="vocabSummary" name="box12"><strong> <a href="/bjc-r/cur/programming/1-introduction/5-follow-the-leader/2-sprite-interaction.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/5-follow-the-leader/2-sprite-interaction.html">1.5.2</a></strong>
<div class="vocabSummary" ><strong> <a href="/bjc-r/cur/programming/1-introduction/5-follow-the-leader/2-sprite-interaction.html?topic=nyc_bjc/1-intro-loops.topic&course=bjc4nyc.html&novideo&noassignment" title="/bjc-r/cur/programming/1-introduction/5-follow-the-leader/2-sprite-interaction.html">1.5.2</a></strong>
<a name="box12">&nbsp;</a>
<div class="todo">CRD-2.B.2, AAP-2.B.2, AAP-2.B.6</div>
<p>A <strong>code segment</strong> is a sequence of connected instructions that carry out a purposeful action, such as the one pictured on the left, which animates a conversation. The instructions in the code segment are carried out in order, from top to bottom.</p>
</div>
Expand Down
Loading

0 comments on commit 09fd226

Please sign in to comment.