How To Add Page Level Ads To Maximize Revenue

Google cares about content creators as well as content readers . After reading this you will have an in depth understanding on page level ads.

Google has come of with on page ads display solution for mobile devices. This time it targets high end mobile devices. The secret sauce is “Page Level Ads”. As the name suggests, page level ads run at page level. That means, it deals with page load event.

There are two types of page level ads

1.Anchor Or Overlay Ads

  • These ads stick to the bottom of high end mobile devices.
  • It is not countable to 3 Ads per page.
  • It is shown at optimal time to increase revenue of user.
  • User can easily close the ad. As you know, google ads are not meant to disturb primary content of any website.

Here is how it looks like,


2. Vignette Ads

  • These are full screen ads high end mobile devices.
  • It gets fired up during page load. So now you are not seeing a loading screen. Your Vignette Ads by Google AdSence is the amazing alternative.
  • It is also shown at optimal time to increase revenue of user.
  • User can easily close the ad.

Now, Lets see how we can enable Page Level Ads in Google AdSence

Activate Page Level Ads In Google AdSence

  1. Please Login to your AdSence Account.
  2.  Please Navigate to myAds > Page Level ads
    you should be on the following page

  3. Please turn on the off toggle button.
  4. Please Click on the get code icon.
  5. Now please copy the code
  6. Paste it inside <head> <head/> or just after <body> tag.

You are all set. Congratulations. !!

Resource Refered : Google Page Level Ads
 * This is only for helping out adsence users Whole credit goes to google to make our life easier.

SQL Operation

In SQL select query we can add, multiply, divide, subtract between columns. We can definitely increase user experience . Thanks to the concatenation operator . Can we concat between two column values ? Lets see how with examples.

Basic Operation on column in terms of SQL Query Result Format

  1. Arithmetic Calculations
  2. String Concatenation
  3. SQL Functions

Arithmetic Calculation On Columns Of A Table

We have gone through select query basic syntax. Do you know, you can do mathematical operation on select query columns.

For example,
Requirement : Employee table has employee_id, employee_name, employee_age, emplyoyee_salary, employee_bonus_factor. Need to prepare a “bonus report” of employees.

SELECT employee_name, 
            employee_salary + employee_salary * employee_bonus_factor 
        FROM employee;
  1. employee_salary + employee_salary * employee_bonus_factor takes the employee_salar, employee_bonus_factor data from the employee table and calculate it.
  2. The result of the employee_salary + employee_salary * employee_bonus_factor expression is populated in the second column.

String Concatenation On Columns To Present Nicely

sql concat(s1,s2) ?
CONCAT(s1,s2) accepts two arguments and returns one concatenated string.

Unlike arithmetic operation, we can concatenates stings to format or display nicely. The result becomes
readable and easy on eyes.

Syntax :   ||   two vertical pipelines . This is usually located just above the enter key in keyboard.

For example,
In some reports, we do not want tables. We want data report pulled out from sql database. We want those to be formatted as per our need. In such cases concatenation operator works like a gem.

SELECT 'Employee "' 
        || employee_name 
        || '" is having salary : '
        || 'Rs ' 
        || TO_CHAR(employee_salary + employee_salary * employee_bonus_factor) 
        || '/-' 
 FROM employee;
  1. Here the result is a single column.
  2. The string expression pulls data from 3 columns. The columns are employee_name, employee_salary, employee_bonus_factor of employee table.

SQL Function On Column(s) Of A Table

We can call sql functions inside select statement. Lets see how it looks like. We will go through sql functions in detail.

Syntax :  SUM( column_name )   sum is an aggregate function.
*Aggregate functions operate with row sets.

For example,
Lets say, we want total salary to be given to all employees. In such case we basically want sum of salary(including bonus) of each employee.

SELECT SUM(employee_salary + employee_salary * employee_bonus_factor) 
        FROM employee;
  1. Here SUM() is the aggregate function.
  2. It takes column name as argument.

SetUp Required

SQL Select

SELECT query is responsible for data retrieve or data read operation in CRUD. We can select data from table either by saying : We want all columns data . or : We want specific column data. Lets see how to get data from database .

SQL Select Statement

Lets know SELECT Query in SQL

SQL SELECT query is used to retrieve data or fetch data from relational database.

Note : We will learn create table and insert data later. For now , let us see how SELECT works.

100 Ramu Lala 25
101 Mojik Lalit 35
104 Kishore Kumar 36
105 Deepika Padukone 40

SELECT syntax

SELECT * FROM employee;

Keywords ?
Keywords are reserved words. That means no one can use the same name to create an object in database.
  • SELECT and FORM are keywords. 
  • * means all columns
  • employee  is the name of table.

Selecting specific columns by column name in Oracle

SELECT column1, column2, column3,...., columnN FROM table_name;
--returns data of column1, column2, column3,...., columnN

Retrieve all columns data in Oracle

In the above “employee” table, there are three columns

SELECT * FROM table_name;
--Returns all columns

SQL Syntax

Do you know the literal meaning of database ? We will understand what database is , different types . Difference between NDBMS and RDBMS, Best Practices and many more. If you love databases , then lets get started.

SQL Syntax – Know SQL grammar ?

Before looking into syntax of SQL , let us have a look into basic terms like Database, Entity etc.

What is Database ?

Database is something which contains data or you can call it data-container. We can access data with ease. Data can be sorted. User or any other application can interact with data in no time.

What is Database Management System (DBMS) ?

NDBMS is Navigational DBMS (1960). Relational DBMS is being upgraded since 1970.

Database Management System (DBMS) also termed as Relational Database Management System (RDBMS).
These database stores data in organised way in the form of table (primary entity of DBMS). Data
can be stored, retrieved, manipulated or delete with easy. User can play with the stored data . Any other
application ( web app, desktop app, database application ) can interact with the database easily.

how do sql statements look like ?

What are case sensitive ?
String literals. e.g SELECT * FROM employee WHERE emp_name = ‘CASE_SENSITIVE’
  1. Case Insensitive – However, it is a good practice to use uppercase for keywords to increase readability
  2. Semicolon – Semicolon is an indicator to tell database, “You know what ; is the end of statement 1. Execute stement 1 and proceed..”

SQL Basics

What is SQL ?

First of all we should understand , SQL stands for Structured Query Language. SQL is a standard. So on top of sql , many relational  database systems are built. Some of the RDBMS (Relational Database Management Systems) are SQL*Plus, Oracle, MySQL etc.
Hence SQL lets you deal with database.

Why to learn SQL ?

Before knowing the answer to this question , I must say welcome. Its because , as you are on our beautiful land of SQL

  1. You are curious
  2. You wanna have a concrete base enriched with clear concepts
  3. You know what is sql but wanna have in depth knowledge

So Learning SQL helps in understanding and taking up oracle , msql and many more.

What SQL can do ?

CRUD is fancy way of saying Create, Read, Update, Delete.

You can CRUD on data or data-blocks holding data.

  1. Create data rows/structure in database
  2. Read data from database
  3. Update data of database
  4. Delete Data in database

You can do many more.We will explore one by one.

How to get all the friends name who have liked posts in facebook page ?

Get All Likers of Posts in Facebook Using Graph API

In this we will learn how to get all the friends post by post in as many pages we want.

We know facebook elements are nodes. So post is a node. It had different attributes. Like post id, message, created_time etc.


Logic :

1. Get the graph API object. With the help of this we can talk to facebook.

2. Get the ids of pages.

3. Initialize liker_list and ll(temp list) to empty list and an empty string.

4. Loop through all the pages.

5. Loop for all the posts in all the pages.

6. Get the likers and keep appending.

7. Once like name retrieval for a person is complete then set it to null.

8. Keep repeating Step 1 to 7 for all posts.


import facebook
graph = facebook.GraphAPI('CAACEdEose0cBABRdoBIZCVqYhzbcaMbdsVBUIWOREhoAc0a3iKCf7Cjqp5pSNaCtrsEzcmJ6QjdixeYchIzHZCIH3JMQRWyXjwSlFJK7FwWS3ZAIxkDfhjhAjZBViOqEt6jiCuliyI5CcZAZCydiNklJUxs6vjWvZAInOPfh1B69hfkJk9mZCejZAhW9N5s7XBAZANH7AMApogocLeZBqx8xXem')
pages = ['nikondslrmagic']
ll = ''
for page in pages:
profile = graph.get_object(page)
posts = graph.get_connections(profile['id'], "posts")
for post in posts['data']:
ll = ''
liker_list = []
for liker in post['likes']['data']:
ll = ll + ' ' + liker['name'] + ', '
ll = ll.strip(' ,')
print(post['id'] + ' : ' + ll)


Thank you for visiting. Please subscribe for out updates.

Ubuntu Sidebar Autohide Not Working [ Solved ]

Ubuntu autohide sidebar feature fix in 1 minute :

First enable ubuntu sidebar autohide feature. Now move the mouse  towards the sidebar . Sometimes it opens sometimes its not.

In this , we will fix it within 1 minute. Lets get started.

Step – 1 : Install CompizConfig Settings Manager in Ubuntu Software Center.

compizconfig settings manager in ubuntu software center
compizconfig settings manager in ubuntu software center

Step – 2 : Enter credential and authenticate.

authenticate compizconfig settings manager
authenticate compizconfig settings manager

Step – 3 : Open CompizConfig Settings Manager . Now goto unity plugin for ubuntu.

unity plugin manager in ubuntu
unity plugin manager in ubuntu

Step – 4 : Go to Launcher tab.

Step – 5 : Decrease the Reveal Launcher Pressure to lower number. Here I have decreased to 1.

launcher tab and launcher reveal pressure in unity
launcher tab and launcher reveal pressure in unity

Enjoy. Now close the CompizConfig Settings Manager.  Caution : Its an advanced tool Please use it carefully. Thanks 🙂

Facebook graph API : like and comment in all posts using Python Graph API

With the use of facebook graph api one can reply to all the birthday wishes, post photos, retrieve photos, post videos, retrieve videos, post comment, like objects. Here we will know way to like and comment in facebook posts in any number of pages using python script.

How to like and comment in all posts in any number of pages using graph API in python.

Here we will go through step by step process to like and comment in all posts of any number of pages. Excited !! Yeah , I am too. Lets get started.


1. Python 3.4
2. Installation of facebook-sdk
3. Pycharm (Optional : Installation of python editor – PyCharm)

Watch us on YouTube :

Illustration :

Steps :

1. Sign in for facebook developer account – Facebook developer sign in here
2. Now you need to go to Tools and Support. Then goto Graph API Explorer
3. Please Click on the Get Access Token -> Get User Access Token.

4. Check the necessary permissions then click on Get Access Token.

5. Copy the access token and paste it in the script.

6. Please get the page id of any page from the url. (Go the respective page , if page url is then page id : nikondslrmagic)

7. Run the following and enjoy. 🙂

Source code   
  1. #!/usr/bin/python
  2. import facebook
  3. import random
  4. graph = facebook.GraphAPI(‘********access token goes here***********’)
  5. pages = [‘******page id 1******’,‘******page id 2******’,‘******page id 3******’]
  6. comments =[‘This is commented by graph API’,‘Python is easy’, ‘Python graph API demo’]
  7. mylink =‘ — Thanks @’
  8. for page in pages:
  9.     profile = graph.get_object(page)
  10.     posts = graph.get_connections(profile[‘id’], “posts”)
  11.     for post in posts[‘data’]:
  12.         try:
  13.             graph.put_object(post[‘id’], “likes”)
  14.             graph.put_comment(post[‘id’], message= random.choice(comments) + mylink)
  15.         except:
  16.             continue


Thanks a lot for visiting our website. Please leave a comment (suggestions or anything). We are happy to be in touch.

How to install facebook-sdk for python ?

facebook-sdk is a third party facebook api provider to communicate to facebook. We will install facebook-sdk from github repository. It has packages to talk to facebook data through graph api. Lets install facebook-sdk now.

Easy facebook-sdk installation steps :

facebook-sdk is a third party facebook api provider to communicate to facebook. We will install facebook-sdk from github repository

Step 1 : Please download Facebook Platform Python SDK from github. (Click to download)

Step 2 : Go to the Downloads folder and extract the file

Step 3 : Change directory into facebook-sdk-master
cd facebook-sdk-master

Step 4 : sudo python install


Open python idle and type >>>import facebook
This should be able to import. Good luck.

How to install chrome in ubuntu ?

Easy way to install Google Chrome in Ubuntu.

Step by step illustration on installation of Google Chrome on Ubuntu.

When you go to Ubuntu Software Center you can not find Google Chrome. However, there is a trick to get it done.
However google-chrome-stable is available as 3rd party provider in PPA repository . We will explain step by step procedure for the same.

Easy way to install Google Chrome in Ubuntu.

Step by step illustration on installation of Google Chrome on Ubuntu.

When you go to Ubuntu Software Center you can not find Google Chrome. However, there is a trick to get it done.

Steps :


url to download google chrome browser for ubuntu
url to download google chrome browser for ubuntu
    • 2. Click on Download Chrome


    • 3. Please select your download package: *64 bit .deb (For Debian/Ubuntu) *64 bit .rpm (For Fedora/openSUSE)


Download chrome for linux accept and install
Download chrome for linux accept and install
    • 4. Click on Accept And Install


    • 5. Double click on the downloaded file named google-chrome-stable_current_amd64.deb


deb file downloaded for chrome
deb file downloaded for chrome
    • 6. It will open Ubuntu software center with google-chrome-stable the web browser by google


install google chrome from ubuntu software center
install google chrome from ubuntu software center
    • 7. Click Install (Please enter password if prompted)

Step 7 may take time depending on the speed of network connection. Now you have google chrome installed.

Thank You.