Pages

Sunday, 21 July 2013

How to change the Favicon for your Blogger blog - step-by-step tutorial

                   A Favicon is a small image which is associated with your blog. It is used in many places. For example, most browser, you will see a small icon besides the title of the page. In my case, it shows two letters 'SC'* . By default, Favicon of a Blogger blog is a letter 'B' written in an orange background*.

In this tutorial I'm gonna show you how to set a favicon for your Blogger blog.

STEP 1 :  Get your Favicon ready.
You may do this by creating an image with your photoshop or any other means but the dimensions of image should be 16X16 px and the format should be .ico. Or much more easier is to create your Favicon with a free online tool in here. I always prefer the latter method. It is a very simple process to get your image/animation using this tool. Draw as you like and after you finish just click 'Download Favicon' and you will now have your .ico file.

STEP 2 : Go to the layout settings of your blog from blogger. On the upper right corner you will see 'Favicon' setting. Click on edit and a new window will pop up.


STEP 3 : Go ahead and click on 'choose file' and upload your .ico file.


STEP 4 : Now click 'Save' and the window will automatically close.


STEP 5 : You will see your favicon in place of the default one on the layout page when the window closes. This means everything is good and you have your very own favicon for your blog now. One last step. Click save arrangement on the upper right corner of your layout page, and 'View Blog' on the upper left. 









That's it! You are now good to go with your blog's new favicon!!
Spare a moment to say thanks and motivate me. :)


//Spectracoder

Saturday, 20 July 2013

Dev C++ - Review + Variations from Turbo C++




           I was addicted to the old school Turbo C++, until very recently, until I met Dev C++. For those who don't know new C++, Dev C++ may be a little strange, but once you get used to some minor changes from that of TC++ , you will be amazed how sophisticated is Dev C++ Compliler. 

       Some of the features I love the most are :
  • Automatic Indentation 
  • Syntax Highlighting
  • Updated and ready to go!
  • Error identification is BITCHIN'!!!
So if you are not satisfied with Turbo C++, I completely recommend you to move on to Dev C++, but you have to know the changes to be made in the program as for it to work with Dev C++. I am listing here, two of the most basic variations of DC++ from TC++ here:

     
  1. .header extension is removed, and most of the header names are changed. For example in TC++,  you include iostream header as : #include<iostream.h> , whereas in Dev C++, you should remove .h extension and type it like this : #include<iostream>. There are many header variations like this.
  2. Another important change is that, inorder to make the program work, you are required to enter this :          using namespace std;                                                                                                               in between the header inclusion and class/function declaration. 

 Here is the addition program in two compilers:

Turbo

#include<iostream.h>
void main(){
int a=3,b=3,c;
c=a+b;
cout<<c;
}

Dev

#include<iostream>
using namespace std;

void main(){
int a=3,b=3,c;
c=a+b;
cout<<c;
}

So, to conclude, Dev C++ is loaded up with many amazing and sophisticated features. And it is also opensource (FREE!) . You may download it from their website. 
That is all for now guys.. 
Spare a moment to say thanks. :)

Monday, 15 April 2013

#3 Operators in C++ and your first practical program - a simple calculator!

                        Today we are gonna talk a little bit about different "Operators" in C++. Operators are anything, which are coded to do something. We already have talked about one operator : the output operator. Actually, the output ( cout ) operator, is the part of a set of operators called input-output (I/O) operators, which also contains many other similar operators.
           
           Next important operator we are gonna learn from I/O operator is the basic input operator. Similar to "cout", the code for input operator is "cin". The header file needed for cin is <iostream.h> . The general format of this operator is :



'a' can be any variable you want to insert from the user. This can be a bit difficult to digest. But this is very simple... Lets do a practical. Suppose you want to insert a number from the user. First thing you want to do is to declare that a variable (a number which is yet to be known) is present in the program.

Declaration of a variable means, letting the compiler know that a variable is present in the program, so as to run it. To declare anything in C++, you want to inform the program it's datatype.
Now a datatype means the type of the thing you want to add to the program. There are two types of datatypes. They are Basic Datatypes and Derived datatypes.  Any program which involves integer operations, should have the "int main()" function. i.e. we have to replace the "void main()" function of the last program with "int main()".

We will learn more datatypes later. Now all you have to know is, an integer number (eg: 0, 2, 13, 63, -4, -7, -10) is of the datatype "int". The second thing to know about variable declaration is that, a variable has to be given a name. Since it is an unknown number, it is appropriate to name it an alphabet like 'x', or a, just like in algebra, where we name unknowns 'x'. This pseudo-name we give to unknown things like a character, or a number is called Identifiers Now lets name our number to be input by our user 'u'. (An identifier need not to be of a single character, we may also name our number 'unknownnumber' or something, but note that white spaces are not allowed in between the text of an identifier, and also it is for simplicity, we are naming our number 'u'). To letting the program know that a variable 'u' exists, you should insert this code just after opening the braces of the main() function:



Now that your program knows it involves an unknown number, next thing you will need to do to input a number from user, is, you should inform the user that the program is expecting a number from him/her. To do this, we just have to output a message saying to input the number, just like this:

Now as the user reads the message he will try to enter the number, but will fail miserably, because *tadaaa* there is no input operator. This is where "cin" comes into play. Now you should enter this code just after the message to user:



Now the user will be able to enter the number, and as soon as he presses enter, the  value he types get stored under the identifier 'u'. If we call 'u' again, the value of 'u' will be used. To understand this let us include this code to output 'u'.:



Let us look at the final code, and what happens when we run it:

The value entered was 34, and  when 'u' is output, 34 is displayed...

UPDATE : Dev C++ is much better than Turbo C++ if you want to learn updated C++. Here is a review of Dev C++ and variations of Dev from Turbo++, and its advantages over other compilers!

That is it for today guys...
Happy coding... :)



Saturday, 13 April 2013

How to resume cancelled Chrome downloads using .crdownload file


The one and only thing I dont like about Chrome is its download system. It can be extremely frustrating sometimes, if you are downloading huge (>500 MB) files. It automatically stops sometimes. The common misconception is that, if this error happens, we have to download the file from the beginning. Easy enough, if you have not reached that far in your download. But what if it happens when you are on 90% or above? Here is an easy trick to resume a cancelled download of Chrome, using leftovers of the dead download…

Step 1 : Go to your download location and locate your file. It will have an extension “.crdownload” (eg : if you are downloading a file named “name.extension”, what you have to locate is “name.extension.crdownload”). Now rename your file by removing the “.crdownload” extension. (eg: rename “name.extension.crdownload” to  ”name.extension”)
Step 2 : Download “wget” from here and copy the .exe file into the same directory as that of your unfinished download.
Step 3 : Open command prompt inside your download folder. To do this easily in Windows 7/8, just hold Shift Key and press left mouse button, and select “Open command prompt here”.
Step 4 : Now a new black window will appear. Type in the command ” wget -c <URL> “








>> You will need to type the place you are downloading the file from in the place of <URL>. You can obtain this from Chrome Downloads page, or the website you are downloading the file from. (eg: http:// webpage.com/ file.extension)
Step 5 : Now your download will RESUME!! After completion, you just need to go to your download folder, and find your file,, completely downloaded! Neat huh?




Kindly take a moment to say Thanks. That will be really appreciated. And it will be a motivation for me. Subscribe for more tricks n’ tips..
~ RaMaN, Spectracoder   B-)

Wednesday, 13 March 2013

#2 Basic Structure of a C++ Program

Let us create a simple 'Hello, World' program... Now just type what you see on the picture in your compiler, and later we will analyze it...
Source code :
After entering the code, you should compile and run your program using your compiler. In the case of Turbo C++ 4.5, for running, press ctrl+F9 or Debug --> Run
Output:
No let us look at the structure of the code..
#include<iostream.h> : This line is to link the program to be run, to a specific file called Header File, in which there are information about things to be done in the program. We will learn about this later...

void main() : This line is called a 'function'. It actually says the compiler that this is where the Program execution should begin. We will learn much more about Fuctions, in coming lessons.

{ & } : Opening and closing curly brackets are the starting, and stopping point of a function. 

cout : Input and output (I/O) operators are integral parts of any programming language. They are the interactive parts of a language. A language without I/O Operators are like a human body without any senses (blind, cannot smell, deaf, dumb, insensitive to the skin)... Whoo! Can't even imagine right? "cout" is one of the output operator of C++ ... That means, cout displays text in the output. Notice that after cout, there are two "<<" less than signs. (NOT ">>"). General form of cout is : | cout<<"text to be displayed"; | Also note that, the operator ends it's line with a semicolon ";". Now try displaying your name in the place of "Hello World" in your program. We will learn many I/O Operators in coming days.

COMMENTS : Comments are those lines in a program which the compiler ignores. In our hello world program, you can see many comment lines on the right side of each line, in dark blue color. Comments can be used for teaching, reminding yourself, and also it is an important part in readability. There are two types of comments :
1. Single line comments - They are those which start with two front slashes "//" These can only be used for commenting in a single line. Their general form is | //commentcontent | 
2. Multiple line comments - Those which start with a front slash and a star and ends with a star and a front slash, are multiple line comments. These can be used to type many lines and paragraphs. The compiler wont even look inside those "/*" and "*/" ! General form is : | /* comment content no limitsssss! */ |
But there are some limitations for WHERE to use multiple line comments. For example, it cannot be used in such a way: | for(i=0;i<n /* Comment invalid */ ; i++) | i.e inside a loop (later, I promise... ;) ) 


In next lesson, we will learn about input functions, where we can INPUT our own values to the program, operators in C++, and EXCLUSIVE : WE ARE GONNA MAKE A SIMPLE CALCULATOR!!! Excited huh??? See you next time... 


Happy Coding.. :)

Monday, 4 March 2013

#1 Introduction to C++ Programming - CPP Tutorials for Beginners

General Introduction




Waah! We are now going to study a brand new and wide subject, C++!
         
            C++ is both an object-oriented and general purpose programming language. There was this long conflict between programmers of 90's whether C or C++ is better. Well, everyone has different Point of Views.
                          I think it in this way : C++ has all features included in C, plus many other new features like Inheritance, Polymorphism (We will study these later). So, C++ is a super-set of C. Or, knowing C++ makes you familiar with almost all the features in C too. Obviously, there are differences in structures, but features are same.

      C++ was developed by a computer scientist named Bjarne Stroustrup, of Bell labs in 80's.

Enough trash talks. Let's get into business!

Beginning C++ 

Prerequisites

NOTHING! I mean it! Nothing!!! There is no need for prior experience in any other languages to learn C++
But a little logic will help.

Things You Need

You must have a not-so-bad computer, with any Operating system.
You must have a compiler of your choice (There are plenty out there in the internet). I am using Turbo C++ 4.5 for demonstration. (Google it, Download it!)

Next Step


Well, be equipped with the things above in the description and
Keep Calm and Wait for my Next Lesson! 

UPDATE : #2 is HERE!
;)

Happy coding! :)

Sunday, 3 March 2013

What is Data and What is Information?


Data and Information... These two are the two of the most used words by Computer Scientists and Geeks. What's the deal with them? Let's see:

Data

Data are plain/raw facts or figures. They are unorganized and meaningless fragments of input given or taken from  a source. An appropriate example is group of names of members in a particular group. When Data is put together in a meaningful fashion, it gives Information.

Information

Information is a group of data, which is arranged in such a way that it conveys a message to the reader.
Lets take the example of the group of names we discussed above. When we arrange this names in a particular order, for instance, when they arranged in alphabetical order, then we can call this Information!


Computer Science deals with the manipulation of data and information. 
Data  is manipulated to give out information, and information is manipulated to give out different results. This conversion/manipulation is called Data Processing. Cool right? Here is a flowchart showing the process of converting data into results. Here, we are taking the example of converting your marks in several subjects to your progress reports, or other results:



Another term related to this and often used by Computer Scientists is Knowledge. Use of information in appropriate situations, is called Knowledge.

That's it for today guys..

Happy Coding! :)

Saturday, 2 March 2013

Introduction to my blog...

Through this blog, I am planning to give away the most valuable, or should I say UNvaluable, thing... Information!
I am going to give tutorials on programming languages like C++ and Java, and web development languages like HTML, CSS, JavaScript, PHP etc; Be sure to subscribe to RSS feed, comment, and share the blog with your friends... :)

Happy Coding!