Aug 282016
 

How do I prevent Adsense ads from appearing on error 404 pages and stay compliant with Google policies?

That’s the big question and this article will show you how to use a small piece of PHP code on your WordPress website in order to block/disable Adsense Ads on the undesired 404 pages!

adsense ads 404 pages

Adsense ads not allowed on 404 pages

Google says firmly that “no ads should be placed on any non-content-based pages such as thank you, exit or error pages.

What’s wrong with 404s? Well, a “404 Page Not Found” is actually a HTML error page which is returned whenever someone calls for a page that is unavailable on your website. A 404 page does not have content except a human readable “Not Found” phrase and eventually a search box. Practically it pops up when a visitor clicks on a broken link or makes a typo thus mismatching the real URL of a website’s page.

Since Adsense is a content-based advertising network and error pages usually contain no content, then it is understandable why an error page would not qualify for showing AdSense Ads.

Hereunder you can see the code you need to insert into your website/blog in order to remove Adsense from “Not found pages” and implicitly avert Google’s punishment.

The php-code snippet which hides/blocks Adsense ads on 404’s is:
<?php if (!is_404()) { ?>
ADD HERE YOUR ADSENSE CODE
<?php } ?>
Note: the logic of the code is to let Adsense run on all pages but the 404s!

How to use the above-mentioned php code?
There are two possibilities: you can choose to either 1. insert it in Theme’s .php files or 2. insert it in Theme’s widget area.

1. A straightforward way is to add the snippet into Theme’s files that manage your Adsense adverts. For example, if your ads appear at the header, then insert the code snippet in header.php, if ads appear on sidebar then insert it in sidebar.php, and so on. (Go to Appearance->Editor->edit your .php files)

This approach works as intended but sometimes the adsense ads may not fit perfectly into the design if you use a highly widgetized theme. In that case, follow the second alternative as depicted below:

2. Instead if inserting the code into theme’s .php files as done in option 1, make use of Text (HTML) widget (Appearance->Widgets) to add Adsense ads code (wrapped in php scripts) to your website. You have to be aware at this point that the code above does not take effect yet because the “Text” widget is unable to understand the php scripts, however do not worry because there is room for a workaround: convert the text-based widget into php-executable widget by inserting the following code lines into the functions.php file of your template.

add_filter(‘widget_text’,’execute_php’,100);
function execute_php($html){
if(strpos($html,”<“.”?php”)!==false){
ob_start();
eval(“?”.”>”.$html);
$html=ob_get_contents();
ob_end_clean();
}
return $html;
}

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

and you are done! The Adsense ads should be nicely displayed (via widgets) on all your blog’s pages except the error 404’s.

Save

Save

Save

Save

Save

Aug 172016
 

Google writes on its blog that is ready to officially roll out its video chat app “Duo” that had been announced a few months ago, but the company has to face a strong competition in the same niche.

google duo

Google Duo, a simple 1-to-1 video calling app

Duo is set to be first launched on the US market while the rest of the world will be able to download it from Google Play store in the upcoming period. The 1-to-1 video calling app can be installed also on Apple’s smartphone and there is no need to own a Google account.

Google vows that Duo will be easy to use and hopes for a large number of installations. One feature that could make Duo different from other apps is called Knock Knock, which means that the recipient can view who makes the call before deciding whether to answer or not.

The video application was first announced in May and will be available on both Android and iOS devices. Users do not need to posses a Google account as a phone number is just enough to set up the app. According to the information posted on company’s blog, Duo is “Fast and Reliable”, has a “Simple Interface” and a “Human Design”.

The internet giant says that all calls are encrypted and the video resolution varies depending on the quality of Internet connections.

The existing competitors on the market are very strong: Apple’s FaceTime, Microsoft’s Skype and Facebook Messenger are already very appreciated and used by hundreds of millions of users worldwide.

Google owns Hangouts, an app that never reached the intended success and was positioned as an application for professional conversations.

Aug 172016
 

The effects of microgravity on the human body: what would happen if you spend your whole life lying in bed?

People spend about a quarter of their lives sleeping, which means they use at least as much time lying in bed, but what would happen to their bodies if they spend the entire life in bed?

The video below tries to provide us with some answers to this question, offering detailed explanations for the appearance of sore back and limbs, atrophy, worse blood circulation, as these are just some of the consequences of staying in bed for too long time.

The video was posted on the Youtube channel Noggin Life two days ago and has already gathered more than 700 thousand views.

Video: Effects of gravity on human body when lying in bed the entire life?

Mar 252016
 

Mysterious space object dubbed 1991 VG was first observed on 6 November 1991 by James Scotti, an astronomer and research specialist at the Lunar and Planetary Lab of the University of Arizona.

Scotti was at the lab’s Kitts Peak (Arizona) telescope and while tweaking various settings beyond the usual range, he spotted an odd thing which he christened 1991 VG.

Asteroids collision near star - artist's concept (NASA/public domain)

Asteroids collision near star – artist’s concept (NASA/public domain)

In 1996, he recalled:
“It was a magnitude V=20.7 object moving with rates typical of a Near-Earth Asteroid.”

V factor measures of the brightness of the object. From there a complex formula links the brightness to the object’s size.

Scotti wrote:
“From photometry measurements we can say that if objects’ albedo is low, let’s say around 5%, then it’s about 19 meters in diameter. If the albedo is around 20%, then the object measures about 9 meters in diameter. If it were a perfect mirror it could be as small as about 4 meters in diameter.”

Nowadays, many conspiracy theorists believe this is a real “alien probe” which is set to come closed and fly near Earth in 2017.

Natural or artificial?
The object created confusion among astronomers because of its odd rotation and longevity in the outer space. Some argue that it’s a section of the Apollo 12 rocket, but Jim Scotti believes the weird space junk might be something else.

“We took into account also the possibility of a man-made object. There were several spacecraft and rocket bodies that could be 1991 VG, but after a detailed analysis, we ruled out this hypothesis,” said Scotti.

The opinions remain yet divided with some folks being convinced that the strange object is a secret Soviet rocket of the Space Race era (1957-1975).

It is widely known that the Soviet space rockets were as powerful as those developed by the US and there is a possibility that the former Communist empire launched such a rocket to the Moon and hid this fact because of a mishap or something which did not go according to plan.
When it was first spotted, the object was about 10 meters in diameter and located at a distance of approximately 451 000 km from Earth and about 80 467 km from the Moon.

This indicates an increased rate of rotation and brightness fluctuations. At that time, such a behavior had not been noticed at another asteroid of similar size. Furthermore 1991VG has an Earth-like orbit.

Mar 152016
 
Sir Andrew Wiles claims Abel Prize, known as Nobel Prize in Mathematics, for proving Fermat's Last Theorem

British mathematician Sir Andrew J. Wiles, who solved the mystery of Fermat’s Last Theorem in 1994, thus cracking a dilemma that troubled specialists in the field for over 350 years, has been given the Abel Prize 2016. The decision to award 62-year-old Wiles the “Nobel Prize for mathematics“, was revealed on Tuesday by the Norwegian [Read more]

Oct 012015
 
First fully autonomous electric minibuses WEpods to hit Dutch roads in November 2015

Starting November 2015, two driverless electric vehicles will start travelling between Wageningen University and the city of Ede in the Netherlands, writes Foxcrawl. The fully autonomous minibuses, called WEpods, are programmed to travel a distance of 5-6 kilometers and passenger will be able to stop them via a smartphone mobile app. Wepods are designed serve [Read more]

Mar 272015
 
Energetic giant black hole in IRAS galaxy astonishes astronomers

In the center of our galaxy, Milky Way, there is a huge black hole with a mass estimated to be millions of times bigger than that of the Sun but according to NASA scientists who study the phenomenon, this hole is “relatively quiet “. However, not the same could be said about a black hole [Read more]

Mar 142015
 
Astronomers spotted fastest star US708 in Milky Way Galaxy

Astronomers at Queen’s University in Belfast have measured the speed of a wandering white dwarf star that travels though space at 1,200 kilometers per second, the highest speed ever recorded for such a celestial body in our galaxy. The hyper-velocity unbound star, named US 708, is free of gravity, which means that is gonna leave [Read more]

Mar 142015
 
NASA reportedly finds water on Jupiter satellite Ganymede

U.S. space agency NASA has confirmed the existence of a new source of water in our solar system. After analyzing scientific data collected by the Hubble Space Telescope, scientists confirmed on Thursday that under the frozen surface of Ganymede, one of Jupiter’s moons, there is an impressive salty ocean. The discovery solved thus the mystery [Read more]

Mar 142015
 
NASA launches four satellites to monitor Earth's magnetic field

An Atlas 5 rocket took off took off at Cape Canaveral in Florida on Thursday carrying four NASA satellites that aim to monitor the energy bursts as well as the electrically charged particles that enter into contact with the Earth’s magnetic field. Atlas V rocket was built and launched by United Launch Alliance, in partnership [Read more]