Anonymous avatar Anonymous committed 4af0870

added module 2

Comments (0)

Files changed (13)

Add a comment to this file

presentation/img/font-creator.png

Added
New image

presentation/module2/10.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Loops-iteration</h1>
+			<ul>
+				<li><a href="./9.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./11.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li>Rerun certain part of code until a condition fails.</li>
+			<li>Can be achived by using for or while statements.</li> 
+			<li> A for structure has three parts: init, test, and update. Each part must be separated by a semi-colon ";". </li>
+			<li>The loop continues until the test evaluates to false.</li>
+<code>
+<pre>
+for (init; test; update) { 
+  statements
+}
+
+int points_to_draw = 5;
+int startX=10;
+int startY=10;
+for(int i=0; i < points_to_draw; i++){
+	point(i*startX,i*startX);
+}
+</pre>
+</code>
+<li> The while structure executes a series of statements continuously while the expression is true.</li>
+ <code>
+<pre>
+while (expression) { 
+  statements
+}
+
+int points_to_draw = 5;
+int startX=10;
+int startY=10;
+while ( points_to_draw > 0) { 
+ point( points_to_draw*startX, points_to_draw*startY);
+ points_to_draw =  points_to_draw -1;
+}
+</pre>
+</code>
+<li> Use <code>break;</code> to end the execution of a structure such as switch(), for(), or while() and jump to the next statement after that.</li>
+<code>
+<pre>
+int points_to_draw = 5;
+int startX=10;
+int startY=10;
+while (true) { 
+ if(points_to_draw == 0){
+	break;
+ }	
+ point( points_to_draw*startX, points_to_draw*startY);
+ points_to_draw =  points_to_draw -1;
+}
+</pre>
+</code>
+<li>Use <code>continue;</break> to skip the reminder of the block and jump to next iteration. Use inside of a for() or while().</li>
+<code>
+<pre>
+//dont draw point no 3
+int points_to_draw = 5;
+int startX=10;
+int startY=10;
+while ( points_to_draw > 0) { 
+ if(points_to_draw == 3){
+  	continue;
+ }	
+ point( points_to_draw*startX, points_to_draw*startY);
+ points_to_draw =  points_to_draw -1;
+}
+</pre>
+</code>
+
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/11.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Loop&nbsp;&nbsp;inside&nbsp;&nbsp;Loop</h1>
+			<ul>
+				<li><a href="./10.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./12.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li>Its possible to loop inside a loop.</li>
+			<li>Useful to handle two dimentional data structures.</li>
+			<li>Draw matrix of points.</li> 
+<code>
+<pre>
+int no_of_rows = 5;
+int no_of_cols = 7;
+int startX=10;
+int startY=10;
+for(int row=0; row < no_of_rows; row++){
+	//for each row draw a column
+	for(int col=0; col < no_of_cols; col++){
+		point(row*startX,col*startX);
+	}
+}
+</pre>
+</code>
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/12.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Text</h1>
+			<ul>
+				<li><a href="./11.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./13.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li>Use <code>text("text to Display", positionX, positionY);</code> to display text.</li>
+			<li>Use <code>loadFont('font name')</code> to load a font before using.</li>
+<code>
+<pre>
+PFont font;
+font = loadFont("CenturySchL-Roma-48.vlw"); 
+textFont(font); 
+text("My first text display", 15, 30); 
+</pre>
+</code>
+<li>The font must be located in the sketch's "data" directory to load successfully.</li>
+<li>Create a font using Tools-&gt;Create Font in processing menu</li>
+<img src="../img/font-creator.png"/>
+<li>Use <code>fill()</code> and other formatting methods to format the text</li>
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/13.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Input</h1>
+			<ul>
+				<li><a href="./12.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./14.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li>Basic ways of feeding into the system are using Keyboard, Mouse and Text files.</li>
+			<li>Other ways like network loading the files, Joystick/Cameras, Database etc can be easily done using external library. We will look into that in next module.</li>
+			
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/14.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Input-Keyboard</h1>
+			<ul>
+				<li><a href="./13.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./15.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li>The <code>keyPressed()</code> function is called once every time a key is pressed. The <code>key</code> that was pressed is stored in the key variable.</li>
+			<li>The <code>keyReleased()</code> function is called once every time a key is released. The <code>key</code> that was released will be stored in the key variable</li>
+			<li>The <code>keyTyped()</code> function is called once every time a key is pressed, but action keys such as Ctrl, Shift, and Alt are ignored.</li>
+			<li><code>keyCode</code> stores the special key values (space, enter, up down etc) when <code>key</code> is <code>CODED</code></li>			
+<li>Try the follwing one at a time.</li>
+
+<code>
+<pre>
+void setup(){
+  size(500,375);
+  background(255);
+  smooth();
+}
+void draw(){
+  PFont font;
+  fill(0);
+  font = loadFont("CenturySchL-Roma-48.vlw"); 
+  textFont(font); 
+}
+
+//case 1
+void keyPressed() { 
+text("pressed ="+key, 15, 100);   
+}
+
+//case 2	
+void keyReleased() { 
+  text("released "+key, 15, 200);
+}
+
+//case 3	
+void keyTyped() { 
+ println("released " + int(key) + " " + keyCode);
+}</pre>
+</code>
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/15.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Input-Mouse</h1>
+			<ul>
+				<li><a href="./14.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./16.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li><code>mousePressed()</code>  is called once after every time a mouse button is pressed.</li>
+			<li><code>mouseReleased()</code>  is called every time a mouse button is released.</li>
+			<li><code>mouseClicked()</code>  is called once after a mouse button has been pressed and then released.</li>
+			<li><code>mouseMoved()</code>  is called every time the mouse moves and a mouse button is not pressed</li>
+			<li><code>mouseDragged()</code> is called once every time the mouse moves and a mouse button is pressed.</li>
+			<li><code>mouseButton</code> 	is the variable that stores which button is pressed. Its values are LEFT, RIGHT, or CENTER depending on which button is pressed.</li>
+			<li><code>mousePressed</code> is true if a mouse button is pressed and false if a button is not pressed.</li>	
+			<li><code>mouseX and mouseY</code> contains the current horizontal/verticle coordinate of the mouse.</li>
+			<li><code>pmouseX and pmouseY</code> contains the previous horizontal/verticle coordinate of the mouse</li>
+
+<code>
+<pre>
+//draw a from(20,20) to mouse point as mouse moves
+void draw()
+{
+  background(204);
+  line(20, 20,mouseX, mouseY);
+}
+
+//draw a from(20,20) to a point where mouse is pressed 
+void draw()
+{
+  background(204);
+  smooth();
+}
+
+void mousePressed() {
+  if(mouseButton == LEFT){
+    line(20, 20,mouseX, mouseY);
+    noLoop();
+  } 
+  else{
+    loop();
+  }
+}
+</pre>
+</code>
+<li>Draw points along the way mouse is dragged.</li>
+<code>
+<pre>
+boolean dragged = false;
+int x =0;
+int y =0;
+void setup(){
+  background(255);
+  smooth();
+ 
+}
+void draw(){
+if(dragged){
+   point(x,y); 
+ }
+ dragged = false;
+}
+
+void mouseDragged(){ 
+    dragged = true;
+     x = mouseX;
+     y = mouseY;
+}
+</pre>
+</code>
+<li>Try: Draw line along the way mouse is clicked.</li>
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/16.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Input-Files</h1>
+			<ul>
+				<li><a href="./15.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./17.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li><code>selectInput()</code> Allow user to select a file using dialog.</li>			
+<code>
+<pre>String loadPath = selectInput();  // Opens file chooser
+if (loadPath == null) {
+  println("cancelled...");
+} else {
+  println(loadPath);
+  //do something with this file	
+}
+</pre>
+</code>
+<li>Similarly you can  use <code>selectFolder()</code> to allow user to select a folder.</li>	
+<li>Once you have the path. You can load the contents using <code>loadStrings()</code> or <code>loadBytes()</code></li>	
+<li><code>loadStrings()</code> Reads the contents of a file or url and creates a String array of its individual lines. </li>
+<code>
+<pre>String lines[] = loadStrings("list.txt");
+println("there are " + lines.length + " lines");
+for (int i=0; i < lines.length; i++) {
+  println(lines[i]);
+}
+</pre>
+</code>
+<li>Try: Load and display the contents of a file selected by user.</li>	
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/17.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Output&nbsp;-&nbsp;Console&nbsp;&nbsp;&&nbsp;&nbsp;Image</h1>
+			<ul>
+				<li><a href="./16.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./18.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li> You can write to console area of the Processing environment using <code>print()</code> and <code><code>println()</code>.</li>			
+<li>Useful for debugging and testing.</li>
+<li><code>save()</code> Saves an image from the display window</li>
+<code>
+<pre>
+background(55,0,0)
+line(20, 20, 80, 80);
+save("diagonal.tif");
+line(80, 20, 20, 80);
+save("cross.jpg");
+</pre>
+</code>
+<li>To see the written images select "Show sketch folder" from the "Sketch" menu. </li>
+<li> Supports TIFF, TARGA, JPEG, and PNG format.</li>
+<li> Use <code>saveFrame()</code> to automatically saves frame as image when called. File names are numbered sequence.</li>
+<code>
+<pre>
+int x = 0;
+void draw()
+{
+  background(204);
+  if(x < 10) {
+    line(x, 0, x, 100);
+    x = x + 1;
+  } else {
+    noLoop();
+  }
+  // Saves each frame as line-00.jpg, line-01.jpg, etc.
+  saveFrame("line-##.jpg"); 
+} 
+</pre>
+</code>
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/18.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Output&nbsp;-&nbsp;File</h1>
+			<ul>
+				<li><a href="./17.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./19.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li> Easy way to save strings to file system are using <code>saveStrings()</code> and <code><code>saveStream()</code>.</li>			
+<li><code>saveStrings()</code> a list into a target file</li>
+<code>
+<pre>
+String names = "thej raj simran me";
+String[] nameslist = split(names, ' ');
+saveStrings("names.txt", nameslist);</pre>
+</code>
+<li>You can allow user to select a target file using <code>selectOutput()</code> </li>
+<code>
+<pre>
+String names = "thej raj simran me";
+String[] nameslist = split(names, ' ');
+String savePath = selectOutput("Please select a file to save the names ");
+saveStrings(savePath, nameslist);</pre>
+</code>
+<li><code>beginRecord() and endRecord()</code> can be used to continuously write to the file system what is written to the screen.
+<code>
+<pre>
+import processing.pdf.*;
+
+void setup() {
+  size(400, 400);
+  beginRecord(PDF, "drawings.pdf");
+}
+
+void draw() {
+  ellipse(mouseX, mouseY, 10, 10);
+}
+
+void mousePressed() {
+  endRecord();
+  exit();
+}
+</pre>
+</code>
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/19.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Before you begin to Program?</h1>
+			<ul>
+				<li><a href="./18.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li>&nbsp;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li>Believe me you are developing a software.</li>
+			<li>Its easy if you follow certain steps.</li>
+			<li>Step 1: Understand the problem.</li>
+			<li>Step 2: Analyze and write a flow chart.</li>
+			<li>Step 3: Sketch (program).</li>
+			<li>Step 4: Debug, Delete, Re-Sketch.</li>
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module2/8.html

 		<div id="header">
 			<h2>Processing 101 </h2><h1>Conditional&nbsp;&nbsp;Flows</h1>
 			<ul>
-				<li><a href="./6.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="./7.html">&lt;&nbsp;Previous</a></li>
 				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
-				<li><a href="./8.html">Next&nbsp;&gt;</a></li>
+				<li><a href="./9.html">Next&nbsp;&gt;</a></li>
 			</ul>
 		</div>
 			

presentation/module2/9.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>Loops</h1>
+			<ul>
+				<li><a href="./8.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./10.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+			<li>By default the code inside draw() will be called again and again.</li>
+			<li>You can stop it by calling noLoop() and force start it by calling loop().</li> 
+<code>
+<pre>
+int age = 25;
+if(age < 50) {
+	println("you are young");
+}
+</pre>
+</code> 
+			</ul>	
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.