Samual Sam has Published 2310 Articles

How to add last element in android ConcurrentLinkedDeque?

Samual Sam

Samual Sam

Updated on 30-Jun-2020 12:58:39

94 Views

Before getting into example, we should know what ConcurrentLinkedDequeis, it is unbounded deque based on linked nodes. Multiple threads can access deque elements with safety.This example demonstrate about How to add last element in android ConcurrentLinkedDequeStep 1 − Create a new project in Android Studio, go to File ⇒ New ... Read More

How to add element based on index in android CopyOnWriteArrayList?

Samual Sam

Samual Sam

Updated on 30-Jun-2020 12:56:41

106 Views

Before getting into example, we should know what CopyOnWriteArrayListis. It is a thread-safe variant of ArrayListand operations add, set, and so on by making a fresh copy of the underlying array.This example demonstrate about How to add element based on index in android CopyOnWriteArrayListStep 1 − Create a new project ... Read More

Mathematical statistics functions in Python

Samual Sam

Samual Sam

Updated on 30-Jun-2020 12:48:26

576 Views

The statistics module of Python library consists of functions to calculate statistical formulae using numeric data types including Fraction and Decimal types.Following import statement is needed to use functions described in this article.>>> from statistics import *Following functions calculate the central tendency of sample data.mean() − This function calculates the ... Read More

MD5 hash encoding using Python?

Samual Sam

Samual Sam

Updated on 30-Jun-2020 09:23:44

5K+ Views

One of the major concern of all IT companies in the security of there data. Multiple hashing techniques are there to project and check our data.What is HashHash is a function which takes variable length sequence of bytes as input and converts it to a fixed length sequence. However, to ... Read More

Generating random Id’s in Python

Samual Sam

Samual Sam

Updated on 30-Jun-2020 09:19:37

2K+ Views

We use to generate a random number in our project for a sample data, which later can be used for testing, filled empty columns or for many other purposes, the key thing is we need to generate random data. In python, there are numerous ways to generate random data and ... Read More

Defining Clean Up Actions in Python

Samual Sam

Samual Sam

Updated on 30-Jun-2020 09:14:31

1K+ Views

There are numerous situation occurs when we want our program to do this specific task, irrespective of whether it runs perfectly or thrown some error. Mostly to catch at any errors or exceptions, we use to try and except block.The “try” statement provides very useful optional clause which is meant ... Read More

Python object serialization

Samual Sam

Samual Sam

Updated on 30-Jun-2020 09:11:53

687 Views

Serialization is a process in which an object is transformed into a format that can be stored/save (in a file or memory buffer), so we are able to deserialize it later and recover the original content/object from the serialized format. We are going to use a python pickle module to ... Read More

Create a Stack and Queue using ArrayDeque in Java

Samual Sam

Samual Sam

Updated on 30-Jun-2020 06:08:43

531 Views

Create a stack using ArrayDeque.Deque s = new ArrayDeque(); // stack s.push("Bat"); s.push("Mat"); s.push("Cat"); s.push("Rat"); s.push("Hat"); s.push("Fat");Create a queue using ArrayDeque −Deque q = new ArrayDeque(); // queue q.add("Bat"); q.add("Mat"); q.add("Cat"); q.add("Rat"); q.add("Hat"); q.add("Fat");The following is an example.Example Live Demoimport java.util.ArrayDeque; import java.util.Deque; public class Demo {    public static void ... Read More

How to display an image with rounded corners on iOS App using Swift?

Samual Sam

Samual Sam

Updated on 30-Jun-2020 05:55:51

3K+ Views

To make an image with round corners or to make any view or button or any UI element with round corners in swift, we need to access the corner radius property of its layer. Every UI element in iOS is based on a layer.First of all, let’s add an UIImageView ... Read More

Push segue from UITableViewCell to ViewController in Swift

Samual Sam

Samual Sam

Updated on 30-Jun-2020 05:50:40

707 Views

To create a segue from a UITableViewCell to another View controller, we’ll do it like any other ViewController to ViewController segue. We’ll do this with help of an example here.First Create a project, delete the View Controller from storyboard and add One Table View Controller and one View Controller in ... Read More

Advertisements