Igor's Blog

22-Apr-2017
Using Jackson to automatically convert Java POJOs to JSON as output of a Jersey service
REST services are great, JSON is great, not having to do any manual conversion between POJOs and JSON is even better. Here's how you do that with Jersey.
17-Apr-2017
Googe Cloud Platform doesn't support CloudFlare's free edge certificates
I've written previously about using CloudFlare to get a free SSL certificate for your site. That works really well in most situations, but it appears that when using the free edge certificate from CloudFlare, the Google Cloud Platform console rejects those certificates.
16-Apr-2017
Fixing the invalid private key error in the Google Cloud Platform App Engine app Settings page
I've started playing around with Google's Cloud Platform recently and one of the first things I wanted to do was to secure my app's static pages so they could be delivered over HTTPS. This meant that I needed to upload my certificate and private key to Google. I went ahead and generated my key as usual and I thought I had an RSA key already, but Google didn't seem to like it.
03-Apr-2017
Debugging Google DFP ad delivery via the publisher console
I've written a number of articles about Google DFP in the past, including how to use it on infinite scroll pages and responsive pages. Recently I noticed that DFP has been behaving strangely on some of my sites and used the DFP Publisher Console to try and diagnose the issue. Unfortunately the issue I came across was not something that I could fix (it was in Google's JavaScript), but using the publisher console helped me in making certain of where the problem lied.
01-Apr-2017
Code Odium: Unnecessary variable declaration and assignment splitting
This is an instalment of my Code Odium series of articles talking about bad programming practices with focus on Java. In this article I will talk about why splitting up variable declaration and assignment is unnecessary.
28-Mar-2017
Handling visibility of mobile only pop-over DIVs on a responsive web site
My travelblog.ws project is built as a responsive site so that I do not have to have a desktop and a mobile version of the site. Unfortunately some features are hard to implement generically and need a specific mobile version. One of these is the 'trip timeline'. On the desktop version it appears as a sidebar, on the mobile version it is a pop-over DIV that covers the whole page. The pop-over is triggered by pressing the 3-bar stack icon at the top of the page.
26-Mar-2017
WebLogic package-name element classpath generator script
I wrote a post a few days ago about using Jersey 2.x as a shared library with WebLogic 12.1.2. In that post I suggested the following: In weblogic.xml the prefer-application-packages element needs to have entries added for ALL OF THE PACKAGES in the Jersey 2.x shared library JAR files. That means you need to go through every jar file in WEB-INF/lib for the shared library that was created with Maven and make sure the packages it defines are included in this element.
22-Mar-2017
Using Jersey 2.x as a shared library on WebLogic 12.1.2
WebLogic 12.1.2 may not be listed on Oracle Technology Network Downloads page but it is still being used. When it comes to RESTful services on WebLogic, 12.1.2 supports Jersey 1.13 so if you're looking to make use of Jersey 2.x features, there's some extra work to be done. With 12.1.3 you can go straight for Jersey 2.x but that's outside the scope of this article.
21-Mar-2017
Google DFP with AdSense fallback is causing infinite scroll pages to go haywire
I've written an article last year about using Google DFP with AdSense on infinite scroll pages which worked very well and was the basis for a number of my own sites and projects. In the past week however I noticed that GPT, which is the JavaScript library used to create DFP ad slots, started behaving erratically.
20-Mar-2017
Workaround for Mobile Safari scrollTop() not updating during scroll
I've recently discovered that on Mobile Safari the $(window).scrollTop() would not update during the scroll event animation. It appeared to only update after the scroll (the elastic scroll) had finished its animation. This was a rather annoying 'feature' for me because I needed to update my UI during the animation, so I went looking for a workaround and here's what I've come up with.
15-Mar-2017
Unmarshalling an XML fragment representing a JAXB object without XmlRootElement
I've recently had a requirement to unmarshal an XML fragment that was passed into one of my services. This in itself is typically not and issue and I've written code that does that plenty a time, however in this case I was having to unmarshal a fragment for a complex type, not for an element. That's where it got a little bit more complicated.
14-Mar-2017
Injecting a ContainerRequestContext into a Jersey entity provider class
I was implementing a custom entity provider in a Jersey REST service when I came across an error during deployment: "java.lang.IllegalStateException: Not inside a request scope." That struck me as a little odd since I was trying to inject a ContainerRequestContext into a MessageBodyWriter, which should have been within request scope. After some research and this Jersey issue I found a solution.
13-Mar-2017
Obfuscating PHP source code with Maven and YAK Pro PO
I'm very close to being able to release a PHP project that I've been working on and started looking at code obfuscation to make it a little bit more difficult for anyone looking to take my code and run with it. I looked at YAK Pro PHP Obfuscator for this purpose and liked how easy it was to configure and use. However, I wanted it to work with Maven since I already use that to minify my JavaScript.
10-Mar-2017
Octotree breaks GitLab Issue Boards
Octotree is an awesome browser extension that makes looking through Git repositories a breeze. It adds a vertical side bar that provides a file system view of whatever Git project you happen to be looking at. It works both on GitHub and GitLab, or at least used to. Recently I found that some features in GitLab stopped working while Octotree is enabled. Namely the Issue Boards do not load as expected.
08-Mar-2017
Compiling the FHIR schema with XJC
I've written previously about fixing HL7 CDA schema compilation with XJC, now that I've been looking at FHIR it seems that there are name collisions in that schema too. The actual problem arises out of the W3C XHTML 1.0 Schema and not the FHIR schema per se.
03-Mar-2017
Generate JAXB jar from a Maven dependency that has multiple referenced schemas
I've been trying to get the maven-jaxb2-plugin to generate a JAXB jar out of XSDs that are stored inside a dependency that I have no control of. This was quite doable for a simple, single XSD Maven dependency that didn't import any other schemas, but when dealing with a more complex schema that did import multiple other XSDs from the same dependency jar, it didn't "just" work. After trying many approaches I found a solution however.
26-Feb-2017
Binding extra variables with PHP PDO returns no results
As I expand the data binding layer for my travelblog.ws project, I keep coming across different ways of breaking the PHP PDO statement class. The recent peculiarity that I've come across was to do with binding more variables than there were bind parameters in the SQL statement. In this situation, PDO will not return any data. In fact this is documented in the API...
21-Feb-2017
Older versions of JD-GUI crashing on macOS Sierra
I've noticed today that my version of JD-GUI started crashing whenever I tried to open a jar file to decompile. I was on macOS Sierra and had version 0.3.3 of JD-GUI installed. This was the kind of error and crash report I was getting...
18-Feb-2017
Detecting print requests to print contents of a DIV with JavaScript
Printing a page with JavaScript is easy but if you want to print the contents of a specific DIV, it gets a little trickier. If you want to do something more complex like intercept the page print request and then print only certain contents of that page there's even more work involved. This article will show you how I did just that over at travelblog.ws.
15-Feb-2017
Using Google DFP with AdSense on responsive pages
I've been using Google DFP instead of AdSense on a number of sites that I run because it relaxes some of the AdSense rules and more importantly gives you fuller control of your ad placement. For example you can easily place AdSense ads on infinite scroll pages using DFP, which can't be done with standard AdSense code. One place that DFP falls short however is the ability to use responsive ads. This example shows how with a bit of extra code it is possible to make DFP ads somewhat more responsive friendly.
13-Feb-2017
Force PHP GD library to load JPEG images that have invalid data
While updating code my my travelblog.ws project I came across an issue where I was not able to upload certain JPEG files to the blog and have them automatically scaled down for thumbnail generation. The files opened fine on my Mac but PHP would not load them.
03-Feb-2017
PHP PDO doesn't work binding multiple IN statement values
PHP's PDO is a great way to access databases and works as expected on the most part, that is until you come to the IN() operator. Some peculiarities begin to emerge there as I've discovered recently when updating code for my travelblog.ws project.
16-Jan-2017
Adding an email subscribe feature to your Blog with Blogtrottr
I've been thinking of adding an email subscribe feature to my Blog for a while now. Originally I thought that I'd build this functionality myself but after a lot of deliberation and research I decided that there really wasn't any need to reinvent the wheel and looked for an alternative. That's when I came across Blogtrottr.
02-Jan-2017
How to open apps from unidentified developers on macOS Sierra
In macOS Sierra, the security around apps from unidentified developers has really been tightened. In previous releases of the OS you were given an option to open the app if it came from an unidentified developer but it seems that Sierra just gives you the 'OK' option and will not launch the app. There is a way around it however so read on for how to do it.

Previous Post

Next Post

Programming, DIY, Games, Hacks, Tech and more.
Follow me on...
Current and Past Projects
See my Resume

Subscribe


RSS Feed

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
300 George St Blogumentary

My Online Tools

UUID to OID Converter
Guru JSON-RPC Tester
Extrudifier Object Designer
Travel ┬ÁBlog

Recent Blog Posts

Showing whitespace characters in vi

Using Jackson to automatically convert Java POJOs to JSON as output of a Jersey service

Enable quick access to the keyboard and emoji viewer in macOS

How to tell if your site is served via CloudFlare

Googe Cloud Platform doesn't support CloudFlare's free edge certificates

Fixing the invalid private key error in the Google Cloud Platform App Engine app Settings page

Cleaning the sticky PlayStation controller analogue thumb sticks

Invoking interactive shell scripts non-interactively

Using variables as column numbers with Bash and Awk when processing text files

Debugging Google DFP ad delivery via the publisher console

Recent Galleries

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

DIY spare parts computer build with a RAIDMAX Anura case

Fake 'Lepin' brand Lego packaging

Hardwood garden bench with clear resin void filler

Fixing a 3D printer extruder that stopped heating up

Easily increase disk space in a Lenovo Ideapad 100S 14" laptop with an M.2 SSD

Making a multi-piece 3D printed solder spool holder stand

DIY indoor apartment grow light wiring

Good Friday Electronics fun Easter Bunny LED PCB Kit IBEABU-01.0

Top Categories

Blogs I follow

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth

Friends

RAWS Parts Online
Alpha Dimensions Hosting
Kristensen Photography
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Follow me on... 
     
...or subscribe for updates!

Don't show this again