July 25, 2014

Factorial of a number in C & C++ | The Simplest Way

09:49 Posted by Freblogg 1 comment

Factorial of a number is a very commonly used function and so, not surprisingly programmers run in to this quite often. But, there is no direct function we can call to do this for us. So, each time i have to use this, i end up writing a 5-10 line code using recursion or some other method and then call that for the factorial, which is pretty boring.

But, I have found a very easy way to implement factorial with a built-in function of "math.h" called tgamma(). So, lets see how to implement this program
#include <math.h>
#include <stdio.h>

double fact(double x)
{
  return tgamma(x+1);
}
int main()
{

May 14, 2014

How to become a Speed Cuber? | Part 2

16:05 Posted by Freblogg , 1 comment
Finally we are back with the Part 2 of this How to become a Speed Cuber series. (For Part 1 - Click here). This article and the previous one mainly concentrate on the original Rubik's Cube, 3x3x3.

Many people liked Part-1, but one thing they wanted was me to explain each of the speed solving methods, i discussed about in detail. Well, I would like to do that for sure, but this article doesn't seem like the correct place for that. So, for now, i'll give a few links at the end of this article to a few sites and videos, that helped me with Speed Cubing. 
But, since, many people asked me to cover the methods, i'll explain the basic procedure, strategy and tips and tricks with each method in this and the successive articles in this series. Here, i need to be honest with you. Jessica Fridrich's method (CFOP), is the most popular and well used. So, as you probably can guess, I use CFOP for solving. At the same time, i know Petrus method too, So, i'll cover these two methods in great amount of detail than the other two methods (Roux and ZZ). But, i'll still give my comments on them but they are mostly from seeing others solve and not my own personal experiences. So, for these two methods i'll provide a few resources for you guys to look at, if you are interested in learning these.
So, Let's get started .

May 11, 2014

How to create Mail merge with Gmail and Google docs?

13:32 Posted by Freblogg , , 1 comment
Mail merge is a very interesting feature in every mail. And, being as popular as it is gmail supports this.
So, What is Mail merge?
Imagine you have a mail that needs to be sent to 50 of your friends/clients. One thing you can do is to add all the mail id's in the 'TO' field and send it.
This sure is one way to do it, but if you want to send a personalized message to each of them, probably something like, Hello Mr.A, for friend A and Hello Mr.B for B and so on. To be able to do this, you need to send the mails individually. Wouldn't it be easier if you can send this to all the persons at once?
Behold the Mail Merge man. He will make this task simple and easy. You just need to write a single mail and that will be sent to each of them with the corresponding personalization.

http://durgaswaroop.blogspot.in/2014/05/how-to-create-mail-merge-with-gmail-and.html

April 30, 2014

Introduction to Two Dimensional arrays | C Programming

05:23 Posted by Freblogg No comments
C Programming Language allows for the use of multidimensional arrays.
An array what we generally mean is a one - dimensional array. An array can be 1-Dimensional, 2-Dimensional, 3-Dimensional, .... so on. In this particular post (assisted by the YouTube video ) we'll learn about the Two dimensional arrays.
Two dimensional arrays will have 2 dimensions, i.e, it is extended in both horizontal and vertical directions, unlike a 1-D array which is represented in a linear form.
And, just as we can access individual elements in a 1-Dimensional array, we'll be able to access each location in the array, using the respective indices (row number, column number).
A two dimensional array with 'a' rows and 'b' columns can be defined like this.
type name_of_array [a] [b] ;
That will create a 2-Dimensional array in the memory. And, you can address the locations in this array using two indices rather than one (as in a 1-D array).
http://durgaswaroop.blogspot.in/2014/04/introduction-to-two-dimensional-arrays.htmlSo, the addressing would be something like the following (for a array named serica)
serica [0] [0]
serica [0] [1]
serica [0] [2]

April 15, 2014

How to become a Speed Cuber? | Part 1

03:00 Posted by Freblogg No comments
Rubik's Cube, introduced in 80's (late 70's) is the most popular puzzle ever made. It has been sold an estimated 350 million pieces as of 2009 and its growing at an incredible rate. So, more than ever in the history of cubing, lots and lots of people are aspiring to become speed cubers. This article is dedicated to all those people wishing them the very best.

So,What is Speed Cubing?
http://durgaswaroop.blogspot.in/2014/04/how-to-become-speed-cuber-part-1.html

 Speed Cubing or Speed solving is solving the Rubik's cube or any other similar puzzles quickly, as fast as possible. So, how fast are we taking about? To give you a perspective of the actual speed, here are the world records in a few categories.
3x3x3 cube - 5.55 secs
4x4x4 cube - 24.66 secs
2x2x2 cube  - 0.69 secs
5x5x5 cube - 50.50 secs

So, if you are a beginner or a person who has just started learning the cube, these may scare you a bit. But you don't need to worry. It is just a matter of the sheer amount of practice you do. This post should be able to help you with almost everything related to speed cubing.
This article is written so that it can help even the person who just just started learning to solve a cube. In other words it covers A-Z of cubing. Starting from How to solve? to finally participating in the Cubing events and ultimately being a world champion !

March 15, 2014

How to plot a graph with discrete data points in Matlab?

23:00 Posted by Unknown No comments
Matlab is a very popular Software package for almost all disciplines of science and Technology. Matlab is

used regularly by many people for many complex and ground breaking applications. But, people don't use it for one simple thing, Plotting graphs when we have a set of discrete data points. Probably the major reason for this is that many people don't know how to plot this kind of graph. So, in this article we will try to show you how you can do this in Matlab.
Let's consider that the set of coordinates are as follows :

March 08, 2014

February 22, 2014

Why do Hard Drives and USB sticks show less space than advertised ?



Have you always wondered why a 8GB USB drive shows less than 8GB (7.5 GB) of space and why does a 500 GB HDD shows an available space of 465GB right out of the box?
That is not because the manufacturer is cheating you or something,but it has to do with the difference in the definitions  of a GB (Giga Byte) for our computer and the manufacturer. It has to do with math.
Hate Math? We'll make it easy for you.

February 10, 2014

How to Format Placeholders? | C Programming

08:24 Posted by Freblogg No comments
Placeholders are used in printf and scanf. They act as a holder , a place for the value of the variable. In this tutorial i'll show you how you can format them so as to change the way the value of the variable gets displayed .This is just formatting the way it is displayed but thid won't change the actual value of the variable.



For more videos in this tutorial series,
C Programming Playlist - Click this
For my YouTube channel , Click here


February 02, 2014

Why is 'Q' always followed by 'U' ?

06:36 Posted by Unknown No comments
Q, the seventeenth letter of English alphabet is one of the very few used letters (2nd most rare word, according to many studies and surveys across the world on the letter frequency). But in all of these  occurrences you will find it before 'U'. Well, except

January 28, 2014

Add Colour to your Computer..

13:45 Posted by Unknown No comments
Some of the customizations you can do with FolderIco
Wouldn't it be great if you can change the color of folders,or its look in Windows?
Well, this is one of the things, almost all of us want for Windows. But, unfortunately, windows doesn't allow this kind of customization. 
Lucky for you, you have a great piece of software for this.  FolderIco, is an amazing software which will allow you to change the color of your windows folders in just ONE click. Its very very easy to use and completely intuitive.
So, Check out their website at the following link, http://www.folderico.com/
You can have the trail version or you can buy the complete version. 
So, go ahead and try it. You will surely love it !