Here is the simple code snippet which allows to observe any DOM modifications for the element on the page. It can be used to check if any asynchronous update was made to the selected part of website.
PostgreSQL 9.5 – use dblink
After instalation of Postgres 9.5 database server dblink function is not available. Trying to use it you will get error message that dblink is an unknown function. So first step is to enable it by following command: As the next
Using Java Melody to monitor methods called internally
Sometimes we can have a code where we have some method which calls a bunch of internal methods one by one. Like in the example below: If we want to monitor the particular class with the Java Melody it’s enough
Mock null value as the parameter of called method (Java 8)
Mockito is a powerful framework, which allows us to mock classes, method behavior etc. Sometimes we would like to mock method call with null value as the parameter. Let’s suppose we have a Foo class which autowires Bar class. We
Google reCAPTCHA – use with PHP
As we take a look on websites, we can easily see that most of them have contact form built in. But having this contact form could switch to huge amount of spam messages sent by using that form. Fortunatelly we
Zend Framework 3: select form field with options fetched from database
Sometimes we have to apply dynamic data (fetched from database) to form fields. Good example is to deliver an option to choose a preferred language during user registration. Let say we have two available languages on the begining, but we
Styling radio buttons with css
Today I have found an interesting code snippet with changing layout of radio buttons using only css. Snippet is available on codepen. All code and view is available on the codepen. However I put a code snippets here in case
Leverage Browser Caching – .htaccess solution
Fetching resources over the network is both slow and expensive: the download may require multiple roundtrips between the client and server, which delays processing and may block rendering of page content, and also incurs data costs for the visitor. All
AngularJS – custom currency formatting
AngularJS have a bunch of filters which allows us to format data for our needs. However we would like to have more flexibility sometimes. In one of my last projects I need to have flexible formatting for currency values. I
Multilevel numbering for ordered lists
Usually we use quite plain structure of content on the website. Sometimes we have to point out some paragraphs on the website. If the structure is not complicated we can use unordered lists ul or ordered lists ol. Let’s think
Zend Framework 2: DB queries with multiple or/and conditions
Database queries usually are quite simple, but sometimes we have to build more complex queries. Let’s have an example We do have a search form where user can select one or many colours of product and one or many sizes.