Fendadis John has Published 72 Articles

What is the best way to compare two strings in JavaScript?

Fendadis John

Fendadis John

Updated on 08-Jan-2020 09:40:36

11K+ Views

To compare two strings in JavaScript, use the localeCompare() method. The method returns 0 if both the strings are equal, -1 if string 1 is sorted before string 2 and 1 if string 2 is sorted before string 1.ExampleYou can try to run the following code to compare two stringsLive ... Read More

How to create a website without using HTML?

Fendadis John

Fendadis John

Updated on 25-Sep-2019 07:52:30

3K+ Views

If you are having no knowledge of HTML or CSS, and want to create a website, then do not worry, you can easily create a website without writing even a single line of HTML code.Here are some ways to build a website without writing any HTML or line of code:Website ... Read More

How to make an HTTP request on iOS App using Swift?

Fendadis John

Fendadis John

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

873 Views

To make an http request in iOS we’ll make use of DataTask and sessions. We’ll create configuration, sessions, url, request, and dataTask objects. Let’s see the steps that we’ll go through.The HTTP request can be of different types, it depends on what kind of request we want to make to ... Read More

How to check Location Manager is running or not in iOS App?

Fendadis John

Fendadis John

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

419 Views

To check any services related to location in ios with swift we can use the CLLocationManager.In this example we’ll see how to check if the location manager is running or not. We’ll do this with help of an sample project. So, create a new project. First we need to create ... Read More

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

761 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

433 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

3K+ 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

6K+ 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

932 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

275 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

Advertisements