Ankith Reddy has Published 1070 Articles

Python program to count unset bits in a range.

Ankith Reddy

Ankith Reddy

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

151 Views

Given a positive a number and the range of the bits. Our task is to count unset bits in a range. Input : n = 50, starting address = 2, ending address = 5 Output : 2 There are '2' unset bits in the range 2 to 5. ... Read More

Python Internet String Preparation

Ankith Reddy

Ankith Reddy

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

235 Views

To identify different things in the internet, it is necessary to compare different identification for equality. The comparison procedure depends on the application domain. For an example, some things are case-insensitive etc. To check these kind of information stringprep is used. The RFC 3454 defines the procedure to prepare the ... Read More

Check if a File is hidden in C#

Ankith Reddy

Ankith Reddy

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

632 Views

To retrieve the attributes of a file, use the FileAttributes Eumeration. It has various members like compressed, directory, hidden, etc. To check if a file is hidden, use the hidden member name. If the FileAttributes.hidden is set that would mean the file is hidden. Firstly, get the path to find ... Read More

C++ Program to Find Factorial of a Number using Dynamic Programming

Ankith Reddy

Ankith Reddy

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

5K+ Views

The factorial of a positive integer n is equal to 1*2*3*...n. Factorial of a negative number does not exist. Here a C++ program is given to find out the factorial of a given input using dynamic programming.AlgorithmBegin    fact(int n):       Read the number n       ... Read More

POSIX Style TTY control using Python

Ankith Reddy

Ankith Reddy

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

355 Views

The termios module provides an interface to the POSIX for tty I/O control. It is only available for Unix system. To use the termios module, we should import it using − import termios All methods in this module, takes the file descriptor as an argument. There are some ... Read More

Python Interface to Shell Pipelines

Ankith Reddy

Ankith Reddy

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

235 Views

To use the UNIX command pipeline mechanism using python. In the command pipelining a sequence converts from one file to another file. This module uses /bin/sh command line. So we need os.system() and os.popen() methods. To use this module, we should import it using − import pipes ... Read More

New Features of C++17

Ankith Reddy

Ankith Reddy

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

368 Views

C++17 is the latest version of standard C++ language. C++11 and C++14 are the previous versions of C++. The current version makes several additions to the core language while some previous features are also removed. C++17 is known as feature full or feature complete. There are some of the new ... Read More

How to find the number of columns in a MySQL table?

Ankith Reddy

Ankith Reddy

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

14K+ Views

To find the number of columns in a MySQL table, use the count(*) function with information_schema.columns and the WHERE clause. Let us see an example. Creating a table. mysql> create table NumberOfColumns -> ( -> id int, -> FirstName varchar(100), ... Read More

time_sleep_until() function in PHP

Ankith Reddy

Ankith Reddy

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

83 Views

The time_sleep_until() function delays execution of the current script until the specified time. Syntax time_sleep_until(time) Parameters time − The time until execution will delay. Return The time_sleep_until() function returns true on success. Example The execution of the above script is now delayed ... Read More

How to initialize an array in C#?

Ankith Reddy

Ankith Reddy

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

2K+ Views

All arrays consist of contiguous memory locations. The lowest address corresponds to the first element and the highest address to the last element. Firstly, declare an array. int[] rank; But declaring an array does not initialize the array in the memory. When the array variable is initialized, you ... Read More

Advertisements