Danreb's blog
Index Loop
A loop that executes when the number of iteration is explicit in the problem. The printing of numbers 1 to 10 is an example of this type of loop.
Learning Example:
Problem: Print the first five even numbers.
Analysis:
We know that the first five even numbers are the numbers 2, 6, 4, 8, 10. The problem simply says that we need to print these even numbers. If we look closer to the numbers, we will notice that there is a step of 2 from every other number. To take this step in the program, the counter function should use 2 as incrementing step to produce the even numbers.

The solution shown is the same solution in printing the numbers 1 to 10 or 1 to 1000. The things new in this solution are the incrementing step used, and the condition set to terminate the loop.
The terminating condition not only checks if the curent value is less than 10 but also cheks if they are the same. The flowchart terminates, if the current value of ctr greater than 10.
Note that the incrementing step set in the counter function is not limited to 1. The counter step differs as the problem calls for it.
Infinite Loop
A loop that runs without end. It is due to mistakes in the logical operation or expression or variables used to control the termination of the loop. Others call this logical error. Often this type of error is the hardest type of error to debug.
Learning Example : Print the first 10 counting numbers
Analysis :
We know that the solution is simply to print numbers 1 to 10. If we made use of wrong variables and or logical expression, then we might end up in having infinite loop.
The following flow chart is a classic example of infinite loop that should be avoided.
Take note of what happened if the programmer accidentally initialized variable to 0 instead of 10.
Worst if the comparison used in the decision symbol to terminate the loop in satisfying the problem is also illogical ( wrong logical operations > instead of <, etc ). This will lead to infinite loops and can give us headache in identifying the problem. Simulation is the best way to debug this error.
- Login to post comments
Fundamentals of Looping
Iteration - The repetition of the loop. When the given problem says that we have to print the numbers 1 to 10, this would mean that we will need a repetition of instruction PRINT 10 times. The number of repetitions the
loop has taken to perform to satisfy the problem is the number of iterations.
Accumulator - A temporary storage location in a central processing unit that holds values during a process. Using the problem given in the iteration example, instead of printing the numbers 1 to 10, the problems looks at printing the sum of the numbers. Illustrating the problem we have,
Numbers given : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Sum of the numbers : 1+2+3+4+5+6+7+8+9+10 = 55
This mean that we will ADD the numbers 10 times, at the same time there will be 10 iterations that will happen, but instead of printing the number as it increases from 1 to 10, we should take this increasing numbers, add them and store them in a temporary variable to hold the current sum value until we completed the 10 iterations.
The variable that temporarily holds this increasing value for sum is the accumulator. Take note that accumulator is used not only for addition but for multiplications and other mathematical applications as well.
- Login to post comments
Drupal 6 Themer Snippets 1.0 - A Free Dreamweaver Extension for Drupal Themer!
Drupal 6 Themer Snippets version 1.0 is a Dreamweaver Extension that will allow you to easily insert template variables for your Drupal template file if you are using Adobe or Macromedia Dreamweaver for creating Drupal 6 themes.
I created this extension to allow me to easily insert Drupal 6 template variables and block of code snippets. I am releasing this extension as my small contribution to all Drupal Themer that is using Adobe Dreamweaver in creating a theme.
This extension is a Free Software, you can use it for free and for any suggestion and request you can send me a feedback, you can also leave a message by adding a comment in this blog post.
Here's the screen shot:

This Dreamweaver extension only insert Drupal 6 template variables, I will regularly updating this extension so any suggested Drupal specific code snippets you want can be included in the future release of the tool, just inform me so that I can integrate it.
The tool will not create any magic in creating a Drupal theme but it will assist and speed up your theme development, it will also speed up your learning process if you want to be a Drupal Themer.
The extension can also help new users who is just switching from static site development (Dreamweaver) to content management system (Drupal). Stay tuned for future release of this extension! To download check the attachment.
Drupal 6 Themer Snippets version 1.0 is a Dreamweaver Extension that will allow you to easily insert template variables for your Drupal template file if you are using Adobe or Macromedia Dreamweaver for creating Drupal 6 themes.
I created this extension to allow me to easily insert Drupal 6 template variables and block of code snippets. I am releasing this extension as my small contribution to all Drupal Themer that is using Adobe Dreamweaver in creating a theme.
This extension is a Free Software, you can use it for free and for any suggestion and request you can send me a feedback, you can also leave a message by adding a comment in this blog post.
Here's the screen shot:

This Dreamweaver extension only insert Drupal 6 template variables, I will regularly updating this extension so any suggested Drupal specific code snippets you want can be included in the future release of the tool, just inform me so that I can integrate it.
The tool will not create a magic in creating Drupal theme but it will assist and speed up your theme development, it can speed up your learning process for you to be a Drupal Themer.
This extension can be a helper tool for new users of Drupal that is just switching from static site development (Dreamweaver) to (CMS) content management system particularly Drupal.
Stay tuned for future release of this extension! Check the attachment to download the tools.
- Login to post comments
Microsoft Outlook E-mail Account Settings
Every time I setup and develop a site for my client, I've always teach them how to configure their email clients to connect to their mail server using Microsoft Outlook.
To freed me from repeating the process again in the future and help others who really don't know the configuration, I created this tutorial.
This is an interactive tutorial and I used my existing email account for demonstration purpose and to be able to apply this in your own website, you will need to use your own mail server and email accounts and follow the configuration shown in the tutorials.
For example: In the tutorial I used in the configuration of incoming and outgoing mail server the value mail.shorr.com.ph which is one of the site that I created and maintained, you need to replace it with mail.yourwebsite.com of course.
The tutorial is a flash file with a size of 5MB and will open in a new window if you click the link below.
Here's the link: View Tutorial
- Login to post comments
DANREB.COM
