The intersection of lists shouldn’t be a nightmare, but it easily could become one. It isn’t unusual to need the intersection of two lists. So, what is the easiest way to do it in Java?
Firstly, what intersection of two list means? Let’s assume that we have two lists of String, one with a dictionary of names and one with some random names. We want to know if our random name list contains names from the dictionary list and which one.
Give the two lists:
List<String> dictonaryList = Arrays.asList(“Adam”, “Mary”, “Ana”, “Ben”, “Ted”);List<String> randomNamesList = Arrays.asList(“Mary”, “John”, “Ben”, “Hur”);
7 changes that will happen with the human body in the next century
Human evolution is never stopping. Our bodies are in constant change and we are adapting constantly to our environment. Researchers and futurologists believe that the human body as we know may look very different in the next century. For example, in the last centuries, humans became more solid and taller and our life expectancy almost doubled.
Do you need a really simple reusable wrapper for your Angular Component? And also, you know that this component will always be a basic component and you will never need a complex logic in it? That’s perfect, I will show you one way to achieve this behaviour in an easy manner.
So, let’s take a table for example. I…
I had this question too late in my projects, after a lot of code was already written. It is much better to know early which method to choose, it will give you a lot less headaches later.
So, you decided to build a gallery android application but native android layout system is giving you headaches? You have an alternative now.
Why did I choose to write this article? I wanted to build an android app that works like Google Photo on a private cloud. Meaning that I need an android app that synchronizes all my device photos and videos and sends them over some kind of requests (http, tcp…) to a remote server. Also, I wanted to be able to see those images and videos in a gallery style on my app.
What I did first was…
There are a few frameworks that are already doing this for you, like Ionic or React Native, and Apache Cordova. I am not going to talk about them now as I like to build things from scratch and I am more confident in something that I build myself.
When I first wanted to build fast android application, I searched for solutions on building android applications using web technologies. …
Prerequisite: Angular, Typescript, ng-template, ng-container
When I first start an Angular 2+ project, the first thing I look up for is a component library. I test some and then I choose a winner. Everything is great, I can focus on my business logic now and just use some already built components, like table, toogles, tabs, wizards, with a lot of built in functionality.
Usually, I use a component multiple times in my project, some of them even hundreds of times. …
It is easy to create a simple operator by just using some built in ones, like filter. We will start easy first and then we will create a more complex one, without using the built-in operators, just from scratch.
Creating operators using the built in operators
Let’s create a multiply by 2 operator from a stream. This is quite…
Java and Angular enthusiast, Technical Lead on Java and Angular, husband and father.