Fendadis John

Fendadis John

40 Articles Published

Articles by Fendadis John

Page 4 of 4

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

Fendadis John
Fendadis John
Updated on 30-Jul-2019 460 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 a locationManager object, so in your view controller.var locationManager = CLLocationManager()Now, we first of all we need to check if the location services are enabled on the device or not. To check this we’ll useCLLocationManager.locationServicesEnabled() function, which returns a Boolean value showing whether the location service on device is active ...

Read More

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

Fendadis John
Fendadis John
Updated on 30-Jul-2019 485 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 multiple steps, out of which even a single step can not be skipped.The first step is to register as a developer on: https://developers.facebook.com/Once you sign up as a developer and complete the required steps to sign up, you will be taken to dashboard. Which at present looks like as shown ...

Read More

Non-persistent CSMA protocol

Fendadis John
Fendadis John
Updated on 30-Jul-2019 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 connecting multiple nodes, or a portion of the wireless spectrum.In non-persistent CSMA, when a transmitting station has a frame to send and it senses a busy channel, it waits for a random period of time without sensing the channel in the interim, and repeats the algorithm again.AlgorithmThe algorithm of non-persistent ...

Read More

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

Fendadis John
Fendadis John
Updated on 30-Jul-2019 1K+ 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 Demoimport static java.lang.Math.sqrt; import static java.lang.Math.pow; public class Demo {    public static void main(String args[]) {       double num = 4.0;       System.out.println("The number is: " + num);       System.out.println("The square root of the above number is: " + sqrt(num));       ...

Read More

Name validation using Java Regular Expressions

Fendadis John
Fendadis John
Updated on 30-Jul-2019 1K+ Views

The name can be validated using the java.util.regex.Pattern.matches() method. This method matches the regular expression for the name and the given input name and returns true if they match and false otherwise.A program that demonstrates this is given as follows:Example Live Demopublic class Demo {    public static void main(String args[]) {       String name = "John Harry Smith";       String regexName = "\p{Upper}(\p{Lower}+\s?)";       String patternName = "(" + regexName + "){2, 3}";       System.out.println("The name is: " + name);       System.out.println("Is the above name valid? " + name.matches(patternName));   ...

Read More

Sorting collection of String and StringBuffer in Java

Fendadis John
Fendadis John
Updated on 30-Jul-2019 935 Views

In order to sort in Java as we know we can use either Comparable or Comparator interfaces in which we could also define our custom logic to sort.One of the approach to sort is to add the entity in TreeSet or TreeMap which would sort the entries as internally they also uses the comparable interface. Now String class in Java internally implements comparable interface so whenever we add string to a tree set or map it uses comparable logic of string class and sort the input entry strings.But String buffer do not have the implementation of comparable interface so ...

Read More

How do I view events fired on an element in Chrome?

Fendadis John
Fendadis John
Updated on 30-Jul-2019 16K+ Views

To view events fired on an element, follow the below steps in Google Chrome:Open Google Chrome and press F12 to open Dev Tools.Now go to Sources TabGo to Event Listener Breakpoints, on the right:Click on the events and interact with the target element.If the event will fire, then you will get a breakpoint in the debugger.

Read More

Java Boolean operators

Fendadis John
Fendadis John
Updated on 30-Jul-2019 10K+ Views

There are following boolean operators supported by Java language.Assume variable A holds 10 and variable B holds 20, then −OperatorDescriptionExample== (equal to)Checks if the values of two operands are equal or not, if yes then condition becomes true.(A == B) is not true.!= (not equal to)Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.(A != B) is true.> (greater than)Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true.(A > B) is not true.< (less than)Checks if the ...

Read More

History of C++ language

Fendadis John
Fendadis John
Updated on 30-Jul-2019 3K+ Views

The C++ programming language has a history going back to 1979, when Bjarne Stroustrup was doing work for his Ph.D. thesis. He began work on "C with Classes", which as the name implies was meant to be a superset of the C language. His goal was to add object-oriented programming into the C language, which was and still is a language well-respected for its portability without sacrificing speed or low-level functionality.His language included classes, basic inheritance, inlining, default function arguments, and strong type checking in addition to all the features of the C language. The first C with Classes compiler ...

Read More

Incrementing an integer inside loop in an ABAP program

Fendadis John
Fendadis John
Updated on 30-Jul-2019 860 Views

You need to use the following:You are missing spaces between ls_id+1. You can also use Add 1 to ls_idIn case you are using internal tables, you can directly use SY-TABIX and SY-Index depending upon whether the loop is nested or not.

Read More
Showing 31–40 of 40 articles
« Prev 1 2 3 4 Next »
Advertisements