Theme Graphic
Theme Graphic

Blogs Home

Welcome to the Programmer's Heaven blogs area! Here you can read blog
posts made by our users, as well as creating and writing your own blog.
Posted on Thursday, June 10, 2010 at 3:06 PM
Programming Tutorial Java Tutorial 5 – Arrays In non-trivial computing problems you often need to store lists of items. Often these items can be specified sequentially and referred to by their position in the list. Sometimes this ordering is natural as in a list of the first ten people to arrive at a sale. The first person would be item one in the list, the second person to arrive would be item two, and so on. Other times the ordering doesn’t really mean anything such as in the ram configuration problem of the previous chapter where having a 4 MB SIMM in slot A and an 8 MB SIMM in slot B was effectively the same as an 8 MB SIMM in slot A and a 4 MB SIMM in slot B. However it’s still convenient to be able to assign each item a unique number and enumerate all the items in a list by counting out the numbers.

Java Tutorial 5 – Arrays

Posted on Sunday, June 06, 2010 at 1:19 PM
Programming Tutorial Java Tutorial 4 – Methods All the programs we’ve written to date have been quite simple, well under fifty lines of code each. As programs grow in size it begins to make sense to break them into parts. Each part can perform a particular calculation and possibly return a value. This is especially useful when the calculation needs to be repeated at several different places in the program. It also helps to define a clearer picture of the flow of the program, much like an outline shows the flow of a book.

Java Tutorial 4 – Methods

Posted on Sunday, June 06, 2010 at 1:16 PM
Programming Tutorial Java Tutorial 3 – The For Statement and Operators Java isn’t as redundant as perl, but there’s still almost always more than one way to write any given program. The following program produces identical output to the Fahrenheit to Celsius program in the preceding section. The main difference is the for loop instead of a while loop. Java Tutorial 3 – The For Statement and Operators

Posted on Wednesday, June 02, 2010 at 3:09 PM
Programming Tutorial Java Tutorial 2 – Classes and Objects: A First Look Classes are the single most important feature of Java. Everything in Java is either a class, a part of a class, or describes how a class behaves. Although classes will be covered in great detail in section four, they are so fundamental to an understanding of Java programs that a brief introduction is going to be given here.

Java Tutorial 2 – Classes and Objects: A First Look

Posted on Wednesday, June 02, 2010 at 2:55 PM
Programming Tutorial Java Tutorial 1 – Hello World: The Application At least since the first edition of Kernighan and Ritchie’s The C Programming Language it’s been customary to begin programming tutorials and classes with the “Hello World” program, a program that prints the string “Hello World” to the display. Being heavily influenced by Kernighan and Ritchie and not ones to defy tradition we begin similarly.

Java Tutorial 1 – Hello World: The Application

Posted on Sunday, May 30, 2010 at 12:48 AM
Programming Tutorial C tutorial index C Tutorial 1 – The basics of C C Tutorial 2 – If statements C Tutorial 3 – Loops C Tutorial 4 – Functions C tutorial 5 – Switch case C Tutorial 6 – An introduction to pointers C tutorial 7 – Structures C Tutorial 8 – Arrays C Tutorial 9 – C Strings C Tutorial 10 – C File I/O and Binary File I/O C Tutorial 11 – Typecasting C Tutorial 12 – Accepting command line arguments

C tutorial index

Posted on Sunday, May 30, 2010 at 12:47 AM
Programming Tutorial C Tutorial 12 – Accepting command line arguments Typecasting is a way to make a variable of one type, such as an int, act like another type, such as a char, for one single operation. To typecast something, simply put the type of variable you want the actual variable to act as inside parentheses in front of the actual variable. (char)a will make ‘a’ function as a char. For example:

C Tutorial 12 – Accepting command line arguments

Posted on Sunday, May 30, 2010 at 12:43 AM
Programming Tutorial C Tutorial 11 – Typecasting Typecasting is a way to make a variable of one type, such as an int, act like another type, such as a char, for one single operation. To typecast something, simply put the type of variable you want the actual variable to act as inside parentheses in front of the actual variable. (char)a will make ‘a’ function as a char. For example:

C Tutorial 11 – Typecasting

Posted on Sunday, May 30, 2010 at 12:40 AM
Programming Tutorial C Tutorial 10 – C File I/O and Binary File I/O When accessing files through C, the first necessity is to have a way to access the files. For C File I/O you need to use a FILE pointer, which will let the program keep track of the file being accessed. (You can think of it as the memory address of the file or the location of the file). For example:

C Tutorial 10 – C File I/O and Binary File I/O

Posted on Saturday, May 29, 2010 at 2:18 PM
Programming Tutorial This lesson will discuss C-style strings, which you may have already seen in the array tutorial. In fact, C-style strings are really arrays of chars with a little bit of special sauce to indicate where the string ends. This tutorial will cover some of the tools available for working with strings–things like copying them, concatenating them, and getting their length.

C Tutorial 9 – C Strings C Tutorial 9 – C Strings

Posted on Saturday, May 29, 2010 at 2:16 PM
Programming Tutorial C Tutorial 8 – Arrays Arrays are useful critters that often show up when it would be convenient to have one name for a group of variables of the same type that can be accessed by a numerical index. For example, a tic-tac-toe board can be held in an array and each element of the tic-tac-toe board can easily be accessed by its position (the upper left might be position 0 and the lower right position 8). At heart, arrays are essentially a way to store many values under the same name. You can make an array out of any data-type including structures and classes.

C Tutorial 8 – Arrays

Posted on Saturday, May 29, 2010 at 2:15 PM
Programming Tutorial C tutorial 7 – Structures When programming, it is often convenient to have a single name with which to refer to a group of a related values. Structures provide a way of storing many different values in variables of potentially different types under the same name. This makes it a more modular program, which is easier to modify because its design makes things more compact. Structs are generally useful whenever a lot of data needs to be grouped together–for instance, they can be used to hold records from a database or to store information about contacts in an address book. In the contacts example, a struct could be used that would hold all of the information about a single contact–name, address, phone number, and so forth. C tutorial 7 – Structures

Posted on Friday, May 28, 2010 at 4:17 PM
Programming tutorial Pointers are an extremely powerful programming tool. They can make some things much easier, help improve your program’s efficiency, and even allow you to handle unlimited amounts of data. For example, using pointers is one way to have a function modify a variable passed to it. It is also possible to use pointers to dynamically allocate memory, which means that you can write programs that can handle nearly unlimited amounts of data on the fly–you don’t need to know, when you write the program, how much memory you need. Wow, that’s kind of cool. Actually, it’s very cool, as we’ll see in some of the next tutorials. For now, let’s just get a basic handle on what pointers are and how you use them.

C Tutorial 6 – An introduction to pointers

Posted on Friday, May 28, 2010 at 4:16 PM
Programming tutorial Switch case statements are a substitute for long if statements that compare a variable to several “integral” values (“integral” values are simply values that can be expressed as an integer, such as the value of a char). The basic format for using switch case is outlined below. The value of the variable given into switch is compared to the value following each of the cases, and when one value matches the value of the variable, the computer continues executing the program from that point.

C tutorial 5 – Switch case

Posted on Friday, May 28, 2010 at 4:14 PM
Programming tutorial Now that you should have learned about variables, loops, and conditional statements it is time to learn about functions. You should have an idea of their uses as we have already used them and defined one in the guise of main. Getchar is another example of a function. In general, functions are blocks of code that perform a number of pre-defined commands to accomplish something productive. You can either use the built-in library functions or you can create your own functions. C Tutorial 4 – Functions

Posted on Friday, May 28, 2010 at 9:33 AM
Programming tutorial Loops are used to repeat a block of code. Being able to have your program repeatedly execute a block of code is one of the most basic but useful tasks in programming — many programs or websites that produce extremely complex output (such as a message board) are really only executing a single task many times. (They may be executing a small number of tasks, but in principle, to produce a list of messages only requires repeating the operation of reading in some data and displaying it.) Now, think about what this means: a loop lets you write a very simple statement to produce a significantly greater result simply by repetition.

C Tutorial 3 – Loops

Posted on Friday, May 28, 2010 at 9:31 AM
Programming tutorial The ability to control the flow of your program, letting it make decisions on what code to execute, is valuable to the programmer. The if statement allows you to control if a program enters a section of code or not based on whether a given condition is true or false. One of the important functions of the if statement is that it allows the program to select an action based upon the user’s input. For example, by using an if statement to check a user-entered password, your program can decide whether a user is allowed access to the program.

C Tutorial 2 -If statements

Posted on Friday, May 28, 2010 at 9:29 AM
Learning by examples

This tutorial is a port of the C++ tutorial but is designed to be a stand-alone introduction to C, even if you’ve never programmed before. Unless you have a particular reason to learn C instead of C++, I recommend starting the C++ tutorial instead. Nevertheless, if you do not desire some of C++’s advanced features or simply wish to start with a slightly less complicated language, then this tutorial is for you! Read more C Tutorial 1 – The basics of C

Posted on Thursday, May 27, 2010 at 11:07 AM
Tutorial

Matlab Tutorial 1 – The basic features Matlab Tutorial 2 – Vectors and matrices Matlab Tutorial 3 – Built-in functions Matlab Tutorial 4 – Plotting Matlab Tutorial 5 – M-files: Scripts and functions Matlab Tutorial 6 – Loops Matlab Tutorial 7 – If statement Matlab Tutorial 8 – Polynomials in MATLAB Matlab Tutorial 9 – Numerical Methods Matlab Tutorial 10 – Matlab GUI tutorial Matlab tutorial index

Posted on Thursday, May 27, 2010 at 11:05 AM
Tutorial Why use a GUI in MATLAB? The main reason GUIs are used is because it makes things simple for the end-users of the program. If GUIs were not used, people would have to work from the command line interface, which can be extremely difficult and fustrating. Imagine if you had to input text commands to operate your web browser (yes, your web browser is a GUI too!). It wouldn’t be very practical would it? In this tutorial, we will create a simple GUI that will add together two numbers, displaying the answer in a designated text field. Read more... Matlab Tutorial 10 – Matlab GUI tutorial

 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.