title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Bootstrap 4 card styled with bg-secondary class
Add less important stuff, using the card class with the bg-secondary contextual class in Bootstrap. This class adds a gray background − <div class="card bg-secondary text-white"> Inside that, add the card body − <div class="card bg-secondary text-white"> <div class="card-body">English</div> </div> You can try to run ...
[ { "code": null, "e": 1162, "s": 1062, "text": "Add less important stuff, using the card class with the bg-secondary contextual class in Bootstrap." }, { "code": null, "e": 1198, "s": 1162, "text": "This class adds a gray background −" }, { "code": null, "e": 1241, ...
Facade Design Pattern | Introduction - GeeksforGeeks
01 Sep, 2021 Facade is a part of Gang of Four design pattern and it is categorized under Structural design patterns. Before we dig into the details of it, let us discuss some examples which will be solved by this particular Pattern. So, As the name suggests, it means the face of the building. The people walking past th...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n01 Sep, 2021" }, { "code": null, "e": 24432, "s": 24212, "text": "Facade is a part of Gang of Four design pattern and it is categorized under Structural design patterns. Before we dig into the details of it, let us discuss some e...
Coding Neural Network — Forward Propagation and Backpropagtion | by Imad Dabbura | Towards Data Science
Why Neural Networks? According to Universal Approximate Theorem, Neural Networks can approximate as well as learn and represent any function given a large enough layer and desired error margin. The way neural network learns the true function is by building complex representations on top of simple ones. On each hidden l...
[ { "code": null, "e": 193, "s": 172, "text": "Why Neural Networks?" }, { "code": null, "e": 969, "s": 193, "text": "According to Universal Approximate Theorem, Neural Networks can approximate as well as learn and represent any function given a large enough layer and desired error ...
How do I open Chrome in selenium WebDriver?
We can open Chrome browser in Selenium webdriver. We can launch Chrome by instantiating an object of the ChromeDriver class with the help of the below statement. WebDriver driver = new ChromeDriver(); Next we have to download the chromedriver and configure it to our project by following the below step by step processes...
[ { "code": null, "e": 1224, "s": 1062, "text": "We can open Chrome browser in Selenium webdriver. We can launch Chrome by instantiating an object of the ChromeDriver class with the help of the below statement." }, { "code": null, "e": 1263, "s": 1224, "text": "WebDriver driver = n...
Julia - Dictionaries and Sets
Many of the functions we have seen so far are working on arrays and tuples. Arrays are just one type of collection, but Julia has other kind of collections too. One such collection is Dictionary object which associates keys with values. That is why it is called an ‘associative collection’. To understand it better, we c...
[ { "code": null, "e": 2369, "s": 2078, "text": "Many of the functions we have seen so far are working on arrays and tuples. Arrays are just one type of collection, but Julia has other kind of collections too. One such collection is Dictionary object which associates keys with values. That is why it i...
Top Python Libraries: Numpy & Pandas | by Md Arman Hossen | Towards Data Science
In this tutorial, I’ll try to make a brief description about two of the most important libraries in Python Numpy and Pandas. Without further delay lets go through Numpy first. numpy is the core library for scientific computing in Python. It provides a high-performance multidimensional array object and tools for working...
[ { "code": null, "e": 348, "s": 172, "text": "In this tutorial, I’ll try to make a brief description about two of the most important libraries in Python Numpy and Pandas. Without further delay lets go through Numpy first." }, { "code": null, "e": 761, "s": 348, "text": "numpy is t...
Splunk - Lookups
In the result of a search query, we sometimes get values which may not clearly convey the meaning of the field. For example, we may get a field which lists the value of product id as a numeric result. These numbers will not give us any idea of what kind of product it is. But if we list the product name along with the p...
[ { "code": null, "e": 2774, "s": 2361, "text": "In the result of a search query, we sometimes get values which may not clearly convey the meaning of the field. For example, we may get a field which lists the value of product id as a numeric result. These numbers will not give us any idea of what kind...
Constructor in Java Abstract Class - GeeksforGeeks
15 Mar, 2022 Constructor is always called by its class name in a class itself. A constructor is used to initialize an object not to build the object. As we all know abstract classes also do have a constructor. So if we do not define any constructor inside the abstract class then JVM (Java Virtual Machine) will give a d...
[ { "code": null, "e": 23583, "s": 23555, "text": "\n15 Mar, 2022" }, { "code": null, "e": 24119, "s": 23583, "text": "Constructor is always called by its class name in a class itself. A constructor is used to initialize an object not to build the object. As we all know abstract cl...
Cohort Analysis with Python. A data clustering skill that every... | by Joe Tran | Towards Data Science
If you are a data analyst working for an e-commerce company, there is a high chance that one of your tasks at work is to discover insights from customer data to improve customer retention. However, the customer data is massive and each customer behaves differently. Customer A who was acquired in March 2020 displays a d...
[ { "code": null, "e": 360, "s": 171, "text": "If you are a data analyst working for an e-commerce company, there is a high chance that one of your tasks at work is to discover insights from customer data to improve customer retention." }, { "code": null, "e": 720, "s": 360, "text"...
Minimum Number of Platforms Problem
A list of arrival and departure time is given. Now the problem is to find the minimum number of platforms are required for the railway as no train waits. By sorting all timings in sorted order, we can find the solution easily, it will be easy to track when the train has arrived but not left the station. The time comple...
[ { "code": null, "e": 1216, "s": 1062, "text": "A list of arrival and departure time is given. Now the problem is to find the minimum number of platforms are required for the railway as no train waits." }, { "code": null, "e": 1367, "s": 1216, "text": "By sorting all timings in so...
Splitting your data to fit any machine learning model | by Magdalena Konkiewicz | Towards Data Science
Introduction After you have performed data cleaning, data visualizations, and learned details about your data it is time to fit the first machine learning model into it. Today I want to share with you a few very simple lines of code that will divide any data set into variables that you can pass to any machine learning ...
[ { "code": null, "e": 185, "s": 172, "text": "Introduction" }, { "code": null, "e": 521, "s": 185, "text": "After you have performed data cleaning, data visualizations, and learned details about your data it is time to fit the first machine learning model into it. Today I want to ...
How I can create Python class from JSON object?
We can use python-jsonschema-objects which is built on top of jsonschema.The python-jsonschema-objects provide an automatic class-based binding to JSON schemas for use in Python. We have a sample json schema as follows schema = '''{ "title": "Example Schema", "type": "object", "properties": { "first...
[ { "code": null, "e": 1241, "s": 1062, "text": "We can use python-jsonschema-objects which is built on top of jsonschema.The python-jsonschema-objects provide an automatic class-based binding to JSON schemas for use in Python." }, { "code": null, "e": 1281, "s": 1241, "text": "We ...
MySQL FLUSH Statement
The FLUSH statement in MySQL is used to clear the caches. Following is the syntax of MySQL FLUSH statement − FLUSH [NO_WRITE_TO_BINLOG | LOCAL] { BINARY LOGS | ENGINE LOGS | ERROR LOGS | GENERAL LOGS | HOSTS | LOGS | PRIVILEGES | OPTIMIZER_COSTS | RELAY LOGS | SLOW LOGS | STATUS | USER_RESOURCES } Following are...
[ { "code": null, "e": 2391, "s": 2333, "text": "The FLUSH statement in MySQL is used to clear the caches." }, { "code": null, "e": 2442, "s": 2391, "text": "Following is the syntax of MySQL FLUSH statement −" }, { "code": null, "e": 2640, "s": 2442, "text": "FL...
A* Search Algorithm - GeeksforGeeks
13 Apr, 2022 Motivation To approximate the shortest path in real-life situations, like- in maps, games where there can be many hindrances.We can consider a 2D Grid having several obstacles and we start from a source cell (colored red below) to reach towards a goal cell (colored green below) What is A* Search Algorithm?...
[ { "code": null, "e": 24329, "s": 24301, "text": "\n13 Apr, 2022" }, { "code": null, "e": 24608, "s": 24329, "text": "Motivation To approximate the shortest path in real-life situations, like- in maps, games where there can be many hindrances.We can consider a 2D Grid having sever...
Faster Pandas with parallel processing: cuDF vs. Modin | by Déborah Mesquita | Towards Data Science
With Pandas, by default we can only use a single CPU core at a time. This is fine for small datasets, but when working with larger files this can create a bottleneck. It's possible to speed-up things by using Parallel processing, but if you never wrote a multithreaded program don't worry: you don't need to learn how to...
[ { "code": null, "e": 338, "s": 171, "text": "With Pandas, by default we can only use a single CPU core at a time. This is fine for small datasets, but when working with larger files this can create a bottleneck." }, { "code": null, "e": 696, "s": 338, "text": "It's possible to sp...
Web Applications in Python. Getting Started with Django | by Sadrach Pierre, Ph.D. | Towards Data Science
Django is a python-based and open-sourced web framework that enables easy creation of database-driven websites. Some examples of sites that use Django include Instagram, Mozilla, and Bitbucket. In this post, we will walk through the steps of building a simple web application with Django. Documentation for Django can be...
[ { "code": null, "e": 366, "s": 172, "text": "Django is a python-based and open-sourced web framework that enables easy creation of database-driven websites. Some examples of sites that use Django include Instagram, Mozilla, and Bitbucket." }, { "code": null, "e": 505, "s": 366, "...
Minimum steps required to reduce all array elements to 1 based on given steps - GeeksforGeeks
22 Nov, 2021 Given an array arr[] of size N. The task is to find the minimum steps required to reduce all array elements to 1. In each step, perform the following given operation: Choose any starting index, say i, and jump to the (arr[i] + i)th index, reducing ith as well as (arr[i] + i)th index by 1, follow this proc...
[ { "code": null, "e": 24479, "s": 24448, "text": " \n22 Nov, 2021\n" }, { "code": null, "e": 24646, "s": 24479, "text": "Given an array arr[] of size N. The task is to find the minimum steps required to reduce all array elements to 1. In each step, perform the following given oper...
Check If the Rune is a Space Character or not in Golang - GeeksforGeeks
27 Sep, 2019 Rune is a superset of ASCII or it is an alias of int32. It holds all the characters available in the world’s writing system, including accents and other diacritical marks, control codes like tab and carriage return, and assigns each one a standard number. This standard number is known as a Unicode code poi...
[ { "code": null, "e": 24380, "s": 24352, "text": "\n27 Sep, 2019" }, { "code": null, "e": 25130, "s": 24380, "text": "Rune is a superset of ASCII or it is an alias of int32. It holds all the characters available in the world’s writing system, including accents and other diacritica...
Basic calculator program using Python program
In this tutorial, we are going to build a basic calculator in Python. I think all of you have an idea about the basic calculators. We will give six options to the user from which they select one option, and we will perform the respective operation. Following are the arithmetic operations we are going to perform. Additi...
[ { "code": null, "e": 1376, "s": 1062, "text": "In this tutorial, we are going to build a basic calculator in Python. I think all of you have an idea about the basic calculators. We will give six options to the user from which they select one option, and we will perform the respective operation. Foll...
Web2py - Quick Guide
web2py is defined as a free, open-source web framework for agile development which involves database-driven web applications; it is written in Python and programmable in Python. It is a full-stack framework; it consists of all the necessary components, a developer needs to build a fully functional web application. web2...
[ { "code": null, "e": 2209, "s": 1893, "text": "web2py is defined as a free, open-source web framework for agile development which involves database-driven web applications; it is written in Python and programmable in Python. It is a full-stack framework; it consists of all the necessary components, ...
XML-RPC - Examples
To demonstrate XML-RPC, we're going to create a server that uses Java to process XML-RPC messages, and we will create a Java client to call procedures on that server. The Java side of the conversation uses the Apache XML Project's Apache XML-RPC, available at http://xml.apache.org/xmlrpc/ Put all the .jar files in appr...
[ { "code": null, "e": 1851, "s": 1684, "text": "To demonstrate XML-RPC, we're going to create a server that uses Java to process XML-RPC messages, and we will create a Java client to call procedures on that server." }, { "code": null, "e": 1974, "s": 1851, "text": "The Java side o...
Java Program to generate n distinct random numbers
For distinct numbers, use Set, since all its implementations remove duplicates − Set<Integer>set = new LinkedHashSet<Integer>(); Now, create a Random class object − Random randNum = new Random(); Generate 10 distinct random numbers now with nextInt of the Random class − while (set.size() < 10) { set.add(randNum.next...
[ { "code": null, "e": 1143, "s": 1062, "text": "For distinct numbers, use Set, since all its implementations remove duplicates −" }, { "code": null, "e": 1191, "s": 1143, "text": "Set<Integer>set = new LinkedHashSet<Integer>();" }, { "code": null, "e": 1227, "s": 1...
Stream Editor - Pattern Buffer
One of the basic operations we perform on any file is display its contents. For this purpose, we can use the print command which prints the contents of the pattern buffer. So let us learn more about the pattern buffer First create a file containing the line number, the name of the book, its author, and the number of pa...
[ { "code": null, "e": 2041, "s": 1823, "text": "One of the basic operations we perform on any file is display its contents. For this purpose, we can use the print command which prints the contents of the pattern buffer. So let us learn more about the pattern buffer" }, { "code": null, "e"...
How to Calculate Mean in Excel?
28 Jul, 2021 The mean (also called average) of the data set is calculated by adding all the numbers in the data set and then dividing it by the total number of values in the data set. In this article, we will find out how to calculate the mean in excel. In this method, we are going to use the AVERAGE function which ret...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2021" }, { "code": null, "e": 269, "s": 28, "text": "The mean (also called average) of the data set is calculated by adding all the numbers in the data set and then dividing it by the total number of values in the data set. In t...
SQL Server | STUFF() Function
09 Jul, 2021 There are situations when user want to change some portion of the data inserted. The reason may be because of human error or the change in data. For this purpose, stuff() function comes to action. STUFF() : In SQL Server, stuff() function is used to delete a sequence of given length of characters from the...
[ { "code": null, "e": 53, "s": 25, "text": "\n09 Jul, 2021" }, { "code": null, "e": 251, "s": 53, "text": "There are situations when user want to change some portion of the data inserted. The reason may be because of human error or the change in data. For this purpose, stuff() fun...
How to easily initialize a list of Tuples in C#?
Tuple can be used where you want to have a data structure to hold an object with properties, but you don't want to create a separate type for it. The Tuple<T> class was introduced in .NET Framework 4.0. A tuple is a data structure that contains a sequence of elements of different data types. Tuple<int, string, string> ...
[ { "code": null, "e": 1480, "s": 1187, "text": "Tuple can be used where you want to have a data structure to hold an object with properties, but you don't want to create a separate type for it.\nThe Tuple<T> class was introduced in .NET Framework 4.0. A tuple is a data structure that contains a seque...
Output of Java Programs | Set 40 (for loop)
27 Sep, 2017 Prerequisite : Loops in Java 1. what will be the output of the following program? publicclass Test {public static void main(String[] args) { for (int i = 0; i < 10; i++) int x = 10; }} Options:1. No Output2. 103. Compile time error4. 10 (10 times) The answer is option (3) Explana...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Sep, 2017" }, { "code": null, "e": 81, "s": 52, "text": "Prerequisite : Loops in Java" }, { "code": null, "e": 134, "s": 81, "text": "1. what will be the output of the following program?" }, { "code": "pu...
How to design a parking lot using object-oriented principles?
22 Jun, 2018 Design a parking lot using object-oriented principles. Asked In : Amazon, Apple, Google and many more interviews Solution: For our purposes right now, we’ll make the following assumptions. We made these specific assumptions to add a bit of complexity to the problem without adding too much. If you made diff...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2018" }, { "code": null, "e": 109, "s": 54, "text": "Design a parking lot using object-oriented principles." }, { "code": null, "e": 167, "s": 109, "text": "Asked In : Amazon, Apple, Google and many more int...
Perl | Subroutines or Functions
13 Jul, 2018 A Perl function or subroutine is a group of statements that together perform a specific task. In every programming language user want to reuse the code. So the user puts the section of code in function or subroutine so that there will be no need to write code again and again. In Perl, the terms function, s...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jul, 2018" }, { "code": null, "e": 766, "s": 28, "text": "A Perl function or subroutine is a group of statements that together perform a specific task. In every programming language user want to reuse the code. So the user puts the s...
Movie tickets Booking management system in Python
12 Nov, 2021 In this article, we are going to code a simple program for book movie tickets. It will be very useful to the passionate beginners who wanted to work on any project. Write a program to build a simple Movie tickets Booking Management System using Python. We had used six functions as follows : t_movie() thea...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 Nov, 2021" }, { "code": null, "e": 217, "s": 52, "text": "In this article, we are going to code a simple program for book movie tickets. It will be very useful to the passionate beginners who wanted to work on any project." }, {...
GATE | GATE CS 1996 | Question 39
01 Nov, 2017 A binary search tree is generated by inserting in order the following integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24 The number of nodes in the left subtree and right subtree of the root respectively is(A) (4, 7)(B) (7, 4)(C) (8, 3)(D) (3, 8)Answer: (B)Explanation:Quiz of this QuestionPlease comme...
[ { "code": null, "e": 54, "s": 26, "text": "\n01 Nov, 2017" }, { "code": null, "e": 134, "s": 54, "text": "A binary search tree is generated by inserting in order the following integers:" }, { "code": null, "e": 180, "s": 134, "text": " 50, 15, 62, 5, 20, 58, 9...
How to create a Responsive Sidebar with dropdown menu in ReactJS?
10 Feb, 2021 A sidebar is an important element of a website’s design since it allows users to quickly visit any section within a site. A glimpse of the project: Prerequisite: npmcreate-react-appreact-router-domuseState React hooks npm create-react-app react-router-dom useState React hooks Basic Setup: You will start a...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Feb, 2021" }, { "code": null, "e": 176, "s": 54, "text": "A sidebar is an important element of a website’s design since it allows users to quickly visit any section within a site." }, { "code": null, "e": 203, "s": 1...
matplotlib.pyplot.viridis() in Python
22 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. The viridis() function in pyplot module of matplotlib library is used to set the colormap to “viridis”. Syntax: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 223, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MAT...
Tree View Component in ReactJS
29 Dec, 2021 Tree Views are used often to display directory trees of file systems or multiple options in a hierarchical structure. A navigator icon denotes whether an option is in an expanded state or not, then displays the items inside it in an indented section below it. It’s very prominent in sidebars of websites lik...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Dec, 2021" }, { "code": null, "e": 388, "s": 28, "text": "Tree Views are used often to display directory trees of file systems or multiple options in a hierarchical structure. A navigator icon denotes whether an option is in an expan...
How to play audio file from the assets directory in Android?
This example demonstrates how do I play audio file from the assets directory in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?...
[ { "code": null, "e": 1276, "s": 1187, "text": "This example demonstrates how do I play audio file from the assets directory in android." }, { "code": null, "e": 1405, "s": 1276, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requir...
Flutter – Circular reveal Animation
15 Feb, 2021 The Circular Reveal Animation in Flutter is inspired by ViewAnimationUtils.createCircularReveal(...). It does exactly what the name suggests, meaning it is used to reveal content generally an image circularly where the circle grows bigger and makes the image visible. In this article, we will implement a si...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Feb, 2021" }, { "code": null, "e": 296, "s": 28, "text": "The Circular Reveal Animation in Flutter is inspired by ViewAnimationUtils.createCircularReveal(...). It does exactly what the name suggests, meaning it is used to reveal cont...
What is 5G Wireless Technology and How it Works?
24 Sep, 2019 According to Robert J. Topol, Intel’s General Manager for 5G Business and Technology, 5G will be the post-smartphone era. But phones are the first place to launch because they’re such an anchor in our lives from a connectivity standpoint. And indeed the applications of 5G merely begin at smartphones and th...
[ { "code": null, "e": 53, "s": 25, "text": "\n24 Sep, 2019" }, { "code": null, "e": 139, "s": 53, "text": "According to Robert J. Topol, Intel’s General Manager for 5G Business and Technology," }, { "code": null, "e": 292, "s": 139, "text": "5G will be the post...
How to add icon logo in title bar using HTML ?
15 Jan, 2019 Most of the websites adds icon or image logo in the title bar. The icon logo is also called as favicon. Adding favicons is also considered to be good for the SEO of the websites. The favicon is the combination of favorite icon. The link attribute is used to add the favicon. Syntax: <link rel="icon" href="i...
[ { "code": null, "e": 53, "s": 25, "text": "\n15 Jan, 2019" }, { "code": null, "e": 281, "s": 53, "text": "Most of the websites adds icon or image logo in the title bar. The icon logo is also called as favicon. Adding favicons is also considered to be good for the SEO of the websi...
Popup Menu in Tkinter
26 Mar, 2020 Tkinter is Python’s standard GUI (Graphical User Interface) package. It is one of the most commonly used packages for GUI applications which comes with the Python itself. Note: For more information, refer to Python GUI – tkinter Menus are an important part of any GUI. A common use of menus is to provide co...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Mar, 2020" }, { "code": null, "e": 199, "s": 28, "text": "Tkinter is Python’s standard GUI (Graphical User Interface) package. It is one of the most commonly used packages for GUI applications which comes with the Python itself." }...
How to make workaround for window.location.href?
30 Aug, 2019 Given a URL, the task is to use the current address of the page and to perform an operation using this address. Example 1: This example points to the same URL and only redirects to the same address.URL = ‘https://gitstr.herokuapp.com’ <!DOCTYPE html><html lang="en"> <head> <title>Example 1:</title></he...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Aug, 2019" }, { "code": null, "e": 140, "s": 28, "text": "Given a URL, the task is to use the current address of the page and to perform an operation using this address." }, { "code": null, "e": 263, "s": 140, "te...
Write a C program to read a data from file and display
How to read a series of items that are present in a file and display the data in columns or tabular form using C Programming Create a file in write mode and write some series of information in the file and close it again open and display the series of data in columns on the console. Write mode of opening the file FILE ...
[ { "code": null, "e": 1312, "s": 1187, "text": "How to read a series of items that are present in a file and display the data in columns or tabular form using C Programming" }, { "code": null, "e": 1471, "s": 1312, "text": "Create a file in write mode and write some series of info...
Program to Convert Octal Number to Binary Number
21 Jan, 2022 Given an Octal number as input, the task is to convert that number to Binary number.Examples: Input : Octal = 345 Output : Binary = 011100101 Explanation : Equivalent binary value of 3: 011 Equivalent binary value of 4: 100 Equivalent binary value of 5: 101 Input : Octal = 120 Output : Binary = 0010100...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jan, 2022" }, { "code": null, "e": 124, "s": 28, "text": "Given an Octal number as input, the task is to convert that number to Binary number.Examples: " }, { "code": null, "e": 338, "s": 124, "text": "Input : Oc...
Wave Patterns - GeeksforGeeks
29 Oct, 2021 Given length and width, print the pattern in wave form using ‘/’ and ”.Examples : Input : wave_height = 4 wave_length = 4 Output : /\ /\ /\ /\ / \ / \ / \ / \ / \ / \ / \ / \ / \/ \/ \/ \ Input : wave_height = ...
[ { "code": null, "e": 24806, "s": 24778, "text": "\n29 Oct, 2021" }, { "code": null, "e": 24889, "s": 24806, "text": "Given length and width, print the pattern in wave form using ‘/’ and ”.Examples : " }, { "code": null, "e": 25174, "s": 24889, "text": "Input :...
Batch Script - Debugging
Debugging a batch script becomes important when you are working on a big complex batch script. Following are the ways in which you can debug the batch file. A very simple debug option is to make use of echo command in your batch script wherever possible. It will display the message in the command prompt and help you de...
[ { "code": null, "e": 2264, "s": 2169, "text": "Debugging a batch script becomes important when you are working on a big complex batch script." }, { "code": null, "e": 2326, "s": 2264, "text": "Following are the ways in which you can debug the batch file." }, { "code": nul...
Set up an Airflow Environment on AWS in Minutes | by Brent Lemieux | Towards Data Science
Apache Airflow is a powerful platform for scheduling and monitoring data pipelines, machine learning workflows, and DevOps deployments. In this post, we’ll cover how to set up an Airflow environment on AWS and start scheduling workflows in the cloud. This is part one of a series, Scheduling Machine Learning Workflows. ...
[ { "code": null, "e": 423, "s": 172, "text": "Apache Airflow is a powerful platform for scheduling and monitoring data pipelines, machine learning workflows, and DevOps deployments. In this post, we’ll cover how to set up an Airflow environment on AWS and start scheduling workflows in the cloud." }...
Maximum Size Subarray Sum Equals k in C++
Suppose we have an array called nums and a target value k, we have to find the maximum length of a subarray that sums to k. If there is not present any, return 0 instead. So, if the input is like nums = [1, -1, 5, -2, 3], k = 3, then the output will be 4, as the subarray [1, - 1, 5, -2] sums to 3 and is the longest. To...
[ { "code": null, "e": 1233, "s": 1062, "text": "Suppose we have an array called nums and a target value k, we have to find the maximum length of a subarray that sums to k. If there is not present any, return 0 instead." }, { "code": null, "e": 1380, "s": 1233, "text": "So, if the ...
Python - Convert key-value String to dictionary - GeeksforGeeks
10 May, 2020 Sometimes, while working with Python strings, we can have problem in which we need to convert a string key-value pairs to dictionary. This can have applications in which we are working with string data and needs to be converted. Let’s discuss certain ways in which this task can be performed. Method #1 : Us...
[ { "code": null, "e": 25929, "s": 25901, "text": "\n10 May, 2020" }, { "code": null, "e": 26222, "s": 25929, "text": "Sometimes, while working with Python strings, we can have problem in which we need to convert a string key-value pairs to dictionary. This can have applications in...
Python program to Find the first non-repeating character from a stream of characters?
In this section we are going to find the first unique or non-repeating character from a string or stream of characters. There are multiple ways to solve this problem. We will try to create two different program for the same stream of characters. def firstNonRepeatingChar(str1): char_order = [] counts = {} for ...
[ { "code": null, "e": 1308, "s": 1062, "text": "In this section we are going to find the first unique or non-repeating character from a string or stream of characters. There are multiple ways to solve this problem. We will try to create two different program for the same stream of characters." }, ...
PyQt5 QSpinBox - Removing the arrow buttons - GeeksforGeeks
06 May, 2020 In this article we will see how we can remove the buttons of the spin box, basically there are two buttons in the spin box one for incrementing the value and second for decrementing the value. Below is the representation of how normal spin box looks like vs the spin box with no buttons looks like In order ...
[ { "code": null, "e": 25731, "s": 25703, "text": "\n06 May, 2020" }, { "code": null, "e": 26029, "s": 25731, "text": "In this article we will see how we can remove the buttons of the spin box, basically there are two buttons in the spin box one for incrementing the value and secon...
Strictly Increasing Array | Practice | GeeksforGeeks
Given an array nums[] of N positive integers. Find the minimum number of operations required to modify the array such that array elements are in strictly increasing order (A[i] < A[i+1]). Changing a number to greater or lesser than original number is counted as one operation. Example 1: Input: nums[] = [1, 2, 3, 6, 5,...
[ { "code": null, "e": 503, "s": 226, "text": "Given an array nums[] of N positive integers. Find the minimum number of operations required to modify the array such that array elements are in strictly increasing order (A[i] < A[i+1]).\nChanging a number to greater or lesser than original number is cou...
Linear search using Multi-threading - GeeksforGeeks
28 Jan, 2018 Given a large file of integers, search for a particular element in it using multi-threading. Examples: Input : 1, 5, 7, 10, 12, 14, 15, 18, 20, 22, 25, 27, 30, 64, 110, 220 Output :if key = 20 Key element found Input :1, 5, 7, 10, 12, 14, 15, 18, 20, 22, 25, 27, 30, 64, 110, 220 Output :i...
[ { "code": null, "e": 25666, "s": 25638, "text": "\n28 Jan, 2018" }, { "code": null, "e": 25759, "s": 25666, "text": "Given a large file of integers, search for a particular element in it using multi-threading." }, { "code": null, "e": 25769, "s": 25759, "text"...
Analyzing Census Data in Python
Census is about recording information about a given population in a systematic manner. The data captured includes various category of information like – demographic, economic, habitation details etc. This ultimately helps the government in understanding the current scenario as well as Planning for the future. In this a...
[ { "code": null, "e": 1667, "s": 1062, "text": "Census is about recording information about a given population in a systematic manner. The data captured includes various category of information like – demographic, economic, habitation details etc. This ultimately helps the government in understanding...
Load CSV data into List and Dictionary using Python - GeeksforGeeks
21 Apr, 2020 Prerequisites: Working with csv files in Python CSV (Comma Separated Values) is a simple file format used to store tabular data, such as a spreadsheet or database. CSV file stores tabular data (numbers and text) in plain text. Each line of the file is a data record. Each record consists of one or more fiel...
[ { "code": null, "e": 24423, "s": 24395, "text": "\n21 Apr, 2020" }, { "code": null, "e": 24471, "s": 24423, "text": "Prerequisites: Working with csv files in Python" }, { "code": null, "e": 24845, "s": 24471, "text": "CSV (Comma Separated Values) is a simple f...
ES6 - Array Method map()
map() method creates a new array with the results of calling a provided function on every element in this array. array.map(callback[, thisObject]); callback − Function that produces an element of the new Array from an element of the current one. callback − Function that produces an element of the new Array from an ...
[ { "code": null, "e": 2390, "s": 2277, "text": "map() method creates a new array with the results of calling a provided function on every element in this array." }, { "code": null, "e": 2429, "s": 2390, "text": "array.map(callback[, thisObject]); \n" }, { "code": null, ...
Factorial of each element in Fibonacci series - GeeksforGeeks
18 Jan, 2022 Given the upper limit, print factorials of all Fibonacci Numbers smaller than the limit.Examples : Input : limit = 20 Output : 1 1 1 2 6 120 40320 6227020800 Explanation : Fibonacci series in this range is 0, 1, 1, 2, 3, 5, 8, 13. Factorials of these numbers are output. Input : 50 Output : 1 1 1 2 6 ...
[ { "code": null, "e": 24325, "s": 24297, "text": "\n18 Jan, 2022" }, { "code": null, "e": 24426, "s": 24325, "text": "Given the upper limit, print factorials of all Fibonacci Numbers smaller than the limit.Examples : " }, { "code": null, "e": 24733, "s": 24426, ...
Reasons to Choose gRPC over REST and How to Adopt It into Your Python APIs | by Dimitris Poulopoulos | Towards Data Science
For a long time now, we’ve had REST (REpresentational State Transfer). REST APIs are cozy, warm, friendly, and very flexible. And if I’m permitted to be a bit abrupt here, thank God I don’t have to use SOAP anymore! So why on earth do we want to change everything again? Why do we keep inventing new, shiny stuff to repl...
[ { "code": null, "e": 387, "s": 171, "text": "For a long time now, we’ve had REST (REpresentational State Transfer). REST APIs are cozy, warm, friendly, and very flexible. And if I’m permitted to be a bit abrupt here, thank God I don’t have to use SOAP anymore!" }, { "code": null, "e": 54...
Program to find the maximum element in a Matrix - GeeksforGeeks
07 May, 2021 Given a NxM matrix. The task is to find the maximum element in this matrix.Examples: Input: mat[4][4] = {{1, 2, 3, 4}, {25, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}}; Output: 25 Input: mat[3][4] = {{9, 8, 7, 6}, {5, 4, 3,...
[ { "code": null, "e": 26171, "s": 26143, "text": "\n07 May, 2021" }, { "code": null, "e": 26258, "s": 26171, "text": "Given a NxM matrix. The task is to find the maximum element in this matrix.Examples: " }, { "code": null, "e": 26531, "s": 26258, "text": "Inp...
Cartesian tree from inorder traversal | Segment Tree - GeeksforGeeks
04 Oct, 2021 Given an in-order traversal of a cartesian tree, the task is to build the entire tree from it. Examples: Input: arr[] = {1, 5, 3} Output: 1 5 3 5 / \ 1 3 Input: arr[] = {3, 7, 4, 8} Output: 3 7 4 8 8 / 7 / \ 3 4 Approach: We have already seen an algorithm here that takes O(NlogN) ti...
[ { "code": null, "e": 25943, "s": 25915, "text": "\n04 Oct, 2021" }, { "code": null, "e": 26038, "s": 25943, "text": "Given an in-order traversal of a cartesian tree, the task is to build the entire tree from it." }, { "code": null, "e": 26049, "s": 26038, "tex...
Check if removing a given edge disconnects a graph - GeeksforGeeks
16 Feb, 2022 Given an undirected graph and an edge, the task is to find if the given edge is a bridge in graph, i.e., removing the edge disconnects the graph. Following are some example graphs with bridges highlighted with red color. One solution is to find all bridges in given graph and then check if given edge is ...
[ { "code": null, "e": 26437, "s": 26409, "text": "\n16 Feb, 2022" }, { "code": null, "e": 26659, "s": 26437, "text": "Given an undirected graph and an edge, the task is to find if the given edge is a bridge in graph, i.e., removing the edge disconnects the graph. Following are som...
strings.Contains Function in Golang with Examples - GeeksforGeeks
31 Dec, 2021 strings.Contains Function in Golang is used to check the given letters present in the given string or not. If the letter is present in the given string, then it will return true, otherwise, return false. Syntax: func Contains(str, substr string) bool Here, str is the original string and substr is the stri...
[ { "code": null, "e": 25653, "s": 25625, "text": "\n31 Dec, 2021" }, { "code": null, "e": 25857, "s": 25653, "text": "strings.Contains Function in Golang is used to check the given letters present in the given string or not. If the letter is present in the given string, then it wi...
Chi-Square Test in R - GeeksforGeeks
30 Jun, 2020 The chi-square test of independence evaluates whether there is an association between the categories of the two variables. There are basically two types of random variables and they yield two types of data: numerical and categorical. Chi-square statistics is used to investigate whether distributions of cat...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n30 Jun, 2020" }, { "code": null, "e": 26973, "s": 26487, "text": "The chi-square test of independence evaluates whether there is an association between the categories of the two variables. There are basically two types of random ...
C# - Reading Lines From a File Until the End of File is Reached - GeeksforGeeks
27 Dec, 2021 Given a file, now our task is to read lines from the file until the end of the file using C#. Before reading the lines from a file we must have some data, so first we need an empty file in our path and then insert lines in our file and then we read lines from a file. So to do this task we use two basic ope...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n27 Dec, 2021" }, { "code": null, "e": 26063, "s": 25547, "text": "Given a file, now our task is to read lines from the file until the end of the file using C#. Before reading the lines from a file we must have some data, so first...
Word Break Problem | DP-32 - GeeksforGeeks
20 Apr, 2022 Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. See following examples for more details. This is a famous Google interview question, also being asked by many other companies now a days. Consider the followin...
[ { "code": null, "e": 26291, "s": 26263, "text": "\n20 Apr, 2022" }, { "code": null, "e": 26577, "s": 26291, "text": "Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. See following e...
Find a peak element in a 2D array in C++
In this tutorial, we are going to write a program that finds the peak element in a 2D array. An element is called a peak element if all the elements around it are smaller than the element. Let's see the steps to solve the problem. Initialize the 2D array with dummy data. Initialize the 2D array with dummy data. Iterate...
[ { "code": null, "e": 1155, "s": 1062, "text": "In this tutorial, we are going to write a program that finds the peak element in a 2D array." }, { "code": null, "e": 1251, "s": 1155, "text": "An element is called a peak element if all the elements around it are smaller than the el...
Count the number of ways to reach Nth stair by taking jumps of 1 to N - GeeksforGeeks
10 Jan, 2022 Given an integer N which depicts the number of stairs, the task is to count the number of ways to reach Nth stair by taking jumps of 1 to N. Examples: Input: N = 2Output: 2Explanation: Two ways to reach are: (1, 1) & (2) Input: N = 3Output: 4 Input: N = 4Output: 8 Approach: In this problem, the number of ...
[ { "code": null, "e": 25452, "s": 25424, "text": "\n10 Jan, 2022" }, { "code": null, "e": 25593, "s": 25452, "text": "Given an integer N which depicts the number of stairs, the task is to count the number of ways to reach Nth stair by taking jumps of 1 to N." }, { "code": ...
Types of Graph
There are various types of graphs depending upon the number of vertices, number of edges, interconnectivity, and their overall structure. We will discuss only a certain few important types of graphs in this chapter. A graph having no edges is called a Null Graph. In the above graph, there are three vertices named 'a', ...
[ { "code": null, "e": 1278, "s": 1062, "text": "There are various types of graphs depending upon the number of vertices, number of edges, interconnectivity, and their overall structure. We will discuss only a certain few important types of graphs in this chapter." }, { "code": null, "e": ...
How could I do simple inference on my Fine-Tuned Transformers NER models? | by Martin Keywood | Towards Data Science
I knew what I wanted to do. I wanted to generate NER in a biomedical domain. I had done it in the wonderful scispaCy package, and even in Transformers via the amazing Simple Transformers, but I wanted to do it in the raw HuggingFace Transformers package. Why? I had it working in scispaCy out the box with their pre-trai...
[ { "code": null, "e": 249, "s": 172, "text": "I knew what I wanted to do. I wanted to generate NER in a biomedical domain." }, { "code": null, "e": 427, "s": 249, "text": "I had done it in the wonderful scispaCy package, and even in Transformers via the amazing Simple Transformers...
Conversational AI with BERT Made Easy | by Brandon Janes | Towards Data Science
For over a year I have been trying to automate appointment scheduling using NLP and python, and I finally got it to work thanks to an amazing free open-source dialogue tool called Rasa. The truth is a year ago, when I started this project, the tools I am using now were hardly available. Certainly not in the easy-to-use...
[ { "code": null, "e": 358, "s": 172, "text": "For over a year I have been trying to automate appointment scheduling using NLP and python, and I finally got it to work thanks to an amazing free open-source dialogue tool called Rasa." }, { "code": null, "e": 887, "s": 358, "text": "...
GATE-CS-2015 (Set 1) - GeeksforGeeks
11 Oct, 2021 She enjoyed herself immensely at the party. (2, 14) (3, 13) (4, 12) (5, 11) Probability = Favorable Outcomes/Total Outcomes Probability = 4/20 = 0.20 Therefore option A is correct Statements: 1. Each step is 3/4 foot high. 2. Each step is 1 foot wide. Flippancy ---> lack of respect or seriousness. A...
[ { "code": null, "e": 27610, "s": 27582, "text": "\n11 Oct, 2021" }, { "code": null, "e": 27654, "s": 27610, "text": "She enjoyed herself immensely at the party." }, { "code": null, "e": 27793, "s": 27654, "text": "(2, 14)\n(3, 13)\n(4, 12)\n(5, 11) \n\nProbabi...
How to add help in the PowerShell function?
When we write a program, people from a non-programming background often expect to get much possible help related to the program. When we write the function and we declare the parameters, people who are unaware of what kind of input the parameter need, generally search for the help first using the Get-Help command and t...
[ { "code": null, "e": 1460, "s": 1062, "text": "When we write a program, people from a non-programming background often expect to get much possible help related to the program. When we write the function and we declare the parameters, people who are unaware of what kind of input the parameter need, g...
Java Concurrency - Overview
Java is a multi-threaded programming language which means we can develop multi-threaded program using Java. A multi-threaded program contains two or more parts that can run concurrently and each part can handle a different task at the same time making optimal use of the available resources specially when your computer ...
[ { "code": null, "e": 2996, "s": 2657, "text": "Java is a multi-threaded programming language which means we can develop multi-threaded program using Java. A multi-threaded program contains two or more parts that can run concurrently and each part can handle a different task at the same time making o...
How to use break and continue statements in Java?
The break statement in Java programming language has the following two usages − When the break statement is encountered inside a loop, the loop is immediately terminated and the program control resumes at the next statement following the loop. It can be used to terminate a case in the switch statement (covered in the n...
[ { "code": null, "e": 1142, "s": 1062, "text": "The break statement in Java programming language has the following two usages −" }, { "code": null, "e": 1306, "s": 1142, "text": "When the break statement is encountered inside a loop, the loop is immediately terminated and the prog...
Bayes’ rule with a simple and practical example | by Tirthajyoti Sarkar | Towards Data Science
Bayes’ theorem (alternatively Bayes’ law or Bayes’ rule) has been called the most powerful rule of probability and statistics. It describes the probability of an event, based on prior knowledge of conditions that might be related to the event. For example, if a disease is related to age, then, using Bayes’ theorem, a p...
[ { "code": null, "e": 415, "s": 171, "text": "Bayes’ theorem (alternatively Bayes’ law or Bayes’ rule) has been called the most powerful rule of probability and statistics. It describes the probability of an event, based on prior knowledge of conditions that might be related to the event." }, { ...
Bootstrap 4 .flex-grow-0|1 class
Use the .flex-grow-0|1 class in Bootstrap to allow a singly lex item to take up rest of the space in the flex. For example, the following takes rest of the space in the right − The above is set by adding flex-grow class for the last flex-item − <div class="d-flex mb-3"> <div class="p-2 bg-danger">P</div> <div class...
[ { "code": null, "e": 1173, "s": 1062, "text": "Use the .flex-grow-0|1 class in Bootstrap to allow a singly lex item to take up rest of the space in the flex." }, { "code": null, "e": 1239, "s": 1173, "text": "For example, the following takes rest of the space in the right −" },...
Mahout - Recommendation
This chapter covers the popular machine learning technique called recommendation, its mechanisms, and how to write an application implementing Mahout recommendation. Ever wondered how Amazon comes up with a list of recommended items to draw your attention to a particular product that you might be interested in! Suppose...
[ { "code": null, "e": 1871, "s": 1705, "text": "This chapter covers the popular machine learning technique called recommendation, its mechanisms, and how to write an application implementing Mahout recommendation." }, { "code": null, "e": 2018, "s": 1871, "text": "Ever wondered ho...
How to get and set form element values with jQuery?
To get a form value with jQuery, you need to use the val() function. To set a form value with jQuery, you need to use the val() function, but to pass it a new value. You can try to run the following code to learn how to get and set form element values with jQuery − Live Demo <!DOCTYPE html> <html> <head> <scri...
[ { "code": null, "e": 1228, "s": 1062, "text": "To get a form value with jQuery, you need to use the val() function. To set a form value with jQuery, you need to use the val() function, but to pass it a new value." }, { "code": null, "e": 1328, "s": 1228, "text": "You can try to r...
Creation of virtual environments using Python
A Python package of a specific version may be needed while developing Python based applications. However if this version of same package is installed for system wide use, it might be conflicting with other application’s requirements. Hence it is desired to have side-by-side environments for each purpose to resolve comp...
[ { "code": null, "e": 1400, "s": 1062, "text": "A Python package of a specific version may be needed while developing Python based applications. However if this version of same package is installed for system wide use, it might be conflicting with other application’s requirements. Hence it is desired...
Setting Y-axis in Matplotlib using Pandas
To set Y-Axis in matplotlib using Pandas, we can take the following steps − Create a dictionary with the keys, x and y. Create a dictionary with the keys, x and y. Create a data frame using Pandas. Create a data frame using Pandas. Plot data points using Pandas plot, with ylim(0, 25) and xlim(0, 15). Plot data points u...
[ { "code": null, "e": 1138, "s": 1062, "text": "To set Y-Axis in matplotlib using Pandas, we can take the following steps −" }, { "code": null, "e": 1182, "s": 1138, "text": "Create a dictionary with the keys, x and y." }, { "code": null, "e": 1226, "s": 1182, ...
Binary Tree to Binary Search Tree Conversion - GeeksforGeeks
12 Jan, 2022 Given a Binary Tree, convert it to a Binary Search Tree. The conversion must be done in such a way that keeps the original structure of Binary Tree. Examples Example 1 Input: 10 / \ 2 7 / \ 8 4 Output: 8 / \ 4 10 / \ ...
[ { "code": null, "e": 37760, "s": 37732, "text": "\n12 Jan, 2022" }, { "code": null, "e": 37910, "s": 37760, "text": "Given a Binary Tree, convert it to a Binary Search Tree. The conversion must be done in such a way that keeps the original structure of Binary Tree. " }, { ...
Check if a key is present in a C++ map or unordered_map - GeeksforGeeks
11 Oct, 2021 A C++ map and unordered_map are initialized to some keys and their respective mapped values. Examples: Input : Map : 1 -> 4, 2 -> 6, 4 -> 6 Check1 : 5, Check2 : 4 Output : 5 : Not present, 4 : Present C++ implementation : map unordered_map // CPP code to check if a// key is present in a map#include <b...
[ { "code": null, "e": 24587, "s": 24559, "text": "\n11 Oct, 2021" }, { "code": null, "e": 24692, "s": 24587, "text": "A C++ map and unordered_map are initialized to some keys and their respective mapped values. Examples: " }, { "code": null, "e": 24791, "s": 24692...
How can competitive programming help you get a job? - GeeksforGeeks
03 Oct, 2018 Let us first know about competitive programming! Competitive Programming Competitive programming is a brain game which take place on the Internet or a local network in which programmers have to code according to the given constraints. Here programmers are referred as competitive coders. Many top notch comp...
[ { "code": null, "e": 25009, "s": 24981, "text": "\n03 Oct, 2018" }, { "code": null, "e": 25058, "s": 25009, "text": "Let us first know about competitive programming!" }, { "code": null, "e": 25082, "s": 25058, "text": "Competitive Programming" }, { "co...
Generate a QR code in Node.js
07 Jun, 2022 In this article, we will discuss how to generate a QR code using Node.js. A QR code is a monochromatic matrix with embedded data that is used in manufacturing industries in order to label the products. Nowadays QR codes are being used for payments in UPI-based apps, some chatting apps like WhatsApp, and in...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2022" }, { "code": null, "e": 597, "s": 28, "text": "In this article, we will discuss how to generate a QR code using Node.js. A QR code is a monochromatic matrix with embedded data that is used in manufacturing industries in or...
PATCH method – Python requests
24 Oct, 2021 Requests library is one of the important aspects of Python for making HTTP requests to a specified URL. This article revolves around how one can make PATCH request to a specified URL using requests.patch() method. Before checking out the PATCH method, let’s figure out what a Http PATCH request is – PATCH...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Oct, 2021" }, { "code": null, "e": 356, "s": 54, "text": "Requests library is one of the important aspects of Python for making HTTP requests to a specified URL. This article revolves around how one can make PATCH request to a speci...
Queue offer() method in Java
26 Sep, 2018 The offer(E e) method of Queue Interface inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions. This method is preferable to add() method since this method does not throws an exception when the capacity of the container is full since it...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Sep, 2018" }, { "code": null, "e": 351, "s": 28, "text": "The offer(E e) method of Queue Interface inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions. This met...
Java Program for How to check if a given number is Fibonacci number?
06 Dec, 2018 Given a number ‘n’, how to check if n is a Fibonacci number. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 141, .. Examples : Input : 8 Output : Yes Input : 34 Output : Yes Input : 41 Output : No Following is an interesting property about Fibonacci numbers that can also be use...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2018" }, { "code": null, "e": 170, "s": 28, "text": "Given a number ‘n’, how to check if n is a Fibonacci number. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 141, .." }, { "code": null, "...
Find the number of divisors of all numbers in the range [1, n]
08 Jun, 2022 Given an integer N. The task is to find the number of divisors of all the numbers in the range [1, N]. Examples: Input: N = 5 Output: 1 2 2 3 2 divisors(1) = 1 divisors(2) = 1 and 2 divisors(3) = 1 and 3 divisors(4) = 1, 2 and 4 divisors(5) = 1 and 5 Input: N = 10 Output: 1 2 2 3 2 4 2 4 3 4 Approach: ...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Jun, 2022" }, { "code": null, "e": 158, "s": 54, "text": "Given an integer N. The task is to find the number of divisors of all the numbers in the range [1, N]. " }, { "code": null, "e": 169, "s": 158, "text": "E...
Convert a Data Frame into a Numeric Matrix in R Programming – data.matrix() Function
16 Jun, 2020 data.matrix() function in R Language is used to create a matrix by converting all the values of a Data Frame into numeric mode and then binding them as a matrix. Syntax: data.matrix(df) Parameters:df: Data frame to be converted. Example 1: # R program to convert a data frame# into a numeric matrix # Cre...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Jun, 2020" }, { "code": null, "e": 215, "s": 53, "text": "data.matrix() function in R Language is used to create a matrix by converting all the values of a Data Frame into numeric mode and then binding them as a matrix." }, { ...
pprint : Data pretty printer in Python
01 Sep, 2021 This article is about a pretty useful built-in module in Python, pprint. The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a well-formatted and more readable way! Let us consider an example: # A python code without pprintimport requests def geocode(address): u...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Sep, 2021" }, { "code": null, "e": 125, "s": 52, "text": "This article is about a pretty useful built-in module in Python, pprint." }, { "code": null, "e": 259, "s": 125, "text": "The pprint module provides a cap...
Draw a smiley face using Graphics in C language
19 Apr, 2021 Prerequisite: graphics.h, How to include graphics.h in CodeBlocks? The task is to write a C program to draw a smiley face using graphics in C.To run the program we have the include the below header file: #include <graphic.h> Approach: We will create a Smiley Face with the help below functions: fillelli...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2021" }, { "code": null, "e": 234, "s": 28, "text": "Prerequisite: graphics.h, How to include graphics.h in CodeBlocks? The task is to write a C program to draw a smiley face using graphics in C.To run the program we have the in...
Why does PHP 5.2+ disallow abstract static class methods ? - GeeksforGeeks
31 May, 2020 Before we answer this question, you must have a clear definition of what exactly is an abstract class, an abstract method and a static method. Abstract Class: In the Object-Oriented programming paradigm, abstraction refers to the process of hiding the internal implementation details of any program and only...
[ { "code": null, "e": 24581, "s": 24553, "text": "\n31 May, 2020" }, { "code": null, "e": 24724, "s": 24581, "text": "Before we answer this question, you must have a clear definition of what exactly is an abstract class, an abstract method and a static method." }, { "code"...
How to position and align a Matplotlib figure legend?
To position and align a matplotlib figure legend, we can take the following steps− Plot line1 and line2 using plot() method. Place a legend on the figure. Use bbox_to_anchor to set the position and make horizontal alignment of the legend elements. To display the figure, use show() method. from matplotlib import pyplot ...
[ { "code": null, "e": 1145, "s": 1062, "text": "To position and align a matplotlib figure legend, we can take the following steps−" }, { "code": null, "e": 1187, "s": 1145, "text": "Plot line1 and line2 using plot() method." }, { "code": null, "e": 1310, "s": 1187,...
C++ Vector Library - assign() Function
The C++ function std::vector::assign() assign new values to the vector elements by replacing old ones. It modifies size of vector if necessary. If memory allocation happens allocation is allocated by internal allocator. Following is the declaration for std::vector::assign() function form std::vector header. template <c...
[ { "code": null, "e": 2747, "s": 2603, "text": "The C++ function std::vector::assign() assign new values to the vector elements by replacing old ones. It modifies size of vector if necessary." }, { "code": null, "e": 2823, "s": 2747, "text": "If memory allocation happens allocatio...
Smallest K digit number divisible by all numbers in given array - GeeksforGeeks
17 Dec, 2021 Given an array arr[]. The task is to create the smallest K digit number divisible by all numbers of arr[]. Examples: Input: arr[] = {2, 3, 5}, N = 3Output: 120Explanation: 120 is divisible by 2, 3 and 5 Input: arr[] = {2, 6, 7, 4, 5}, N = 5Output: 10080 Approach: This problem can be solved by using Lowest ...
[ { "code": null, "e": 24903, "s": 24875, "text": "\n17 Dec, 2021" }, { "code": null, "e": 25010, "s": 24903, "text": "Given an array arr[]. The task is to create the smallest K digit number divisible by all numbers of arr[]." }, { "code": null, "e": 25020, "s": 250...
Chain of Responsibility - Python Design Patterns - GeeksforGeeks
04 Jan, 2022 Chain of Responsibility method is Behavioral design pattern and it is the object-oriented version of if ... elif ... elif ... else and make us capable to rearrange the condition-action blocks dynamically at the run-time. It allows us to pass the requests along the chain of handlers. The processing is simpl...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n04 Jan, 2022" }, { "code": null, "e": 24493, "s": 23901, "text": "Chain of Responsibility method is Behavioral design pattern and it is the object-oriented version of if ... elif ... elif ... else and make us capable to rearrange...
Postfix to Infix in C++
In this problem, we are given expression in postfix form and our task is to print the infix form of the expression. Infix expression is an expression in which the operator is in the middle of operands, like operand operator operand. Postfix expression is an expression in which the operator is after operands, like opera...
[ { "code": null, "e": 1178, "s": 1062, "text": "In this problem, we are given expression in postfix form and our task is to print the infix form of the expression." }, { "code": null, "e": 1295, "s": 1178, "text": "Infix expression is an expression in which the operator is in the ...
Branch prediction macros in GCC - GeeksforGeeks
28 May, 2017 One of the most used optimization techniques in the Linux kernel is ” __builtin_expect”. When working with conditional code (if-else statements), we often know which branch is true and which is not. If compiler knows this information in advance, it can generate most optimized code. Let us see macro definit...
[ { "code": null, "e": 25665, "s": 25637, "text": "\n28 May, 2017" }, { "code": null, "e": 25948, "s": 25665, "text": "One of the most used optimization techniques in the Linux kernel is ” __builtin_expect”. When working with conditional code (if-else statements), we often know whi...
Python | Pandas Series.str.endswith() - GeeksforGeeks
17 Sep, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas endswith() is yet another method to search and filter text data in a Series or a Data ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n17 Sep, 2018" }, { "code": null, "e": 25751, "s": 25537, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages a...
GATE | GATE-CS-2015 (Set 2) | Question 21 - GeeksforGeeks
01 Nov, 2021 Consider the following C function. int fun (int n){ int x=1, k; if (n==1) return x; for (k=1; k < n; ++k) x = x + fun(k) * fun(n – k); return x;} The return value of fun(5) is __________. (A) 0(B) 26(C) 51(D) 71Answer: (C)Explanation: fun(5) = 1 + fun(1) * fun(4) + fun(2) * fun(3) + f...
[ { "code": null, "e": 25717, "s": 25689, "text": "\n01 Nov, 2021" }, { "code": null, "e": 25752, "s": 25717, "text": "Consider the following C function." }, { "code": "int fun (int n){ int x=1, k; if (n==1) return x; for (k=1; k < n; ++k) x = x + fun(k) * fun(n – k)...
PHP | urldecode() Function - GeeksforGeeks
23 May, 2019 The urldecode() function is an inbuilt function in PHP which is used to decode url which is encoded by encoded() function.Syntax: string urldecode( $input ) Parameters: This function accepts single parameter $input which holds the url to be decoded. Return Value: This function returns the decoded string on...
[ { "code": null, "e": 26087, "s": 26059, "text": "\n23 May, 2019" }, { "code": null, "e": 26217, "s": 26087, "text": "The urldecode() function is an inbuilt function in PHP which is used to decode url which is encoded by encoded() function.Syntax:" }, { "code": null, "...
HTML | DOM Input Date disabled Property - GeeksforGeeks
09 Dec, 2021 The Input date disabled property is used to set or return whether a date field should be disabled, or not. An element becomes unusable and un-clickable if it is disabled. Such elements are generally rendered in gray by browsers. The HTML disable attribute is reflected by the Date disabled property.Syntax: ...
[ { "code": null, "e": 26139, "s": 26111, "text": "\n09 Dec, 2021" }, { "code": null, "e": 26448, "s": 26139, "text": "The Input date disabled property is used to set or return whether a date field should be disabled, or not. An element becomes unusable and un-clickable if it is di...