Get Best Photo Scan App For Free

Nowadays we frequently submit soft copies of documents online. Most of the documentation or verification process for any kind of enrollment has become digital. One thing I noticed is that people often ask me to submit scanned copies of documents. I don’t have a physical scanner in my home. It doesn’t make sense to me … Read more

Mocked Dependency Object Is Null After Using Mockito @InjectMocks Annotation

Let me explain the problem first. We have a Java class under test. We are using Junit with Mockito framework to write the unit test cases.We have annotated our test class with @InjectMocks annotation as below: @InjectMocks private TestClass testClass; @Mock private Dependency1 dependency1; @Mock private Dependency2 dependency2; That should inject mocked dependencies to the … Read more

How to Run PIP Command with Specific Python Version

This question has been answered online in multiple places. I want to highlight few challenges faced while running pip command with multiple versions of Python installed in the operating system & my preferred way of doing it.I have an old machine with Ubuntu 16.04. By default Ubuntu 16 has Python 2.7 and Python 3.5. So … Read more

Signing JWT Token With JWK Private Key Using PyJWT

JWK is a JSON that represents a cryptographic key. PyJWT is a pretty popular Python library to generate, verify JWT token. But one drawback is that it doesn’t support JWK format, at least it is not properly documented. Suppose we have an RSA private key, but it is given in JWK format. Our objective is … Read more

LeetCode 22. Generate Parentheses Java Solution And Time Complexity Explanation

Generating all possible combinations of balanced parentheses is a common interview problem & is found in websites like LeetCode & GeeksForGeeks.Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. We are using backtracking to solve this problem. There are two cases where we can proceed to the next recursive … Read more