3 basic mistakes for NullPointerException when Mock

You might get NullPointerException exception when you try to mock object in your tests. This article is a shortlist of the three most common reasons why this might be happening.

Continue reading

Posted in Testing | Tagged , , , | 5 Comments

How to create a file in a different directory in PHP

How to make this file in another folder than the execution file location? This article will help you with a small snippet of code to create a file in a different folder.

Continue reading

Posted in Language basics | Tagged , | Leave a comment

How to create a folder in PHP if it doesn’t exist

This article will show you how to create a folder automatically in PHP if it does not exist. We will see several different approaches to solve this problem in the right way.

Continue reading

Posted in Tutorials | Tagged , | 1 Comment

Solution for Lombok plugin incompatible with 2018.1 Intellij Idea warning

Migrating from the older to the newest version of IntelliJ Idea can cause a warning message for the Lombok module.

Continue reading

Posted in IDE | Tagged , , , | Leave a comment

How to loop over HashMap in Java

HashMap is one of the most used data collection. There are several ways how to loop over it and get what you need. We will show five different ways how to loop over HashMap. So what is the best way to iterate over the items in a HashMap? Continue reading

Posted in Language basics | Tagged | Leave a comment

How to sync up new Git repository on GitHub or GitLab

From time to time you necessary to set up new Git repository. This article is about a list of commands which are helpful for creating a new repository and syncing it with GitHub or GitLab.

Continue reading

Posted in Solutions | Tagged , , | Leave a comment

Python String split() Method

From time to time, you will find yourself trying to get a list of things from a string. For this purpose, you can use the split() function.

Continue reading

Posted in Language basics | Tagged | Leave a comment

How to concatenate or append strings in Python

If you are looking for answer how to append strings in Python, you are on the right page.
Continue reading

Posted in Language basics | Tagged | Leave a comment

How to write CRON jobs

CRON jobs or CRON tasks are very useful for automatizing repetitive work. With cron job help you can for example once a week wipe out cache files in your app directory or send email about number of newly registered users. You can imagine any kind of task which require repetitiveness.

Continue reading

Posted in Tips & tricks | 1 Comment

How to compute distance between 2 GPS points?

When working on projects involving geographical calculations, such as determining the direct distance between two airports on a global scale, developers often seek efficient methods to compute such distances accurately. One common approach involves utilizing algorithms derived from the Great Circle distance method, which considers the curvature of the Earth’s surface.

Continue reading

Posted in Solutions | Tagged , , , , , , , | Leave a comment