Track Lost Smartphone with Google

Samual Sam
Updated on 14-Jul-2020 13:07:49

191 Views

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 More

Secure SSHD Using Fail2Ban on RHEL 7 & CentOS 7

Samual Sam
Updated on 14-Jul-2020 13:06:09

483 Views

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 More

Access Variables from Enclosing Class Using Lambda in Java

raja
Updated on 14-Jul-2020 13:00:28

795 Views

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) {       SimpleInterface test = () -> x;     // Accessing of static variable ... Read More

Create a Thread Using Method Reference in Java

raja
Updated on 14-Jul-2020 12:54:42

781 Views

Method reference is one of a way in a lambda expression to refer a method without executing it. In the body part of a lambda expression, we can call another method if they are compatible with a functional interface. We can also capture "this" and "super" keywords in method references.In the below two examples, we can create a thread with the help of "this" and "super" keywords using method reference.Example of this keywordpublic class MethodRefThisTest {    public void runBody() {       for(int i = 1; i < 10; i++) {          System.out.println("Square of " + i + " ... Read More

Implement DoubleUnaryOperator Using Lambda and Method Reference in Java

raja
Updated on 14-Jul-2020 12:48:28

323 Views

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 -> { // lambda expression          return doubleValue * 2;       }; ... Read More

Importance of Internships to College Students

Samual Sam
Updated on 14-Jul-2020 12:37:45

259 Views

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 More

Know Your Project Contract Before Signing

Samual Sam
Updated on 14-Jul-2020 12:30:36

130 Views

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

ISO: The Buzzing Word

Samual Sam
Updated on 14-Jul-2020 12:27:23

448 Views

Around the industry, everyone is talking about attaining and acquiring ISO standards for their Organizations. ISO has grabbed the market very fast and has become a quality measurement parameter. However, what exactly is ISO and what is the process of attaining this certification?To understand this more effectively, let us first understand what is Quality. Quality can be implied as a measure of degree of excellence. With better quality comes better service and value for money. Quality can mean different things to different people. For some people, Quality can mean doing the right job at the right time, for some Quality ... Read More

Implement LongSupplier Using Lambda and Method Reference in Java

raja
Updated on 14-Jul-2020 12:25:24

494 Views

LongSupplier is a built-in functional interface from java.util.function package. This interface doesn’t expect any input but produces a long-valued output. Since LongSupplier is a functional interface, it can be used as an assignment target for lambda expression and method reference and contains only one abstract method: getAsLong().Syntax@FunctionalInterface public interface LongSupplier {  long getAsLong(); }Example of Lambda Expressionimport java.util.function.LongSupplier; public class LongSupplierLambdaTest {    public static void main(String args[]) {       LongSupplier supplier = () -> {     // lambda expression          return 75;       };       long result = supplier.getAsLong();       System.out.println(result);    } }Output75Example ... Read More

Implement LongPredicate Using Lambda and Method Reference in Java

raja
Updated on 14-Jul-2020 12:06:47

274 Views

LongPredicate is a functional interface defined in java.util.function package. This interface can be used mainly for evaluating an input of type long and returns an output of type boolean. LongPredicate can be used as an assignment target for a lambda expression or method reference. It contains one abstract method: test() and three default methods: and(), negate() and or().Syntax@FunctionalInterface interface LongPredicate {  boolean test(long value); }Example of Lambda Expressionimport java.util.function.LongPredicate; public class LongPredicateLambdaTest {    public static void main(String args[]) {       LongPredicate longPredicate = (long input) -> {    // lambda expression          if(input == 50) {       ... Read More

Advertisements