Found 27104 Articles for Server Side Programming

Programming Paradigms in Python

Niharika Aitam
Updated on 02-Aug-2023 11:32:03

2K+ Views

Programming paradigm is a specific approach or style of programming that provides a framework for designing and implementing computer programs. It encompasses a set of principles, concepts, and techniques that guide the development process and the structure of the code. Different paradigms have different ways of solving problems, organizing code, and expressing computations. The below are the various programming paradigms available in python which makes the developer work easy and more efficient. Procedural Programming Procedural programming focuses on dividing a program into a set of procedures or functions. In Python, we can define functions to perform specific tasks and structure ... Read More

Program to calculate Dooms Day for a year

Niharika Aitam
Updated on 02-Aug-2023 11:30:15

101 Views

The doomsday is also known as the doomsday of the week which is a specific day of the week that falls on the same date every year. The concept of the doomsday is based on the doomsday algorithm, which allows us to determine the day of the week for any given date. The doomsday algorithm was developed by mathematician John Horton Conway and is based on the idea that certain dates within each year fall on the same day of the week called the doomsday. The doomsday occurs on the following dates − January 3rd February 7th or 14th ... Read More

Check if the given Permutation is a Valid BFS of a Given Tree

Shubham Vora
Updated on 02-Aug-2023 13:05:45

140 Views

In this problem, we will check whether we can get the permutation of 1 to N elements given array using the BFS (Breadth−first search) traversal with the given binary tree. Here, we will traverse the tree and find all possible permutations using the BFS traversal. After that, we can check whether any BFS traversal result matches the array permutation. Problem statement − We have given an array of size containing the first N positive integers in random order. Also, we have given a tree containing the first N numbers as a tree node. We need to check whether we ... Read More

PHP program to Fetch Data from Localhost Server Database using XAMPP

Pradeep Kumar
Updated on 02-Aug-2023 11:32:36

764 Views

What is XAMPP? XAMPP is a software package that enables users to create a local web development environment on their computers. It includes the Apache web server, MySQL database, PHP scripting language, and Perl programming language. XAMPP simplifies the process of setting up a web server for testing and developing web applications, allowing users to work on their projects offline. It is widely used by developers to prototype and debug websites or web applications before deploying them to a live server. What is Database? A database is a structured collection of data organized and stored in ... Read More

Program to access different columns of a multidimensional Numpy array

Niharika Aitam
Updated on 02-Aug-2023 11:28:57

76 Views

Numpy is the most powerful library in python for computing numerical data. It provides multidimensional arrays, along with different collections of functions and modules to work with arrays. Its efficient array operations, broadcasting capabilities, and integration with other libraries make it a go-to choice for data manipulation, analysis, and modeling tasks. The following are the key features and functionalities of the Numpy library. Multidimensional arrays Array creation Array operations Indexing and Slicing Vectorized operations Numerical Routines Integration with other libraries Performance Open source and community support Creation of an array In Numpy library we have the functions called ... Read More

Check if the End of the Array can be Reached from a given Position

Shubham Vora
Updated on 02-Aug-2023 12:58:23

57 Views

In this problem, we will check whether we can reach the array’s end by moving back or ahead by nums[p] moves from the current position. The naïve approach to solve the problem is to check all possibilities to move into the array and see if we can reach the array’s end. Another approach is using the queue and BFS traversal in the array. In this tutorial, we will learn both approaches to check whether we can reach to the end of the array. Problem statement − We have given a nums[] array containing the positive integers. Also, we have given ... Read More

PHP Program to Count Trailing Zeroes in Factorial of a Number

Pradeep Kumar
Updated on 02-Aug-2023 10:31:14

143 Views

What is Factorial of a Number? The factorial of a non-negative integer, denoted by the symbol "!", is the product of all positive integers less than or equal to that number. In other words, the factorial of a number is obtained by multiplying that number by all the positive integers below it. For example, the factorial of 5 is calculated as: 5! = 5 x 4 x 3 x 2 x 1 = 120 Similarly, the factorial of 0 is defined to be 1: 0! = 1 Factorials are often used in mathematics and combinatorics to ... Read More

PHP Program to Count set Bits in an Integer

Pradeep Kumar
Updated on 02-Aug-2023 10:26:07

148 Views

What is Binary code? Binary code is a system of representing information or data using a base-2 numeral system. It uses only two digits, typically 0 and 1, to represent all values. Each digit in a binary code is called a bit (short for binary digit). In binary code, each digit represents a power of 2. Starting from the rightmost digit, the powers of 2 increase from right to left. For example, in an 8-bit binary code, the rightmost bit represents 2^0 (1), the next bit represents 2^1 (2), the next represents 2^2 (4), and so on. Example ... Read More

PHP Program to Count Page Views

Pradeep Kumar
Updated on 02-Aug-2023 10:18:31

2K+ Views

What is PHP? PHP (Hypertext Preprocessor) is a popular scripting language designed for web development. It is widely used for creating dynamic and interactive web pages. PHP code can be embedded directly into HTML, allowing developers to mix PHP and HTML seamlessly. PHP can connect to databases, process form data, generate dynamic content, handle file uploads, interact with servers, and perform various server-side tasks. It supports a wide range of web development frameworks, such as Laravel, Symfony, and CodeIgniter, which provide additional tools and features for building web applications. PHP is an open-source language with a large community, extensive ... Read More

PHP Program to Count Number of Binary Strings without Consecutive 1’s

Pradeep Kumar
Updated on 01-Aug-2023 16:17:47

72 Views

What is Count Number of Binary Strings without Consecutive 1’s? Let's consider an example to explain the concept of counting binary strings without consecutive 1's. Example Suppose we want to count the number of binary strings of length 3 that do not contain consecutive 1's. A binary string is a string consisting of only 0's and 1's. The possible binary strings of length 3 are: 000, 001, 010, 011, 100, 101, 110, and 111. However, we need to count only those binary strings that do not have consecutive 1's. So, we need to exclude the strings ... Read More

Advertisements