Bo Andersen
I am a back-end web developer with a passion for open source technologies. I have been a PHP developer for many years, and also have experience with Java and Spring Framework. I currently work full time as a lead developer. Apart from that, I also spend time on making online courses, so be sure to check those out!
Posts by Bo Andersen
Firefox Now Available on iOS
Mozilla’s popular open source browser, Firefox, is finally available on iOS, meaning both iPhones and iPads.
Microsoft Publishes API for Emotion Recognition
Microsoft has published an API for recognizing emotions in images by using machine learning.
Anonymous Declares War on ISIS after Paris Attacks
Condemning the terrorist attacks in Paris last week, the hacker movement Anonymous now declares cyberwar on ISIS.
Google Chrome Drops Support for Windows XP and Vista
In April 2016, Google Chrome will no longer receive updates on Windows XP, Windows Vista and certain versions of OS X.
Changing Layout in ZF2 Controller
Changing the layout or template within a Zend Framework 2 is easy. Thanks to the layout controller plugin, one can change the layout for a given controller action in just one line. public function indexAction() { $this->layout(‘layout/default’); return new ViewModel(); } As you can see above, the only thing you have to do in order… read more
Get Base Url within ZF2 Controller
Getting the base url of a request in Zend Framework 2 is quite simple. Because you are probably extending the AbstractActionController class, you get some functionality out of the box, including easily accessing the current request. From the request, one can get the URI, which exposes various methods for different parts of the URI. In… read more
Getting URL Parameters in ZF2 Controllers
Accessing URL parameters from controllers in Zend Framework 2 is extremely easy thanks to the params controller plugin. This plugin exposes various methods that one can use to retrieve parameters from various sources of a request, including from the URL. I will give examples of the various sources below. Getting URL Parameters To get URL… read more
Enum to Integer and Integer to Enum in Java
Need to convert an integer to an enum in Java? The bad news is that it is not as easy as it should be, but the good news is that it is still easy! Consider the enum below. public enum PageType { ABOUT(1), CODING(2), DATABASES(3); private int value; private static Map map = new HashMap();… read more
PostgreSQL Last Insert ID Not Working With PDO
If you are using PostgreSQL with PHP’s PDO for database connectivity, you might have experienced that the lastInsertId method on the database handler returns FALSE after inserting a row into the database. This can cause a lot of frustration, and this is one of the scenarios where PDO is not so database vendor independent. For… read more
Replacing Newline Characters in Java and JSTL
In this article, we will take a look at how we can replace newline characters in Java. Additionally, we will implement a custom JSTL tag so that we can replace newline characters with corresponding <br /> break lines within JSP files. Unlike PHP’s nl2br function, for instance, this is not as easy in JSTL. Replacing… read more