What is a Java Bean? Is it Just Any Java Class?

What is a Java Bean? Is it just any java class? The answer is no! Many people think when they say “Java Bean” they are talking about just any java class, but this is not the case. A Bean is not just any java class. Java Beans are classes that need to abide by some […]

Difference between a Framework and a Library

Recently, I heard 2 of my friends talking about the difference between a framework and a library, and I thought some may need a clear explanation to see the difference. Check out the simple diagram below. Library A library is essentially a set of functions that you can call, these days usually organised into classes. Each […]

Django – Difference Between Filter and Get

For the new comers Django’s Get and Filter functions may be consuming when it comes to decide which one to use. The primary difference between the two is Get will return exactly one object while Filter will return a query object even if the result set contains only a single object. GET Returns the object matching […]

How to check if Insert query succeeded in PHP

Here is another post to help out PHP beginners. So you created your connection object, wrote your query, created a statement object, bound your variables to protect yourself against injection attacks etc. Now you execute your query and wanna see if the execution was successful. How do you know if the  query was successfully executed on […]

String Concatenation in Ruby

There are various ways that you can do string concatenation in Ruby: 1- Concatenate using “+” operator

2- Concatenate without the “+” operator

3- Concatenate using “<<” operator

4- Concatenate using “concat” method

5- Create an array of strings and use “join” method

Check out the links below for some […]

Difference Between Relative, Absolute and Fixed Positioning

If you are a web developer/webmaster, it is imperative that you understand positioning and know how relative, absolute and fixed positioning works. In this post, I will try to briefly explain how they work so that you can see the differences and use them correctly in your page design. Relative Positioning Every element on a […]

Difference Between Hashing and Encryption

When it comes to security, you will hear a lot of people talking about things like hashing and encryption. But what are they? What are the differences? What are the practical approaches when it comes to choose which one to use? In this post, I will try to give a brief explanation about both concepts and try […]

PHP Prepared Statements – Part 2

I have already written a post titled “Php Prepared Statements” but it was very brief and did not explain the workings of Prepared Statements, neither did it mention the PROS of using Prepared Statements. In this post, I want to provide more info about Prepared Statements in PHP. What are their advantages, why you should use them, […]

PHP Shorthand IF Statements (Ternary Operator)

You know If statements. They are almost all the same in most of the programming languages. In PHP, their structure is also just the way you would expect them to be 🙂 Below is a very simple if statement in PHP:

How about PHP Shorthand IF Statements…? Sometimes you want them to be as short as […]