title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How can I stop running a MySQL query? | Before stopping a running query of MySQL, first we need to see how many processes are
running with the help of show command.
The query for that is given as follows −
mysql> show processlist;
After executing the above query, we will get the output with some id’s. This is given as follows −
+----+-----------------+------... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "Before stopping a running query of MySQL, first we need to see how many processes are\nrunning with the help of show command."
},
{
"code": null,
"e": 1228,
"s": 1187,
"text": "The query for that is given as follows −"
},
{
"... |
Convert min Heap to max Heap in C++ | In this tutorial, we will be discussing a program to convert min heap to max heap.
For this we will be provided with the array representation of the min heap. Our task is to convert that given min heap to max heap in O(n) time complexity.
Live Demo
#include<bits/stdc++.h>
using namespace std;
//converting a given subt... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to convert min heap to max heap."
},
{
"code": null,
"e": 1301,
"s": 1145,
"text": "For this we will be provided with the array representation of the min heap. Our task is to convert ... |
Filter the records of current day, month and year in MySQL? | Let’s say you have a table with UserLoginTime column wherein we have stored some values for sample. This is the login time of users and we want to filter all these records on the basis of current day, month and year i.e. the current date. We will be
Let us now create the table we discussed above
mysql> create table use... | [
{
"code": null,
"e": 1312,
"s": 1062,
"text": "Let’s say you have a table with UserLoginTime column wherein we have stored some values for sample. This is the login time of users and we want to filter all these records on the basis of current day, month and year i.e. the current date. We will be"
... |
PySpark – Extracting single value from DataFrame | 17 Jun, 2021
In this article, we are going to extract a single value from the pyspark dataframe columns. To do this we will use the first() and head() functions.
Single value means only one value, we can extract this value based on the column name
Syntax:
dataframe.first()[‘column name’]
Dataframe.head()[‘Index’]
Wher... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 177,
"s": 28,
"text": "In this article, we are going to extract a single value from the pyspark dataframe columns. To do this we will use the first() and head() functions."
},
{
"code": null... |
How do I get the index of an item in Tkinter.Listbox? | We use the Tkinter Listbox widget to create a list of items. Each item in the listbox has some indexes that are assigned to them sequentially in vertical order.
Let us suppose that we want to get the index of a clicked item in the listbox. Then, we have to first create a button that will capture the current selection o... | [
{
"code": null,
"e": 1348,
"s": 1187,
"text": "We use the Tkinter Listbox widget to create a list of items. Each item in the listbox has some indexes that are assigned to them sequentially in vertical order."
},
{
"code": null,
"e": 1610,
"s": 1348,
"text": "Let us suppose that w... |
What is Web API and why we use it ? | 31 May, 2020
API stands for Application Programming Interface. API is actually some kind of interface which is having a set of functions. These set of functions will allow programmers to acquire some specific features or the data of an application.
Web API is an API as the name suggests, it can be accessed over the we... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 May, 2020"
},
{
"code": null,
"e": 289,
"s": 52,
"text": "API stands for Application Programming Interface. API is actually some kind of interface which is having a set of functions. These set of functions will allow programmers to ... |
Find maximum value of Sum( i*arr[i]) with only rotations on given array allowed | 03 May, 2021
Given an array, only rotation operation is allowed on array. We can rotate the array as many times as we want. Return the maximum possible summation of i*arr[i].
Examples :
Input: arr[] = {1, 20, 2, 10}
Output: 72
We can get 72 by rotating array twice.
{2, 10, 1, 20}
20*3 + 1*2 + 10*1 + 2*0 = 72
Input: ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 May, 2021"
},
{
"code": null,
"e": 216,
"s": 54,
"text": "Given an array, only rotation operation is allowed on array. We can rotate the array as many times as we want. Return the maximum possible summation of i*arr[i]."
},
{
... |
Reverse a Doubly Linked List | 24 Jun, 2022
Given a Doubly Linked List, the task is to reverse the given Doubly Linked List.
See below diagrams for example.
(a) Original Doubly Linked List
(b) Reversed Doubly Linked List
Here is a simple method for reversing a Doubly Linked List. All we need to do is swap prev and next pointers for all nodes, c... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 133,
"s": 52,
"text": "Given a Doubly Linked List, the task is to reverse the given Doubly Linked List."
},
{
"code": null,
"e": 166,
"s": 133,
"text": "See below diagrams for e... |
How to Integrate Google reCAPTCHA in Android? | 24 Jan, 2021
Google reCAPTCHA is one of the services provided by Google which is used to verify whether the user is a bot or not. The Google reCAPTCHA is seen in many websites and applications to verify the users. In this article, we will take a look at the implementation of Google reCAPTCHA in Android.
We will be bui... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 321,
"s": 28,
"text": "Google reCAPTCHA is one of the services provided by Google which is used to verify whether the user is a bot or not. The Google reCAPTCHA is seen in many websites and applicat... |
DELETE request using XMLHttpRequest by making Custom HTTP library | 22 Jul, 2020
The task here is to show how the XMLHttpRequest can be used to DELETE data to an API by making a custom HTTP library. A placeholder API that contains an array of objects would be used as an example. The DELETE request is performed on this API. The URL of the API is https://jsonplaceholder.typicode.com/post... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jul, 2020"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "The task here is to show how the XMLHttpRequest can be used to DELETE data to an API by making a custom HTTP library. A placeholder API that contains an array of objects would... |
Convert CSV to Pandas Dataframe | 02 Dec, 2020
In this article, we will discuss how to convert CSV to Pandas Dataframe, this operation can be performed using pandas.read_csv reads a comma-separated values (csv) file into DataFrame.
Example 1: In the below program we are going to convert nba.csv into a data frame and then display it.
Python
# import pan... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 239,
"s": 54,
"text": "In this article, we will discuss how to convert CSV to Pandas Dataframe, this operation can be performed using pandas.read_csv reads a comma-separated values (csv) file into ... |
Stack.Count Property in C# | 04 Feb, 2019
This method(comes under System.Collections namespace) is used to get the number of elements contained in the Stack. The capacity is the number of elements that the Stack can store and the count is the number of elements that are actually in the Stack. The capacity is always greater than or equal to Count. ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Feb, 2019"
},
{
"code": null,
"e": 395,
"s": 28,
"text": "This method(comes under System.Collections namespace) is used to get the number of elements contained in the Stack. The capacity is the number of elements that the Stack can s... |
GATE | GATE-CS-2017 (Set 2) | Question 64 | 28 Jun, 2021
Two transactions T1 and T2 are given as:
T1: r1(X)w1(X)r1(Y)w1(Y)
T2 : r2(Y)w2(Y)r2(Z)w2(Z)
where ri(V) denotes a read operation by transaction Ti on a variable V and wi(V) denotes a write operation by transaction Ti on a variable V. The total number of conflict serializable schedules that can be formed ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 93,
"s": 52,
"text": "Two transactions T1 and T2 are given as:"
},
{
"code": null,
"e": 146,
"s": 93,
"text": "T1: r1(X)w1(X)r1(Y)w1(Y)\n\nT2 : r2(Y)w2(Y)r2(Z)w2(Z)\n"
},
{
... |
Creating and Executing a .jar File in Linux Terminal | 06 Jul, 2021
JAR – Java Archive. It is like a zip file but for java classes. It combines all the .class files in Java into a single .jar file. It is used to download all java classes on HTTP in a single operation. These can be created using the “jar” CLI tool. It also has an optional META-INF which can include files li... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 340,
"s": 28,
"text": "JAR – Java Archive. It is like a zip file but for java classes. It combines all the .class files in Java into a single .jar file. It is used to download all java classes on HT... |
Reaching a point using clockwise or anticlockwise movements | 08 Jun, 2022
Given starting and ending position and a number N. Given that we are allowed to move in only four directions as shown in the image below. The directions of moves are U(), R, Dand L. We need to write a program to determine if starting from the given starting position we can reach the given end position in e... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 411,
"s": 28,
"text": "Given starting and ending position and a number N. Given that we are allowed to move in only four directions as shown in the image below. The directions of moves are U(), R, D... |
How to set default value to NULL in MySQL? | Use DEFAULT keyword in MySQL to set default value to NULL. Let us first create a −
mysql> create table DemoTable1440
-> (
-> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> StudentName varchar(20) DEFAULT NULL,
-> StudentAge int DEFAULT NULL
-> );
Query OK, 0 rows affected (0.55 sec)
Insert some re... | [
{
"code": null,
"e": 1270,
"s": 1187,
"text": "Use DEFAULT keyword in MySQL to set default value to NULL. Let us first create a −"
},
{
"code": null,
"e": 1493,
"s": 1270,
"text": "mysql> create table DemoTable1440\n -> (\n -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY... |
How to Change ActionBar Title Programmatically in Android? | 11 Aug, 2021
Whenever we develop an Android application and run it, we often observe that the application comes with an ActionBar with the name of the application in it. This happens by default unless explicitly changed. This text is called the title in the application. One can change the title of the application by ma... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 394,
"s": 28,
"text": "Whenever we develop an Android application and run it, we often observe that the application comes with an ActionBar with the name of the application in it. This happens by de... |
Flutter – TabView Widget | 16 Aug, 2021
There are lots of apps where you often have come across tabs. Tabs are a common pattern in the apps. They are situated at top of the app below the App bar. So today we are going to create our own app with tabs.
Project Setup
Code
Conclusion
You can either create a new project or a new file in your existing... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 239,
"s": 28,
"text": "There are lots of apps where you often have come across tabs. Tabs are a common pattern in the apps. They are situated at top of the app below the App bar. So today we are goi... |
Sparse Matrix Representations | Set 3 ( CSR ) | 07 Jul, 2022
If most of the elements in the matrix are zero then the matrix is called a sparse matrix. It is wasteful to store the zero elements in the matrix since they do not affect the results of our computation. This is why we implement these matrices in more efficient representations than the standard 2D Array. Us... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 542,
"s": 54,
"text": "If most of the elements in the matrix are zero then the matrix is called a sparse matrix. It is wasteful to store the zero elements in the matrix since they do not affect the... |
How to create an unordered_map of pairs in C++? | 24 Mar, 2022
Unordered Map does not contain a hash function for a pair like it has for int, string, etc, So if we want to hash a pair then we have to explicitly provide it with a hash function that can hash a pair. unordered_map can takes upto 5 arguments:
Key : Type of key values
Value : Type of value to be stored a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Mar, 2022"
},
{
"code": null,
"e": 298,
"s": 52,
"text": "Unordered Map does not contain a hash function for a pair like it has for int, string, etc, So if we want to hash a pair then we have to explicitly provide it with a hash fun... |
Matplotlib.axes.Axes.margins() in Python | 09 Jul, 2021
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.
The Ax... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 329,
"s": 28,
"text": "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... |
Concatenating CSV files using Pandas module | 02 Dec, 2020
Using pandas we can perform various operations on CSV files such as appending, updating, concatenating, etc. In this article, we are going to concatenate two CSV files using pandas module.
Suppose we have one .csv file named Employee.csv which contains some records and it is as below:
Employee.csv
There is... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 217,
"s": 28,
"text": "Using pandas we can perform various operations on CSV files such as appending, updating, concatenating, etc. In this article, we are going to concatenate two CSV files using p... |
How to change font style using drop-down list in JavaScript ? - GeeksforGeeks | 03 Jun, 2020
To change or set a font style for certain text, the fontFamily CSS property needs to be changed. The fontFamily property sets or returns a list of font-family names for text in an element.
Syntax:
object.style.fontFamily = "font"
To change the font style by option dropdown: The font values can be passed in... | [
{
"code": null,
"e": 25098,
"s": 25070,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 25287,
"s": 25098,
"text": "To change or set a font style for certain text, the fontFamily CSS property needs to be changed. The fontFamily property sets or returns a list of font-family name... |
Difference between == and === operator in JavaScript - GeeksforGeeks | 31 Jan, 2022
The ‘==’ operator tests for abstract equality i.e. it does the necessary type conversions before doing the equality comparison.But the ‘===’ operator tests for strict equality i.e it will not do the type conversion hence if the two values are not of the same type, when compared, it will return false.
Examp... | [
{
"code": null,
"e": 24418,
"s": 24390,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 24720,
"s": 24418,
"text": "The ‘==’ operator tests for abstract equality i.e. it does the necessary type conversions before doing the equality comparison.But the ‘===’ operator tests for str... |
Altering a database view in SAP HANA | You can alter the view, then we can use the Alter View command to alter the view.
Alter view View_EmpInfo as Select Emp_Details.Id, Emp_Details.EmplName,
EmpProj.Projname from Emp_Details inner join EmpProjInfo
on Emp_Details.Id=EmpProjInfo.Id;
We have applied ALTER command to update an existing view with name- View_E... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "You can alter the view, then we can use the Alter View command to alter the view."
},
{
"code": null,
"e": 1308,
"s": 1144,
"text": "Alter view View_EmpInfo as Select Emp_Details.Id, Emp_Details.EmplName,\nEmpProj.Projname from Emp_... |
Create, modify, and delete columns using dplyr package in R - GeeksforGeeks | 24 Oct, 2021
In this article, we will discuss mutate function present in dplyr package in R Programming Language to create, modify, and delete columns of a dataframe.
Columns can be inserted either by appending a new column or using existing columns to evaluate a new column. By default, columns are added to the far rig... | [
{
"code": null,
"e": 25267,
"s": 25239,
"text": "\n24 Oct, 2021"
},
{
"code": null,
"e": 25421,
"s": 25267,
"text": "In this article, we will discuss mutate function present in dplyr package in R Programming Language to create, modify, and delete columns of a dataframe."
},
{... |
PHP - Function opendir() | resource opendir ( string $path [, resource $context] );
It opens up a directory handle to be used in subsequent closedir(), readdir(), and rewinddir() calls.
path(Required)
The directory path that is to be opened
context(Optional)
Specifies the context of the directory handle. Context is a set of options that can mod... | [
{
"code": null,
"e": 2815,
"s": 2757,
"text": "resource opendir ( string $path [, resource $context] );\n"
},
{
"code": null,
"e": 2917,
"s": 2815,
"text": "It opens up a directory handle to be used in subsequent closedir(), readdir(), and rewinddir() calls."
},
{
"code":... |
Breaking Spotify’s Algorithm of Music Genre Classification! | by Rajat Keshri | Towards Data Science | There are many different types of genres present in the industry. But the basic genres will have a few principle aspects that make it easier to identify them. Genres are used to tag and define different kinds of music based on the way they are composed or based on their musical form and musical style.
In this article, ... | [
{
"code": null,
"e": 475,
"s": 172,
"text": "There are many different types of genres present in the industry. But the basic genres will have a few principle aspects that make it easier to identify them. Genres are used to tag and define different kinds of music based on the way they are composed or... |
Check if two given Circles are Orthogonal or not - GeeksforGeeks | 19 Mar, 2022
Given are two circles with their centres C1(x1, y1) and C2(x2, y2) and radius r1 and r2, the task is to check if both the circles are orthogonal or not. Two curves are said to be orthogonal if their angle of intersection is a right angle i.e the tangents at their point of intersection are perpendicular.
T... | [
{
"code": null,
"e": 24631,
"s": 24603,
"text": "\n19 Mar, 2022"
},
{
"code": null,
"e": 24937,
"s": 24631,
"text": "Given are two circles with their centres C1(x1, y1) and C2(x2, y2) and radius r1 and r2, the task is to check if both the circles are orthogonal or not. Two curves... |
Python: Difference between Lock and Rlock objects | 18 May, 2022
A thread is an entity within a process that can be scheduled for execution. Also, it is the smallest unit of processing that can be performed in an OS (Operating System). In simple words, a thread is a sequence of such instructions within a program that can be executed independently of other codes. For sim... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 May, 2022"
},
{
"code": null,
"e": 432,
"s": 54,
"text": "A thread is an entity within a process that can be scheduled for execution. Also, it is the smallest unit of processing that can be performed in an OS (Operating System). In ... |
bool Keyword in C# | 22 Jun, 2020
Keywords are the words in a language that are used for some internal process or represent some predefined actions. bool is a keyword that is used to declare a variable which can store Boolean values true or false. It is an alias of System.Boolean.
Bool Keyword occupies 1 byte (8 bits) in the memory. There ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 276,
"s": 28,
"text": "Keywords are the words in a language that are used for some internal process or represent some predefined actions. bool is a keyword that is used to declare a variable which c... |
The build() method in Java Stream.Builder | The build() method in Stream.Builder class is used to build the stream. It returns the built stream.
The syntax is as follows:
Stream<T>l build()
Import the following package for the Stream.Builder class in Java:
import java.util.stream.Stream;
Declare a Stream.Builder:
Stream.Builder<String> builder = Stream.builder()... | [
{
"code": null,
"e": 1288,
"s": 1187,
"text": "The build() method in Stream.Builder class is used to build the stream. It returns the built stream."
},
{
"code": null,
"e": 1314,
"s": 1288,
"text": "The syntax is as follows:"
},
{
"code": null,
"e": 1333,
"s": 131... |
PyQt5 – How to add action to a button ? | 22 Apr, 2020
In this article we will see how to set action to a push button. QPushButton is a simple button in PyQt, when clicked by a user some associated action gets performed. For adding this button into the application, QPushButton class is used.
When the button is pressed it should perform some action, in order to... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 290,
"s": 52,
"text": "In this article we will see how to set action to a push button. QPushButton is a simple button in PyQt, when clicked by a user some associated action gets performed. For addi... |
Elias Gamma Decoding in Python | 28 Nov, 2021
The Elias gamma code is a universal code that is used to encode a sequence of positive integers. It is developed by Peter Elias. It is most useful when the upper-bound of integers cannot be determined beforehand.
Formula:
Elias Gamma Coding=Unary(1+floor(log2(x)))+Binary representation of ‘x’ without MSB
E... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 267,
"s": 54,
"text": "The Elias gamma code is a universal code that is used to encode a sequence of positive integers. It is developed by Peter Elias. It is most useful when the upper-bound of int... |
Java Program to Open Input URL in System Default Browser in Windows | 19 Jan, 2021
URL is the URL you want to display in the default Web browser. For example, wire http://www.site.com/report.html to this input to display the HTML file report.html on the Web Server www.site.com in the browser.
Our problem is to write a java program to open Input URL in System Default Browser in Windows.
T... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jan, 2021"
},
{
"code": null,
"e": 239,
"s": 28,
"text": "URL is the URL you want to display in the default Web browser. For example, wire http://www.site.com/report.html to this input to display the HTML file report.html on the Web ... |
ES6 - Promises | The Syntax related to promise is mentioned below where, p is the promise object, resolve is the function that should be called when the promise executes successfully and reject is the function that should be called when the promise encounters an error.
let p = new Promise(function(resolve,reject){
let workDone = tru... | [
{
"code": null,
"e": 2664,
"s": 2411,
"text": "The Syntax related to promise is mentioned below where, p is the promise object, resolve is the function that should be called when the promise executes successfully and reject is the function that should be called when the promise encounters an error."... |
Python | os.path.exists() method | 21 May, 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. os.path module is sub module of OS module in python used for common path name manipulati... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 May, 2019"
},
{
"code": null,
"e": 365,
"s": 54,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usi... |
How to limit character input in textarea including count in jQuery ? | 18 Jan, 2021
In this article, we will set the limit character input in the textarea including count in the jQuery. To set the limit character in the input textarea, we use length property.
Approach:
We create an input text area with a given maxlength and then use jQuery code to limit the characters. First, we set the m... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 204,
"s": 28,
"text": "In this article, we will set the limit character input in the textarea including count in the jQuery. To set the limit character in the input textarea, we use length property.... |
Bypassing Pandas Memory Limitations | by Michael Beale | Towards Data Science | When you encounter a new set of data, you need to spend some time getting to know it. The process is not unlike meeting a new person for the first time. Instead of asking questions like “What’s your name?”, “Where are you from?”, and “Katy Perry or Taylor Swift?” you ask “What does your distribution look like?”, “Do yo... | [
{
"code": null,
"e": 589,
"s": 172,
"text": "When you encounter a new set of data, you need to spend some time getting to know it. The process is not unlike meeting a new person for the first time. Instead of asking questions like “What’s your name?”, “Where are you from?”, and “Katy Perry or Taylor... |
Creating a view of parent array in Julia - view(), @view and @views Methods - GeeksforGeeks | 21 Apr, 2020
The view() is an inbuilt function in julia which is used to return a view into the given parent array A with the given indices instead of making a copy.
Syntax: view(A, inds...)
Parameters:
A: Specified parent array.
inds: Specified indices.
Returns: It returns a view into the given parent array A with the... | [
{
"code": null,
"e": 24544,
"s": 24516,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 24697,
"s": 24544,
"text": "The view() is an inbuilt function in julia which is used to return a view into the given parent array A with the given indices instead of making a copy."
},
{
... |
Python 3 - String rjust() Method | The rjust() method returns the string right justified in a string of length width. Padding is done using the specified fillchar (default is a space). The original string is returned if width is less than len(s).
Following is the syntax for rjust() method −
str.rjust(width[, fillchar])
width − This is the string length... | [
{
"code": null,
"e": 2552,
"s": 2340,
"text": "The rjust() method returns the string right justified in a string of length width. Padding is done using the specified fillchar (default is a space). The original string is returned if width is less than len(s)."
},
{
"code": null,
"e": 2597... |
Check if two arrays are permutations of each other - GeeksforGeeks | 25 Aug, 2021
Given two unsorted arrays of the same size, write a function that returns true if two arrays are permutations of each other, otherwise false.
Examples:
Input: arr1[] = {2, 1, 3, 5, 4, 3, 2}
arr2[] = {3, 2, 2, 4, 5, 3, 1}
Output: Yes
Input: arr1[] = {2, 1, 3, 5,}
arr2[] = {3, 2, 2, 4}
Output... | [
{
"code": null,
"e": 24698,
"s": 24670,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 24840,
"s": 24698,
"text": "Given two unsorted arrays of the same size, write a function that returns true if two arrays are permutations of each other, otherwise false."
},
{
"code":... |
URL getRef() method in Java with Examples - GeeksforGeeks | 31 Dec, 2018
The getRef() function is a part of URL class. The function getRef() returns the Reference or anchor part of a specified URL.
Function Signature:
public String getRef()
Syntax:
url.getRef()
Parameter: This function does not require any parameter
Return Type: The function returns String Type
Below programs i... | [
{
"code": null,
"e": 23975,
"s": 23947,
"text": "\n31 Dec, 2018"
},
{
"code": null,
"e": 24100,
"s": 23975,
"text": "The getRef() function is a part of URL class. The function getRef() returns the Reference or anchor part of a specified URL."
},
{
"code": null,
"e": 2... |
Arduino - Wireless Communication | The wireless transmitter and receiver modules work at 315 Mhz. They can easily fit into a breadboard and work well with microcontrollers to create a very simple wireless data link. With one pair of transmitter and receiver, the modules will only work communicating data one-way, however, you would need two pairs (of dif... | [
{
"code": null,
"e": 3249,
"s": 2870,
"text": "The wireless transmitter and receiver modules work at 315 Mhz. They can easily fit into a breadboard and work well with microcontrollers to create a very simple wireless data link. With one pair of transmitter and receiver, the modules will only work co... |
Topological sorting using Javascript DFS | A topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge UV from vertex u to vertex v, u comes before v in the ordering. This only makes sense in directed graphs.
There are many places where topological sort makes a lot of sense. For example, ... | [
{
"code": null,
"e": 1302,
"s": 1062,
"text": "A topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge UV from vertex u to vertex v, u comes before v in the ordering. This only makes sense in directed graphs."
},
{
... |
Pytest best practices for libraries | Towards Data Science | Disclaimer: You won’t be able to fit everything to the proposed structure, apply common sense and your judgement during the testing developing and design.
These days many python libraries are built by ML researchers and practitioners. This is also true at my company, where we maintain several internal libraries and do ... | [
{
"code": null,
"e": 327,
"s": 172,
"text": "Disclaimer: You won’t be able to fit everything to the proposed structure, apply common sense and your judgement during the testing developing and design."
},
{
"code": null,
"e": 732,
"s": 327,
"text": "These days many python librarie... |
SQLite - CREATE Table | SQLite CREATE TABLE statement is used to create a new table in any of the given database. Creating a basic table involves naming the table and defining its columns and each column's data type.
Following is the basic syntax of CREATE TABLE statement.
CREATE TABLE database_name.table_name(
column1 datatype PRIMARY KEY... | [
{
"code": null,
"e": 2831,
"s": 2638,
"text": "SQLite CREATE TABLE statement is used to create a new table in any of the given database. Creating a basic table involves naming the table and defining its columns and each column's data type."
},
{
"code": null,
"e": 2888,
"s": 2831,
... |
Python Input, Output and Import. In this tutorial let us understand the... | by Tanu N Prabhu | Towards Data Science | In this tutorial let us understand the Input and Output built-in-functions used in python, also we will learn how to import libraries and use them in our programs.
Before getting started let us understand what are built-in-functions?
Any function that is provided as part of a high-level language and can be executed by ... | [
{
"code": null,
"e": 336,
"s": 172,
"text": "In this tutorial let us understand the Input and Output built-in-functions used in python, also we will learn how to import libraries and use them in our programs."
},
{
"code": null,
"e": 406,
"s": 336,
"text": "Before getting started... |
GATE | GATE-CS-2000 | Question 35 - GeeksforGeeks | 19 Nov, 2018
The following arrangement of master-slave flip flops has the initial state of P, Q as 0, 1 (respectively). After three clock cycles the output state P, Q is (respectively),
(A) 1, 0(B) 1, 1(C) 0, 0(D) 0,1Answer: (A)Explanation: Given P = 0 , J = 1 and k = 1
JK flipflop toggles the input in ‘11’ state. Th... | [
{
"code": null,
"e": 24081,
"s": 24053,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 24255,
"s": 24081,
"text": "The following arrangement of master-slave flip flops has the initial state of P, Q as 0, 1 (respectively). After three clock cycles the output state P, Q is (resp... |
How can a simple bivariate distribution be shown using ‘imshow’ in Matplotlib Python? | Matplotlib is a popular Python package that is used for data visualization. Visualizing data is a key step since it helps understand what is going on in the data without actually looking at the numbers and performing complicated computations.
It helps in communicating the quantitative insights to the audience effective... | [
{
"code": null,
"e": 1305,
"s": 1062,
"text": "Matplotlib is a popular Python package that is used for data visualization. Visualizing data is a key step since it helps understand what is going on in the data without actually looking at the numbers and performing complicated computations."
},
{
... |
Select Odd and Even Rows and Columns from DataFrame in R - GeeksforGeeks | 23 Sep, 2021
In this article, we will discuss how to select odd and even rows from a dataframe in R programming language.
The number of rows in a data frame in R can be fetched by the nrow() method. It returns the number of rows in the data frame. The seq_len() method is then applied to generate the integers beginning ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 26596,
"s": 26487,
"text": "In this article, we will discuss how to select odd and even rows from a dataframe in R programming language."
},
{
"code": null,
"e": 27108,
"s": 2... |
Change Color of ggplot2 Boxplot in R - GeeksforGeeks | 12 Dec, 2021
In this article, we are going to see how to change the color of boxplots using ggplot2 in R Programming Language.
We have considered the built-in data frame “ChickWeight”. It contains information about the feed type and growth rate of chickens for six different types of foods like casein, soybean, etc. I... | [
{
"code": null,
"e": 26513,
"s": 26485,
"text": "\n12 Dec, 2021"
},
{
"code": null,
"e": 26628,
"s": 26513,
"text": "In this article, we are going to see how to change the color of boxplots using ggplot2 in R Programming Language. "
},
{
"code": null,
"e": 26911,
... |
Scala String compareTo() method with example - GeeksforGeeks | 03 Oct, 2019
The compareTo() method is utilized to compare a string with another string.Some points to remember:
Here, If a string(S1) is same as string(S2) in comparison then this method returns zero.
If S1 is less than S2 then a negative number is returned which is the difference of character value.
If S1 is greater ... | [
{
"code": null,
"e": 25231,
"s": 25203,
"text": "\n03 Oct, 2019"
},
{
"code": null,
"e": 25331,
"s": 25231,
"text": "The compareTo() method is utilized to compare a string with another string.Some points to remember:"
},
{
"code": null,
"e": 25420,
"s": 25331,
... |
Introduction to Social Networks using NetworkX in Python - GeeksforGeeks | 21 Aug, 2021
Prerequisite – Python Basics
Ever wondered how the most popular social networking site Facebook works? How we are connected with friends using just Facebook? So, Facebook and other social networking sites work on a methodology called social networks. Social networking is used in mostly all social media si... | [
{
"code": null,
"e": 26341,
"s": 26313,
"text": "\n21 Aug, 2021"
},
{
"code": null,
"e": 26371,
"s": 26341,
"text": "Prerequisite – Python Basics "
},
{
"code": null,
"e": 27000,
"s": 26371,
"text": "Ever wondered how the most popular social networking site Fa... |
How to change radio button state programmatically in jQuery ? - GeeksforGeeks | 25 Jul, 2021
In this article, we will change the selected option of the radio button using jQuery. To select the value of the radio button we can set the “checked” to set to the desired option. For setting the property, we can use the prop() method in jQuery.
Syntax:
$(selector).prop("checked", true);
Note: Selector, ... | [
{
"code": null,
"e": 26202,
"s": 26174,
"text": "\n25 Jul, 2021"
},
{
"code": null,
"e": 26449,
"s": 26202,
"text": "In this article, we will change the selected option of the radio button using jQuery. To select the value of the radio button we can set the “checked” to set to th... |
K-th smallest element after removing some integers from natural numbers - GeeksforGeeks | 28 Apr, 2021
Given an array arr[] of size ‘n’ and a positive integer k. Consider series of natural numbers and remove arr[0], arr[1], arr[2], ..., arr[p] from it. Now the task is to find k-th smallest number in the remaining set of natural numbers. If no such number exists print “-1”.
Examples :
Input : arr[] = { 1 }... | [
{
"code": null,
"e": 25323,
"s": 25295,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 25596,
"s": 25323,
"text": "Given an array arr[] of size ‘n’ and a positive integer k. Consider series of natural numbers and remove arr[0], arr[1], arr[2], ..., arr[p] from it. Now the task ... |
Node.js Stream readable.resume() Method - GeeksforGeeks | 12 Oct, 2021
The readable.resume() method in a Readable Stream is used to paused data that can be resumed again and data starts flowing again.
Syntax:
readable.resume()
Parameters: This method doesn’t accept any parameters.
Return Value: If this method is used then the data that was paused, starts flowing again.
Below ... | [
{
"code": null,
"e": 25779,
"s": 25751,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 25909,
"s": 25779,
"text": "The readable.resume() method in a Readable Stream is used to paused data that can be resumed again and data starts flowing again."
},
{
"code": null,
"... |
Integrating Facebook Like & Share Plugin Using Django - GeeksforGeeks | 16 Feb, 2021
Django is a Python-based web framework that allows you to quickly create efficient web applications. It is also called batteries included framework because Django provides built-in features for everything including Django Admin Interface, default database – SQLlite3, etc. In this article we will learn to ... | [
{
"code": null,
"e": 25539,
"s": 25511,
"text": "\n16 Feb, 2021"
},
{
"code": null,
"e": 25891,
"s": 25539,
"text": "Django is a Python-based web framework that allows you to quickly create efficient web applications. It is also called batteries included framework because Django ... |
Learn How to Setup Email Services using Postfix in Linux | There are a number of reasons why you would want to set up your own Linux mail server. These days more people than ever are compelled to get their email fixed – if it ever fails. Postfix is an MTA (Mail switch Agent), a software used to send and receive mail. It is Wietse Venema’s mail server that began life at IBM res... | [
{
"code": null,
"e": 1578,
"s": 1062,
"text": "There are a number of reasons why you would want to set up your own Linux mail server. These days more people than ever are compelled to get their email fixed – if it ever fails. Postfix is an MTA (Mail switch Agent), a software used to send and receive... |
30 Examples to Master SQL. A comprehensive practical tutorial | by Soner Yıldırım | Towards Data Science | SQL is a programming language that is used to manage data stored in tabular form (i.e. tables) in relational databases.
A relational database consists of multiple tables that relate to each other. The relation between tables is formed in the sense of shared columns.
There are many different relational database manageme... | [
{
"code": null,
"e": 292,
"s": 172,
"text": "SQL is a programming language that is used to manage data stored in tabular form (i.e. tables) in relational databases."
},
{
"code": null,
"e": 439,
"s": 292,
"text": "A relational database consists of multiple tables that relate to e... |
Analyzing Climate Patterns with Self-Organizing Maps (SOMs) | by Haihan Lan | Towards Data Science | In this article, we’ll look at:
The Self-Organizing Map (SOM), and how it can be used in dimensionality reduction and unsupervised learning
Interpreting the visualizations of a trained SOM for exploratory data analysis
Applications of SOMs to clustering climate patterns in the province of British Columbia, Canada
Links... | [
{
"code": null,
"e": 203,
"s": 171,
"text": "In this article, we’ll look at:"
},
{
"code": null,
"e": 311,
"s": 203,
"text": "The Self-Organizing Map (SOM), and how it can be used in dimensionality reduction and unsupervised learning"
},
{
"code": null,
"e": 390,
... |
Block swap algorithm for array rotation in C++ | The block swap algorithm for array rotation is an efficient algorithm that is used for array rotation. It can do your work in O(n) time complexity.
So, in array rotation, we are given an array arr[] of size n and a number k that define the no. of the element to be rotated.
Let’s see an example on array rotations −
Inpu... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "The block swap algorithm for array rotation is an efficient algorithm that is used for array rotation. It can do your work in O(n) time complexity."
},
{
"code": null,
"e": 1336,
"s": 1210,
"text": "So, in array rotation, we are give... |
Choosing a Baseline Accuracy for a Classification Model | by Aaron Lee | Towards Data Science | When you evaluate a new machine learning model and end up with an accuracy number or other metric, you need to know if it is meaningful. Particularly in imbalanced classification models, it can appear that your model isn’t really doing much better than guessing. What accuracy is enough to call your model useful?
This a... | [
{
"code": null,
"e": 485,
"s": 171,
"text": "When you evaluate a new machine learning model and end up with an accuracy number or other metric, you need to know if it is meaningful. Particularly in imbalanced classification models, it can appear that your model isn’t really doing much better than gu... |
How to create a Junit report in Cypress? | We can create a Junit report in Cypress. To install the package for the JUnit report, run the command −
npm install cypress-junit-reporter --save-dev
Implementation in cypress.json
{
"reporter": "junit",
"reporterOptions": {
"mochaFile": "cypress/results/results.xml",
"toConsole": true
}
}
If we... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "We can create a Junit report in Cypress. To install the package for the JUnit report, run the command −"
},
{
"code": null,
"e": 1215,
"s": 1166,
"text": " npm install cypress-junit-reporter --save-dev"
},
{
"code": null,
... |
Generation of time delay in 8085 | In this section we will see how to generate the time delay using 8085 programs. The delay will be used in different places to simulate clocks, or counters or some other area.
When the delay subroutine is executed, the microprocessor does not execute other tasks. For the delay we are using the instruction execution time... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "In this section we will see how to generate the time delay using 8085 programs. The delay will be used in different places to simulate clocks, or counters or some other area."
},
{
"code": null,
"e": 1523,
"s": 1237,
"text": "When th... |
Search in an almost sorted array | 14 Mar, 2022
Given an array which is sorted, but after sorting some elements are moved to either of the adjacent positions, i.e., arr[i] may be present at arr[i+1] or arr[i-1]. Write an efficient function to search an element in this array. Basically the element arr[i] can only be swapped with either arr[i+1] or arr[i-... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 491,
"s": 54,
"text": "Given an array which is sorted, but after sorting some elements are moved to either of the adjacent positions, i.e., arr[i] may be present at arr[i+1] or arr[i-1]. Write an e... |
Split an array into chunks in JavaScript | 16 May, 2019
We have a large array and we want to split it into chunks. So these are few of the methods to do it.
splice()This method adds/removes items to/from an array, and returns the list of removed item(s).Syntax:array.splice(index, number, item1, ....., itemN)
Parameters:index:This parameter is required. It speci... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2019"
},
{
"code": null,
"e": 129,
"s": 28,
"text": "We have a large array and we want to split it into chunks. So these are few of the methods to do it."
},
{
"code": null,
"e": 725,
"s": 129,
"text": "splic... |
Whale Optimization Algorithm (WOA) | 12 Apr, 2021
The step-by-step procedure to obtain an optimum value (maximum or minimum) of an objective function is called an Optimization Algorithm.
Meta-heuristic optimization algorithms are becoming more and more popular in engineering applications because they:
rely on rather simple concepts and are easy to impleme... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Apr, 2021"
},
{
"code": null,
"e": 165,
"s": 28,
"text": "The step-by-step procedure to obtain an optimum value (maximum or minimum) of an objective function is called an Optimization Algorithm."
},
{
"code": null,
"e": 2... |
Java atan() method with Examples | 08 Apr, 2018
The java.lang.Math.atan() returns the arc tangent of an angle in between -pi/2 through pi/2. If the argument is NaN, then the result is NaN.
Note:If the argument is zero, then the result is a zero with the same sign as the argument.
Syntax :
public static double atan(double a)
Parameter :
a : the value who... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Apr, 2018"
},
{
"code": null,
"e": 169,
"s": 28,
"text": "The java.lang.Math.atan() returns the arc tangent of an angle in between -pi/2 through pi/2. If the argument is NaN, then the result is NaN."
},
{
"code": null,
"e... |
TCS Coding Practice Question | Check Odd or Even | 07 Jul, 2022
Given a number, the task is to check if this number is Odd or Even using Command Line Arguments. A number is called even if the number is divisible by 2 and is called odd if it is not divisible by 2.
Examples:
Input: 123
Output: No
Input: 588
Output: Yes
Approach:
Since the number is entered as Command ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 255,
"s": 53,
"text": "Given a number, the task is to check if this number is Odd or Even using Command Line Arguments. A number is called even if the number is divisible by 2 and is called odd if ... |
How to print all files within a directory using Python? | 29 May, 2021
In this article, we will learn “How to print all files within a directory using Python?”. To do this task we are using the os module in Python. So, let’s discuss some concepts related to that.
The os module is one of the most popular Python modules for automating the systems calls and operations of an oper... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 May, 2021"
},
{
"code": null,
"e": 247,
"s": 54,
"text": "In this article, we will learn “How to print all files within a directory using Python?”. To do this task we are using the os module in Python. So, let’s discuss some concept... |
MongoDB NOT operator ( $not ) | 22 Apr, 2020
MongoDB provides different types of logical query operators and $not operator is one of them. This operator is used to perform logical NOT operation on the specified operator expressions and select or retrieve only those documents that do not match the given operator expression. It also includes those docu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 468,
"s": 28,
"text": "MongoDB provides different types of logical query operators and $not operator is one of them. This operator is used to perform logical NOT operation on the specified operator ... |
Count numbers have all 1s together in binary representation | 24 Jun, 2022
Given an integer n, the task is to count the total lucky numbers smaller than or equal to n. A number is said to be lucky if it has all contagious number of 1’s in binary representation from the beginning. For example 1, 3, 7, 15 are lucky numbers, and 2, 5 and 9 are not lucky numbers.Examples:
Input :n ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 326,
"s": 28,
"text": "Given an integer n, the task is to count the total lucky numbers smaller than or equal to n. A number is said to be lucky if it has all contagious number of 1’s in binary repr... |
C# | Overloading of Indexers | 23 Jan, 2019
Like functions, Indexers can also be overloaded. In C#, we can have multiple indexers in a single class. To overload an indexer, declare it with multiple parameters and each parameter should have a different data type. Indexers are overloaded by passing 2 different types of parameters. It is quite similar ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jan, 2019"
},
{
"code": null,
"e": 358,
"s": 28,
"text": "Like functions, Indexers can also be overloaded. In C#, we can have multiple indexers in a single class. To overload an indexer, declare it with multiple parameters and each p... |
Rabin-Karp Algorithm for Pattern Searching | 25 Jun, 2022
Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m.
Examples:
Input: txt[] = "THIS IS A TEST TEXT"
pat[] = "TEST"
Output: Pattern found at index 10
Input: txt[] = "AABAACAA... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Jun, 2022"
},
{
"code": null,
"e": 228,
"s": 54,
"text": "Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m."... |
Python program to Reverse a range in list - GeeksforGeeks | 07 Apr, 2021
Given a List, our task is to write a Python program to reverse a range in the list.
Example:
Input : test_list = [6, 3, 1, 8, 9, 2, 10, 12, 7, 4, 11], str, end = 3, 9
Output : [6, 3, 1, 7, 12, 10, 2, 9, 8, 4, 11]
Explanation : 8, 9, 2, 10, 12, 7 are reversed in list to 7, 12, 10, 2, 9, 8.
Input : test_list... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 24376,
"s": 24292,
"text": "Given a List, our task is to write a Python program to reverse a range in the list."
},
{
"code": null,
"e": 24385,
"s": 24376,
"text": "Exampl... |
How do we display a text area in HTML? | Use the <textarea> tag to show a text area. The HTML <textarea> tag is used within a form to declare a textarea element - a control that allows the user to input text over multiple rows.
The following are the attributes −
You can try to run the following code to display a text area in HTML −
<!DOCTYPE html>
<html>
<... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "Use the <textarea> tag to show a text area. The HTML <textarea> tag is used within a form to declare a textarea element - a control that allows the user to input text over multiple rows."
},
{
"code": null,
"e": 1284,
"s": 1249,
"tex... |
What is the use of ‘Using’ statement in C#? | The using statement is used to set one or more than one resource. These resources are executed and the resource is released. The statement is also used with database operations.
The main goal is to manage resources and release all the resources automatically.
Let us see an example wherein “A” would print first since th... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "The using statement is used to set one or more than one resource. These resources are executed and the resource is released. The statement is also used with database operations."
},
{
"code": null,
"e": 1322,
"s": 1240,
"text": "The ... |
How to preload all Angular Bundles ? - GeeksforGeeks | 05 Jun, 2020
Introduction to pre-loading: The introduction of the Lazy Loading feature in Angular greatly improved the performance of the application. Lazy loading helps keep initial bundle sizes smaller, which in turn helps decrease load times. But, the main problem with lazy loading was that when the user navigates(o... | [
{
"code": null,
"e": 25109,
"s": 25081,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 25556,
"s": 25109,
"text": "Introduction to pre-loading: The introduction of the Lazy Loading feature in Angular greatly improved the performance of the application. Lazy loading helps keep i... |
How to compare two images using Java OpenCV library? | To compare two images −
Read Both of them using the Image.IO.read() method.
Read Both of them using the Image.IO.read() method.
Get the height and width of both of them to make sure they are equal.
Get the height and width of both of them to make sure they are equal.
Get the pixel values and, get the RGB values of both... | [
{
"code": null,
"e": 1086,
"s": 1062,
"text": "To compare two images −"
},
{
"code": null,
"e": 1138,
"s": 1086,
"text": "Read Both of them using the Image.IO.read() method."
},
{
"code": null,
"e": 1190,
"s": 1138,
"text": "Read Both of them using the Image.I... |
Count ways to reach end from start stone with at most K jumps at each step - GeeksforGeeks | 24 Nov, 2021
Given N stones in a row from left to right. From each stone, you can jump to at most K stones. The task is to find the total number of ways to reach from sth stone to Nth stone.Examples:
Input: N = 5, s = 2, K = 2 Output: Total Ways = 3 Explanation: Assume s1, s2, s3, s4, s5 be the stones. The possible p... | [
{
"code": null,
"e": 24780,
"s": 24752,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 24969,
"s": 24780,
"text": "Given N stones in a row from left to right. From each stone, you can jump to at most K stones. The task is to find the total number of ways to reach from sth stone... |
Assembly - Constants | There are several directives provided by NASM that define constants. We have already used the EQU directive in previous chapters. We will particularly discuss three directives −
EQU
%assign
%define
The EQU directive is used for defining constants. The syntax of the EQU directive is as follows −
CONSTANT_NAME EQU expres... | [
{
"code": null,
"e": 2263,
"s": 2085,
"text": "There are several directives provided by NASM that define constants. We have already used the EQU directive in previous chapters. We will particularly discuss three directives −"
},
{
"code": null,
"e": 2267,
"s": 2263,
"text": "EQU"... |
How to automate voxel modelling of 3D point cloud with python | Towards Data Science | What if we had a quick way to transform point clouds captured from reality into 3D meshes? And what if these 3D meshes were a voxel-based assembly? Is this something that makes sense? How can this help you for creative or professional purposes? 🤔
Let us dive in with a small lego story before exploring the python autom... | [
{
"code": null,
"e": 419,
"s": 172,
"text": "What if we had a quick way to transform point clouds captured from reality into 3D meshes? And what if these 3D meshes were a voxel-based assembly? Is this something that makes sense? How can this help you for creative or professional purposes? 🤔"
},
... |
Why choose between R and Python?. The reticulate package makes it easy to... | by Keith McNulty | Towards Data Science | R and Python have many similarities and many differences. Most of the underlying concepts of data structures are very similar between the two languages, and there are many data science packages that now exist in both languages. But R is set up in a way that I would describe as ‘data first, application second’, whereas ... | [
{
"code": null,
"e": 727,
"s": 172,
"text": "R and Python have many similarities and many differences. Most of the underlying concepts of data structures are very similar between the two languages, and there are many data science packages that now exist in both languages. But R is set up in a way th... |
Write a Golang program to find the sum of digits for a given number | num = 125 => 1 + 2 + 5 = 8
num = 101 => 1 + 0 + 1 = 2
num = 151 => 1 + 5 + 1 = 7
Step 1: Define a function that accepts numbers(num); type is int.
Step 2: Start a true loop until num becomes 0 and define res:=0.
Step 3: Find modulo and add to res.
Step 4: Divide num by 10.
Step 5: Return res.
Live Demo
package main
imp... | [
{
"code": null,
"e": 1089,
"s": 1062,
"text": "num = 125 => 1 + 2 + 5 = 8"
},
{
"code": null,
"e": 1116,
"s": 1089,
"text": "num = 101 => 1 + 0 + 1 = 2"
},
{
"code": null,
"e": 1143,
"s": 1116,
"text": "num = 151 => 1 + 5 + 1 = 7"
},
{
"code": null,
... |
VB.Net - Button Control | The Button control represents a standard Windows button. It is generally used to generate a Click event by providing a handler for the Click event.
Let's create a label by dragging a Button control from the Toolbox ad dropping it on the form.
The following are some of the commonly used properties of the Button control ... | [
{
"code": null,
"e": 2448,
"s": 2300,
"text": "The Button control represents a standard Windows button. It is generally used to generate a Click event by providing a handler for the Click event."
},
{
"code": null,
"e": 2543,
"s": 2448,
"text": "Let's create a label by dragging a... |
Storing Output on a File in Julia | 04 May, 2022
Julia provides a vast library to store and save the output in multiple file formats. We can store the output in various forms such as CSV(comma-separated value) or in Excel or just simply a text file.
In order to store the data in a text file, we need to use open() function with “w” flag which allows us to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 May, 2022"
},
{
"code": null,
"e": 229,
"s": 28,
"text": "Julia provides a vast library to store and save the output in multiple file formats. We can store the output in various forms such as CSV(comma-separated value) or in Excel or... |
How to change the font and size of buttons and frame in tkinter? | Tkinter Button Widgets are a general way to provide Event Handling in a variety of applications. Sometimes, we may need to style the buttons which are defined in an application. In order to add styling in the button widgets, first create an instance of Button widget using a variable. Then, add some property like fontfa... | [
{
"code": null,
"e": 1620,
"s": 1187,
"text": "Tkinter Button Widgets are a general way to provide Event Handling in a variety of applications. Sometimes, we may need to style the buttons which are defined in an application. In order to add styling in the button widgets, first create an instance of ... |
GATE | GATE CS 2020 | Question 15 | 11 Aug, 2021
The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree ?(A) 10, 11, 12, 15, 16, 18, 19, 20(B) 11, 12, 10, 16, 19, 18, 20, 15(C) 20, 19, 18, 16, 15, 12, 11, 10(D) 19, 16, 18, 20, 11, 12, 10, 15Answer: (B)Explanation... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 408,
"s": 28,
"text": "The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree ?(A) 10, 11, 12, 15, 16, 18... |
What is a Melting Point? | 26 Sep, 2021
The matter is characterised by different states. There can be a transition from one state of matter to another. For instance, a solid can be transformed into a liquid and a liquid can be changed into a gas. For example, most of the solid metals, transform into liquid on heating and turn into vapour on furt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Sep, 2021"
},
{
"code": null,
"e": 348,
"s": 28,
"text": "The matter is characterised by different states. There can be a transition from one state of matter to another. For instance, a solid can be transformed into a liquid and a li... |
PostgreSQL – Connecting to the database using Python | 30 Aug, 2020
PostgreSQL API for Python allows user to interact with the PostgreSQL database using the psycopg2 module. In this article we will look into the process of connecting to a PostgreSQL database using Python.
First we will need to install the psycopg2 module with the below command in the command prompt:
pip in... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Aug, 2020"
},
{
"code": null,
"e": 233,
"s": 28,
"text": "PostgreSQL API for Python allows user to interact with the PostgreSQL database using the psycopg2 module. In this article we will look into the process of connecting to a Post... |
Getting union of sets in Julia – union() and union!() Methods | 26 Mar, 2020
The union() is an inbuilt function in julia which is used to construct the union of the specified sets.
Syntax: union(s, itrs...)
Parameters:
s: Specified first set.
itrs: Specified second set.
Returns: It returns the constructed union of the specified sets.
Example:
# Julia program to illustrate # the use... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 132,
"s": 28,
"text": "The union() is an inbuilt function in julia which is used to construct the union of the specified sets."
},
{
"code": null,
"e": 158,
"s": 132,
"text": "Sy... |
How to Export Multiple Dataframes to Different Excel Worksheets in R | 17 Jun, 2021
In this article, we are going to see how to export multiple dataframe to different Excel Worksheets in R Programming Language.
We will be using the xlsx module. The xlsx library provides R functions to read/write/format Excel files and their formats. The xlsx package gives programmatic control of Excel fil... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "In this article, we are going to see how to export multiple dataframe to different Excel Worksheets in R Programming Language."
},
{
"code": null,
"e": 694,
"s... |
Program to print an array in Pendulum Arrangement | 08 Jun, 2022
Write a program to input a list of integers in an array and arrange them in a way similar to the to-and-fro movement of a Pendulum.
The minimum element out of the list of integers, must come in center position of array.
The number in the ascending order next to the minimum, goes to the right, the next high... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 184,
"s": 52,
"text": "Write a program to input a list of integers in an array and arrange them in a way similar to the to-and-fro movement of a Pendulum."
},
{
"code": null,
"e": 272,
... |
Operating Systems | Set 16 | 24 Sep, 2021
Following questions have been asked in GATE CS 2005 exam.
1) Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, such I/O protection is ensured by having the I/O instructions privileged. In a CPU with memory mapped I/O, th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 111,
"s": 52,
"text": "Following questions have been asked in GATE CS 2005 exam. "
},
{
"code": null,
"e": 668,
"s": 111,
"text": "1) Normally user programs are prevented from h... |
Python | Binary list to integer | 21 Feb, 2019
The problem being discussed in this article is quite common that every programmer would have come across it. Conversion of binary number list to its integer value can be done using shorthands and knowledge of them can prove to be quite useful. Let’s discuss certain ways in which this can be done.
Method #1... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 326,
"s": 28,
"text": "The problem being discussed in this article is quite common that every programmer would have come across it. Conversion of binary number list to its integer value can be done ... |
Julia Fractal set in C/C++ Using Graphics | 02 Jan, 2020
The Julia set is associated with those points z = x + iy on the complex plane for which the series zn+1 = zn2 + c does not tend to infinity. c is a complex constant, one gets a different Julia set for each c. The initial value z0 for the series is each point in the image plane.
The well known Mandelbrot se... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Jan, 2020"
},
{
"code": null,
"e": 333,
"s": 54,
"text": "The Julia set is associated with those points z = x + iy on the complex plane for which the series zn+1 = zn2 + c does not tend to infinity. c is a complex constant, one gets... |
Recursive Program to print multiplication table of a number - GeeksforGeeks | 05 Apr, 2021
Given a number N, the task is to print its multiplication table using recursion. Examples
Input: N = 5 Output: 5 * 1 = 5 5 * 2 = 10 5 * 3 = 15 5 * 4 = 20 5 * 5 = 25 5 * 6 = 30 5 * 7 = 35 5 * 8 = 40 5 * 9 = 45 5 * 10 = 50Input: N = 8 Output: 8 * 1 = 8 8 * 2 = 16 8 * 3 = 24 8 * 4 = 32 8 * 5 = 40 8 * 6 = 48... | [
{
"code": null,
"e": 27151,
"s": 27123,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 27243,
"s": 27151,
"text": "Given a number N, the task is to print its multiplication table using recursion. Examples "
},
{
"code": null,
"e": 27506,
"s": 27243,
"text":... |
React-Bootstrap OverlayTrigger Component - GeeksforGeeks | 04 May, 2021
React-Bootstrap is a front-end framework that was designed keeping react in mind. OverlayTrigger Component helps with common use-cases into our Overlay components. It positions itself with the help of ref and style prop for our overlay component. We can use the following approach in ReactJS to use the reac... | [
{
"code": null,
"e": 26181,
"s": 26153,
"text": "\n04 May, 2021"
},
{
"code": null,
"e": 26526,
"s": 26181,
"text": "React-Bootstrap is a front-end framework that was designed keeping react in mind. OverlayTrigger Component helps with common use-cases into our Overlay components.... |
Convert Decimal to String in Python - GeeksforGeeks | 28 Jul, 2020
Python defines type conversion functions to directly convert one data type to another. This article is aimed at providing the information about converting decimal to string.
str() method can be used to convert decimal to string in Python.
Syntax: str(object, encoding=’utf-8?, errors=’strict’)
Parameters:
o... | [
{
"code": null,
"e": 24317,
"s": 24289,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 24491,
"s": 24317,
"text": "Python defines type conversion functions to directly convert one data type to another. This article is aimed at providing the information about converting decimal ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.