Before discussing classes, this lesson will be an introduction to data structures similar to classes. Structures are 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 Read More →

You have a sales table listing product, salesperson and amount:

DROP TABLE IF EXISTS sales;
CREATE TABLE sales (
id int(11) default NULL,
product char(5) default NULL,
salesperson char(5) default NULL,
amount decimal(10,2) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO sales VALUES
(1,'radio','bob','100.00'),
(2,'radio','sam','100.00'),
(3,'radio','sam','100.00'),
(4,'tv','bob','200.00'),
(5,'tv','sam','300.00'),
(6,'radio','bob','100.00');
SELECT * FROM sales;
+------+---------+-------------+--------+
| id | product | salesperson | amount |
+------+---------+-------------+--------+
| 1 | radio | bob | 100.00 |
| 2 Read More →

If you’re a Linux user then you’ve probably used cURL. It’s a powerful tool used from posting mails to downloading the latest My Little Pony subtitles. In this article I’ll explain how to use the cURL extension in PHP. The extension offers us the functionality as the console utility in the comfortable world of PHP. Read More →

http://gearman.org/getting-started/
How many times have you developed a web application that had some functionality which would benefit from running an external program or even forking a separate process? This is not something you generally like to do from your web app because you want to make it run as fast and efficient as possible, while keeping Read More →

Design Pattern History
The term “design pattern” was originally coined in the field of architecture. Christopher Alexander, in his 1977 work, “A Pattern Language: Towns/Building/Construction,” describes common issues of architectural design and explains how new, effective designs can be created through the aggregation of existing, well-known patterns. Alexander’s concepts translate well into software development, where it’s Read More →

Setting up the REMOTE DEBUG C/C++ with Netbeans :
1. Create new C/C++

2. Setting-up the C/C++ Hosts from Services Tab

3. Create the C/C++ source code and create Select Build Host

4. Clean and Build the Project

5. Select from the Project -> Proprieties -> Run -> Console Type : Standard OUTPUT

6. Debug the builded Project after Read More →

GDB
A debugging tool to debug errors in C and C++ programs. A debugger is the best friend of a software programmer.This tutorial assumes you already know how to program in C and C++ and you can compile and execute programs.
GNU Debugger which is called gdb is the most popular debugger for UNIX systems to debug Read More →

Have you ever designed an ER Diagram in MySQL Workbench and wondered, just what is the difference between “Identifying” and “Non-Identifying” relationships? Non-Identifying Relationships have dotted lines, whereas Identifying Relationships have solid lines in MySQL Workbench. The difference is subtle but worth knowing.
When you create an identifying relationship, the primary key of the child table Read More →

A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string of length n has n! permutation.
Source: Mathword(http://mathworld.wolfram.com/Permutation.html)
Below are the permutations of string ABC.
ABC, ACB, BAC, BCA, CAB, CBA
Here is a solution using backtracking.

These permute2 values themselves Read More →

Someone posed an interesting probelm over at sitepoint the other day.
Given an array of words how can you work out each possible combination?
There are a few methods but here's the PHP code for the cleanest:

$words = array('red', 'blue', 'green');
$num = count($words);

//The total number of possible combinations
$total = pow(2, $num);

//Loop through Read More →

Recursive functions can be very useful when developing in PHP.
A recursive function is simply a function that calls itself, but why would you want your function to be able to call itself?
They are best used when a problem needs to be solved by breaking it up into a smaller instance of itself. Examples of this Read More →

Introduction
Elliptic integrals of the first and second type is given in code, with some example of their implementation. I had recently a need for these types of integrals, both complete and incomplete, and such implementations was not easy to find (I couldn't find anything in C# or VB, as usual, and the C++ versions I Read More →

References in PHP are a means to access the same variable content by different names.They are not like C pointers; for instance, you cannot perform pointer arithmetic using them, they are not actual memory addresses, and so on. Instead, they are symbol table aliases. Note that in PHP, variable name and variable content
are different, so Read More →

Self installing .NET service using the Win32 API
Download demo project - 30.4 Kb

Introduction
The Windows service code that ships with the .NET framework and Visual Studio works just fine usually. However, sometimes it's just annoying to have to create an installer project just for a simple service you're writing. Furthermore, Microsoft tends to hide away the Read More →

The Model-View-Control (MVC) pattern, originally formulated in the late 1970s, is a software architecture pattern built on the basis of keeping the presentation of data separate from the methods that interact with the data. In theory, a well-developed MVC system should allow a front-end developer and a back-end developer to work on the same system Read More →

Sam handed Peter a computer printout and asked, “If the yields are so high, why is my efficiency so low?”
Peter studied the report for a moment and then nodded. “Let me show you what’s going on,” he said as he picked up a marker and drew a diagram (see Figure 1).
“This process has 10 separate Read More →

I have to admit the first time I peeked at the academic definition of the Open/Closed Principle, its predicate was surprisingly clear to me. Leaving all of the technical jargon out of the picture, of course, its dictate was pretty much the mantra that we’ve heard so many times before: “Don’t hack the core”.
Well, admittedly Read More →