Showing posts with label Computer Science. Show all posts
Showing posts with label Computer Science. Show all posts

Tuesday, 17 May 2016

How to change the default blogspot favicon ?


Know more about favicons from my previous post 



This is the default favicon that appears for any blogspot. Do you know that you can change this favicon and put your own favicon? Here is the step by step process of changing the default favicon in blopspot.

                 Step-1: Open your blogspot dashboard



Step-2:After opening the Dashboard, click on the layout option as shown below.




Step-3:Now you can see a favicon section in the layout. Click on the edit button here.




Step-4:As you click on the edit, a window will be popped out, asking to choose the file. Click on choose file.




Step-5:After clicking on choose file, you can choose the image you want to make as your favicon and click on open.




Step-6:After clicking on open, you get a window as shown below. Click on save.




Step-7:Now click on the save arrangement as shown below




Step-8:You will see a message "your changes have been saved".




Step-9: Now open your blogspot in a window. It takes some time to get the updated favicon, so don't be panic. After sometime, you will get the updated favicon of your blog as shown below.


What are favicons ?

Favicon's are those images which appear before the title of any webpage as shown in the figure.

For any blogspot, the default favicon is shown below. Favicons are also considered as logos.
BLOGSPOT DEFAULT FAVICON
 There may be a doubt or misconception that this favicon can't be changed. This is completely wrong. You can change the favicon for your blogspot.  How this is done? This is clearly explained in my next post 
Some of the popular website along with their favicon's are shown below

YUOTUBE FAVICON



GOOGLE FAVICON
FACEBOOK FAVICON

Friday, 6 November 2015

If b=a+++++a+++a; What would be the output ?

If we use pre increment operator in a statement, then increment takes place first and then the statement gets executed. But if we use post increment operator in a statement the statement gets executed with it's older value and after this statement execution increment takes place 


Ex: a=10;
      b=a++; //b=10,a= 11

     a=10;
     b=++a; //b=11,a= 11


NOTE: You may have a doubt that If you use b=( a++)+(++a)+(++a) or any other statement which involves multiple pre or post increment or decrement operations on the same variable then what would be output?   

The answer is undefined i.e. it is a compiler dependent. The compiler won't give an error but different compiler gives different outputs and no c++ rule define their execution.

Wednesday, 14 October 2015

What is compile time & What is run time ? ?

We write program in high level language. But computer can understand only binary language (0's and 1's). In order to achieve this conversion from High level language to Machine language,compiler is used. The time taken by the compiler to convert the High level language to machine language(binary language) is called as compile time.

The time taken to execute the compiled program is called run time or execution time.


Tuesday, 13 October 2015

What is inline function in C++ ? ?

Sometimes we may come across using a small function many times in a program. Consider we use normal function definition. Whenever a normal function call is encountered, the program will store the memory address of the instructions which are immediately following the function call. It load the function being called and executes this function and stores the return value if any. Now it jumps back to the stored memory address,which is the memory address of the instruction which is immediate to the function call. So too much run time is involved here. In such cases we can declare the function as inline. This declaration is done by just keeping "inline" before the actual function definition. If we use this inline declaration, then compiler replaces all the function call statements with the function definition so that jumping can be avoided,which in turn decreases the run-time for the program.

***By using inline function, we are increasing the compile time  and decreasing the run time.

***It is just a suggestion to the compiler but not a compulsion. i.e, If the function is big,but it is declared as inline, the compiler won't treat it as inline function, it just treats as a normal function only.