Friday, 31 January 2014

Doubleclick for Publishers reference material


For Premium

DFP Premium Help Center

Please remember that are two main ways to contact DFP. There is a
Contact Us link on all DFP Premium support page (near the upper right
hand part of the page). There is also a Report a Bug link in your DFP
account (also in the upper right hand corner of your page).

Getting Started Guide (high level overview)


Partner Directory

DFP Training Videos:

Release Notes

Other Resources

Google also provides additional tools to webmasters to help you track
traffic and improve your search rankings. If you have not signed up
already, you might want to at least take a quick look at them.

Google Analytics

Google Webmaster Tools


Google has been releasing quite a few webinars that people maybe
interested in. While not always specific to DFP, many of them are
helpful for webmasters and advertising in general.

You can register for Google Webinars here:

Or use their Calendar to see upcoming Webinars

Javascript: Finding the viewport width,

Useful for responsive design, determining same max-width used in @media queries

var windowWidth = window.innerWidth ||
document.documentElement.clientWidth || document.body.clientWidth;

Based on:

"The responsive viewport breakpoint "staircase" in my opinion becomes:

320px, 480px, 603px, 768px, 966px, 1024px"


Also read:

Been working recently on Google DFP tag code, so keeping these references:!msg/dfp/gxHN91Z7PoI/yC14WsR0KoMJ

<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type='text/javascript'
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
<style type='text/css'>

<script type='text/javascript'>//<![CDATA[
$("#showValue").click(function () {
var windowWidth = window.innerWidth ||
document.documentElement.clientWidth || document.body.clientWidth;




<p>Width: <span id="widthLabel"></span>

<br/>window.innerWidth: <span id="windowinnerWidth"></span>

<br/>document.documentElement.clientWidth: <span

<br/>document.body.clientWidth: <span id="documentbodyclientWidth"></span>

<br/>$(window).height(): <span id="viewportHeight"></span>
<input id="showValue" type="button" value="Show Width" />


Wednesday, 15 January 2014

TIL: Hibernate JPA NamedNativeQuery declaration requires a "resultClass" even for update/delete operations

I was writing some JPA code (Hibernate implementation) that used

and kept getting this when I ran the webapp in Tomcat:

nested exception is org.hibernate.cfg.NotYetImplementedException: Pure
native scalar queries are not yet supported

The exception was from an unrelated class but I suspected that this
was caused by changes I made.

According to this:

resultClass is required for all NamedNativeQuery, even the ones that
don't return them, because of a longstanding BUG in Hibernate.
Apparently the bug was fixed as of Hibernate 4.2 but we're still on
3.6 so upgrading is not really an option.