title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to center a div on the screen using jQuery?
To center a div on the screen, use the jQuery centering function jQuery.fn.center. You can try to run the following code to learn how to center a div on the screen: Live Demo <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(d...
[ { "code": null, "e": 1227, "s": 1062, "text": "To center a div on the screen, use the jQuery centering function jQuery.fn.center. You can try to run the following code to learn how to center a div on the screen:" }, { "code": null, "e": 1237, "s": 1227, "text": "Live Demo" }, ...
C# | Deconstructor with Classes - GeeksforGeeks
28 Aug, 2019 In Classes, deconstructor is used in the form of methods to access the class variables outside the class by assigning them into new variables. It is achieved by using out parameters because using out parameters you can have multiple overloads for different values. Also, you are allowed to use multiple deco...
[ { "code": null, "e": 24222, "s": 24194, "text": "\n28 Aug, 2019" }, { "code": null, "e": 24777, "s": 24222, "text": "In Classes, deconstructor is used in the form of methods to access the class variables outside the class by assigning them into new variables. It is achieved by us...
Benefits of inline functions in C++?
C++ inline function is a powerful concept that is commonly used with classes. If a function is inline, the compiler places a copy of the code of that function at each point where the function is called at compile time. Any change to an inline function could require all clients of the function to be recompiled because c...
[ { "code": null, "e": 1281, "s": 1062, "text": "C++ inline function is a powerful concept that is commonly used with classes. If a function is inline, the compiler places a copy of the code of that function at each point where the function is called at compile time." }, { "code": null, "e...
Keras - Dense Layer
Dense layer is the regular deeply connected neural network layer. It is most common and frequently used layer. Dense layer does the below operation on the input and return the output. output = activation(dot(input, kernel) + bias) where, input represent the input data input represent the input data kernel represent th...
[ { "code": null, "e": 2235, "s": 2051, "text": "Dense layer is the regular deeply connected neural network layer. It is most common and frequently used layer. Dense layer does the below operation on the input and return the output." }, { "code": null, "e": 2283, "s": 2235, "text":...
How to use the ErrorAction parameter in PowerShell?
Like ErrorActionPreference variable, ErrorAction parameter works similarly. ErrorAction parameter supported in Advance functions and most of the built-in cmdlets in PowerShell. It is useful to convert the non-terminating error to the terminating error and then you can handle them with try/catch blocks. Supported Values...
[ { "code": null, "e": 1366, "s": 1062, "text": "Like ErrorActionPreference variable, ErrorAction parameter works similarly. ErrorAction parameter supported in Advance functions and most of the built-in cmdlets in PowerShell. It is useful to convert the non-terminating error to the terminating error a...
Finding all the Elements of a Range from Start to End in C# - GeeksforGeeks
28 Jun, 2021 The Range Structure is introduced in C# 8.0. It represents a range that has a start and end indexes. You are allowed to find all the range object starting from the start index to end with the help of All Property provided by the Range struct. This property always returns 0..^0 range.Syntax: public static...
[ { "code": null, "e": 24506, "s": 24478, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24800, "s": 24506, "text": "The Range Structure is introduced in C# 8.0. It represents a range that has a start and end indexes. You are allowed to find all the range object starting from the...
Find the string in grid | Practice | GeeksforGeeks
Given a 2D grid of n*m of characters and a word, find all occurrences of given word in grid. A word can be matched in all 8 directions at any point. Word is said be found in a direction if all characters match in this direction (not in zig-zag form). The 8 directions are, horizontally left, horizontally right, vertical...
[ { "code": null, "e": 610, "s": 238, "text": "Given a 2D grid of n*m of characters and a word, find all occurrences of given word in grid. A word can be matched in all 8 directions at any point. Word is said be found in a direction if all characters match in this direction (not in zig-zag form). The ...
Coloring a Cycle Graph - GeeksforGeeks
20 Aug, 2021 Cycle:- cycle is a path of edges and vertices wherein a vertex is reachable from itself. or in other words, it is a Closed walk. Even Cycle:- In which Even number of vertices is present is known as Even Cycle. Odd Cycle:- In which Odd number of Vertices is present is known as Odd Cycle.Given the number o...
[ { "code": null, "e": 24631, "s": 24603, "text": "\n20 Aug, 2021" }, { "code": null, "e": 24761, "s": 24631, "text": "Cycle:- cycle is a path of edges and vertices wherein a vertex is reachable from itself. or in other words, it is a Closed walk. " }, { "code": null, "...
Quicksort in Python. Introduction to ‘quickSort’ in Python | by Sadrach Pierre, Ph.D. | Towards Data Science
Sorting algorithms are among the most important algorithms in computer science. Sorting involves the task of ordering elements in a list or array. The most common uses of ordering are numerical and lexicographical. In this post, we will discuss how to implement a ‘quickSort’ algorithm in python which we will use to num...
[ { "code": null, "e": 513, "s": 171, "text": "Sorting algorithms are among the most important algorithms in computer science. Sorting involves the task of ordering elements in a list or array. The most common uses of ordering are numerical and lexicographical. In this post, we will discuss how to imp...
MySQL Stored Procedure DEFINER=`root`@`%` is not working in localhost?
First of all, you need to check the host. The host can be ‘localhost’ or ‘%’. Check the existence of user accounts with host − mysql> select user,host from MySQL.user; This will produce the following output − +------------------+-----------+ | user | host | +------------------+-----------+ | Bob ...
[ { "code": null, "e": 1189, "s": 1062, "text": "First of all, you need to check the host. The host can be ‘localhost’ or ‘%’. Check the existence of user accounts with host −" }, { "code": null, "e": 1230, "s": 1189, "text": "mysql> select user,host from MySQL.user;" }, { ...
How to render Pandas DataFrame as HTML Table?
28 Feb, 2022 Pandas in Python has the ability to convert Pandas DataFrame to a table in the HTML web page. pandas.DataFrame.to_html() method is used for render a Pandas DataFrame. Syntax : DataFrame.to_html()Return : Return the html format of a dataframe. Let’s understand with examples: First, create a Dataframe: Pyth...
[ { "code": null, "e": 53, "s": 25, "text": "\n28 Feb, 2022" }, { "code": null, "e": 221, "s": 53, "text": "Pandas in Python has the ability to convert Pandas DataFrame to a table in the HTML web page. pandas.DataFrame.to_html() method is used for render a Pandas DataFrame." }, ...
How to place a thousand separator in MySQL records?
Use the FORMAT() method for this. Let us first create a table − mysql> create table DemoTable -> ( -> Amount DECIMAL(10,2) -> ); Query OK, 0 rows affected (0.45 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values(84848757.60); Query OK, 1 row affected (0.14 sec) my...
[ { "code": null, "e": 1251, "s": 1187, "text": "Use the FORMAT() method for this. Let us first create a table −" }, { "code": null, "e": 1362, "s": 1251, "text": "mysql> create table DemoTable\n -> (\n -> Amount DECIMAL(10,2)\n -> );\nQuery OK, 0 rows affected (0.45 sec)" ...
HTML5 <article> Tag
17 Mar, 2022 The <article> tag is one of the new sectioning element in HTML5. The HTML <article> tag is used to represent an article. More specifically, the content within the <article> tag is independent of the other content of the site (even though it can be related). In other words, The article element represents a ...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Mar, 2022" }, { "code": null, "e": 310, "s": 52, "text": "The <article> tag is one of the new sectioning element in HTML5. The HTML <article> tag is used to represent an article. More specifically, the content within the <article> t...
Ruby | String include? Method
09 Dec, 2019 include? is a String class method in Ruby which is used to return true if the given string contains the given string or character. Syntax: str.include? Parameters: Here, str is the given string. Returns: true if the given string contains the given string or character otherwise false. Example 1: # Ruby prog...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Dec, 2019" }, { "code": null, "e": 159, "s": 28, "text": "include? is a String class method in Ruby which is used to return true if the given string contains the given string or character." }, { "code": null, "e": 180, ...
Python | Adding K to each element in a list of integers
28 Jan, 2019 While working with the Python lists, we can come over a situation in which we require to add the integer k to each element in the list. We possibly need to iterate and add k to each element but that would increase the line of code. Let’s discuss certain shorthands to perform this task. Method #1 : Using Li...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jan, 2019" }, { "code": null, "e": 315, "s": 28, "text": "While working with the Python lists, we can come over a situation in which we require to add the integer k to each element in the list. We possibly need to iterate and add k t...
How to Use cbind in Python?
28 Nov, 2021 In this article, we will discuss cbind in Python. We have seen cbind() function in R Programming language to combine specified Vector, Matrix, or Data Frame by columns. But in Python, there is concat() function which is equivalent to cbind() function of R. Python3 # import pandas moduleimport pandas as pd ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2021" }, { "code": null, "e": 285, "s": 28, "text": "In this article, we will discuss cbind in Python. We have seen cbind() function in R Programming language to combine specified Vector, Matrix, or Data Frame by columns. But in...
Python | Pandas Series.rank()
11 Feb, 2019 Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.rank() function compute numerical da...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Feb, 2019" }, { "code": null, "e": 285, "s": 28, "text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index...
PyQt5 QProgressBar – How to create progress bar ?
22 Apr, 2020 In this article we will see how we can create the progress bar in PyQt5. In order to create progress bar object we will use QProgressBar. A progress bar is a graphical control element used to visualize the progression of an extended computer operation, such as a download, file transfer, or installation. So...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Apr, 2020" }, { "code": null, "e": 190, "s": 52, "text": "In this article we will see how we can create the progress bar in PyQt5. In order to create progress bar object we will use QProgressBar." }, { "code": null, "e":...
Python EasyGUI – Yes No Box
05 Sep, 2020 Yes No Box : It is used to display a window having a two option yes or no in EasyGUI, it can be used where there is a need to get the answer of the question in form of yes or no, it displays two option yes or no for example when we want to ask user weather he is above 18 or not we will use yes no box, it i...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Sep, 2020" }, { "code": null, "e": 425, "s": 28, "text": "Yes No Box : It is used to display a window having a two option yes or no in EasyGUI, it can be used where there is a need to get the answer of the question in form of yes or ...
How to Retrieve the Records Based on a Date from Oracle Database?
28 Oct, 2021 DATE is a SQL-defined data type that is used to store dates in a column, different database management systems store dates in different formats. MySQL uses 3 bytes to store dates. It stores DATE in a format like ‘YYYY-MM-DD’. The DATE value ranges from 1000-01-01 to 9999-12-31. Oracle database management s...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Oct, 2021" }, { "code": null, "e": 385, "s": 28, "text": "DATE is a SQL-defined data type that is used to store dates in a column, different database management systems store dates in different formats. MySQL uses 3 bytes to store da...
Append to JSON file using Python
31 Aug, 2021 The full form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and transfer the data. Python supports JSON through a built-in package called JSON. To use this feature, we import the JSON package in Python scrip...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 Aug, 2021" }, { "code": null, "e": 469, "s": 52, "text": "The full form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and transfer t...
LinkedList clear() Method in Java
10 Dec, 2018 The Java.util.LinkedList.clear() method is used to remove all the elements from a linked list. Using the clear() method only clears all the element from the list and not deletes the list. In other words we can say that the clear() method is used to only empty an existing LinkedList. Syntax: void clear() P...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Dec, 2018" }, { "code": null, "e": 312, "s": 28, "text": "The Java.util.LinkedList.clear() method is used to remove all the elements from a linked list. Using the clear() method only clears all the element from the list and not delet...
Program for Banker’s Algorithm | Set 1 (Safety Algorithm)
28 Jun, 2021 Prerequisite: Banker’s Algorithm The banker’s algorithm is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating the allocation for predetermined maximum possible amounts of all resources, then makes an “s-state” check to test for possible activities, before deciding wh...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jun, 2021" }, { "code": null, "e": 87, "s": 54, "text": "Prerequisite: Banker’s Algorithm" }, { "code": null, "e": 409, "s": 87, "text": "The banker’s algorithm is a resource allocation and deadlock avoidance alg...
Python | Canvas in kivy - GeeksforGeeks
19 Oct, 2021 Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications. ???????? Kivy Tutorial – Learn Kivy with Examples. Canvas: The Canvas ...
[ { "code": null, "e": 41137, "s": 41109, "text": "\n19 Oct, 2021" }, { "code": null, "e": 41374, "s": 41137, "text": "Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application...
Preprocessing Time Series Data for Supervised Machine Learning | by Sijuade Oguntayo | Towards Data Science
We shall be exploring some techniques to transform Time Series data into a structure that can be used with the standard suite of supervised ML models. Time series is a sequence of evenly spaced and ordered data collected at regular intervals. One consequence of this is that there is a potential for correlation between ...
[ { "code": null, "e": 323, "s": 172, "text": "We shall be exploring some techniques to transform Time Series data into a structure that can be used with the standard suite of supervised ML models." }, { "code": null, "e": 516, "s": 323, "text": "Time series is a sequence of evenly...
Set a blue border to an element in Bootstrap
Use the border-primary class to set a blue border to an element. For a blue border, add the class, as if you add it for <div> or any other element − <div class="demo border border-primary"> </div> Let us see an example to set a blue border − Live Demo <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Examp...
[ { "code": null, "e": 1127, "s": 1062, "text": "Use the border-primary class to set a blue border to an element." }, { "code": null, "e": 1211, "s": 1127, "text": "For a blue border, add the class, as if you add it for <div> or any other element −" }, { "code": null, "...
Check if sum of count of digits of array elements is Prime or not - GeeksforGeeks
17 May, 2021 Given an array A[] consisting of N integers, the task is to check if the sum of numbers of digits in each array element is a prime number or not. Examples: Input: A[] = {1, 11, 12}Output: YesExplanation: Count of digits of A[0], A[1] and A[2] are 1, 2, 2 respectively. Therefore, total sum of count of digi...
[ { "code": null, "e": 24716, "s": 24688, "text": "\n17 May, 2021" }, { "code": null, "e": 24862, "s": 24716, "text": "Given an array A[] consisting of N integers, the task is to check if the sum of numbers of digits in each array element is a prime number or not." }, { "co...
C Program to find sum of two numbers without using any operator
In this section we will see how to print the sum of two numbers without using any type of operator into our program. This problem is tricky. To solve this problem we are using minimum width field of printf() statement. For an example if we want to put x number of spaces before “Hello” using printf() we can write this. ...
[ { "code": null, "e": 1179, "s": 1062, "text": "In this section we will see how to print the sum of two numbers without using any type of operator into our program." }, { "code": null, "e": 1498, "s": 1179, "text": "This problem is tricky. To solve this problem we are using minimu...
Components in Angular 8 - GeeksforGeeks
04 Nov, 2020 The component is the basic building block of Angular. It has a selector, template, style, and other properties, and it specifies the metadata required to process the component. Creating a Component in Angular 8: To create a component in any angular application, follow the below steps: Get to the angular a...
[ { "code": null, "e": 24226, "s": 24198, "text": "\n04 Nov, 2020" }, { "code": null, "e": 24404, "s": 24226, "text": "The component is the basic building block of Angular. It has a selector, template, style, and other properties, and it specifies the metadata required to process t...
Program for factorial of a number in C program
Given with the number n the task is to calculate the factorial of a number. Factorial of a number is calculated by multiplying the number with its smallest or equal integer values. Factorial is calculated as − 0! = 1 1! = 1 2! = 2X1 = 2 3! = 3X2X1 = 6 4! = 4X3X2X1= 24 5! = 5X4X3X2X1 = 120 . . . N! = n * (n-1) * (n-2) *...
[ { "code": null, "e": 1243, "s": 1062, "text": "Given with the number n the task is to calculate the factorial of a number. Factorial of a number is calculated by multiplying the number with its smallest or equal integer values." }, { "code": null, "e": 1272, "s": 1243, "text": "F...
Perl eval Function
This function evaluates EXPR at execution time as if EXPR were a separate Perl script. This allows you to use a separate, perhaps user-supplied, piece of Perl script within your program. An eval EXPR statement is evaluated separately each time the function is called. The second form evaluates BLOCK when the rest of the...
[ { "code": null, "e": 2488, "s": 2220, "text": "This function evaluates EXPR at execution time as if EXPR were a separate Perl script. This allows you to use a separate, perhaps user-supplied, piece of Perl script within your program. An eval EXPR statement is evaluated separately each time the funct...
Java & MySQL - Create Table Example
This chapter provides an example on how to create a table using JDBC application. Before executing the following example, make sure you have the following in place − To execute the following example you can replace the username and password with your actual user name and password. To execute the following example you c...
[ { "code": null, "e": 2852, "s": 2686, "text": "This chapter provides an example on how to create a table using JDBC application. Before executing the following example, make sure you have the following in place −" }, { "code": null, "e": 2968, "s": 2852, "text": "To execute the f...
ABB Interview Experience (Placement 2020) - GeeksforGeeks
21 Dec, 2020 I participated in the placement drive of ABB recently for the post of Software Engineer. (Time frame is given below for reference) It was a pool placement drive for four IITs, viz. IIT Bhilai, IIT Dharwad, IIT Goa, and IIT Pallakad. There were in total 87 candidates and only 7 were selected. Out of those...
[ { "code": null, "e": 25215, "s": 25187, "text": "\n21 Dec, 2020" }, { "code": null, "e": 25510, "s": 25215, "text": "I participated in the placement drive of ABB recently for the post of Software Engineer. (Time frame is given below for reference) It was a pool placement drive fo...
How to find consonants in a given string using Java?
One way to find the vowels in a given String is to compare every character in it using the charAt() method with the vowel letters. Live Demo public class FindingConsonants { public static void main(String args[]) { String str = new String("Hi Welcome to Tutorialspoint"); for(int i=0; i<str.length(); i++)...
[ { "code": null, "e": 1193, "s": 1062, "text": "One way to find the vowels in a given String is to compare every character in it using the charAt() method with the vowel letters." }, { "code": null, "e": 1203, "s": 1193, "text": "Live Demo" }, { "code": null, "e": 1686...
Python File readlines() Method
Python file method readlines() reads until EOF using readline() and returns a list containing the lines. If the optional sizehint argument is present, instead of reading up to EOF, whole lines totalling approximately sizehint bytes (possibly after rounding up to an internal buffer size) are read. An empty string is ret...
[ { "code": null, "e": 2542, "s": 2244, "text": "Python file method readlines() reads until EOF using readline() and returns a list containing the lines. If the optional sizehint argument is present, instead of reading up to EOF, whole lines totalling approximately sizehint bytes (possibly after round...
How to add copyright symbol to your HTML document ? - GeeksforGeeks
06 Aug, 2021 Various symbols, including technical, mathematical, and currency symbols aren’t found on a normal keyboard. There are three ways to add such symbols to an HTML document Using HEX CodeUsing HTML CodeUsing HTML Entity Using HEX Code Using HTML Code Using HTML Entity In this article we will illustrate how to ...
[ { "code": null, "e": 24503, "s": 24475, "text": "\n06 Aug, 2021" }, { "code": null, "e": 24611, "s": 24503, "text": "Various symbols, including technical, mathematical, and currency symbols aren’t found on a normal keyboard." }, { "code": null, "e": 24672, "s": 24...
Mirror Android Screen to PC using scrcpy - GeeksforGeeks
01 Oct, 2020 scrcpy is a free and open-source Android screen mirroring application. It is a very lightweight application that provides display and control of Android devices connected over USB or TCP. It doesn’t require any root access. In this article, we are going to see how can we mirror the android device’s screen ...
[ { "code": null, "e": 25251, "s": 25223, "text": "\n01 Oct, 2020" }, { "code": null, "e": 25568, "s": 25251, "text": "scrcpy is a free and open-source Android screen mirroring application. It is a very lightweight application that provides display and control of Android devices co...
SQL Query to Make Month Wise Report - GeeksforGeeks
15 Sep, 2021 In this article, we will learn SQL Query how to extract data on monthly basis from a table or generate a report Month wise and we will implement it with the help of an example for better understanding. We will follow step by step process. Here we will discuss how to extract data on monthly basis from a tab...
[ { "code": null, "e": 25513, "s": 25485, "text": "\n15 Sep, 2021" }, { "code": null, "e": 25752, "s": 25513, "text": "In this article, we will learn SQL Query how to extract data on monthly basis from a table or generate a report Month wise and we will implement it with the help o...
Elements greater than the previous and next element in an Array - GeeksforGeeks
08 Mar, 2022 Given an array of N integers. The task is to print the elements from the array which are greater than their immediate previous and next elements.Examples : Input : arr[] = {2, 3, 1, 5, 4, 9, 8, 7, 5} Output : 3, 5, 9 In above given example 3 is greater than its left element 2 and right element 1. Simil...
[ { "code": null, "e": 26333, "s": 26305, "text": "\n08 Mar, 2022" }, { "code": null, "e": 26491, "s": 26333, "text": "Given an array of N integers. The task is to print the elements from the array which are greater than their immediate previous and next elements.Examples : " },...
What is the C++ equivalent of sprintf?
The sprint() function is present inside the C and C++ also. This function is used to store something inside a string. The syntax is like the printf() function, the only difference is, we have to specify the string into it. In C++ also, we can do the same by using ostringstream. This ostringstream is basically the outpu...
[ { "code": null, "e": 1285, "s": 1062, "text": "The sprint() function is present inside the C and C++ also. This function is used to store something inside a string. The syntax is like the printf() function, the only difference is, we have to specify the string into it." }, { "code": null, ...
How to convert milliseconds to date format in Android using Kotlin?
This example demonstrates how to convert milliseconds to date format in Android using Kotlin. 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="ut...
[ { "code": null, "e": 1156, "s": 1062, "text": "This example demonstrates how to convert milliseconds to date format in Android using Kotlin." }, { "code": null, "e": 1285, "s": 1156, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all r...
Makefile - Quick Guide
Compiling the source code files can be tiring, especially when you have to include several source files and type the compiling command every time you need to compile. Makefiles are the solution to simplify this task. Makefiles are special format files that help build and manage the projects automatically. For example, ...
[ { "code": null, "e": 2001, "s": 1784, "text": "Compiling the source code files can be tiring, especially when you have to include several source files and type the compiling command every time you need to compile. Makefiles are the solution to simplify this task." }, { "code": null, "e":...
How to iterate over filtered (ng-repeat filter) collection of objects in AngularJS ? - GeeksforGeeks
05 Jan, 2022 The task is to iterate over a collection of objects already filtered by ng-repeat filters and after clicking a button, change some property of only those objects which got filtered. Suppose you have a collection of objects that were filtered by a text search within a title property on each object. Now you ...
[ { "code": null, "e": 24307, "s": 24279, "text": "\n05 Jan, 2022" }, { "code": null, "e": 24753, "s": 24307, "text": "The task is to iterate over a collection of objects already filtered by ng-repeat filters and after clicking a button, change some property of only those objects w...
Making an arrow with VPython - GeeksforGeeks
08 Jun, 2020 VPython makes it easy to create navigable 3D displays and animations, even for those with limited programming experience. Because it is based on Python, it also has much to offer for experienced programmers and researchers. VPython allows users to create objects such as spheres and cones in 3D space and di...
[ { "code": null, "e": 24472, "s": 24444, "text": "\n08 Jun, 2020" }, { "code": null, "e": 25075, "s": 24472, "text": "VPython makes it easy to create navigable 3D displays and animations, even for those with limited programming experience. Because it is based on Python, it also ha...
Short Circuiting Techniques in Python?
A common mistake for people new to programming is a misunderstanding of the way that boolean operators works, which stems from the way the python interpreter reads these expressions. For example, after initially learning about "and " and "or" statements, one might assume that the expression X = (‘x’ or ‘y’) would check...
[ { "code": null, "e": 1599, "s": 1062, "text": "A common mistake for people new to programming is a misunderstanding of the way that boolean operators works, which stems from the way the python interpreter reads these expressions. For example, after initially learning about \"and \" and \"or\" statem...
React Native - ActivityIndicator
In this chapter we will show you how to use the activity indicator in React Native. App component will be used to import and show our ActivityIndicator. import React from 'react' import ActivityIndicatorExample from './activity_indicator_example.js' const Home = () => { return ( <ActivityIndicatorExample /> ...
[ { "code": null, "e": 2428, "s": 2344, "text": "In this chapter we will show you how to use the activity indicator in React Native." }, { "code": null, "e": 2497, "s": 2428, "text": "App component will be used to import and show our ActivityIndicator." }, { "code": null, ...
DFA of a string in which 2nd symbol from RHS is 'a' - GeeksforGeeks
28 Jun, 2020 Prerequisite – Finite Automata IntroductionProblem – Draw deterministic finite automata (DFA) of the language containing the set of all strings over {a, b} in which 2nd symbol from RHS is ‘a’. The strings in which 2nd last symbol is “a” are: aa, ab, aab, aaa, aabbaa, bbbab etc For example: INPUT : baba OU...
[ { "code": null, "e": 24932, "s": 24904, "text": "\n28 Jun, 2020" }, { "code": null, "e": 25125, "s": 24932, "text": "Prerequisite – Finite Automata IntroductionProblem – Draw deterministic finite automata (DFA) of the language containing the set of all strings over {a, b} in whic...
Quick Code to Spruce Up Your Histograms & Scatterplots | by Jennifer McKaig | Towards Data Science
Simple graphs are essential visual tools for data analysis. If you are starting to learn how to make visualizations in Python, there are small adjustments to your graph parameters that will make them stand out. To get started, import the Pyplot and Seaborn libraries. I. Choose Matplotlib colors that brighten up your gr...
[ { "code": null, "e": 440, "s": 172, "text": "Simple graphs are essential visual tools for data analysis. If you are starting to learn how to make visualizations in Python, there are small adjustments to your graph parameters that will make them stand out. To get started, import the Pyplot and Seabor...
Addition and Subtraction of Matrix using pthreads in C/C++
Here we will see how to perform the matrix addition and subtraction using multithreaded environment. The pthread is used to execute multiple threads simultaneously in C or C++. There are two matrices A and B. Order of each matrix is (m x n). Each thread will take each row, and perform addition or subtraction. So for m ...
[ { "code": null, "e": 1239, "s": 1062, "text": "Here we will see how to perform the matrix addition and subtraction using multithreaded environment. The pthread is used to execute multiple threads simultaneously in C or C++." }, { "code": null, "e": 1419, "s": 1239, "text": "There...
What are the uses of this keyword in java?
The "this" keyword in Java is a reference to the object of the current class. Using it, you can refer a field, method or, constructor of a class. As discussed you can refer an instance filed/variable of a class from an instance method or, a constructor using "this" keyword. i.e. If a method has a local variable with t...
[ { "code": null, "e": 1208, "s": 1062, "text": "The \"this\" keyword in Java is a reference to the object of the current class. Using it, you can refer a field, method or, constructor of a class." }, { "code": null, "e": 1338, "s": 1208, "text": "As discussed you can refer an inst...
Replace characters in a string in Arduino
The .replace() function in Arduino allows you to replace a character or a substring with another character/substring in Arduino. Note: This function replaces substrings in the original string itself, and does not return a new string containing the changes. Examples are given in the code below − void setup() { Serial...
[ { "code": null, "e": 1191, "s": 1062, "text": "The .replace() function in Arduino allows you to replace a character or a substring with another character/substring in Arduino." }, { "code": null, "e": 1319, "s": 1191, "text": "Note: This function replaces substrings in the origin...
R - Binomial Distribution
The binomial distribution model deals with finding the probability of success of an event which has only two possible outcomes in a series of experiments. For example, tossing of a coin always gives a head or a tail. The probability of finding exactly 3 heads in tossing a coin repeatedly for 10 times is estimated durin...
[ { "code": null, "e": 2751, "s": 2402, "text": "The binomial distribution model deals with finding the probability of success of an event which has only two possible outcomes in a series of experiments. For example, tossing of a coin always gives a head or a tail. The probability of finding exactly 3...
Cost Accounting - CVP Analysis
Cost-Volume-Profit (CVP) Analysis is also known as Break–Even Analysis. Every business organization works to maximize its profits. With the help of CVP analysis, the management studies the co-relation of profit and the level of production. CVP analysis is concerned with the level of activity where total sales equals th...
[ { "code": null, "e": 2879, "s": 2639, "text": "Cost-Volume-Profit (CVP) Analysis is also known as Break–Even Analysis. Every business organization works to maximize its profits. With the help of CVP analysis, the management studies the co-relation of profit and the level of production." }, { ...
Dynamic Memory Allocation in C - GeeksQuiz
08 Aug, 2018 X: m=malloc(5); m= NULL; 1: using dangling pointers Y: free(n); n->value=5; 2: using uninitialized pointers Z: char *p; *p = ’a’; 3. lost memory is: free(p); p = NULL; Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here. Comment...
[ { "code": null, "e": 27219, "s": 27191, "text": "\n08 Aug, 2018" }, { "code": null, "e": 27393, "s": 27219, "text": "X: m=malloc(5); m= NULL; 1: using dangling pointers\nY: free(n); n->value=5; 2: using uninitialized pointers\nZ: char *p; *p = ’a’; 3. los...
Python | Convert 1D list to 2D list of variable length - GeeksforGeeks
22 May, 2019 Given a 1D list ‘lst’ and list of variable lengths ‘var_lst’, write a Python program to convert the given 1D list to 2D list of given variable lengths. Examples: Input : lst = [1, 2, 3, 4, 5, 6] var_lst = [1, 2, 3] Output : [[1], [2, 3], [4, 5, 6]] Input : lst = ['a', 'b', 'c', 'd', 'e'] v...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n22 May, 2019" }, { "code": null, "e": 24053, "s": 23901, "text": "Given a 1D list ‘lst’ and list of variable lengths ‘var_lst’, write a Python program to convert the given 1D list to 2D list of given variable lengths." }, { ...
What is crypto module in Node.js and how it is used ? - GeeksforGeeks
19 Sep, 2021 Node.js is an open-source and cross-platform runtime environment built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. Node.js supports a large number of third-party modules that help to perform many different kinds of tasks. Crypto module is one of the third-party modu...
[ { "code": null, "e": 25170, "s": 25142, "text": "\n19 Sep, 2021" }, { "code": null, "e": 25713, "s": 25170, "text": "Node.js is an open-source and cross-platform runtime environment built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. Node.js...
Predicting vehicle accident severity using ensemble classifiers and AutoML | by Ranganath Venkataraman | Towards Data Science
INTRODUCTION / BUSINESS PROBLEM This essay details work that uses a publicly available dataset on vehicle accidents registered by the Seattle City Department of Transportation. This work benefits the American public by identifying those factors conducive to various types of traffic incidents, predicting accident severi...
[ { "code": null, "e": 204, "s": 172, "text": "INTRODUCTION / BUSINESS PROBLEM" }, { "code": null, "e": 546, "s": 204, "text": "This essay details work that uses a publicly available dataset on vehicle accidents registered by the Seattle City Department of Transportation. This work...
Python - Algorithm Types
The efficiency and accuracy of algorithms have to be analysed to compare them and choose a specific algorithm for certain scenarios. The process of making this analysis is called Asymptotic analysis. It refers to computing the running time of any operation in mathematical units of computation. For example, the running...
[ { "code": null, "e": 2623, "s": 2327, "text": "The efficiency and accuracy of algorithms have to be analysed to compare them and choose a specific algorithm for certain scenarios. The process of making this analysis is called Asymptotic analysis. It refers to computing the running time of any opera...
How to enable MySQL Query Log?
To enable query log, use the command SET global. You cannot use set general_log in MySQL version 8.0.12 version. If you are using version 8.0.12, then you will get the below given error. Here, we are trying to set general_log to see what error will come − mysql> SET general_log = 1; The following is the output − ERROR ...
[ { "code": null, "e": 1318, "s": 1062, "text": "To enable query log, use the command SET global. You cannot use set general_log in MySQL\nversion 8.0.12 version. If you are using version 8.0.12, then you will get the below given error.\nHere, we are trying to set general_log to see what error will co...
Python program to find the sum of all even and odd digits of an integer list
When it is required to find the sum of all even and odd digits of an integer list, a simple iteration and the ‘modulus’ operator are used. Below is a demonstration of the same − Live Demo my_list = [369, 793, 2848, 4314, 57467] print("The list is :") print(my_list) sum_odd = 0 sum_even = 0 for index in my_list: ...
[ { "code": null, "e": 1201, "s": 1062, "text": "When it is required to find the sum of all even and odd digits of an integer list, a simple iteration and the ‘modulus’ operator are used." }, { "code": null, "e": 1240, "s": 1201, "text": "Below is a demonstration of the same −" }...
Groovy - parseInt()
This method is used to get the primitive data type of a certain String. parseXxx() is a static method and can have one argument or two. static int parseInt(String s) static int parseInt(String s, int radix) s − This is a string representation of decimal. s − This is a string representation of decimal. radix − This ...
[ { "code": null, "e": 2374, "s": 2238, "text": "This method is used to get the primitive data type of a certain String. parseXxx() is a static method and can have one argument or two." }, { "code": null, "e": 2449, "s": 2374, "text": "static int parseInt(String s)\n \nstatic int ...
Intersection of two arrays in Java
The intersection of the two arrays results in those elements that are contained in both of them. If an element is only in one of the arrays, it is not available in the intersection. An example of this is given as follows − Array 1 = 1 2 5 8 9 Array 2 = 2 4 5 9 Intersection = 2 5 9 A program that demonstrates the inte...
[ { "code": null, "e": 1286, "s": 1062, "text": "The intersection of the two arrays results in those elements that are contained in both of them. If an element is only in one of the arrays, it is not available in the intersection. An example of this is given as follows −" }, { "code": null, ...
How to retrieve all nested fields from MongoDB collection?
For this, use aggregate(). Let us create a collection with documents − >db.demo138.insertOne({"Id":101,"PlayerDetails":[{"PlayerName":"Chris","PlayerScore":400},{"PlayerName":"David","PlayerScore":1000}]}); { "acknowledged" : true, "insertedId" : ObjectId("5e31bb9ffdf09dd6d08539a1") } >db.demo138.insertOne({"Id":...
[ { "code": null, "e": 1133, "s": 1062, "text": "For this, use aggregate(). Let us create a collection with documents −" }, { "code": null, "e": 1572, "s": 1133, "text": ">db.demo138.insertOne({\"Id\":101,\"PlayerDetails\":[{\"PlayerName\":\"Chris\",\"PlayerScore\":400},{\"PlayerNa...
CSS | stroke-width Property - GeeksforGeeks
18 Nov, 2019 The stroke-width property is used to set the width of a border in a SVG shape. This property can only be applied to elements that have a shape or are text content elements. Syntax: stroke-width: <length> | <percentage> Property Values: length: It is used to set the stroke width in measurement units. It can...
[ { "code": null, "e": 25296, "s": 25268, "text": "\n18 Nov, 2019" }, { "code": null, "e": 25469, "s": 25296, "text": "The stroke-width property is used to set the width of a border in a SVG shape. This property can only be applied to elements that have a shape or are text content ...
CSS overflow: visible
In the CSS overflow property with value visible, the overflow is not clipped. This is the default. You can try to run the following code to implement CSS overflow: visible property: Live Demo <!DOCTYPE html> <html> <head> <style> div { background-color: orange; width: 250px; ...
[ { "code": null, "e": 1244, "s": 1062, "text": "In the CSS overflow property with value visible, the overflow is not clipped. This is the default. You can try to run the following code to implement CSS overflow: visible property:" }, { "code": null, "e": 1254, "s": 1244, "text": "...
Deploy app using FastApI, Docker and AWS | Towards Data Science
You can visit the final app on rdok.net. The code is open-source on GitHub.This is mostly a procedural article. The purpose is to describe the full process of creating an app without bombarding the reader with code snippets. What’s the app about? The app is called Random Dose of Knowledge and looks like this There are ...
[ { "code": null, "e": 396, "s": 171, "text": "You can visit the final app on rdok.net. The code is open-source on GitHub.This is mostly a procedural article. The purpose is to describe the full process of creating an app without bombarding the reader with code snippets." }, { "code": null, ...
Explain the purpose of render() in ReactJS - GeeksforGeeks
19 Sep, 2021 React.js library has two components: Class components Functional Components Class components uses render function. The ReactDOM.render() function takes two arguments, HTML code and an HTML element. Purpose of render(): React renders HTML to the web page by using a function called render(). The purpose of t...
[ { "code": null, "e": 24349, "s": 24321, "text": "\n19 Sep, 2021" }, { "code": null, "e": 24386, "s": 24349, "text": "React.js library has two components:" }, { "code": null, "e": 24403, "s": 24386, "text": "Class components" }, { "code": null, "e":...
Check if a given point lies inside a Polygon
In this problem, one polygon is given, and a point P is also given. We need to check whether the point is inside the polygon or outside the polygon. For solving it we will draw a straight line from the point P. It extends to the infinity. The line is horizontal, or it is parallel to the x-axis. From that line, we will ...
[ { "code": null, "e": 1211, "s": 1062, "text": "In this problem, one polygon is given, and a point P is also given. We need to check whether the point is inside the polygon or outside the polygon." }, { "code": null, "e": 1358, "s": 1211, "text": "For solving it we will draw a str...
Kotlin - Functions
Kotlin is a statically typed language, hence, functions play a great role in it. We are pretty familiar with function, as we are using function throughout our examples in our last chapters. A function is a block of code which is written to perform a particular task. Functions are supported by all the modern programming...
[ { "code": null, "e": 2807, "s": 2425, "text": "Kotlin is a statically typed language, hence, functions play a great role in it. We are pretty familiar with function, as we are using function throughout our examples in our last chapters. A function is a block of code which is written to perform a par...
Explain Key-events in JavaScript?
The key-events happen whenever a user interacts with keyboard. There are mainly three key event types − keydown, keypress and keyup. Following is the code for key events in JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial...
[ { "code": null, "e": 1195, "s": 1062, "text": "The key-events happen whenever a user interacts with keyboard. There are mainly three key event types − keydown, keypress and keyup." }, { "code": null, "e": 1248, "s": 1195, "text": "Following is the code for key events in JavaScrip...
Generate two output strings depending upon occurrence of character in input string. - GeeksforGeeks
29 Apr, 2021 Given an input string str[], generate two output strings. One of which consists of those character which occurs only once in input string and second which consists of multi-time occurring characters. Output strings must be sorted.Examples: Input : str[] = "geeksforgeeks" Output : String with characters o...
[ { "code": null, "e": 24462, "s": 24434, "text": "\n29 Apr, 2021" }, { "code": null, "e": 24704, "s": 24462, "text": "Given an input string str[], generate two output strings. One of which consists of those character which occurs only once in input string and second which consists...
ArangoDB - Quick Guide
ArangoDB is hailed as a native multi-model database by its developers. This is unlike other NoSQL databases. In this database, the data can be stored as documents, key/value pairs or graphs. And with a single declarative query language, any or all of your data can be accessed. Moreover, different models can be combined...
[ { "code": null, "e": 2467, "s": 1980, "text": "ArangoDB is hailed as a native multi-model database by its developers. This is unlike other NoSQL databases. In this database, the data can be stored as documents, key/value pairs or graphs. And with a single declarative query language, any or all of yo...
Generate Random Point in a Circle in C++
Suppose we have the radius and x-y positions of the center of a circle, we have to write a function called randPoint() which generates a uniform random point in the circle. So there will be some important points that we have to keep in mind − Input and output values are in floating-point. Radius and x-y position of the...
[ { "code": null, "e": 1305, "s": 1062, "text": "Suppose we have the radius and x-y positions of the center of a circle, we have to write a function called randPoint() which generates a uniform random point in the circle. So there will be some important points that we have to keep in mind −" }, { ...
How to animate a change in background color using jQuery on mouseover?
To change background color, use the mouseenter event. The background color change when you place mouse cursor: mouseenter: function(){ $(this).css("background-color", "gray"); } The mouse cursor is placed on the following element: <p class="my">Click and move the mouse pointer to change the background color.</p> You...
[ { "code": null, "e": 1173, "s": 1062, "text": "To change background color, use the mouseenter event. The background color change when you place mouse cursor:" }, { "code": null, "e": 1243, "s": 1173, "text": "mouseenter: function(){\n $(this).css(\"background-color\", \"gray\")...
Accounting Basics - Quick Guide
Accounting is a business language. We can use this language to communicate financial transactions and their results. Accounting is a comprehensive system to collect, analyze, and communicate financial information. The origin of accounting is as old as money. In early days, the number of transactions were very small, so...
[ { "code": null, "e": 2853, "s": 2639, "text": "Accounting is a business language. We can use this language to communicate financial transactions and their results. Accounting is a comprehensive system to collect, analyze, and communicate financial information." }, { "code": null, "e": 34...
Tryit Editor v3.7
Tryit: HTML address element
[]
C# Program to Kill a Thread
Create a thread first and start it − // new thread Thread thread = new Thread(c.display); thread.Start(); Now display the thread and set a stop function to stop the working of the thread − public void display() { while (!flag) { Console.WriteLine("It's Working"); Thread.Sleep(2000); } } public void St...
[ { "code": null, "e": 1099, "s": 1062, "text": "Create a thread first and start it −" }, { "code": null, "e": 1168, "s": 1099, "text": "// new thread\nThread thread = new Thread(c.display);\nthread.Start();" }, { "code": null, "e": 1251, "s": 1168, "text": "Now...
Deadlock, Starvation, and Livelock - GeeksforGeeks
08 Apr, 2022 Prerequisite – Deadlock and Starvation Livelock occurs when two or more processes continually repeat the same interaction in response to changes in the other processes without doing any useful work. These processes are not in the waiting state, and they are running concurrently. This is different from a d...
[ { "code": null, "e": 23945, "s": 23917, "text": "\n08 Apr, 2022" }, { "code": null, "e": 23985, "s": 23945, "text": "Prerequisite – Deadlock and Starvation " }, { "code": null, "e": 24323, "s": 23985, "text": "Livelock occurs when two or more processes continu...
Applications of String indexOf() Method in Java - GeeksforGeeks
23 Sep, 2021 There are four variants of indexOf() method. indexOf(): This method returns the index within this string of the first occurrence of the specified character or -1 if the character does not occur.indexOf(char ch, int start ): This method returns the index within this string of the first occurrence of the spe...
[ { "code": null, "e": 24812, "s": 24784, "text": "\n23 Sep, 2021" }, { "code": null, "e": 24857, "s": 24812, "text": "There are four variants of indexOf() method." }, { "code": null, "e": 25597, "s": 24857, "text": "indexOf(): This method returns the index with...
VBA - Exit For
A Exit For statement is used when we want to exit the For Loop based on certain criteria. When Exit For is executed, the control jumps to the next statement immediately after the For Loop. Following is the syntax for Exit For Statement in VBA. Exit For The following example uses Exit For. If the value of the Counter ...
[ { "code": null, "e": 2124, "s": 1935, "text": "A Exit For statement is used when we want to exit the For Loop based on certain criteria. When Exit For is executed, the control jumps to the next statement immediately after the For Loop." }, { "code": null, "e": 2179, "s": 2124, "t...
How can we find the most recent and most oldest date from a table with the help of MySQL MAX() and MIN() functions?
For getting the most recent date from a table, we need to provide the name of the column, having a date as value, as the argument of MAX() function. Similarly, forgetting the oldest date from a table, we need to provide the name of a column, having a date as value, as the argument of MIN() function. To understand it, c...
[ { "code": null, "e": 1469, "s": 1062, "text": "For getting the most recent date from a table, we need to provide the name of the column, having a date as value, as the argument of MAX() function. Similarly, forgetting the oldest date from a table, we need to provide the name of a column, having a da...
Do Not Use “+” to Join Strings in Python | by Christopher Tao | Towards Data Science
When I start to use Python, it is very intuitive and easy to come out to use the plus operator + to join string, as many programming languages do such as Java. However, soon I realised that many developers seem to like to use the .join() method rather than +. In this article, I’ll introduce what’s the differences betwe...
[ { "code": null, "e": 332, "s": 172, "text": "When I start to use Python, it is very intuitive and easy to come out to use the plus operator + to join string, as many programming languages do such as Java." }, { "code": null, "e": 546, "s": 332, "text": "However, soon I realised t...
Difference between dependencies, devDependencies and peerDependencies - GeeksforGeeks
27 Jan, 2022 Introduction: In every web application project, we have a file called package.json. This file contains all the relevant data regarding the project i.e. metadata. Starting from all the dependencies used to all the version numbers are present in the file. In this way, they are three types of dependencies tha...
[ { "code": null, "e": 25002, "s": 24974, "text": "\n27 Jan, 2022" }, { "code": null, "e": 25400, "s": 25002, "text": "Introduction: In every web application project, we have a file called package.json. This file contains all the relevant data regarding the project i.e. metadata. S...
How to make a GridLayout fit screen size in Android using Kotlin?
This example demonstrates how to make a GridLayout fit screen size in Android using Kotlin. Step 1 − Create a new project in a new project Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" xml...
[ { "code": null, "e": 1154, "s": 1062, "text": "This example demonstrates how to make a GridLayout fit screen size in Android using Kotlin." }, { "code": null, "e": 1201, "s": 1154, "text": "Step 1 − Create a new project in a new project" }, { "code": null, "e": 1266, ...
How to Install psycopg2 Binary Module in Python ? - GeeksforGeeks
05 Oct, 2021 psycopg2 is the most popular PostgreSQL database adapter for the Python programming language. It is a DB API 2.0 compliant PostgressSQL driver that is actively developed. It is designed for heavily multi-threaded applications that create and destroy lots of cursors and create a large number of “INSERTs” or...
[ { "code": null, "e": 24587, "s": 24559, "text": "\n05 Oct, 2021" }, { "code": null, "e": 24906, "s": 24587, "text": "psycopg2 is the most popular PostgreSQL database adapter for the Python programming language. It is a DB API 2.0 compliant PostgressSQL driver that is actively dev...
Higher Order Functions in Scala
15 Apr, 2019 A function is called Higher Order Function if it contains other functions as a parameter or returns a function as an output i.e, the functions that operate with another functions are known as Higher order Functions. It is worth knowing that this higher order function is applicable for functions and methods...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Apr, 2019" }, { "code": null, "e": 549, "s": 28, "text": "A function is called Higher Order Function if it contains other functions as a parameter or returns a function as an output i.e, the functions that operate with another functi...
C program for file Transfer using UDP
30 Jul, 2019 Data can be transferred between two computers using Socket programming in C. Similarly, files can easily be sent using UDP protocol and a simple client/server. Security: Handled by encryption. Protocol : UDPEncryption: XOR encryption Algorithm : 1. The server starts and waits for filename. 2. The client se...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jul, 2019" }, { "code": null, "e": 131, "s": 54, "text": "Data can be transferred between two computers using Socket programming in C." }, { "code": null, "e": 214, "s": 131, "text": "Similarly, files can easily ...
Python | Pandas DataFrame.set_index()
01 Sep, 2020 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 set_index() is a method to set a List, Series or Data frame as index of a Data Frame. I...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Sep, 2020" }, { "code": null, "e": 520, "s": 28, "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 and makes imp...
PyQt5 – How to add an item to the ComboBox ?
22 Apr, 2020 In this article we will see how we can add item to the combo box. By default the combo box has no items in order to add items to the combo box we use addItem method. Combo box will then allow us to choose from the added items. Syntax : combo_box.addItem(item) Argument : It takes string as argument Action p...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 255, "s": 28, "text": "In this article we will see how we can add item to the combo box. By default the combo box has no items in order to add items to the combo box we use addItem method. Combo box...
Implementation of Erdos-Renyi Model on Social Networks
01 Oct, 2020 Prerequisite: Introduction to Social Networks, Erdos-Renyi Model Erdos Renyi model is used to create random networks or graphs on social networking. In the Erdos Reny model, each edge has a fixed probability of being present and being absent independent of the edges in a network. Step 1) Import necessary m...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2020" }, { "code": null, "e": 93, "s": 28, "text": "Prerequisite: Introduction to Social Networks, Erdos-Renyi Model" }, { "code": null, "e": 309, "s": 93, "text": "Erdos Renyi model is used to create random ...
Python | Ellipse (different polygons) in Kivy
21 Sep, 2021 Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications. Kivy Tutorial – Learn Kivy with Examples. Ellipse is a vertex canvas i...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Sep, 2021" }, { "code": null, "e": 265, "s": 28, "text": "Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows, etc. It is basically used to develop the Android application, but it do...
Roots of Unity
01 Sep, 2021 Given a small integer n, print all the n’th roots of unity up to 6 significant digits. We basically need to find all roots of equation xn – 1. Examples: Input : n = 1 Output : 1.000000 + i 0.000000 x - 1 = 0 , has only one root i.e., 1 Input : 2 Output : 1.000000 + i 0.000000 -1.000000 + i 0.000000...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Sep, 2021" }, { "code": null, "e": 195, "s": 52, "text": "Given a small integer n, print all the n’th roots of unity up to 6 significant digits. We basically need to find all roots of equation xn – 1." }, { "code": null, ...
Ternary Operator in Python
24 May, 2022 Ternary operators are also known as conditional expressions are operators that evaluate something based on a condition being true or false. It was added to Python in version 2.5. It simply allows testing a condition in a single line replacing the multiline if-else making the code compact. Syntax : [on_tr...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 May, 2022" }, { "code": null, "e": 343, "s": 52, "text": "Ternary operators are also known as conditional expressions are operators that evaluate something based on a condition being true or false. It was added to Python in version ...
How to refresh parent page on closing a popup ?
07 Aug, 2020 The task is to refresh parent page on closing a popup. The Steps to achieve this are as follows: Create a page.Create a popup.Popup should contain a button that when clicked refreshes parent page.Attach an event listener to that button and listen for click event on that button.Clicking on that button trigg...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Aug, 2020" }, { "code": null, "e": 83, "s": 28, "text": "The task is to refresh parent page on closing a popup." }, { "code": null, "e": 125, "s": 83, "text": "The Steps to achieve this are as follows:" }, { ...
C# String.Contains() Method
The String.Contains() method in C# is used to return a value indicating whether a specified substring occurs within this string. public bool Contains (string val); Above, val is the string to search for. Live Demo using System; public class Demo { public static void Main(String[] args) { string str1 = "Akon";...
[ { "code": null, "e": 1316, "s": 1187, "text": "The String.Contains() method in C# is used to return a value indicating whether a specified substring occurs within this string." }, { "code": null, "e": 1351, "s": 1316, "text": "public bool Contains (string val);" }, { "cod...
what happens when you don’t free memory after using malloc()
05 Oct, 2021 Pre-requisite: Dynamic memory allocation in CThe “malloc” or “memory allocation” method is used to dynamically allocate a single large block of memory with the specified size. It returns a pointer of type void which can be cast into a pointer of any form. It initializes each block with a default garbage va...
[ { "code": null, "e": 53, "s": 25, "text": "\n05 Oct, 2021" }, { "code": null, "e": 374, "s": 53, "text": "Pre-requisite: Dynamic memory allocation in CThe “malloc” or “memory allocation” method is used to dynamically allocate a single large block of memory with the specified size...
Inline media query in React components
21 Feb, 2022 Generally, one can not do inline styling with media queries because React doesn’t allow us to use media queries in inline styling. We can use radium which is a third-party package that enables media queries for inline styling. Creating React Application: Step 1: Create a React application using the followi...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Feb, 2022" }, { "code": null, "e": 279, "s": 52, "text": "Generally, one can not do inline styling with media queries because React doesn’t allow us to use media queries in inline styling. We can use radium which is a third-party pa...
Importance of wait(), notify() and notifyAll() methods in Java?
The threads can communicate with each other through wait(), notify() and notifyAll() methods in Java. These are final methods defined in the Object class and can be called only from within a synchronized context. The wait() method causes the current thread to wait until another thread invokes the notify() or notifyAll(...
[ { "code": null, "e": 1900, "s": 1187, "text": "The threads can communicate with each other through wait(), notify() and notifyAll() methods in Java. These are final methods defined in the Object class and can be called only from within a synchronized context. The wait() method causes the current thr...
Number Guessing Game in Python using Binary Search
01 Jun, 2021 In the number guessing game, the user selects a number within a defined range and then the program guesses the number. If the number guessed is wrong then the user tells the program that is the actual number is greater than the guessed number or not. Similarly, the program again guesses the number until th...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Jun, 2021" }, { "code": null, "e": 522, "s": 28, "text": "In the number guessing game, the user selects a number within a defined range and then the program guesses the number. If the number guessed is wrong then the user tells the p...
Python | Group list elements based on frequency
25 Jun, 2019 Given a list of elements, write a Python program to group list elements and their respective frequency within a tuple. Examples: Input : [1, 3, 4, 4, 1, 5, 3, 1] Output : [(1, 3), (3, 2), (4, 2), (5, 1)] Input : ['x', 'a', 'x', 'y', 'a', 'x'] Output : [('x', 3), ('a', 2), ('y', 1)] Method #1 : List compr...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Jun, 2019" }, { "code": null, "e": 147, "s": 28, "text": "Given a list of elements, write a Python program to group list elements and their respective frequency within a tuple." }, { "code": null, "e": 157, "s": 147, ...