summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2018-05-03 21:13:33 -0400
committerknolax <1339802534.kk@gmail.com>2018-05-03 21:13:33 -0400
commite46bafab2c9e31fadad2840b31288517b47187b8 (patch)
tree98ad531443ba0e92c9ca99039488be6feba8e556
parent6a819c74238ea304b2f91d855e9851ee59fa99de (diff)
added review notesHEADmaster
-rw-r--r--4-28-notes.txt153
-rw-r--r--cont/index.html10
-rw-r--r--index.html29
3 files changed, 159 insertions, 33 deletions
diff --git a/4-28-notes.txt b/4-28-notes.txt
new file mode 100644
index 0000000..137dceb
--- /dev/null
+++ b/4-28-notes.txt
@@ -0,0 +1,153 @@
+Variables
+"They're something in a program that stores values, this can be a number, a\
+character, a pointer a float or arrays of those things."
+
+Variable Type
+"the type of a variable is what sort of thing the variable is, what kind of\
+value it stores, what operators work on it and the size of it"
+
+Examples
+int integer = 34;
+char character = 'a';
+char * string = "1234";
+float floating-point = 12.0;
+double doubleFloatingPoint = 111112.0;
+int * pointer = &integer;
+int array[4] = {0,2,3,4};
+
+Special types of integers
+
+unsigned int unsignedInteger = 4;
+short shortInteger = 5;
+long longInteger = 1212121212122121212;
+uint8_t unsigned8bitInteger = 255;
+uint32_t unsigned32bitInteger = 323232323233223232323;
+
+printf("Hello World! %d %c %s\n\a",122,'A',"A String");
+
+"printf is a function a part of stdio(Standard I/O) that allows a program to\
+print to serial out(the terminal) it takes a format string and values after that"
+
+Format String
+"The format string is what you want printf to print out with, with stuff like\
+%d that are placeholders that let you also print out the value of variables you\
+supply to printf as arguments"
+
+so in printf("hello world!\n"); "hello world!\n" is the format string
+
+'\n' and '\a' are special characters, '\n' stands for new line and is like
+pressing enter. '\a' is the alarm bell and makes a beeping sound
+
+%d is a placeholder for an integer, printed out in decimal(base 10)
+%c is a placeholder for a character
+%s is a placeholder for a string
+
+for more information look at 'man printf'
+
+What is a function?
+"A math function is a when a domain is paired to a co-domain, in programming,\
+piece of code that you can run multiple times and does an action"
+
+Function return
+"the value a function outputs"
+
+Function argument
+"the input to a function"
+
+//How do you run a function
+foobar(foo, bar);
+also known as a function call;
+a function is also an expression
+printf("hello world"); is a function call, you're running printf with the
+argument "hello world."
+"where foobar(int, int) is a function and foo and bar are arguments
+that whole piece of code would then evaluate to the output of foobar"
+eg.
+"if foobar(foo, bar) outputs jia
+then foobar(foo, bar); == jia"
+
+Function Definition
+"defining a function is when you write down what a function takes as arguments,
+what the function returns and what code the function runs"
+
+unsigned int foobar(int foo, int bar) {
+ int lar = 0;
+ lar = (foo - bar) * 82 + bar;
+ return lar;
+}
+
+"the above is a function that returns a variable of type 'unsigned int' and
+takes two arguments foo and bar that are of type 'int'. it runs the code inside
+of the squiggly brackets {}."
+
+Code blocks
+
+"any code inside of an {} are a code block, you can put code blocks inside of
+code blocks, that's called nesting code blocks. When you make a new code block
+you should indent the code inside of the block"
+printf("foobar\n");
+i++;
+if( i == 0) {
+ printf("barfoo\n");
+ j++;
+}
+"you indent, by putting a tab in front of every line, a tab is a big space"
+"When you have a nested code block, you indent another level, or have an extra
+tab in front of every line"
+foobar
+while (barfoo){
+ foobar
+ if (baz) {
+ qux
+ bazqux
+ }
+ foobarbaz
+}
+
+Foo Bar Baz Qux
+"Foo Bar Baz Qux are placeholder names , they don't mean anything and you can
+put your own stuff in place of them."
+https://www.ietf.org/rfc/rfc3092.txt for more information
+
+Variable Declarations and Assignments
+//When you declaring a variable, you tell the compiler that there is a variable
+//named foo of type bar that now exists. You can only use a variable after
+//declaring/defining it.
+int foo;
+//however, right now foo is "uninitialized", meaning there is no value being
+//stored in foo, which means you can't use it. Initializing a function is just
+//giving it a value.
+foo = 0;
+//a function that is defined and initialized
+bar = 12;
+//assigning a value to a variable just changes the value stored by a variable.
+foo = 10;
+foo = bar;
+foo = foobar(12);
+
+foobar(34);
+
+Statements and Expressions
+"Expressions evaluate to a value, where as statements do a thing. In c all \
+statements are also expressions but you can ignore that"
+a + b //is a statement
+foobar(34); is a statement because function calls are statements
+if (a + b) {} is an if statement
+i++; increments i or adds 1 to it.
+
+PRACTICE/REVIEW:
+"identify the parts of the below code"
+
+int main(int argc, char * argv[] ) {
+ if(argc > 1) {
+ printf("you gave me %d arguments\n",argc);
+ } else {
+ printf("you didn't give me any arguments\n");
+ }
+ return argc - 1;
+}
+
+
+
+
+
diff --git a/cont/index.html b/cont/index.html
index 5307a22..84a1b58 100644
--- a/cont/index.html
+++ b/cont/index.html
@@ -39,13 +39,6 @@ http://hairydiode.xyz and this site from scratch)
<li>Basic Computer Security(best practices, CTF challenges)</li>
<li>Robotics (Head programmer at the Urbana Mandelbots FTC team)</li>
</ul>
-<p>
-I have been:
-</p>
-<ul>
- <li>Head Programmer at the Urbana Mandelbots Robotics Team</li>
- <li>Former Vice Present at a student run non-profit(Resigned)</li>
-</ul>
<h>Course Details</h>
<h>---Required Course Materials</h>
<p>A dedicated laptop that Linux will be installed on, this can be any
@@ -129,3 +122,6 @@ Network Secruity)</li>
<li>c - Hosting your own website with github.io</li>
</ul>
</ul>
+
+<h>---Review Notes:</h>
+<a href="4-28-notes.txt">April 28rd Session Review Notes</a>
diff --git a/index.html b/index.html
index 5149e5e..a740c95 100644
--- a/index.html
+++ b/index.html
@@ -18,7 +18,6 @@ educational programs offered by schools are often aimed towards the lowest
common
denominator, oversimplifying things to the point where your child loses interest
in them.</p>
-<h> For Course Notes scroll down</h>
<p>The Urban Computing and Electronics Summer Program aims to provide a
balance between this, offering practical and challenging course material, but
also providing in person tutoring for those who have little prior experience.
@@ -52,13 +51,6 @@ http://hairydiode.xyz and this site from scratch)
<li>Basic Computer Security(best practices, CTF challenges)</li>
<li>Robotics (Head programmer at the Urbana Mandelbots FTC team)</li>
</ul>
-<p>
-I have been:
-</p>
-<ul>
- <li>Head Programmer at the Urbana Mandelbots Robotics Team</li>
- <li>Former Vice Present at a student run non-profit(Resigned)</li>
-</ul>
<h>Course Details</h>
<h>---Required Course Materials</h>
<p>A dedicated laptop that Linux will be installed on, this can be any
@@ -142,24 +134,9 @@ Network Secruity)</li>
<li>c - Hosting your own website with github.io</li>
</ul>
</ul>
-<h>C expressions course notes</h>
-<p>
-Bitwise Operators: &amp, bitwise and; |, bitwise or; ~, bitwise not; ^, bitwise xor.
-Bitwise operators apply logic operations in each position of a binary number,
-return the resulting binary number.
-</p>
-<p>
-Boolean Operators: &amp&amp, boolean and; ||, boolean or; !, boolean not.
-Boolean operators apply logic on whether then entire number is true or false,
-and returns true or false.
-</p>
-<p>
-Comparisons: &gt, greater than; &lt, lesser than; &gt=, greater than or equals;
-&lt=, lesser than or equals; ==, equals; !=, does not equal.
-</p>
-<p>AND: if both are true, then the output is true. OR: if one is true, then the
-output is true. XOR: if one is true and the other false, then the output is
-true, otherwise it is false. NOT: if true, false; if false, true.</p>
+
+<h>---Review Notes:</h>
+<a href="4-28-notes.txt">April 28rd Session Review Notes</a>
</div>
</body>
<!--