Fendadis John has Published 80 Articles

How do I load an image by URL on iOS device using Swift?

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:25

618 Views

To load an image in iOS using swift we’ll make use of simple data Task session. The image needs to be loaded in background because it may be of any size and we don’t want it to stop our main view’s operations.Let’s see this with help of an example. Create ... Read More

How to integrate a facebook login in swift for iOS App?

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:25

351 Views

Social logins in applications have become a very common thing these days. Facebook login is one of them, in this article we’ll see how we can make use of facebook login, to access basic user information and login to the application.Implementing facebook login in an application is a series of ... Read More

Non-persistent CSMA protocol

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:25

2K+ Views

Non-persistent CSMA is a non – aggressive version of Carrier Sense Multiple Access (CMSA) protocol that operates in the Medium Access Control (MAC) layer. Using CMSA protocols, more than one users or nodes send and receive data through a shared medium that may be a single cable or optical fiber ... Read More

P-persistent CSMA protocol

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:25

5K+ Views

P-persistent CSMA is an approach of Carrier Sense Multiple Access (CMSA) protocol that combines the advantages of 1-persistent CMSA and non-persistent CMSA. Using CMSA protocols, more than one users or nodes send and receive data through a shared medium that may be a single cable or optical fiber connecting multiple ... Read More

Use static Import for sqrt() and pow() methods in class Math in Java

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:24

719 Views

Static import means that the fields and methods in a class can be used in the code without specifying their class if they are defined as public static.The Math class methods sqrt() and pow() in the package java.lang are static imported. A program that demonstrates this is given as follows:Example Live ... Read More

Obtain the hash code for a string in Java

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:24

164 Views

The hashCode() method is used to obtain the hash code for a string. This method does not accept any parameters as it is a default method and it returns a hash code value.A program that demonstrates the hashCode() method in Java is given as follows:Example Live Demoimport java.io.*; public class Demo ... Read More

Change Thread Priority in Java

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:24

584 Views

A thread can be created by implementing the Runnable interface and overriding the run() method. Then a Thread object can be created and the start() method called.The thread priority determines when the processor is provided to the thread as well as other resources. It can be changed using the method ... Read More

A greedy qualifier in Java Regular Expressions

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:24

182 Views

A greedy qualifier repeats the specified token as many times as possible and then the engine backtracks and the greedy qualifier gives up matches to eventually find the required match.The regex "(\w+)(\d)(\w+)" is used to find the match in the string "EarthHas1Moon".A program that demonstrates this is given as follows:Example Live ... Read More

Use find() to find a subsequence in Java Regexp

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:24

52 Views

The find() method finds the subsequence in an input sequence that matches the pattern required. This method is available in the Matcher class that is available in the java.util.regex packageA program that uses the find() method to find a subsequence in Java is given as follows:Example Live Demoimport java.util.regex.Matcher; import java.util.regex.Pattern; ... Read More

How to find the subsequence in an input sequence that matches the pattern required in Java Regular Expressions?

Fendadis John

Fendadis John

Updated on 30-Jul-2019 22:30:24

351 Views

The find() method finds the subsequence in an input sequence that matches the pattern required. This method is available in the Matcher class that is available in the java.util.regex package.A program that demonstrates the method Matcher.find() in Java regular expressions is given as follows:Example Live Demoimport java.util.regex.Matcher; import java.util.regex.Pattern; public class ... Read More

Advertisements