Nancy Den has Published 335 Articles

Get Array Dimensions in Java

Nancy Den

Nancy Den

Updated on 29-Jun-2020 06:41:04

1K+ Views

In order to get Array Dimensions in Java, we use the getClass(), isArray() and getComponentType() methods with decision making in combination with iterative statements.The getClass() method method returns the runtime class of an object. The getClass() method is a part of the java.lang.Object class.Declaration − The java.lang.Object.getClass() method is declared ... Read More

Internal Python object serialization (marshal)

Nancy Den

Nancy Den

Updated on 27-Jun-2020 15:01:53

805 Views

Even though marshal module in Python’s standard library provides object serialization features (similar to pickle module), it is not really useful for general purpose data persistence or transmission of Python objects through sockets etc. This module is mostly used by Python itself to support read/write operations on compiled versions of ... Read More

Generate pseudo-random numbers in Python

Nancy Den

Nancy Den

Updated on 27-Jun-2020 14:59:02

3K+ Views

Many computer applications need random number to be generated. However, none of them generate a truly random number. Python, like any other programming technique, uses a pseudo-random generator. Python’s random generation is based upon Mersenne Twister algorithm that produces 53-bit precision floats. The technique is fast and thread-safe but not ... Read More

Measure execution time of small Python code snippets (timeit)

Nancy Den

Nancy Den

Updated on 27-Jun-2020 14:38:42

143 Views

The Timer class and other convenience functions in timeit module of Python's standard library are designed to provide a mechanism to measure time taken by small bits of Python code to execute. The module has a command line interface and the functions can be called from within program as well.Easiest ... Read More

How to save ArrayList to SharedPreferences on Android?

Nancy Den

Nancy Den

Updated on 27-Jun-2020 13:43:48

4K+ Views

Before getting into shared preference to store arraylist example , we should know what is shared preferences in android. Using share preference, we can store or retrieve values as key and value pair. There are five different methods are available in share preference as shown below −Edit() − It going ... Read More

How to parse JSON object in iPhone/iOS?

Nancy Den

Nancy Den

Updated on 27-Jun-2020 13:29:49

420 Views

JSON stands for Javascript object notation. Most of the when dealing with APIs or any other services the data is returned in JSON format and we need to convert it to usable and supporte language formats.Foundation framework of iOS provides a class JSONSerialization to convert JSON into supported formats like ... Read More

What is Xcode error “Could not find Developer Disk Image”?

Nancy Den

Nancy Den

Updated on 27-Jun-2020 13:25:20

505 Views

The Xcode error occurs when the xcode version and ios versions don’t match. Usually it happens when the Xcode version is less than the device iOS version. i.e. the Xcode is too old for the device. This is a compatibility issue which can be resolved by performing some steps.Always check ... Read More

How to create a Border, Border radius, and shadow to a UIView in iPhone/iOS?

Nancy Den

Nancy Den

Updated on 27-Jun-2020 13:19:37

363 Views

In this article we’ll learn how to create borders and shadows. We’ll do it in two ways, one by directly coding and one by making it designable and an extension of UIView, which can be edited directly in the storyboard.Let’s see how to play around with borders in ios −Method ... Read More

Character - Oriented Framing and Bit - Oriented Framing

Nancy Den

Nancy Den

Updated on 27-Jun-2020 13:15:01

7K+ Views

Framing is a Data Link layer function whereby the packets from the Network Layer are encapsulated into frames. The data frames can be of fixed length or variable length. In variable - length framing, the size of each frame to be transmitted may be different. So, a pattern of bits ... Read More

Can we override a private or static method in Java

Nancy Den

Nancy Den

Updated on 27-Jun-2020 12:48:55

7K+ Views

No, we cannot override private or static methods in Java.Private methods in Java are not visible to any other class which limits their scope to the class in which they are declared.ExampleLet us see what happens when we try to override a private method − Live Democlass Parent {    private ... Read More

Advertisements