George John has Published 1167 Articles

Flip Out Y Animation Effect with CSS

George John

George John

Updated on 19-Jun-2020 16:51:46

98 Views

To implement Flip Out Y Animation effect with CSS, you can try to run the following codeLive Demo                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: no-repeat;         ... Read More

Java program to find the cube root of a given number

George John

George John

Updated on 19-Jun-2020 14:51:46

1K+ Views

Following is an example to find the cube root of a given number.Programimport java.util.Scanner; public class FindingCubeRoot {    public static void main(String args[]){       double i, precision = 0.000001;       System.out.println("Enter a number ::");       Scanner sc = new Scanner(System.in);       ... Read More

How do I define string constants in C++?

George John

George John

Updated on 19-Jun-2020 08:57:27

12K+ Views

To define a string constant in C++, you have to include the string header library, then create the string constant using this class and the const keyword.Example#include #include int main() { const std::string MY_STRING = "Hello World!"; std::cout

Who’s Who in the Telecommunications World

George John

George John

Updated on 18-Jun-2020 07:08:18

314 Views

The service domains, legal status, and scopes of telecommunication companies worldwide are varied. In order to provide compatibility among different agencies, International Telecommunication Union (ITU) was formed. ITU is a specialized agency of the United Nations Organizations that standardizes information and communication technologies worldwide. ITU membership lays down the who’s ... Read More

How to clamp floating numbers in Python?

George John

George John

Updated on 17-Jun-2020 14:51:13

6K+ Views

Clamp function limits a value to a given range. Python doesn't have such a function in built. You can create this function likedef clamp(num, min_value, max_value):    return max(min(num, max_value), min_value) print(clamp(5, 1, 20)) print(clamp(1, 10, 20)) print(clamp(20, 1, 10))This will give the output5 10 10

How to check if a float value is a whole number in Python?

George John

George John

Updated on 17-Jun-2020 12:57:59

1K+ Views

To check if a float value is a whole number, use the float.is_integer() method. For example,print((10.0).is_integer()) print((15.23).is_integer())This will give the outputTrue False

How to create Python dictionary from JSON input?

George John

George John

Updated on 17-Jun-2020 11:22:57

1K+ Views

You can parse JSON files using the json module in Python. This module parses the json and puts it in a dict. You can then get the values from this like a normal dict. For example, if you have a json with the following content{    "id": "file",    "value": ... Read More

Shuffle Array Contents

George John

George John

Updated on 17-Jun-2020 10:17:55

454 Views

This algorithm will take an array and shuffle the contents of the array. It will generate a random permutation of the array elements.To solve this problem, we will swap elements starting from the last index to randomly generated an index in the array.Input and OutputInput: An array of integers: {1, ... Read More

Sort strings in Alphanumeric sequence

George John

George John

Updated on 17-Jun-2020 09:48:30

4K+ Views

A list of given strings is sorted in alphanumeric order or Dictionary Order. Like for these words: Apple, Book, Aim, they will be sorted as Aim, Apple, Book.If there are some numbers, they can be placed before the alphabetic strings.Input and OutputInput: A list of strings: Ball Apple Data Area ... Read More

Number to word conversion

George John

George John

Updated on 17-Jun-2020 09:28:45

2K+ Views

This algorithm will convert a given number into English words. Like 564 will be Five Hundred and Sixty-Four. For this algorithm, some predefined strings are given, from that list, it will get the proper words to make into words.The lists are like Units: it will hold all words for (0 to 9) ... Read More

Advertisements