Posts

Java 8 Streams - How to find the duplicate elements from a Collection - Multiple ways

Example 1: Using Collections.frequency() To find frequency of a particular element we can use the frequency() method: import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; public class DriverClass { public static void main( String [] args) { List < String > obj = Arrays.asList( "ant" , "1" , "cat" , "ant" , "we" , "java" , "cat" ); obj.stream().filter(i -> Collections. frequency(obj, i) > 1 ).collect(Collectors.toSet()) .forEach(System.out :: println); } } Output: ant cat Example 2: Using Collectors.groupingBy() We can also use the Collectors.groupingBy() method to count the frequency of elements present in a stream.  import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Function; import java

Vue.js + Python + MongoDB CRUD example

Image
Hello everyone, today we will learn how to develop a  web application that is a basic User Management Application using MongoDB , Vue.js , Python , and Flask . GitHub repository link is provided at the end of this tutorial. You can download the source code. More Related Topics, React.js + Python + MongoDB CRUD application Python + MongoDB + Vue.js CRUD Application  Angular10 + Python + MongoDB CRUD application Python-Create a CRUD Restful Service API using FLASK and MYSQL Python-Simple CRUD Web App with Python, Flask, and Mysql Python with MongoDB Atlas - CRUD After completing this tutorial what we will build? We will build a full-stack web application that is a basic User Management Application with CRUD features:       • Create User     • List User     • Update User     • Delete User User Interfaces -Retrieve all Users: -Add a User: -Update User: We divided this tutorial into two parts.  PART 1 - Rest APIs Development using Python and Flask PART 2 - UI development using Vue.js PART 1