title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Dynamically Resize Buttons When Resizing a Window using Tkinter
Python has many rich libraries for creating and developing GUI-based applications. Tkinter is one of the most commonly used Python libraries for creating GUI-based applications. It has many features like adding widgets and other necessary attributes necessary for creating an application. A button is a widget which can ...
[ { "code": null, "e": 1476, "s": 1187, "text": "Python has many rich libraries for creating and developing GUI-based applications.\nTkinter is one of the most commonly used Python libraries for creating GUI-based\napplications. It has many features like adding widgets and other necessary attributes n...
Check if a Matrix is Invertible
29 Jul, 2021 In linear algebra, an n-by-n square matrix A is called Invertible, if there exists an n-by-n square matrix B such that where ‘In‘ denotes the n-by-n identity matrix. The matrix B is called the inverse matrix of A. A square matrix is Invertible if and only if its determinant is non-zero. Examples: Input...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Jul, 2021" }, { "code": null, "e": 342, "s": 52, "text": "In linear algebra, an n-by-n square matrix A is called Invertible, if there exists an n-by-n square matrix B such that where ‘In‘ denotes the n-by-n identity matrix. The matr...
VB.Net - Basic Controls
An object is a type of user interface element you create on a Visual Basic form by using a toolbox control. In fact, in Visual Basic, the form itself is an object. Every Visual Basic control consists of three important elements − Properties which describe the object, Properties which describe the object, Methods cause...
[ { "code": null, "e": 2665, "s": 2434, "text": "An object is a type of user interface element you create on a Visual Basic form by using a toolbox control. In fact, in Visual Basic, the form itself is an object. Every Visual Basic control consists of three important elements −" }, { "code": ...
Using List as Stack and Queues in Python
In this article, we will learn about Stack & Queue structures in Python 3.x. Or earlier. Here we will discuss the working and modification within these data structures − This includes − Insertion operation (Push, Enqueue)Deletion operation (Pop, Dequeue)Display / Traversing Operation Insertion operation (Push, Enqueue)...
[ { "code": null, "e": 1357, "s": 1187, "text": "In this article, we will learn about Stack & Queue structures in Python 3.x. Or earlier. Here we will discuss the working and modification within these data structures −" }, { "code": null, "e": 1373, "s": 1357, "text": "This include...
How to use Compare-Object in PowerShell?
Compare-Object command in PowerShell is used to compare two objects. Objects can be a variable content, two files, strings, etc. This cmdlet uses few syntaxes to show the difference between objects which is called side indicators. => - Difference in destination object. <= - Difference in reference (source) object. == -...
[ { "code": null, "e": 1293, "s": 1062, "text": "Compare-Object command in PowerShell is used to compare two objects. Objects can be a variable content, two files, strings, etc. This cmdlet uses few syntaxes to show the difference between objects which is called side indicators." }, { "code": ...
How to repair MySQL tables from the command line?
The repair of MySQL tables is only applicable to MyISAM engine type, not for InnoDB. Therefore, we need to change the Engine type to MyISAM. The following is an example. Creating a table mysql> create table RepairTableDemo -> ( -> id int, -> name varchar(100) -> ); Query OK, 0 rows affected (0.51 sec) To co...
[ { "code": null, "e": 1203, "s": 1062, "text": "The repair of MySQL tables is only applicable to MyISAM engine type, not for InnoDB. Therefore, we need to change the Engine type to MyISAM." }, { "code": null, "e": 1232, "s": 1203, "text": "The following is an example." }, { ...
DatePicker in Kotlin - GeeksforGeeks
21 Jan, 2022 Android DatePicker is a user interface control which is used to select the date by day, month and year in our android application. DatePicker is used to ensure that the users will select a valid date.In android DatePicker having two modes, first one to show the complete calendar and second one shows the da...
[ { "code": null, "e": 24063, "s": 24035, "text": "\n21 Jan, 2022" }, { "code": null, "e": 24574, "s": 24063, "text": "Android DatePicker is a user interface control which is used to select the date by day, month and year in our android application. DatePicker is used to ensure tha...
Understanding Neural Networks: What, How and Why? | by Euge Inzaugarat | Towards Data Science
Neural networks is one of the most powerful and widely used algorithms when it comes to the subfield of machine learning called deep learning. At first look, neural networks may seem a black box; an input layer gets the data into the “hidden layers” and after a magic trick we can see the information provided by the out...
[ { "code": null, "e": 501, "s": 47, "text": "Neural networks is one of the most powerful and widely used algorithms when it comes to the subfield of machine learning called deep learning. At first look, neural networks may seem a black box; an input layer gets the data into the “hidden layers” and af...
How to Win in the NFL with Machine Learning | by Rich Folsom | Towards Data Science
You have been hired as the defensive coordinator for the Dallas Cowboys, and you are coaching against the New England Patriots in the Super Bowl. I realize this is a highly unlikely scenario given that the Cowboys don’t look anything like a Super Bowl contender. However, we can still use this as an example project for ...
[ { "code": null, "e": 528, "s": 172, "text": "You have been hired as the defensive coordinator for the Dallas Cowboys, and you are coaching against the New England Patriots in the Super Bowl. I realize this is a highly unlikely scenario given that the Cowboys don’t look anything like a Super Bowl con...
Is it possible to synchronize the string type in Java?
A thread is a piece of code (under execution) in a program, which executes a sub task of the process independently. independent process. In other words, a thread is a light weight process which executes a piece of code independently. If a process has multiple threads running independently at the same time (multi-thread...
[ { "code": null, "e": 1199, "s": 1062, "text": "A thread is a piece of code (under execution) in a program, which executes a sub task of the process independently. independent process." }, { "code": null, "e": 1296, "s": 1199, "text": "In other words, a thread is a light weight pr...
Maximum and minimum sums from two numbers with digit replacements - GeeksforGeeks
05 May, 2021 Given two positive numbers calculate the minimum and maximum possible sums of two numbers. We are allowed to replace digit 5 with digit 6 and vice versa in either or both the given numbers.Examples : Input : x1 = 645 x2 = 666 Output : Minimum Sum: 1100 (545 + 555) Maximum Sum: 1312 (646 + 666) ...
[ { "code": null, "e": 24945, "s": 24917, "text": "\n05 May, 2021" }, { "code": null, "e": 25147, "s": 24945, "text": "Given two positive numbers calculate the minimum and maximum possible sums of two numbers. We are allowed to replace digit 5 with digit 6 and vice versa in either ...
How to create Hover animations on Button ?
05 Mar, 2021 In this project, we are going to create animated buttons using HTML and CSS. In these buttons when we hover over them an emoji get displayed on them for better UX. Glimpse of the Buttons: CDN Link: For button icons, we will use the fontawesome CDN link. Place this link in the script tag. https://kit.fontaw...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Mar, 2021" }, { "code": null, "e": 192, "s": 28, "text": "In this project, we are going to create animated buttons using HTML and CSS. In these buttons when we hover over them an emoji get displayed on them for better UX." }, { ...
Program to Convert Milliseconds to a Date Format in Java
07 Dec, 2021 Given milliseconds. The task is to write a program in Java to convert Milliseconds to a Date which Displays the date in dd MMM yyyy HH:mm:ss:SSS Z format.The Date class in Java internally stores Date in milliseconds. So any date is the number of milliseconds passed since January 1, 1970, 00:00:00 GMT and t...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Dec, 2021" }, { "code": null, "e": 678, "s": 28, "text": "Given milliseconds. The task is to write a program in Java to convert Milliseconds to a Date which Displays the date in dd MMM yyyy HH:mm:ss:SSS Z format.The Date class in Jav...
Minimum steps to make all the elements of the array divisible by 4
27 Oct, 2021 Given an array of size n, the task is to find the minimum number of steps required to make all the elements of the array divisible by 4. A step is defined as removal of any two elements from the array and adding the sum of these elements to the array. Examples: Input: array = {1, 2, 3, 1, 2, 3, 8} Output...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Oct, 2021" }, { "code": null, "e": 316, "s": 52, "text": "Given an array of size n, the task is to find the minimum number of steps required to make all the elements of the array divisible by 4. A step is defined as removal of any t...
How to Execute Multiple SQL Commands on a Database Simultaneously in JDBC?
08 Jun, 2022 Java Database Connectivity also is known as JDBC is an application programming interface in Java that is used to establish connectivity between a Java application and database. JDBC commands can be used to perform SQL operations from the Java application. Demonstrating execution of multiple SQL commands on...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2022" }, { "code": null, "e": 421, "s": 28, "text": "Java Database Connectivity also is known as JDBC is an application programming interface in Java that is used to establish connectivity between a Java application and database...
Logistic Regression From Scratch in Python | by Suraj Verma | Towards Data Science
In this article, we are going to implement the most commonly used Classification algorithm called the Logistic Regression. First, we will understand the Sigmoid function, Hypothesis function, Decision Boundary, the Log Loss function and code them alongside. After that, we will apply the Gradient Descent Algorithm to fi...
[ { "code": null, "e": 429, "s": 171, "text": "In this article, we are going to implement the most commonly used Classification algorithm called the Logistic Regression. First, we will understand the Sigmoid function, Hypothesis function, Decision Boundary, the Log Loss function and code them alongsid...
How do I convert between big-endian and little-endian values in C++?
Here we will see how to convert Little endian value to Big endian or big endian value to little endian in C++. Before going to the actual discussion, we will see what is the big endian and the little endian? In different architectures, the multi-byte data can be stored in two different ways. Sometimes the higher order ...
[ { "code": null, "e": 1270, "s": 1062, "text": "Here we will see how to convert Little endian value to Big endian or big endian value to little endian in C++. Before going to the actual discussion, we will see what is the big endian and the little endian?" }, { "code": null, "e": 1537, ...
How to override only few methods of interface in Java?
Once you implement an interface from a concrete class you need to provide implementation to all its methods. If you try to skip implementing methods of an interface at compile time an error would be generated. Live Demo interface MyInterface{ public void sample(); public void display(); } public class InterfaceE...
[ { "code": null, "e": 1272, "s": 1062, "text": "Once you implement an interface from a concrete class you need to provide implementation to all its methods. If you try to skip implementing methods of an interface at compile time an error would be generated." }, { "code": null, "e": 1283, ...
Ansible - Ad hoc Commands
Ad hoc commands are commands which can be run individually to perform quick functions. These commands need not be performed later. For example, you have to reboot all your company servers. For this, you will run the Adhoc commands from ‘/usr/bin/ansible’. These ad-hoc commands are not used for configuration management ...
[ { "code": null, "e": 1922, "s": 1791, "text": "Ad hoc commands are commands which can be run individually to perform quick functions. These commands need not be performed later." }, { "code": null, "e": 2047, "s": 1922, "text": "For example, you have to reboot all your company se...
Count of elements of an array present in every row of NxM matrix - GeeksforGeeks
26 May, 2021 Given N rows with M elements each and an array arr[] of L numbers, the task is to print the count of elements of that array present in every row of the matrix. Examples: Input: {8 27 39 589 23 23 34 589 12 45 939 32 27 12 78 23 349 48 21 32}, arr[] = {589, 39, 27}...
[ { "code": null, "e": 25420, "s": 25392, "text": "\n26 May, 2021" }, { "code": null, "e": 25592, "s": 25420, "text": "Given N rows with M elements each and an array arr[] of L numbers, the task is to print the count of elements of that array present in every row of the matrix. Exa...
MySQL query to extract first word from a field?
To extract first word from a field, use in-built SUBSTRING_INDEX() function. The syntax is as follows − SELECT SUBSTRING_INDEX(yourColumnName,’ ‘,1) as anyVariableName from yourTableName; In the above query, if you use -1 in place of 1 then you will get the last word. To understand the above concept, let us create a ta...
[ { "code": null, "e": 1166, "s": 1062, "text": "To extract first word from a field, use in-built SUBSTRING_INDEX() function. The syntax is as follows −" }, { "code": null, "e": 1250, "s": 1166, "text": "SELECT SUBSTRING_INDEX(yourColumnName,’ ‘,1) as anyVariableName from yourTable...
How to Launch Jupyter Notebook Quickly | by Benjamin Dornel | Towards Data Science
Jupyter Notebook is a great tool for data science but can be pretty slow if you constantly need to navigate through multiple directories before launching a notebook file, or if you’re using a clunky GUI like Anaconda Navigator to get to your files. Today, I’ll be covering how to use Windows File Explorer, Command Promp...
[ { "code": null, "e": 420, "s": 171, "text": "Jupyter Notebook is a great tool for data science but can be pretty slow if you constantly need to navigate through multiple directories before launching a notebook file, or if you’re using a clunky GUI like Anaconda Navigator to get to your files." }, ...
Convert a 1D array to a 2D Numpy array
13 Jan, 2021 Numpy is a Python package that consists of multidimensional array objects and a collection of operations or routines to perform various operations on the array and processing of the array. This package consists of a function called numpy.reshape which is used to convert a 1-D array into a 2-D array of requ...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jan, 2021" }, { "code": null, "e": 470, "s": 52, "text": "Numpy is a Python package that consists of multidimensional array objects and a collection of operations or routines to perform various operations on the array and processing...
Lightweight Directory Access Protocol (LDAP)
21 Jun, 2019 Lightweight Directory Access Protocol (LDAP) is an internet protocol works on TCP/IP, used to access information from directories. LDAP protocol is basically used to access an active directory. Features of LDAP: Functional model of LDAP is simpler due to this it omits duplicate, rarely used and esoteric fe...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jun, 2019" }, { "code": null, "e": 222, "s": 28, "text": "Lightweight Directory Access Protocol (LDAP) is an internet protocol works on TCP/IP, used to access information from directories. LDAP protocol is basically used to access an...
How do we create multiline comments in Python?
23 Sep, 2021 Comments are pieces of information present in the middle of code that allows a developer to explain his work to other developers. They make the code more readable and hence easier to debug. An inline comment is a single line comment and is on the same line as a statement. They are created by putting a ‘#’...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Sep, 2021" }, { "code": null, "e": 219, "s": 28, "text": "Comments are pieces of information present in the middle of code that allows a developer to explain his work to other developers. They make the code more readable and hence ea...
How to select and upload multiple files with HTML and PHP, using HTTP POST?
07 Aug, 2021 In this article, we will look at how to upload multiple files with HTML and PHP. Multiple image upload allows the user to select multiple files at once and upload all files to the server. index.html Create a simple HTML page to select multiple files and submit it to upload files on the server. Here, the HT...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Aug, 2021" }, { "code": null, "e": 240, "s": 52, "text": "In this article, we will look at how to upload multiple files with HTML and PHP. Multiple image upload allows the user to select multiple files at once and upload all files t...
Python | Carousel Widget In Kivy
06 Feb, 2020 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. The Carousel widget provides...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Feb, 2020" }, { "code": null, "e": 264, "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 doe...
How to remove portion of a string after a certain character in PHP?
21 Feb, 2019 The substr() and strpos() function is used to remove portion of string after certain character.strpos() function: This function is used to find the first occurrence position of a string inside another string. Function returns an integer value of position of first occurrence of string. Function treats upper...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Feb, 2019" }, { "code": null, "e": 380, "s": 28, "text": "The substr() and strpos() function is used to remove portion of string after certain character.strpos() function: This function is used to find the first occurrence position o...
GATE | GATE CS 2011 | Question 7
28 Jun, 2021 A company needs to develop digital signal processing software for one of its newest inventions. The software is expected to have 40000 lines of code. The company needs to determine the effort in person-months needed to develop this software using the basic COCOMO model. The multiplicative factor for this m...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 647, "s": 28, "text": "A company needs to develop digital signal processing software for one of its newest inventions. The software is expected to have 40000 lines of code. The company needs to dete...
STRCMP() Function in MySQL
11 Jan, 2021 STRCMP() function in MySQL is used to compare two strings. If both of the strings are same then it returns 0, if the first argument is smaller than the second according to the defined order it returns -1 and it returns 1 when the second one is smaller the first one. Syntax : STRCMP(Str1, Str2) Parameter : ...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jan, 2021" }, { "code": null, "e": 295, "s": 28, "text": "STRCMP() function in MySQL is used to compare two strings. If both of the strings are same then it returns 0, if the first argument is smaller than the second according to the...
tellg() function in C++ with example
05 Jun, 2018 The tellg() function is used with input streams, and returns the current “get” position of the pointer in the stream. It has no parameters and returns a value of the member type pos_type, which is an integer data type representing the current position of the get stream pointer. Syntax:- pos_type tellg(); ...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Jun, 2018" }, { "code": null, "e": 307, "s": 28, "text": "The tellg() function is used with input streams, and returns the current “get” position of the pointer in the stream. It has no parameters and returns a value of the member ty...
Generating RGBA portable graphic images through C++ - GeeksforGeeks
23 May, 2020 PNG images are capable of supporting multiple image properties such as multiple colors, degree of transparency, Gamma correction, Lossless compression, etc. PNG images are widely used and preferred for numerous types of images. For working with PNG files we will be using the PNGwriter platform-independent,...
[ { "code": null, "e": 24201, "s": 24173, "text": "\n23 May, 2020" }, { "code": null, "e": 24429, "s": 24201, "text": "PNG images are capable of supporting multiple image properties such as multiple colors, degree of transparency, Gamma correction, Lossless compression, etc. PNG im...
How to create PySpark dataframe with schema ? - GeeksforGeeks
09 May, 2021 In this article, we will discuss how to create the dataframe with schema using PySpark. In simple words, the schema is the structure of a dataset or dataframe. For creating the dataframe with schema we are using: Syntax: spark.createDataframe(data,schema) Parameter: data – list of values on which dataframe...
[ { "code": null, "e": 23925, "s": 23897, "text": "\n09 May, 2021" }, { "code": null, "e": 24085, "s": 23925, "text": "In this article, we will discuss how to create the dataframe with schema using PySpark. In simple words, the schema is the structure of a dataset or dataframe." ...
Generating random number in a range in C
Here we will see how to generate random number in given range using C. To solve this problem, we will use the srand() function. The current time will be used to seed the srad() function. This function cannot generate random number in any range, it can generate number between 0 to some value. So for it, we have to follo...
[ { "code": null, "e": 1249, "s": 1062, "text": "Here we will see how to generate random number in given range using C. To solve this problem, we will use the srand() function. The current time will be used to seed the srad() function." }, { "code": null, "e": 1504, "s": 1249, "tex...
Using Python in Power BI. Step by step guide on how to enable... | by Tommi Ranta | Towards Data Science
Since April 2019 Python integration has been generally available in Power BI. Just as with the R support you can now use Python for importing data, data transformation and data visualization. In this article we will step by step prepare a Python environment, enable Python in Power BI, import data and apply clustering t...
[ { "code": null, "e": 711, "s": 171, "text": "Since April 2019 Python integration has been generally available in Power BI. Just as with the R support you can now use Python for importing data, data transformation and data visualization. In this article we will step by step prepare a Python environme...
Getter and Setter in Python - GeeksforGeeks
04 Dec, 2019 In Python, getters and setters are not the same as those in other object-oriented programming languages. Basically, the main purpose of using getters and setters in object-oriented programs is to ensure data encapsulation. Private variables in python are not actually hidden fields like in other object orie...
[ { "code": null, "e": 23761, "s": 23733, "text": "\n04 Dec, 2019" }, { "code": null, "e": 24135, "s": 23761, "text": "In Python, getters and setters are not the same as those in other object-oriented programming languages. Basically, the main purpose of using getters and setters i...
What is ComponentWillMount() method in ReactJS ? - GeeksforGeeks
31 Oct, 2021 React requires several components to represent a unit of logic for specific functionality. The componentWillMount lifecycle hook is an ideal choice when it comes to updating business logic, app configuration updates, and API calls. The componentWillMount() lifecycle hook is primarily used to implement ser...
[ { "code": null, "e": 24423, "s": 24395, "text": "\n31 Oct, 2021" }, { "code": null, "e": 24656, "s": 24423, "text": "React requires several components to represent a unit of logic for specific functionality. The componentWillMount lifecycle hook is an ideal choice when it comes t...
Building Recommendation Engines using Pandas - GeeksforGeeks
04 Jan, 2022 In this article, we learn how to build a basic recommendation engine from scratch using Pandas. A Recommendation Engine or Recommender Systems or Recommender Systems is a system that predicts or filters preferences according to each user’s likings. Recommender systems supervise delivering an index of sugge...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n04 Jan, 2022" }, { "code": null, "e": 24388, "s": 24292, "text": "In this article, we learn how to build a basic recommendation engine from scratch using Pandas." }, { "code": null, "e": 24662, "s": 24388, "te...
ExpressJS - Form data
Forms are an integral part of the web. Almost every website we visit offers us forms that submit or fetch some information for us. To get started with forms, we will first install the body-parser(for parsing JSON and url-encoded data) and multer(for parsing multipart/form data) middleware. To install the body-parser an...
[ { "code": null, "e": 2352, "s": 2061, "text": "Forms are an integral part of the web. Almost every website we visit offers us forms that submit or fetch some information for us. To get started with forms, we will first install the body-parser(for parsing JSON and url-encoded data) and multer(for par...
DOM - Element Object Method - setAttributeNS
The method setAttributeNS adds a new attribute. If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value parameter. Following is the syntax for the usage of the setAttributeNS ...
[ { "code": null, "e": 2548, "s": 2288, "text": "The method setAttributeNS adds a new attribute. If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value para...
floor() and ceil() function Python - GeeksforGeeks
28 Oct, 2021 floor() method in Python returns the floor of x i.e., the largest integer not greater than x. Syntax: import math math.floor(x) Parameter: x-numeric expression. Returns: largest integer not greater than x. Below is the Python implementation of floor() method: Python # Python program to demonstrate t...
[ { "code": null, "e": 23979, "s": 23951, "text": "\n28 Oct, 2021" }, { "code": null, "e": 24074, "s": 23979, "text": "floor() method in Python returns the floor of x i.e., the largest integer not greater than x. " }, { "code": null, "e": 24191, "s": 24074, "tex...
Progression - Solved Examples
Q 1 - Locate the ninth term and sixteenth term of the A.P. 5,8,11, 14, 17... A - 40 B - 50 C - 60 D - 70 Answer - B Explanation In the given A.P. we have a=5, d= (8-5) = 3 ∴ Tn= a+ (n-1) d= 5+ (n-1)3 = 3n+2 T16= (3*16+2) = 50 Q 2 - Which term of the A.P. 4,9,14, 19 ... is 109? A - 22nd B - 23rd C - 24th D - 25th ...
[ { "code": null, "e": 3969, "s": 3892, "text": "Q 1 - Locate the ninth term and sixteenth term of the A.P. 5,8,11, 14, 17..." }, { "code": null, "e": 3976, "s": 3969, "text": "A - 40" }, { "code": null, "e": 3983, "s": 3976, "text": "B - 50" }, { "code"...
PHP - Facebook Login
We can use Facebook login to allow the users to get access into the websites. This page will explain you about login with facebook PHP SDK. Need to go https://developers.facebook.com/apps/ and click on add a new group button to make the app ID. Need to go https://developers.facebook.com/apps/ and click on add a new gro...
[ { "code": null, "e": 2897, "s": 2757, "text": "We can use Facebook login to allow the users to get access into the websites. This page will explain you about login with facebook PHP SDK." }, { "code": null, "e": 3002, "s": 2897, "text": "Need to go https://developers.facebook.com...
How do I run a command on an already existing Docker container?
Suppose you have already created a Docker container previously and have worked with it. Now, you have stopped the container. So, the container is in exited state. What if you want to run a command inside the container? Typically, there can be two cases. Either the container is stopped using the Docker stop command or t...
[ { "code": null, "e": 1281, "s": 1062, "text": "Suppose you have already created a Docker container previously and have worked with it. Now, you have stopped the container. So, the container is in exited state. What if you want to run a command inside the container?" }, { "code": null, "e...
string.char() function in Lua programming
There are so many scenarios where you might want to convert a decimal value into a character representation. The character representation of a decimal or integer value is nothing but the character value, which one can interpret using the ASCII table. In Lua, to convert a decimal value to its internal character value we...
[ { "code": null, "e": 1313, "s": 1062, "text": "There are so many scenarios where you might want to convert a decimal value into a character representation. The character representation of a decimal or integer value is nothing but the character value, which one can interpret using the ASCII table." ...
Explain the Mandatory Attribute in PowerShell Advanced Function.
We have an example of PowerShell advanced function below and we will try to understand how mandatory parameter works. function math_Operation{ [cmdletbinding()] param([int]$val1,[int]$val2) Write-Host "Multiply : $($val1*$val2)" Write-Host "Addition : $($val1+$val2)" Write-Host "Subtraction : $($val1-$va...
[ { "code": null, "e": 1180, "s": 1062, "text": "We have an example of PowerShell advanced function below and we will try to understand how mandatory parameter works." }, { "code": null, "e": 1429, "s": 1180, "text": "function math_Operation{\n [cmdletbinding()]\n param([int]$v...
How can Keras be used to load weights from checkpoint and re-evaluate the model using Python?
Tensorflow is a machine learning framework that is provided by Google. It is an open−source framework used in conjunction with Python to implement algorithms, deep learning applications and much more. It is used in research and for production purposes. The ‘tensorflow’ package can be installed on Windows using the belo...
[ { "code": null, "e": 1315, "s": 1062, "text": "Tensorflow is a machine learning framework that is provided by Google. It is an open−source framework used in conjunction with Python to implement algorithms, deep learning applications and much more. It is used in research and for production purposes."...
How to implement Multithreaded queue With Python
In this example, we will create a task queue that holds all the tasks to be executed and a thread pool that interacts with the queue to process its elements individually. We will begin with the question, what is a Queue?. A queue is a data structure that is a collection of different elements maintained in a very specif...
[ { "code": null, "e": 1233, "s": 1062, "text": "In this example, we will create a task queue that holds all the tasks to be executed and a thread pool that interacts with the queue to process its elements individually." }, { "code": null, "e": 1438, "s": 1233, "text": "We will beg...
How to check if a service is running on Android?
Before getting into example, we should know what service is in android. Service is going to do back ground operation without interact with UI and it works even after activity destroy. This example demonstrate about How to check if a service is running on Android. Step 1 − Create a new project in Android Studio, go to F...
[ { "code": null, "e": 1246, "s": 1062, "text": "Before getting into example, we should know what service is in android. Service is going to do back ground operation without interact with UI and it works even after activity destroy." }, { "code": null, "e": 1326, "s": 1246, "text":...
How to listen for a WebView finishing loading a URL in Android?
This example demonstrates how do I listen for a webview finishing loading a URL 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. <RelativeLayout xmlns:android="http...
[ { "code": null, "e": 1154, "s": 1062, "text": "This example demonstrates how do I listen for a webview finishing loading a URL in android." }, { "code": null, "e": 1282, "s": 1154, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all requ...
Java program for Multiplication of Array elements.
To find the product of elements of an array. create an empty variable. (product) Initialize it with 1. In a loop traverse through each element (or get each element from user) multiply each element to product. Print the product. Live Demo import java.util.Arrays; import java.util.Scanner; public class ProductOfArrayOfE...
[ { "code": null, "e": 1107, "s": 1062, "text": "To find the product of elements of an array." }, { "code": null, "e": 1143, "s": 1107, "text": "create an empty variable. (product)" }, { "code": null, "e": 1165, "s": 1143, "text": "Initialize it with 1." }, ...
How to create EditText with rounded corners in Android?
This example demonstrates how to create EditText with rounded corners 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"?> <Line...
[ { "code": null, "e": 1144, "s": 1062, "text": "This example demonstrates how to create EditText with rounded corners in Android." }, { "code": null, "e": 1273, "s": 1144, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required deta...
Naïve Bayes Spam Filter — From Scratch | by Mark Garvey | Towards Data Science
Probability is all around us. It's in the weather updates we receive daily, to sports team strategies we see on TV, to insurance premiums we purchase. It is also heavily prevalent in the field of Machine Learning, as one of the mathematical driving forces powering modern algorithms. It also powers earlier algorithms, s...
[ { "code": null, "e": 456, "s": 172, "text": "Probability is all around us. It's in the weather updates we receive daily, to sports team strategies we see on TV, to insurance premiums we purchase. It is also heavily prevalent in the field of Machine Learning, as one of the mathematical driving forces...
JavaScript - Check if value is a percentage?
Let’s say the following is our value − var value="97%"; To check the value for percentage, use regular expression. Following is the code − var value="97%"; var result=/^\d+(\.\d+)?%$/.test(value); if (result==true) { console.log("The percent is="+value); } else { console.log("This is not percentage"); } var v...
[ { "code": null, "e": 1101, "s": 1062, "text": "Let’s say the following is our value −" }, { "code": null, "e": 1118, "s": 1101, "text": "var value=\"97%\";" }, { "code": null, "e": 1177, "s": 1118, "text": "To check the value for percentage, use regular expres...
How to add a new row to JTable with insertRow() in Java Swing
Let us first create a table with DefaulTabelMode − DefaultTableModel tableModel = new DefaultTableModel(); JTable table = new JTable(tableModel); Now, add a column to the table − tableModel.addColumn("Languages"); The insertRow() method will now add a row − tableModel.insertRow(0, new Object[] { "CSS" }); tableModel.in...
[ { "code": null, "e": 1113, "s": 1062, "text": "Let us first create a table with DefaulTabelMode −" }, { "code": null, "e": 1208, "s": 1113, "text": "DefaultTableModel tableModel = new DefaultTableModel();\nJTable table = new JTable(tableModel);" }, { "code": null, "e"...
What is the use of -Force parameter in Get-ChildItem in PowerShell?
To display files along with hidden files, you need to use –Force parameter. Get-ChildItem D:\Temp\ -Force If you see the above output, hiddenfile.xlsx is the hidden file and same can be identified with the mode where –a-h—attribute of the file. You can also use this parameter with –Recurse or –Depth. Get-ChildItem D:\T...
[ { "code": null, "e": 1138, "s": 1062, "text": "To display files along with hidden files, you need to use –Force parameter." }, { "code": null, "e": 1168, "s": 1138, "text": "Get-ChildItem D:\\Temp\\ -Force" }, { "code": null, "e": 1307, "s": 1168, "text": "If ...
Display array structure and values in PHP 7
An array in PHP is a type of data structure that can store multiple elements of similar data type under a single variable. To display array structure and values in PHP, we can use two functions. We can use var_dump() or print_r() to display the values of an array in human-readable format or to see the output value of t...
[ { "code": null, "e": 1185, "s": 1062, "text": "An array in PHP is a type of data structure that can store multiple elements of similar data type under a single variable." }, { "code": null, "e": 1400, "s": 1185, "text": "To display array structure and values in PHP, we can use tw...
Aquatone - Tool for domain flyovers - GeeksforGeeks
27 Jan, 2022 AQUATONE is a set of tools used for performing reconnaissance, scanning, and discovery o domain names. AQUATONE can discover subdomains on a given target domain using OSINT source and the most common domain brute force method. After discovering the subdomain, the AQUATONE tool can scan the domain for stand...
[ { "code": null, "e": 24406, "s": 24378, "text": "\n27 Jan, 2022" }, { "code": null, "e": 24872, "s": 24406, "text": "AQUATONE is a set of tools used for performing reconnaissance, scanning, and discovery o domain names. AQUATONE can discover subdomains on a given target domain us...
Multiple Time Series Forecast & Demand Pattern Classification using R — Part 2 | by Gouthaman Tharmathasan | Towards Data Science
Ensemble, ARIMA, ETS, Dynamic Harmonic Regression, Time Series Linear Regression, STL Decomposition ETS, Holt’s Linear, Holt’s Linear Damp, Simple Exponential Smoothing, Drift, Seasonal NAIVE, NAIVE, CROSTON, SBA This is a continuation of my previous blog. In the previous blog, we looked at how we perform basic data pr...
[ { "code": null, "e": 384, "s": 171, "text": "Ensemble, ARIMA, ETS, Dynamic Harmonic Regression, Time Series Linear Regression, STL Decomposition ETS, Holt’s Linear, Holt’s Linear Damp, Simple Exponential Smoothing, Drift, Seasonal NAIVE, NAIVE, CROSTON, SBA" }, { "code": null, "e": 606, ...
Aurelia - Custom Elements
Aurelia offers a way to add components dynamically. You can reuse a single component on different parts of your app without the need to include HTML multiple times. In this chapter, you will learn how to achieve this. Let's create new components directory inside src folder. C:\Users\username\Desktop\aureliaApp\src>mkdi...
[ { "code": null, "e": 2383, "s": 2165, "text": "Aurelia offers a way to add components dynamically. You can reuse a single component on different parts of your app without the need to include HTML multiple times. In this chapter, you will learn how to achieve this." }, { "code": null, "e"...
C++ Queue Library - operator== Function
The C++ function std::queue::operator== tests whether two queues are equal or not. Comparison is done by applying corresponding operator to the underlying container. Following is the declaration for std::queue::operator== function form std::queue header. template <class T, class Container> bool operator== (const queue<...
[ { "code": null, "e": 2769, "s": 2603, "text": "The C++ function std::queue::operator== tests whether two queues are equal or not. Comparison is done by applying corresponding operator to the underlying container." }, { "code": null, "e": 2858, "s": 2769, "text": "Following is the...
Tail Recursion in Data Structures
Here we will see what is tail recursion. The tail recursion is basically using the recursive function as the last statement of the function. So when nothing is left to do after coming back from the recursive call, that is called tail recursion. We will see one example of tail recursion. Live Demo #include <iostream> u...
[ { "code": null, "e": 1350, "s": 1062, "text": "Here we will see what is tail recursion. The tail recursion is basically using the recursive function as the last statement of the function. So when nothing is left to do after coming back from the recursive call, that is called tail recursion. We will ...
Program to find lowest sum of pairs greater than given target in Python
Suppose we have a list of numbers called nums and another value target. We have to find the lowest sum of pair of numbers that is larger than target. So, if the input is like nums = [2, 4, 6, 10, 14] target = 10, then the output will be 12, as we pick 2 and 10 To solve this, we will follow these steps − sort the list n...
[ { "code": null, "e": 1212, "s": 1062, "text": "Suppose we have a list of numbers called nums and another value target. We have to find the lowest sum of pair of numbers that is larger than target." }, { "code": null, "e": 1323, "s": 1212, "text": "So, if the input is like nums = ...
Matplotlib.ticker.LogLocator Class in Python
21 Apr, 2020 Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. The matplotlib.ticker.LogLocator class is used to determine the tick locations for log axes. In...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Apr, 2020" }, { "code": null, "e": 240, "s": 28, "text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t...
Matplotlib.axes.Axes.plot() in Python
12 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.Example:...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Apr, 2020" }, { "code": null, "e": 126, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library." }, { "code": null, "e": 336, "s": 126, "text": "The Axes...
Number of ways to form a heap with n distinct integers
09 Jul, 2021 Given n, how many distinct Max Heap can be made from n distinct integers?Examples: Input : n = 3 Output : Assume the integers are 1, 2, 3. Then the 2 possible max heaps are: 3 / \ 1 2 3 / \ 2 1 Input : n = 4 Output : Assume the i...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Jul, 2021" }, { "code": null, "e": 139, "s": 54, "text": "Given n, how many distinct Max Heap can be made from n distinct integers?Examples: " }, { "code": null, "e": 572, "s": 139, "text": "Input : n = 3\nOutpu...
How to remove random symbols in a dataframe in Pandas?
30 Jun, 2021 In this article, we will see how to remove random symbols in a dataframe in Pandas. Method 1: Selecting columns Syntax: dataframe[columns].replace({symbol:},regex=True) First, select the columns which have a symbol that needs to be removed. And inside the method replace() insert the symbol example replace(...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2021" }, { "code": null, "e": 112, "s": 28, "text": "In this article, we will see how to remove random symbols in a dataframe in Pandas." }, { "code": null, "e": 140, "s": 112, "text": "Method 1: Selecting co...
PHP | json_decode() Function
09 May, 2019 The json_decode() function is an inbuilt function in PHP which is used to decode a JSON string. It converts a JSON encoded string into a PHP variable. Syntax: json_decode( $json, $assoc = FALSE, $depth = 512, $options = 0 ) Parameters: This function accepts four parameters as mentioned above and described ...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 May, 2019" }, { "code": null, "e": 179, "s": 28, "text": "The json_decode() function is an inbuilt function in PHP which is used to decode a JSON string. It converts a JSON encoded string into a PHP variable." }, { "code": nu...
Node.js Timers module
08 Oct, 2021 The Timers module in Node.js contains various functions that allow us to execute a block of code or a function after a set period of time. The Timers module is global, we do not need to use require() to import it. Timers module has the following functions: Scheduling Timers: It is used to call a function a...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Oct, 2021" }, { "code": null, "e": 266, "s": 52, "text": "The Timers module in Node.js contains various functions that allow us to execute a block of code or a function after a set period of time. The Timers module is global, we do ...
Draw a Smiley in Java Applet
11 Mar, 2022 Given task is to draw a smiley face in Java Applet.Approach: Create three Ovals, one for the face, two for the eyes.Fill eyes oval with black color.Create an arc for the smile in the face. Create three Ovals, one for the face, two for the eyes. Fill eyes oval with black color. Create an arc for the smile...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Mar, 2022" }, { "code": null, "e": 115, "s": 52, "text": "Given task is to draw a smiley face in Java Applet.Approach: " }, { "code": null, "e": 243, "s": 115, "text": "Create three Ovals, one for the face, two ...
How to convert list to dictionary in Python?
The list is a linear data structure containing data elements. Example 1,2,3,4,5,6 Dictionary is a data structure consisting of key: value pairs. Keys are unique and each key has some value associated with it. Example 1:2, 3:4, 5:6 Given a list, convert this list into the dictionary, such that the odd position elements ...
[ { "code": null, "e": 1249, "s": 1187, "text": "The list is a linear data structure containing data elements." }, { "code": null, "e": 1257, "s": 1249, "text": "Example" }, { "code": null, "e": 1269, "s": 1257, "text": "1,2,3,4,5,6" }, { "code": null, ...
Double colon (::) operator in Java
23 Feb, 2022 The double colon (::) operator, also known as method reference operator in Java, is used to call a method by referring to it with the help of its class directly. They behave exactly as the lambda expressions. The only difference it has from lambda expressions is that this uses direct reference to the metho...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Feb, 2022" }, { "code": null, "e": 418, "s": 54, "text": "The double colon (::) operator, also known as method reference operator in Java, is used to call a method by referring to it with the help of its class directly. They behave ...
How to Change the Number of Open File Limit in Linux?
09 Apr, 2021 If you are an active Linux user, who has to work with many files on Linux at a time then you might have definitely faced a problem regarding “Too many open files” on a Linux system. When you have reached the maximum open file limit you will get an error message displaying “Too many open files (24)” error o...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Apr, 2021" }, { "code": null, "e": 350, "s": 28, "text": "If you are an active Linux user, who has to work with many files on Linux at a time then you might have definitely faced a problem regarding “Too many open files” on a Linux s...
Pafy – Getting Dislike Count of the Video
20 Jul, 2020 In this article we will see how we can get the dislike count of the given youtube video in pafy. Pafy is a python library to download YouTube content and retrieve metadata. Pafy object is the object which contains all the information about the given video. A YouTube video has a like and dislike count meter...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Jul, 2020" }, { "code": null, "e": 390, "s": 28, "text": "In this article we will see how we can get the dislike count of the given youtube video in pafy. Pafy is a python library to download YouTube content and retrieve metadata. Pa...
Python | Check possible bijection between sequence of characters and digits
20 Jun, 2019 Given a string ‘char_seq'(sequence of characters) and a positive integer ‘dig_seq'(sequence of digits), Write a Python program to find possible bijection or one-one onto relationship between ‘char_seq’ and ‘dig_seq’ such that each character matches to one and only one digit. Examples: Input : char_seq = 'b...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Jun, 2019" }, { "code": null, "e": 304, "s": 28, "text": "Given a string ‘char_seq'(sequence of characters) and a positive integer ‘dig_seq'(sequence of digits), Write a Python program to find possible bijection or one-one onto relat...
Transparent window in Tkinter
19 Nov, 2020 Prerequisite: Python GUI – tkinter Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. To create a transparent window, we will use the...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Nov, 2020" }, { "code": null, "e": 63, "s": 28, "text": "Prerequisite: Python GUI – tkinter" }, { "code": null, "e": 288, "s": 63, "text": "Python offers multiple options for developing GUI (Graphical User Interfa...
Reversing a queue using recursion
13 Jun, 2022 Given a queue, write a recursive function to reverse it. Standard operations allowed : enqueue(x) : Add an item x to rear of queue. dequeue() : Remove an item from front of queue. empty() : Checks if a queue is empty or not.Examples : Input : Q = [5, 24, 9, 6, 8, 4, 1, 8, 3, 6] Output : Q = [6, 3, 8, 1, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jun, 2022" }, { "code": null, "e": 289, "s": 52, "text": "Given a queue, write a recursive function to reverse it. Standard operations allowed : enqueue(x) : Add an item x to rear of queue. dequeue() : Remove an item from front of q...
Stream of() method in Java
08 Oct, 2018 Stream of(T t) returns a sequential Stream containing a single element.Syntax : static Stream of(T t) Parameters: This method accepts a mandatory parameter t which is the single element in the Stream. Return Value: Stream of(T t) returns a sequential Stream containing the single specified element. Example...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Oct, 2018" }, { "code": null, "e": 108, "s": 28, "text": "Stream of(T t) returns a sequential Stream containing a single element.Syntax :" }, { "code": null, "e": 131, "s": 108, "text": "static Stream of(T t)\n" ...
Tailwind CSS Float
23 Mar, 2022 This class accepts more than one value in tailwind CSS. It is the alternative to the CSS float property. The float class defines the flow of content for controlling the wrapping of content around an element. Float Classes: float-right float-left float-none float-right: This class is used to make the ele...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Mar, 2022" }, { "code": null, "e": 237, "s": 28, "text": "This class accepts more than one value in tailwind CSS. It is the alternative to the CSS float property. The float class defines the flow of content for controlling the wrappi...
Check if the given two numbers are friendly pair or not
23 Jun, 2022 Given two positive integer N, M. The task is to check if N and M are friendly pair or not. In number theory, friendly pairs are two numbers with a common abundancy index, the ratio between the sum of divisors of a number and the number itself i.e ?(n)/n. S o, two number n and m are friendly number if ?(n)...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jun, 2022" }, { "code": null, "e": 146, "s": 54, "text": "Given two positive integer N, M. The task is to check if N and M are friendly pair or not. " }, { "code": null, "e": 414, "s": 146, "text": "In number the...
Split a Numeric String into Fibonacci Sequence
12 Oct, 2021 Given a numeric string S representing a large number, the task is to form a Fibonacci Sequence of at least length 3 from the given string. If such a split is not possible, print -1. Examples: Input: S = “5712” Output: 5 7 12 Explanation: Since 5 + 7 = 12, the splits {5}, {7}, {12} forms a Fibonacci seque...
[ { "code": null, "e": 54, "s": 26, "text": "\n12 Oct, 2021" }, { "code": null, "e": 236, "s": 54, "text": "Given a numeric string S representing a large number, the task is to form a Fibonacci Sequence of at least length 3 from the given string. If such a split is not possible, pr...
Preorder Traversal of N-ary Tree Without Recursion
22 Jun, 2021 Given an n-ary tree, print preorder traversal of it. Example : Preorder traversal of below tree is A B K N M J F D G E C H I L The idea is to use stack like iterative preorder traversal of binary tree.1) Create an empty stack to store nodes. 2) Push the root node to the stack. 3) Run a loop while the s...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2021" }, { "code": null, "e": 105, "s": 52, "text": "Given an n-ary tree, print preorder traversal of it." }, { "code": null, "e": 117, "s": 105, "text": "Example : " }, { "code": null, "e": 183...
Split a column in 2 columns using comma as separator - MySQL
For this, you can use substring_index() in MySQL. Let us create a table − mysql> create table demo79 -> ( -> fullname varchar(50) -> ); Query OK, 0 rows affected (0.64 Insert some records into the table with the help of insert command − mysql> insert into demo79 values("John,Smith"); Query OK, 1 row affected (...
[ { "code": null, "e": 1261, "s": 1187, "text": "For this, you can use substring_index() in MySQL. Let us create a table −" }, { "code": null, "e": 1364, "s": 1261, "text": "mysql> create table demo79\n -> (\n -> fullname varchar(50)\n -> );\nQuery OK, 0 rows affected (0.64" ...
Some Basic Theorems on Trees
14 Feb, 2022 Tree:- A connected graph without any circuit is called a Tree. In other words, a tree is an undirected graph G that satisfies any of the following equivalent conditions: Any two vertices in G can be connected by a unique simple path. G is acyclic, and a simple cycle is formed if any edge is added to G. G...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Feb, 2022" }, { "code": null, "e": 226, "s": 54, "text": "Tree:- A connected graph without any circuit is called a Tree. In other words, a tree is an undirected graph G that satisfies any of the following equivalent conditions: " ...
Prime Number of Set Bits in Binary Representation | Set 2
24 May, 2021 Given two integers ‘L’ and ‘R’, we need to write a program that finds the count of numbers having the prime number of set bits in their binary representation in the range [L, R]. Examples: Input : 6 10 Output : 4 6 -> 110 (2 set bits, 2 is prime) 7 -> 111 (3 set bits, 3 is prime) 9 -> 1001 (2 set bits , ...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 May, 2021" }, { "code": null, "e": 231, "s": 52, "text": "Given two integers ‘L’ and ‘R’, we need to write a program that finds the count of numbers having the prime number of set bits in their binary representation in the range [L,...
How to get negative result using modulo operator in JavaScript ?
26 Aug, 2021 The %(modulo) operator in JavaScript gives the remainder obtained by dividing two numbers. There is a difference between %(modulo) and remainder operator. When remainder or %(modulo) is calculated on positive numbers then both behave similar but when negative numbers are used then both behave differently.T...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Aug, 2021" }, { "code": null, "e": 601, "s": 53, "text": "The %(modulo) operator in JavaScript gives the remainder obtained by dividing two numbers. There is a difference between %(modulo) and remainder operator. When remainder or %...
Groups in Linux System Administration - GeeksforGeeks
19 Nov, 2021 Each group in a Linux system is uniquely identified by a group identification number or GID. All the information listing groups in a system are stored in /etc/group file. The hashed passwords for groups are stored in /etc/gshadow file. Every user has a primary user group and zero or more supplementary gro...
[ { "code": null, "e": 24635, "s": 24607, "text": "\n19 Nov, 2021" }, { "code": null, "e": 24872, "s": 24635, "text": "Each group in a Linux system is uniquely identified by a group identification number or GID. All the information listing groups in a system are stored in /etc/grou...
File upload Fields in Serializers - Django REST Framework - GeeksforGeeks
20 Dec, 2021 In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some fields (entries) which are going to be processed. For example if you have a class with name Employee and its fields as Employee_id, Employee_name, is...
[ { "code": null, "e": 24440, "s": 24412, "text": "\n20 Dec, 2021" }, { "code": null, "e": 25127, "s": 24440, "text": "In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some field...
Simple Genetic Algorithm (SGA)
07 Apr, 2021 Prerequisite – Genetic Algorithm Introduction : Simple Genetic Algorithm (SGA) is one of the three types of strategies followed in Genetic algorithm. SGA starts with the creation of an initial population of size N.Then, we evaluate the goodness/fitness of each of the solutions/individuals. SGA starts with ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Apr, 2021" }, { "code": null, "e": 85, "s": 52, "text": "Prerequisite – Genetic Algorithm" }, { "code": null, "e": 100, "s": 85, "text": "Introduction :" }, { "code": null, "e": 202, "s": 100, ...
Extend Class Method in Python
06 Feb, 2020 In Python, when a subclass defines a function that already exists in its superclass in order to add some other functionality in its own way, the function in the subclass is said to be an extended method and the mechanism is known as extending. It is a way by which Python shows Polymorphism. This is similar...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Feb, 2020" }, { "code": null, "e": 555, "s": 54, "text": "In Python, when a subclass defines a function that already exists in its superclass in order to add some other functionality in its own way, the function in the subclass is s...
Ruby - Regular Expressions
A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings using a specialized syntax held in a pattern. A regular expression literal is a pattern between slashes or between arbitrary delimiters followed by %r as follows − /pattern/ /pattern/im # option can...
[ { "code": null, "e": 2593, "s": 2428, "text": "A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings using a specialized syntax held in a pattern." }, { "code": null, "e": 2711, "s": 2593, "text": "A regular express...
UInt32.MaxValue Field in C# with Examples
01 May, 2019 The MaxValue field of UInt32 Struct is used to represent the maximum value of the 32-bit unsigned integer. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 4294967295. Its hexadecimal value is 0xFFFFFFFF. It is used to avoid the Overf...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 May, 2019" }, { "code": null, "e": 458, "s": 28, "text": "The MaxValue field of UInt32 Struct is used to represent the maximum value of the 32-bit unsigned integer. The value of this field is constant means that the user cannot chang...
How to Find Standard Deviation in R?
07 Apr, 2021 In this article, we will discuss how to find the Standard Deviation in R Programming Language. Standard deviation is the measure of the dispersion of the values. It can also be defined as the square root of variance. Formula of sample standard deviation: where, s = sample standard deviation N = Number of ...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Apr, 2021" }, { "code": null, "e": 245, "s": 28, "text": "In this article, we will discuss how to find the Standard Deviation in R Programming Language. Standard deviation is the measure of the dispersion of the values. It can also b...
Maximum of all subarrays of size k | Practice | GeeksforGeeks
Given an array arr[] of size N and an integer K. Find the maximum for each and every contiguous subarray of size K. Example 1: Input: N = 9, K = 3 arr[] = 1 2 3 1 4 5 2 3 6 Output: 3 3 4 5 5 5 6 Explanation: 1st contiguous subarray = {1 2 3} Max = 3 2nd contiguous subarray = {2 3 1} Max = 3 3rd contiguous subarray =...
[ { "code": null, "e": 354, "s": 238, "text": "Given an array arr[] of size N and an integer K. Find the maximum for each and every contiguous subarray of size K." }, { "code": null, "e": 365, "s": 354, "text": "Example 1:" }, { "code": null, "e": 743, "s": 365, ...
Ruby - Variables, Constants and Literals
Variables are the memory locations, which hold any data to be used by any program. There are five types of variables supported by Ruby. You already have gone through a small description of these variables in the previous chapter as well. These five types of variables are explained in this chapter. Global variables begi...
[ { "code": null, "e": 2377, "s": 2294, "text": "Variables are the memory locations, which hold any data to be used by any program." }, { "code": null, "e": 2593, "s": 2377, "text": "There are five types of variables supported by Ruby. You already have gone through a small descript...
Python - Rename column names by index in a Pandas DataFrame without using rename()
We can easily rename a column by index i.e. without using rename(). Import the required library − import pandas as pd Create a DataFrame with 3 columns − dataFrame = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Tesla', 'Mustang', 'Mercedes', 'Jaguar'],"Reg_Price": [7000, 1500, 5000, 8000, 9000, 6000],"Units": [90,...
[ { "code": null, "e": 1160, "s": 1062, "text": "We can easily rename a column by index i.e. without using rename(). Import the required library −" }, { "code": null, "e": 1180, "s": 1160, "text": "import pandas as pd" }, { "code": null, "e": 1216, "s": 1180, "t...
Define ng-if, ng-show and ng-hide - GeeksforGeeks
24 Jun, 2020 In this article, we will be explaining about ng-if, ng-show and ng-hide directive. ng-if Directive:The ng-if Directive in AngularJS is used to remove or recreate a portion of HTML element based on an expression.If the expression inside it is false then the element is completely removed from the DOM.if the ...
[ { "code": null, "e": 24176, "s": 24148, "text": "\n24 Jun, 2020" }, { "code": null, "e": 24259, "s": 24176, "text": "In this article, we will be explaining about ng-if, ng-show and ng-hide directive." }, { "code": null, "e": 25154, "s": 24259, "text": "ng-if D...
Comb Sort
The basic idea of comb sort and the bubble sort is same. In other words, comb sort is an improvement on the bubble sort. In the bubble sorting technique, the items are compared with the next item in each phase. But for the comb sort, the items are sorted in a specific gap. After completing each phase, the gap is decrea...
[ { "code": null, "e": 1521, "s": 1062, "text": "The basic idea of comb sort and the bubble sort is same. In other words, comb sort is an improvement on the bubble sort. In the bubble sorting technique, the items are compared with the next item in each phase. But for the comb sort, the items are sorte...
How to create a custom progress bar component in React.js ?
30 Jun, 2021 In this article, We will make a custom reusable Progress bar component using React.js Prerequisites: Basic Knowledge of React Basic Knowledge of HTML/CSS Inline styling in React The <Progressbar /> component should do the following: Indicates the progress visually to the user via the colored bar.Shows th...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jun, 2021" }, { "code": null, "e": 141, "s": 54, "text": "In this article, We will make a custom reusable Progress bar component using React.js " }, { "code": null, "e": 157, "s": 141, "text": "Prerequisites: " ...
Print the first and last character of each word in a String
06 May, 2021 Given a string, the task is to print the first and last character of each word in a string.Examples: Input: Geeks for geeks Output: Gs fr gs Input: Computer applications Output: Cr as Approach Run a loop from the first letter to the last letter.Print the first and last letter of the string.If there ...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 May, 2021" }, { "code": null, "e": 156, "s": 53, "text": "Given a string, the task is to print the first and last character of each word in a string.Examples: " }, { "code": null, "e": 240, "s": 156, "text": "In...