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 can we sort a Map by both key and value using lambda in Java?
A Map interface implements the Collection interface that provides the functionality of the map data structure. A Map doesn't contain any duplicate keys and each key is associated with a single value. We can able to access and modify values using the keys associated with them.In the below two examples, we can able to sort a Map by both key and value with the help of lambda expression.Example for sorting of Map using Keyimport java.util.*; import java.util.stream.*; public class MapSortUsingKeyTest { public static void main(String args[]) { ...
Read MoreHow to implement LongUnaryOperator using lambda in Java?
LongUnaryOperator is a functional interface from java.util.function package. This functional interface accepts a single long-valued operand and produces a long-valued result. LongUnaryOperator interface can be used as an assignment target for lambda expression and method reference. It contains one abstract method: applyAsLong(), one static method: identity() and two default methods: andThen() and compose().Syntax@FunctionalInterface public interface LongUnaryOperator long applyAsLong(long operand); }Exampleimport java.util.function.LongUnaryOperator; public class LongUnaryOperatorTest { public static void main(String args[]) { LongUnaryOperator getSquare = longValue -> { // lambda ...
Read MoreHow to find your Current Wifi Password and Secure it?
Do you see your devices connected to your Wifi-network, but presently are you are facing problem recollecting your Wifi password, which you have previously used and connected all your devices with your Wifi network.The reason as to why you may have forgotten your Wifi password is, you would have clicked on the box, which states remember the password. This helps you escape the pain of entering your password every time when you login to your device. Days would have passed and you might not remember what password you have kept for your Wifi-Network. Another reason, as to why many people ...
Read MoreHow to Hide Data on your Smartphone
Your smartphone is your personal device which stores many of your personal files and data. There may be several reasons you would want to hide your data which includes private photos, videos and messages. If you want to hide a file from prying eyes on your smartphone, then it’s incredibly important that you can learn some methods for hiding files or folders so that you can properly store and sort files as needed.There are ways you can hide files on your phone with ease. Some of these methods don’t need any apps while some of them include various apps which ...
Read MoreHow to Track Lost Smartphone with Google?
We live in an era in which we can do a lot more than just calling with our phones, hence the name ‘smartphones’. Calling, messaging, clock, calculator, these were just the mere facilities of the older generation. Now these gadgets can do so much more! Loads of apps, games, e-books, etc. are available to the customer for entertainment and education.Smartphones being such an important part of our lives now, containing so much of our private information have had a huge impact. But what if your phone is lost, well that’s exactly where this article kicks in!We have two different methods ...
Read MoreHow to Secure The SSHD Using Fail2Ban on RHEL 7.x/CentOS 7.x
In this article, we will learn how to install and configure to secure the SSH connection using Fail2ban on CentOS 7, as we all get connected to the servers using the SSH which is secured and SSH will get exposed to the internet to work properly, there may be a risk of being targeted in this way, if we see the logs for these services. We often see the repeated logins using the brute-force attacks.Installing the Fail2banAs the Fail2ban is not available in the official CentOS repository, we need to update and install the package using EPEL project, then we ...
Read MoreHow to access variables from enclosing class using lambda in Java?
The variables defined by the enclosing scope of a lambda expression can be accessible within the lambda expression. A lambda expression can access to both instance, static variables and methods defined by the enclosing class. It has also access to "this" variable (both implicitly and explicitly) that can be an instance of enclosing class. The lambda expression also sets the value of an instance or static variable.Exampleinterface SimpleInterface { int func(); } public class SimpleLambdaTest { static int x = 50; public static void main(String[] args) { ...
Read MoreHow to implement DoubleUnaryOperator using lambda and method reference in Java?
DoubleUnaryOperator is a functional interface defined in java.util.function package. This functional interface expects a parameter of type double as input but produces the output of the same type. DoubleUnaryOperator interface can be used as an assignment target for lambda expression and method reference. This interface contains one abstract method: applyAsDouble(), one static method: identity() and two default methods: andThen() and compose().Syntax@FunctionalInterface public interface DoubleUnaryOperator { double applyAsDouble(double operand); }Example of Lambda Expressionimport java.util.function.DoubleUnaryOperator; public class DoubleUnaryOperatorTest1 { public static void main(String[] args) { DoubleUnaryOperator getDoubleValue = doubleValue -> { // ...
Read MoreImportance of Internships to College Students
There is something in internships that is all the more inescapable than the sweet fragrance of a rose flower – Learning. An adage suggests, “Learning is not preparation for life; Learning is life itself.” Learning in every point of life is cardinal in its own way. When students experience a continuous learning environment, they get an opportunity to explore diverse and unexplored territorial domains. What thus follows is a phantasmagoria of constructive and highly rewarding events. This eventually leads to new ideas. Internships are cherished by students and multiple internships are mandated in a few reputed organizations.Here is a curated ...
Read MoreKnow Your Project Contract Before Signing
Depending upon the nature of business, it is often seen that many organizations outsource some portions of their work to a third party vendor instead of doing on its own. And to define a clear working procedure between the two parties they agree to sign a contract, which is a legal agreement between your organization and the service provider or vendor, where both the parties are bound to abide the terms and conditions stated in the contract.A contract is a mutually agreed legal document where one party is the service provider i.e. seller and the other one is the receiver ...
Read More