Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to implement LongFunction using lambda and method reference in Java?
LongFunction is an in-built functional interface defined in java.util.function package. This functional interface expects a long-valued parameter as input and produces a result. LongFunction interface can be used as an assignment target for a lambda expression or method reference. It contains only one abstract method: apply().Syntax@FunctionalInterface public interface LongFunction { R apply(long value) }Exampleimport java.util.function.LongFunction; public class LongFunctionTest { public static void main(String[] args) { LongFunction function1 = (long i) -> { // lambda expression return i + i; ...
Read MoreSnagit Tool: Taking Better Screenshots the Easy Way
A very common need for anyone who works on computers and laptops is taking screenshots of the browser or application window that they are working with. Although the task seems easy, it can be tedious at times. Generally, if you want to take a screenshot you will use the shortcut keys on your Windows system, paste it to Paint and then modify them accordingly. However, this comes with a few drawbacks:You have to use shortcut keys and paste to Paint.You can’t take screenshots of a part of screen (without cropping it in Paint later).If you are taking screenshot of a ...
Read MoreRequirements Gathering By Business Analysts
A great user experience is all about enabling the end users to achieve their objective be it a website, a software system or a product. In order to fulfill their needs, we need to understand their work and the context of their work. The first and basic phase of software development life cycle is requirements gathering. They give clear, concise and agreed set of customer requirements that the software should provide. Business analyst and subject experts are responsible for requirement gathering process.Business customers have a tendency to expect software teams to be mind-readers, and to deliver a solution based on ...
Read MorePhobias: Embarrassing yet Compulsive Problems
Fear is a common human reaction to threat that most of us have one way or the other. But what if your fear rages through you like wild fire and beyond your levels of control? Irrepressible fears can lead to mental as well as physical distress to levels which ultimately turn into anxiety disorder technically known as phobia . It can affect people of any age. In this article I discuss categories in which phobias are divided, symptoms to identify phobia, possible causes and treatment. I briefly list out some common and some exceptionally rare phobias that you did not know ...
Read MoreMyths Around Agile - Scrum Framework
In our childhood, we used to listen to many stories from our Parents, Grandparents and also Teachers in the school. There are stories about Kings and Queens, Prince and Princes, Dogs and Monkeys etc., a wide range of stories from fictions, drama, and actions to stories with morals. One of such famous stories called as “The Sour Grapes”, where the fox jumped again and again to eat the grapes from the tree, but when he couldn’t reach to that height after many attempts, he declared that the grapes are sour.You can see the same state of affairs also occurs in ...
Read MoreHow to implement LongBinaryOperator using lambda and method reference in Java?
LongBinaryOperator is a part of the functional interface from java.util.function package. This functional interface expects two parameters of type long as the input and produces a long type result. LongBinaryOperator interface can be used as an assignment target for a lambda expression or method reference. It contains only one abstract method, applyAsLong().Syntax@FunctionalInterface public interface LongBinaryOperator { long applyAsLong(long left, long right) }Example of Lambda Expressionimport java.util.function.LongBinaryOperator; public class LongBinaryOperatorTest1 { public static void main(String[] args) { LongBinaryOperator multiply = (a, b) -> { // lambda expression return a*b; }; long a = ...
Read MoreThe 5 Best Price Tracking Tools
The E-commerce sector in our nation is booming like never before. Presently, it is occupying the third position with regards to internet users, having 10 million people who shop online. Definitely, there exists a huge potential, which is untapped to make use of.In India, Flipkart concluded its biggest online sale recently, despite few technical hiccups, they were successful in selling about 2 million items in a day for about 1.5 million people. The sales figure is quite impressive. Its fierce competitor Amazon India has also launched a mega sale later at the great Indian festival and Snapdeal is also not ...
Read MoreHow to implement IntConsumer using lambda and method reference in Java?
IntConsumer interface is a functional interface from java.util.function package in Java 8. This interface accepts a single int-valued argument as input but doesn't produce any output. Since it is a functional interface, it can be used as an assignment target for a lambda expression or method reference. It contains one abstract method: accept() and one default method: andThen().Syntax@FunctionalInterface public interface IntConsumer { void accept(int value); }Example of Lambda Expressionimport java.util.function.IntConsumer; public class IntConsumerTest1 { public static void main(String[] args) { IntConsumer displayNextInt = i -> System.out.println("Next Int ...
Read MorePrint all permutations with repetition of characters in C++
In this problem, we are given a string of n characters and we have to print all permutations of characters of the string. Repeating of characters of the string is allowed. The printing of permutation should be done in alphabetical order (lexicographically sorted order).Let’s take an example to understand the topic better :Input − XYOutput − XX, XY, YX, YYTo solve this problem, we need to use fix and recur logic. Here, we will fix one element at first index of the array and then recursively call for the next elements in the sequence.Let’s see an implementation example which will ...
Read MorePreconditions - Java
Precondition to check if the list passed as parameter is empty or not. Let us see an example −Examplepublic void my_fun(List myList){ if (myList == null){ throw new IllegalArgumentException("List is null"); } if (myList.isEmpty()){ throw new IllegalArgumentException("List is empty"); } my_fun(myList); }A void function named ‘my_fun’ is defined that takes a list of objects as its parameters. If the list is null, it prints the relevant message. If the list has no elements in it, a specific message is displayed. The function is called by passing the list as ...
Read More