title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Determinant of a Matrix in C++ Program | In this tutorial, we are going to learn how to find the determinant of a matrix.
Let's see the steps to find the determinant of a matrix.
Initialize the matrix.
Initialize the matrix.
Write a function to find the determinant of the matrix.If the size of the matrix is 1 or 2, then find the determinant of the matrix. It'... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "In this tutorial, we are going to learn how to find the determinant of a matrix."
},
{
"code": null,
"e": 1200,
"s": 1143,
"text": "Let's see the steps to find the determinant of a matrix."
},
{
"code": null,
"e": 1223,
... |
How to use Transformer Networks to build a Forecasting model | by Youness Mansar | Towards Data Science | I recently read a really interesting paper called Deep Transformer Models for Time Series Forecasting: The Influenza Prevalence Case. I thought it might be an interesting project to implement something similar from scratch to learn more about time series forecasting.
In time series forecasting, the objective is to pred... | [
{
"code": null,
"e": 440,
"s": 172,
"text": "I recently read a really interesting paper called Deep Transformer Models for Time Series Forecasting: The Influenza Prevalence Case. I thought it might be an interesting project to implement something similar from scratch to learn more about time series ... |
EJB - Dependency Injection | EJB 3.0 specification provides annotations, which can be applied on fields or setter methods to inject dependencies. EJB Container uses the global JNDI registry to locate the dependency. Following annotations are used in EJB 3.0 for dependency injection.
@EJB − used to inject other EJB reference.
@EJB − used to inject ... | [
{
"code": null,
"e": 2302,
"s": 2047,
"text": "EJB 3.0 specification provides annotations, which can be applied on fields or setter methods to inject dependencies. EJB Container uses the global JNDI registry to locate the dependency. Following annotations are used in EJB 3.0 for dependency injection... |
Print all strings of maximum length from an array of strings | 22 Jun, 2021
Given an array of strings arr[], the task is to print all the strings of maximum length from the given array.
Example:
Input: arr[] = {“aba”, “aa”, “ad”, “vcd”, “aba”}Output: aba vcd abaExplanation:Maximum length among all the strings from the given array is 3.The strings having length equal to 3 from the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 162,
"s": 52,
"text": "Given an array of strings arr[], the task is to print all the strings of maximum length from the given array."
},
{
"code": null,
"e": 171,
"s": 162,
"tex... |
K’th Least Element in a Min-Heap | 29 Nov, 2018
Given a min-heap of size n, find the kth least element in the min-heap.
Examples:
Input : {10, 50, 40, 75, 60, 65, 45}k = 4Output : 50
Input : {10, 50, 40, 75, 60, 65, 45}k = 2Output : 40
Naive approach:We can extract the minimum element from the min-heap k times and the last element extracted will be the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 124,
"s": 52,
"text": "Given a min-heap of size n, find the kth least element in the min-heap."
},
{
"code": null,
"e": 134,
"s": 124,
"text": "Examples:"
},
{
"code": n... |
Program to print Even Odd Number Pyramid | 06 Jun, 2022
Given the total number of rows as n, the task is to print the given pattern.
* 1* *2* 1*3* *2*4* 1*3*5* *2*4*6* 1*3*5*7* *2*4*6*8* 1*3*5*7*9* . .
Examples:
Input: n = 5
Output:
*
1*
*2*
1*3*
*2*4*
Input: n = 10
Output:
*
1*
*2*
1*3*
*2*4*
1*3*5*
*2*4*6*
1*3*5*7*
*2*4*6*8*
1*3*5*7*9*
Below is the solu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 106,
"s": 28,
"text": "Given the total number of rows as n, the task is to print the given pattern. "
},
{
"code": null,
"e": 177,
"s": 106,
"text": "* 1* *2* 1*3* *2*4* 1*3*5* *... |
Lex Program to print the total characters, white spaces, tabs in the given input file | 30 Apr, 2019
Lex is a computer program that generates lexical analyzers. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in the C programming language.
The commands for executing the lex program are:
lex abc.l (abc is the file name)
cc lex.yy.c -lfl
./a.out
Let’... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 248,
"s": 52,
"text": "Lex is a computer program that generates lexical analyzers. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in the C ... |
How to Replace a Element in Java ArrayList? | 27 Jul, 2021
To replace an element in Java ArrayList, set() method of java.util. An ArrayList class can be used. The set() method takes two parameters-the indexes of the element which has to be replaced and the new element. The index of an ArrayList is zero-based. So, to replace the first element, 0 should be the index... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 Jul, 2021"
},
{
"code": null,
"e": 384,
"s": 53,
"text": "To replace an element in Java ArrayList, set() method of java.util. An ArrayList class can be used. The set() method takes two parameters-the indexes of the element which has... |
Different ways to Initialize all members of an array to the same value in C | 09 Oct, 2018
An array is a collection of data that holds fixed number of values of same type. For example: if you want to store marks of 100 students, you can create an array for it.
int num[100];
How to declare an array in C?
Data_type array_name[size_of_array];
For example,
float num[10];
Below are some of the di... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Oct, 2018"
},
{
"code": null,
"e": 224,
"s": 54,
"text": "An array is a collection of data that holds fixed number of values of same type. For example: if you want to store marks of 100 students, you can create an array for it."
}... |
Greedy Algorithm for Egyptian Fraction | 21 Feb, 2022
Every positive fraction can be represented as sum of unique unit fractions. A fraction is unit fraction if numerator is 1 and denominator is a positive integer, for example 1/3 is a unit fraction. Such a representation is called Egyptian Fraction as it was used by ancient Egyptians. Following are few examp... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 368,
"s": 54,
"text": "Every positive fraction can be represented as sum of unique unit fractions. A fraction is unit fraction if numerator is 1 and denominator is a positive integer, for example 1... |
Check whether two Strings are Anagram of each other using HashMap in Java - GeeksforGeeks | 01 Aug, 2019
Write a function to check whether two given strings are an Anagram of each other or not.
An anagram of a string is another string that contains the same characters, only the order of characters can be different.
For example, “abcd” and “dabc” are an Anagram of each other.
Approach: Hashmaps can also be use... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n01 Aug, 2019"
},
{
"code": null,
"e": 24311,
"s": 24222,
"text": "Write a function to check whether two given strings are an Anagram of each other or not."
},
{
"code": null,
"e": 24434,
"s": 24311,
"text": "A... |
GATE | GATE-CS-2009 | Question 60 - GeeksforGeeks | 28 Jun, 2021
Let R and S be relational schemes such that R={a,b,c} and S={c}. Now consider the following queries on the database:
IV) SELECT R.a, R.b
FROM R,S
WHERE R.c=S.c
Which of the above queries are equivalent?(A) I and II(B) I and III(C) II and IV(D) III and IVAnswer: (A)Explanation: I and II d... | [
{
"code": null,
"e": 24492,
"s": 24464,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24609,
"s": 24492,
"text": "Let R and S be relational schemes such that R={a,b,c} and S={c}. Now consider the following queries on the database:"
},
{
"code": null,
"e": 24671,
... |
Hibernate - ORM Overview | JDBC stands for Java Database Connectivity. It provides a set of Java API for accessing the relational databases from Java program. These Java APIs enables Java programs to execute SQL statements and interact with any SQL compliant database.
JDBC provides a flexible architecture to write a database independent applicat... | [
{
"code": null,
"e": 2305,
"s": 2063,
"text": "JDBC stands for Java Database Connectivity. It provides a set of Java API for accessing the relational databases from Java program. These Java APIs enables Java programs to execute SQL statements and interact with any SQL compliant database."
},
{
... |
H2 Database - Select | Select command is used to fetch record data from a table or multiple tables. If we design a select query, then it returns data in the form of result table called result sets.
The basic syntax of SELECT statement is as follows −
SELECT [ TOP term ] [ DISTINCT | ALL ] selectExpression [,...]
FROM tableExpression [,...] ... | [
{
"code": null,
"e": 2282,
"s": 2107,
"text": "Select command is used to fetch record data from a table or multiple tables. If we design a select query, then it returns data in the form of result table called result sets."
},
{
"code": null,
"e": 2335,
"s": 2282,
"text": "The bas... |
Absolute, Relative and Percentage errors in Numerical Analysis - GeeksforGeeks | 05 Jan, 2021
Let’s first know some basics about numbers used in floating-point arithmetic or in other words Numerical analysis and how they are calculated.
Basically, all the numbers that we use in Numerical Analysis are of two types as follows.
Exact Numbers –Numbers that have their exact quantity, means their value ... | [
{
"code": null,
"e": 24916,
"s": 24888,
"text": "\n05 Jan, 2021"
},
{
"code": null,
"e": 25060,
"s": 24916,
"text": "Let’s first know some basics about numbers used in floating-point arithmetic or in other words Numerical analysis and how they are calculated."
},
{
"code... |
Euphoria - Flow Control | Program execution flow refers to the order in which program statements get executed. By default the statements get executed one after another.
However; many times the order of execution needs to be altered from the default order, to get the task done.
Euphoria has a number of flow control statements that you can use to... | [
{
"code": null,
"e": 2110,
"s": 1967,
"text": "Program execution flow refers to the order in which program statements get executed. By default the statements get executed one after another."
},
{
"code": null,
"e": 2219,
"s": 2110,
"text": "However; many times the order of execut... |
C# | Math.Sign() Method - GeeksforGeeks | 31 Jan, 2019
In C#, Sign() is a math class method which returns an integer that specify the sign of the number. This method can be overloaded by changing the data type of the passed arguments as follows:
Math.Sign(Decimal): Returns the integer that specifies the sign of a decimal number.
Math.Sign(Double): Returns the ... | [
{
"code": null,
"e": 25611,
"s": 25583,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 25802,
"s": 25611,
"text": "In C#, Sign() is a math class method which returns an integer that specify the sign of the number. This method can be overloaded by changing the data type of the p... |
C Program for Cutting a Rod | DP-13 - GeeksforGeeks | 25 Jun, 2021
Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces. For example, if length of the rod is 8 and the values of different pieces are given as following, then the ma... | [
{
"code": null,
"e": 26175,
"s": 26147,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 26558,
"s": 26175,
"text": "Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting ... |
Just Start with the Dask LocalCluster | by Hugo Shi | Towards Data Science | This article is the first article of an ongoing series on using Dask in practice. Each article in this series will be simple enough for beginners, but provide useful tips for real work. The next article in the series is about parallelizing for loops, and other embarssingly parallel operations with dask.delayed.
At Satu... | [
{
"code": null,
"e": 485,
"s": 172,
"text": "This article is the first article of an ongoing series on using Dask in practice. Each article in this series will be simple enough for beginners, but provide useful tips for real work. The next article in the series is about parallelizing for loops, and ... |
ReactJS Blueprint Dialog Component - GeeksforGeeks | 08 Apr, 2022
BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications.
Dialog Component allows the user to show content on top of an overlay that requires user interaction. We can use the following approa... | [
{
"code": null,
"e": 26667,
"s": 26639,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 26841,
"s": 26667,
"text": "BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop app... |
Convert CSV to list in R - GeeksforGeeks | 16 May, 2021
In this article, we will discuss how to convert the content of the CSV file to list in R Programming Language.
CSV Used:
In this method, the file is first read into the R program and then one by one using for loop the columns are extracted and converted to list explicitly using list() function.
Example :
R... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 26598,
"s": 26487,
"text": "In this article, we will discuss how to convert the content of the CSV file to list in R Programming Language."
},
{
"code": null,
"e": 26608,
"s":... |
What is the maximum length of MySQL VARCHAR column? | Actually VARCHAR data type stores variable-length character data in single byte and multibyte character Syntax for this data type is VARCHAR(n),where n is the maximum number of characters and it must be specified while creating the table. Before MySQL 5.03 the value of n can be in the range of 0 to 255 but in and after... | [
{
"code": null,
"e": 1440,
"s": 1062,
"text": "Actually VARCHAR data type stores variable-length character data in single byte and multibyte character Syntax for this data type is VARCHAR(n),where n is the maximum number of characters and it must be specified while creating the table. Before MySQL 5... |
How to get button toggle state within HTML? - GeeksforGeeks | 21 Apr, 2021
Toggle buttons are basically on/off buttons. A button can be switched from on to off state and vice-versa. This process is called toggling.Examples of toggle button:
The buttons on our switchboards are the best example of toggle buttons.
Some of the buttons on our phones- the torch button, the mobile dat... | [
{
"code": null,
"e": 26017,
"s": 25989,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 26185,
"s": 26017,
"text": "Toggle buttons are basically on/off buttons. A button can be switched from on to off state and vice-versa. This process is called toggling.Examples of toggle butto... |
I analyzed hundreds of user’s Tinder data — including messages — so you don’t have to. | by Alyssa Beatriz Fernandez | Towards Data Science | I read Modern Romance by Aziz Ansari in 2016 and beyond a shadow of a doubt, it is one of the most influential books I’ve ever read. At the time, I was a snot-nosed college student who was still dating someone from high school.
The numbers and figures given by the book about online dating success struck me as being cal... | [
{
"code": null,
"e": 399,
"s": 171,
"text": "I read Modern Romance by Aziz Ansari in 2016 and beyond a shadow of a doubt, it is one of the most influential books I’ve ever read. At the time, I was a snot-nosed college student who was still dating someone from high school."
},
{
"code": null,... |
asin() and atan() functions in C/C++ with Example - GeeksforGeeks | 30 Oct, 2020
In C++, asin() and atan() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. All the functions available in this library take double as an argument and return double as the result.
asin()
asin() function is used to find the ar... | [
{
"code": null,
"e": 24219,
"s": 24191,
"text": "\n30 Oct, 2020"
},
{
"code": null,
"e": 24481,
"s": 24219,
"text": "In C++, asin() and atan() is a predefined function used for mathematical calculations. math.h is the header file required for various mathematical functions. All t... |
Dekker's algorithm in Operating System | Dekker’s algorithm is the first solution of critical section problem. There are many versions of this algorithms, the 5th or final version satisfies the all the conditions below and is the most efficient among all of them.
The solution to critical section problem must ensure the following three conditions:
Mutual Exclu... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "Dekker’s algorithm is the first solution of critical section problem. There are many versions of this algorithms, the 5th or final version satisfies the all the conditions below and is the most efficient among all of them."
},
{
"code": null,
... |
How to iterate json array – JavaScript? | To iterate JSON array, use the JSON.parse().
Following is the code −
var apiValues =
[
'{"name": "John", "scores": [78, 89]}',
'{"name": "David", "scores": [58, 98]}',
'{"name": "Bob", "scores": [56, 79]}',
'{"name": "Mike", "scores": [94, 91]}'
];
var parseJSONObject = apiValues.map(obj =... | [
{
"code": null,
"e": 1107,
"s": 1062,
"text": "To iterate JSON array, use the JSON.parse()."
},
{
"code": null,
"e": 1131,
"s": 1107,
"text": "Following is the code −"
},
{
"code": null,
"e": 1505,
"s": 1131,
"text": "var apiValues =\n [\n '{\"name\": \... |
How to get an attribute value in jQuery? | To get an attribute value in jQuery is quite easy. For this, use the jQuery attr() method. You can try to run the following code to learn how to get an attribute value in jQuery −
Live Demo
<html>
<head>
<title>jQuery Example</title>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jque... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "To get an attribute value in jQuery is quite easy. For this, use the jQuery attr() method. You can try to run the following code to learn how to get an attribute value in jQuery −"
},
{
"code": null,
"e": 1252,
"s": 1242,
"text": "Li... |
MySQL regular expression to update a table with column values including string, numbers and special characters | For this, use UPDATE command along with REGEXP. Let us first create a table −
mysql> create table DemoTable2023
-> (
-> StreetNumber varchar(100)
-> );
Query OK, 0 rows affected (0.59 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable2023 values('7');
Query OK, 1 row affe... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "For this, use UPDATE command along with REGEXP. Let us first create a table −"
},
{
"code": null,
"e": 1260,
"s": 1140,
"text": "mysql> create table DemoTable2023\n -> (\n -> StreetNumber varchar(100)\n -> );\nQuery OK, 0 rows ... |
Guava - Quick Guide | Guava is an open source, Java-based library and contains many core libraries of Google, which are being used in many of their projects. It facilitates best coding practices and helps reduce coding errors. It provides utility methods for collections, caching, primitives support, concurrency, common annotations, string p... | [
{
"code": null,
"e": 2238,
"s": 1885,
"text": "Guava is an open source, Java-based library and contains many core libraries of Google, which are being used in many of their projects. It facilitates best coding practices and helps reduce coding errors. It provides utility methods for collections, cac... |
C# Multiple Local Variable Declarations | In C#, you can use the comma to declare more than one local variable in a statement. The following displays the same −
int a = 20, b = 70, c = 40, d = 90;
Let us see an example in which we are declaring multiple local variables. Below four variable is declared and initialized in the same statement.
Live Demo
using Syst... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "In C#, you can use the comma to declare more than one local variable in a statement. The following displays the same −"
},
{
"code": null,
"e": 1217,
"s": 1181,
"text": "int a = 20, b = 70, c = 40, d = 90;"
},
{
"code": null,... |
C# Files | The File class from the
System.IO namespace, allows us to work with files:
using System.IO; // include the System.IO namespace
File.SomeFileMethod(); // use the file class with methods
The File class has many useful methods for creating and getting information
about files.
For example:
For a full list of File me... | [
{
"code": null,
"e": 76,
"s": 0,
"text": "The File class from the \nSystem.IO namespace, allows us to work with files:"
},
{
"code": null,
"e": 190,
"s": 76,
"text": "using System.IO; // include the System.IO namespace\n\nFile.SomeFileMethod(); // use the file class with method... |
Interesting Fact about Python Multi-line Comments - GeeksforGeeks | 09 Sep, 2021
Multi-line comments(comments block) are used for description of large text of code or comment out chunks of code at the time of debugging application.Does Python Support Multi-line Comments(like c/c++...)? Actually in many online tutorial and website you will find that multiline_comments are available in p... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 24486,
"s": 23927,
"text": "Multi-line comments(comments block) are used for description of large text of code or comment out chunks of code at the time of debugging application.Does Python S... |
JDBC - Create Database Example | This tutorial provides an example on how to create a Database using JDBC application. Before executing the following example, make sure you have the following in place −
You should have admin privilege to create a database in the given schema. To execute the following example, you need to replace the username and passw... | [
{
"code": null,
"e": 2332,
"s": 2162,
"text": "This tutorial provides an example on how to create a Database using JDBC application. Before executing the following example, make sure you have the following in place −"
},
{
"code": null,
"e": 2527,
"s": 2332,
"text": "You should h... |
C# | Constructors - GeeksforGeeks | 05 Nov, 2020
A constructor is a special method of the class which gets automatically invoked whenever an instance of the class is created. Like methods, a constructor also contains the collection of instructions that are executed at the time of Object creation. It is used to assign initial values to the data members of... | [
{
"code": null,
"e": 25224,
"s": 25196,
"text": "\n05 Nov, 2020"
},
{
"code": null,
"e": 25549,
"s": 25224,
"text": "A constructor is a special method of the class which gets automatically invoked whenever an instance of the class is created. Like methods, a constructor also cont... |
PyQt5 QScrollBar – Setting Value - GeeksforGeeks | 04 Aug, 2021
In this article we will see how we can set the value of QScrollBar. QScrollBar is a control that enables the user to access parts of a document that is larger than the widget used to display it. Slider is the scroll-able object inside the bar. Value is basically depend upon the slider position, scroll bar ... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 26084,
"s": 25647,
"text": "In this article we will see how we can set the value of QScrollBar. QScrollBar is a control that enables the user to access parts of a document that is larger than... |
Decimal Functions in Python | Set 2 (logical_and(), normalize(), quantize(), rotate() ... ) - GeeksforGeeks | 09 Feb, 2022
Some of the Decimal functions have been discussed in Set 1 below
Decimal Functions in Python | Set 1
More functions are discussed in this article.1. logical_and() :- This function computes digit-wise logical “and” operation of the number. Digits can only have the values 0 or 1.
2. logical_or() :- This func... | [
{
"code": null,
"e": 26367,
"s": 26339,
"text": "\n09 Feb, 2022"
},
{
"code": null,
"e": 26432,
"s": 26367,
"text": "Some of the Decimal functions have been discussed in Set 1 below"
},
{
"code": null,
"e": 26468,
"s": 26432,
"text": "Decimal Functions in Pyth... |
Python - Print Heart Pattern - GeeksforGeeks | 24 Feb, 2021
Given an even integer input, the task is to write a Python program to print a heart using loops and mathematical formulations.
For n = 8
* * * *
* * *
* *
* G F G *
* *
* *
* *
*
For n = 14
* * ... | [
{
"code": null,
"e": 25581,
"s": 25553,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 25708,
"s": 25581,
"text": "Given an even integer input, the task is to write a Python program to print a heart using loops and mathematical formulations."
},
{
"code": null,
"e":... |
Reverse a Stack using C# | Set a stack and add elements to it.
Stack st = new Stack();
st.Push('P');
st.Push('Q');
st.Push('R');
Now set another stack to reverse it.
Stack rev = new Stack();
Until the count of ths Stack is not equal to 0, use the Push and Pop method to reverse it.
while (st.Count != 0) {
rev.Push(st.Pop());
}
The following is... | [
{
"code": null,
"e": 1098,
"s": 1062,
"text": "Set a stack and add elements to it."
},
{
"code": null,
"e": 1164,
"s": 1098,
"text": "Stack st = new Stack();\nst.Push('P');\nst.Push('Q');\nst.Push('R');"
},
{
"code": null,
"e": 1201,
"s": 1164,
"text": "Now se... |
Git Revert | revert is the command we use when we want to take a previous commit and add it as a new commit, keeping the log intact.
Step 1: Find the previous commit:
Step 2: Use it to make a new commit:
Let's make a new commit, where we have "accidentally" deleted a file:
git commit -m "Just a regular update, definitely no acciden... | [
{
"code": null,
"e": 120,
"s": 0,
"text": "revert is the command we use when we want to take a previous commit and add it as a new commit, keeping the log intact."
},
{
"code": null,
"e": 154,
"s": 120,
"text": "Step 1: Find the previous commit:"
},
{
"code": null,
"e... |
HTML | File Paths | 12 Aug, 2021
A file path specifies the location of a file inside a web folder structure. Its like an address of a file which helps the web browser to access the files. File paths are used to link external resources such as images, videos, style sheets, JavaScript, displaying other web pages etc.To insert a file in a we... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Aug, 2021"
},
{
"code": null,
"e": 566,
"s": 53,
"text": "A file path specifies the location of a file inside a web folder structure. Its like an address of a file which helps the web browser to access the files. File paths are used... |
Time Functions in Python | Set 1 (time(), ctime(), sleep()...) | 22 Jan, 2022
Python has defined a module, “time” which allows us to handle various operations regarding time, its conversions and representations, which find its use in various applications in life. The beginning of time is started measuring from 1 January, 12:00 am, 1970 and this very time is termed as “epoch” in Pyth... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jan, 2022"
},
{
"code": null,
"e": 363,
"s": 52,
"text": "Python has defined a module, “time” which allows us to handle various operations regarding time, its conversions and representations, which find its use in various applicatio... |
PyCairo – Saving SVG Image file to PNG file | 12 Nov, 2020
In this article, we will see how we can save an SVG file to a PNG file using PyCairo in Python. We can create an SVG file using SVGSurface method. An SVG file is a graphics file that uses a two-dimensional vector graphic format created by the World Wide Web Consortium (W3C). It describes images using a tex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Nov, 2020"
},
{
"code": null,
"e": 454,
"s": 28,
"text": "In this article, we will see how we can save an SVG file to a PNG file using PyCairo in Python. We can create an SVG file using SVGSurface method. An SVG file is a graphics fi... |
How to configure ESLint for React Projects ? | 21 Sep, 2021
In this article, we will see how to configure ESLint for your React Project from scratch. Before getting started you may refer to a previous article on ESLint introduction although it’s not a necessity.Talking about ESLint it’s a linting tool that finds and many times fixes problems in your JavaScript code... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 927,
"s": 52,
"text": "In this article, we will see how to configure ESLint for your React Project from scratch. Before getting started you may refer to a previous article on ESLint introduction al... |
Important differences between Python 2.x and Python 3.x with examples | 01 Mar, 2021
Division operator
print function
Unicode
xrange
Error Handling
_future_ module
Division operator
If we are porting our code or executing python 3.x code in python 2.x, it can be dangerous if integer division changes go unnoticed (since it doesn’t raise any error). It is preferred to use the floating value ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Mar, 2021"
},
{
"code": null,
"e": 70,
"s": 52,
"text": "Division operator"
},
{
"code": null,
"e": 85,
"s": 70,
"text": "print function"
},
{
"code": null,
"e": 93,
"s": 85,
"text": "Unicode"... |
Frequency count of multiple variables in R Dataframe | 30 May, 2021
A data frame may contain repeated or missing values. Each column may contain any number of duplicate or repeated instances of the same variable. Data statistics and analysis mostly rely on the task of computing the frequency or count of the number of instances a particular variable contains within each col... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 405,
"s": 28,
"text": "A data frame may contain repeated or missing values. Each column may contain any number of duplicate or repeated instances of the same variable. Data statistics and analysis m... |
time.strftime() function in Python | 11 Nov, 2021
As time module provides various time-related functions. So it is necessary to import the time module otherwise it will through error because of the definition of time.strftime(format[, t]) is present in time module.time.strftime(format[, t]) function convert a tuprl or struct_time representing a time as re... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 722,
"s": 28,
"text": "As time module provides various time-related functions. So it is necessary to import the time module otherwise it will through error because of the definition of time.strftime... |
Convert String to Double in Java | 22 Apr, 2022
Here, we will convert String to Double in Java. There are 3 methods for this conversion as mentioned below:
Illustration:
Input : String = "20.156"
Output: 20.156
Input : String = "456.21"
Output : 456.21
Using parseDouble() method of Double classUsing valueOf() method of Double classUsing constructor o... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 161,
"s": 53,
"text": "Here, we will convert String to Double in Java. There are 3 methods for this conversion as mentioned below:"
},
{
"code": null,
"e": 177,
"s": 161,
"text"... |
Sum of elements whose square root is present in the array | 02 Jun, 2021
Given an array arr[], the task is to find the sum of all those elements from the given array whose square root is present in the same array.
Examples:
Input: arr[] = {1, 2, 3, 4, 6, 9, 10} Output: 13 4 and 9 are the only numbers whose square roots 2 and 3 are present in the array
Input: arr[] = {4, 2, 36,... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 169,
"s": 28,
"text": "Given an array arr[], the task is to find the sum of all those elements from the given array whose square root is present in the same array."
},
{
"code": null,
"e... |
How to encrypt and decrypt data in Python | What is cryptography? Cryptography deals with the conversion of plain text into cipher text which is called encryption of data and cipher text back to plain text which is called decryption of data.
We will be using the fernet module in the cryptography package to encrypt and decrypt data using Python. While using the f... | [
{
"code": null,
"e": 1385,
"s": 1187,
"text": "What is cryptography? Cryptography deals with the conversion of plain text into cipher text which is called encryption of data and cipher text back to plain text which is called decryption of data."
},
{
"code": null,
"e": 1611,
"s": 138... |
How to find first value from any table in SQL Server | 23 Nov, 2020
We could use FIRST_VALUE() in SQL Server to find the first value from any table. FIRST_VALUE() function used in SQL server is a type of window function that results in the first value in an ordered partition of the given data set.
Syntax :
SELECT *,
FROM tablename;
FIRST_VALUE ( scalar_value )
OVER (
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Nov, 2020"
},
{
"code": null,
"e": 284,
"s": 53,
"text": "We could use FIRST_VALUE() in SQL Server to find the first value from any table. FIRST_VALUE() function used in SQL server is a type of window function that results in the fi... |
sync command in Linux with Examples | 18 Jan, 2022
sync command in Linux is used to synchronize cached writes to persistent storage. If one or more files are specified, sync only them, or their containing file systems.
Syntax:
sync [OPTION] [FILE]...
Note: Nothing is being shown in the screenshots just because sync command makes the cache in the backgro... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 197,
"s": 28,
"text": "sync command in Linux is used to synchronize cached writes to persistent storage. If one or more files are specified, sync only them, or their containing file systems. "
},
... |
How to Install Code Blocks for C++ on Linux? | 06 Oct, 2021
Code::Blocks is a free IDE( an integrated development environment), for C/C++ and FORTRAN languages. It is a cross-platform IDE and available for Windows, Mac, and Linux, In this article, we are going to discuss various methods using which we can install Code Blocks on Linux.:
Follow the below steps to ins... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "Code::Blocks is a free IDE( an integrated development environment), for C/C++ and FORTRAN languages. It is a cross-platform IDE and available for Windows, Mac, and Linux, In t... |
Python Lists | 08 Jul, 2022
Lists are just like dynamically sized arrays, declared in other languages (vector in C++ and ArrayList in Java). In a simple language, a list is a collection of things, enclosed in [ ] and separated by commas. Lists are the simplest containers that are an integral part of the Python language. Lists need no... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 589,
"s": 52,
"text": "Lists are just like dynamically sized arrays, declared in other languages (vector in C++ and ArrayList in Java). In a simple language, a list is a collection of things, enclo... |
A C Programming Language Puzzle - GeeksforGeeks | 21 Jun, 2018
Give a = 12 and b = 36 write a C function/macro that returns 3612 without using arithmetic, strings and predefined functions.
We strongly recommend you to minimize your browser and try this yourself first.
Below is one solution that uses String Token-Pasting Operator (##) of C macros. For example, the expr... | [
{
"code": null,
"e": 23841,
"s": 23813,
"text": "\n21 Jun, 2018"
},
{
"code": null,
"e": 23967,
"s": 23841,
"text": "Give a = 12 and b = 36 write a C function/macro that returns 3612 without using arithmetic, strings and predefined functions."
},
{
"code": null,
"e": ... |
Understanding Logistic Regression step by step | by Gustavo Chávez | Towards Data Science | Logistic Regression is a popular statistical model used for binary classification, that is for predictions of the type this or that, yes or no, A or B, etc. Logistic regression can, however, be used for multiclass classification, but here we will focus on its simplest application.
As an example, consider the task of pr... | [
{
"code": null,
"e": 454,
"s": 172,
"text": "Logistic Regression is a popular statistical model used for binary classification, that is for predictions of the type this or that, yes or no, A or B, etc. Logistic regression can, however, be used for multiclass classification, but here we will focus on... |
Recursive program to find the Sum of the series 1 - 1/2 + 1/3 - 1/4 ... 1/N - GeeksforGeeks | 23 Apr, 2021
Given a positive integer N, the task is to find the sum of the series 1 – (1/2) + (1/3) – (1/4) +.... (1/N) using recursion.
Examples:
Input: N = 3 Output: 0.8333333333333333 Explanation: 1 – (1/2) + (1/3) = 0.8333333333333333
Input: N = 4 Output: 0.5833333333333333 Explanation: 1- (1/2) + (1/3) – (1/4) =... | [
{
"code": null,
"e": 24587,
"s": 24559,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 24712,
"s": 24587,
"text": "Given a positive integer N, the task is to find the sum of the series 1 – (1/2) + (1/3) – (1/4) +.... (1/N) using recursion."
},
{
"code": null,
"e": 2... |
Groovy - equals() | The method determines whether the Number object that invokes the method is equal to the object that is passed as argument.
public boolean equals(Object o)
o - Any object.
The methods returns True if the argument is not null and is an object of the same type and with the same numeric value.
Following is an example of t... | [
{
"code": null,
"e": 2361,
"s": 2238,
"text": "The method determines whether the Number object that invokes the method is equal to the object that is passed as argument."
},
{
"code": null,
"e": 2394,
"s": 2361,
"text": "public boolean equals(Object o)\n"
},
{
"code": nul... |
MathML - Quick Guide | MathML stands for Mathematical Markup Language and is an XML based application. It is used to describe mathematical and scientific notations. It's 1 and 2 version were created and developed by The Math Working Group which is one of the oldest W3C Working Groups during 1996-2004. MathML version 3 was created during Math... | [
{
"code": null,
"e": 2652,
"s": 2257,
"text": "MathML stands for Mathematical Markup Language and is an XML based application. It is used to describe mathematical and scientific notations. It's 1 and 2 version were created and developed by The Math Working Group which is one of the oldest W3C Workin... |
Apache Pig - SIZE() | The SIZE() function of Pig Latin is used to compute the number of elements based on any Pig data type.
Given below is the syntax of the SIZE() function.
grunt> SIZE(expression)
The return values vary according to the data types in Apache Pig.
Assume that we have a file named employee.txt in the HDFS directory /pig_dat... | [
{
"code": null,
"e": 2787,
"s": 2684,
"text": "The SIZE() function of Pig Latin is used to compute the number of elements based on any Pig data type."
},
{
"code": null,
"e": 2837,
"s": 2787,
"text": "Given below is the syntax of the SIZE() function."
},
{
"code": null,
... |
Program to find the Encrypted word - GeeksforGeeks | 02 Mar, 2020
Given a string, the given string is an encrypted word, the task is to decrypt the given string to get the original word.
Examples:
Input: str = "abcd"
Output: bdee
Explanation:
a -> a + 1 -> b
b -> b + 2 -> d
c -> c + 2 -> e
d -> d + 1 -> e
Input: str = "xyz"
Output: yaa
Explanation:
x -> x + 1 -> y
y -> ... | [
{
"code": null,
"e": 23839,
"s": 23811,
"text": "\n02 Mar, 2020"
},
{
"code": null,
"e": 23960,
"s": 23839,
"text": "Given a string, the given string is an encrypted word, the task is to decrypt the given string to get the original word."
},
{
"code": null,
"e": 23970... |
C++ program to print unique words in a file | A file is a memory location that stores word streams. In a file, there are various words. In this program, we will find all unique words from the file and print them.
A unique word means the number of occurrences of the word is one in the file.
For example,
Tutorials point is best for programming tutorials.
Here, the w... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "A file is a memory location that stores word streams. In a file, there are various words. In this program, we will find all unique words from the file and print them."
},
{
"code": null,
"e": 1307,
"s": 1229,
"text": "A unique word m... |
How to get multiple selected values of select box in php? - GeeksforGeeks | 31 Aug, 2021
Given a list of items and the task is to retrieve the multiple selected value from a select box using PHP.Use multiple attribute in HTML to select multiple value from drop down list. Selecting multiple values in HTML depends on operating system and browser.
For window users – hold down + CTRL key to sele... | [
{
"code": null,
"e": 24961,
"s": 24933,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 25221,
"s": 24961,
"text": "Given a list of items and the task is to retrieve the multiple selected value from a select box using PHP.Use multiple attribute in HTML to select multiple value f... |
How to align Text in React Material UI? - GeeksforGeeks | 23 Dec, 2020
The Typography component of Material UI is used to present your text and content as clearly and efficiently as possible.
Import:
import Typography from '@material-ui/core/Typography';
// OR
import { Typography } from '@material-ui/core';
Syntax: It sets the alignment property.
<object align="value"> Text <... | [
{
"code": null,
"e": 24121,
"s": 24093,
"text": "\n23 Dec, 2020"
},
{
"code": null,
"e": 24242,
"s": 24121,
"text": "The Typography component of Material UI is used to present your text and content as clearly and efficiently as possible."
},
{
"code": null,
"e": 24250... |
What are the differences between a dictionary and an array in C#? | Dictionary is a collection of keys and values in C#. Dictionary is included in the System.Collection.Generics namespace.
To declare a Dictionary −
IDictionary<int, int> d = new Dictionary<int, int>();
To add elements −
IDictionary<int, int> d = new Dictionary<int, int>();
d.Add(1,97);
d.Add(2,89);
d.Add(3,77);
d.Add(4,... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "Dictionary is a collection of keys and values in C#. Dictionary is included in the System.Collection.Generics namespace."
},
{
"code": null,
"e": 1209,
"s": 1183,
"text": "To declare a Dictionary −"
},
{
"code": null,
"e"... |
How we built an easy-to-use image segmentation tool with transfer learning | by Jenny Huang | Towards Data Science | Authors: Jenny Huang, Ian Hunt-Isaak, William Palmer
GitHub Repo
Training an image segmentation model on new images can be daunting, especially when you need to label your own data. To make this task easier and faster, we built a user-friendly tool that lets you build this entire process in a single Jupyter notebook. I... | [
{
"code": null,
"e": 225,
"s": 172,
"text": "Authors: Jenny Huang, Ian Hunt-Isaak, William Palmer"
},
{
"code": null,
"e": 237,
"s": 225,
"text": "GitHub Repo"
},
{
"code": null,
"e": 554,
"s": 237,
"text": "Training an image segmentation model on new images c... |
Understanding Graph Mining. Your first baby step to learn Deep... | by Vincent Tatan | Towards Data Science | Imagine Facebook: How do you get connected within layers of friends?
Imagine Recommendation System: How do you know a person’s preference is closely related to its clusters?
Welcome to Graph Mining
Graph classification generates graphs among a vast amount of connected data (e.g: Social, Biological, and Payment) and use... | [
{
"code": null,
"e": 240,
"s": 171,
"text": "Imagine Facebook: How do you get connected within layers of friends?"
},
{
"code": null,
"e": 345,
"s": 240,
"text": "Imagine Recommendation System: How do you know a person’s preference is closely related to its clusters?"
},
{
... |
DayOfWeek of() method in Java with Examples - GeeksforGeeks | 19 Mar, 2019
The of() method of java.time.DayOfWeek is an in-built function in Java which returns an instance of DayOfWeek from an int value. The int value ranges between 1 (Monday) to 7 (Sunday).
Method Declaration:
public static DayOfWeek of(int dayOfWeek)
Syntax:
DayOfWeek dayOfWeekObject = DayOfWeek.of(int dayOfWe... | [
{
"code": null,
"e": 24530,
"s": 24502,
"text": "\n19 Mar, 2019"
},
{
"code": null,
"e": 24714,
"s": 24530,
"text": "The of() method of java.time.DayOfWeek is an in-built function in Java which returns an instance of DayOfWeek from an int value. The int value ranges between 1 (Mo... |
Allow wrapping of flex items in Bootstrap on different screens | To allow wrapping of flex items on different screens, use the flex-*-wrap class. The flex-wrap for varied screen sizes work for small, medium, large and extra large screens.
For example, use the flex-lg-wrap class to wrap flex items on large screen −
<div class="d-flex flex-lg-wrap bg-primary">
For small screen −
<div ... | [
{
"code": null,
"e": 1236,
"s": 1062,
"text": "To allow wrapping of flex items on different screens, use the flex-*-wrap class. The flex-wrap for varied screen sizes work for small, medium, large and extra large screens."
},
{
"code": null,
"e": 1313,
"s": 1236,
"text": "For exam... |
PyQt5 - QSpinBox Widget | A QSpinBox object presents the user with a textbox which displays an integer with up/down button on its right. The value in the textbox increases/decreases if the up/down button is pressed.
By default, the integer number in the box starts with 0, goes upto 99 and changes by step 1. Use QDoubleSpinBox for float values.
... | [
{
"code": null,
"e": 2153,
"s": 1963,
"text": "A QSpinBox object presents the user with a textbox which displays an integer with up/down button on its right. The value in the textbox increases/decreases if the up/down button is pressed."
},
{
"code": null,
"e": 2283,
"s": 2153,
"... |
Updating a MySQL column that contains dot (.) in its name? | If the MySQL column contains dot (.) in its name, then you need to use backticks around the column name.
To understand the above concept, let us create a table. The query to create a table is as follows
mysql> create table UpdateDemo
-> (
-> UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> `User.FirstName.La... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "If the MySQL column contains dot (.) in its name, then you need to use backticks around the column name.\nTo understand the above concept, let us create a table. The query to create a table is as follows"
},
{
"code": null,
"e": 1448,
"s... |
Insert Operation in B-Tree - GeeksforGeeks | 11 Aug, 2021
In the previous post, we introduced B-Tree. We also discussed search() and traverse() functions. In this post, insert() operation is discussed. A new key is always inserted at the leaf node. Let the key to be inserted be k. Like BST, we start from the root and traverse down till we reach a leaf node. Once ... | [
{
"code": null,
"e": 29622,
"s": 29594,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 30159,
"s": 29622,
"text": "In the previous post, we introduced B-Tree. We also discussed search() and traverse() functions. In this post, insert() operation is discussed. A new key is always... |
Cordova - Storage | We can use storage API available for storing data on the client apps. This will help the usage of the app when the user is offline and it can also improve performance. Since this tutorial is for beginners, we will show you how to use local storage. In one of our later tutorials, we will show you the other plugins that ... | [
{
"code": null,
"e": 2513,
"s": 2180,
"text": "We can use storage API available for storing data on the client apps. This will help the usage of the app when the user is offline and it can also improve performance. Since this tutorial is for beginners, we will show you how to use local storage. In o... |
C++ Program Structure | The best way to learn a programming language is by writing programs. Typically, the first program beginners write is a program called "Hello World", which simply prints "Hello World" to your computer screen. Although it is very simple, it contains all the fundamental components C++ programs have. Let's look at the code... | [
{
"code": null,
"e": 1402,
"s": 1062,
"text": "The best way to learn a programming language is by writing programs. Typically, the first program beginners write is a program called \"Hello World\", which simply prints \"Hello World\" to your computer screen. Although it is very simple, it contains a... |
Absolute sum of array elements - JavaScript | We are required to write a JavaScript function that takes in an array with both positive and negative numbers and returns the absolute sum of all the elements of the array.
We are required to do this without taking help of any inbuilt library function.
For example: If the array is −
const arr = [1, -5, -34, -5, 2, 5, 6... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in an array with both positive and negative numbers and returns the absolute sum of all the elements of the array."
},
{
"code": null,
"e": 1315,
"s": 1235,
"text": "We are re... |
Get today's date in (YYYY-MM-DD) format in MySQL? | To get today’s date in (YYYY-MM-DD) format in MySQL, you can use CURDATE().
Following is the query to get the current date:
mysql> SELECT CURDATE();
This will produce the following output:
+------------+
| CURDATE() |
+------------+
| 2019-04-09 |
+------------+
1 row in set (0.00 sec)
You can also use NOW() for this.... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To get today’s date in (YYYY-MM-DD) format in MySQL, you can use CURDATE()."
},
{
"code": null,
"e": 1186,
"s": 1138,
"text": "Following is the query to get the current date:"
},
{
"code": null,
"e": 1211,
"s": 1186,
... |
Python Program to Implement a Stack | When it is required to implement a stack using Python, a stack class is created, and an instance of this class is created. Methods to push, pop elements are defined and the instance is used to call these methods.
Below is a demonstration of the same −
Live Demo
class Stack_struct:
def __init__(self):
self.ite... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "When it is required to implement a stack using Python, a stack class is created, and an instance of this class is created. Methods to push, pop elements are defined and the instance is used to call these methods."
},
{
"code": null,
"e": 131... |
NATURALLEFTOUTERJOIN function | Performs an outer join of a table with another table. The tables are joined on common columns (by name) in the two tables. The two tables should be related.
If the two tables have no common column names, or if there is no relationship between the two tables, an error is returned.
DAX NATURALLEFTOUTERJOIN function is ne... | [
{
"code": null,
"e": 2158,
"s": 2001,
"text": "Performs an outer join of a table with another table. The tables are joined on common columns (by name) in the two tables. The two tables should be related."
},
{
"code": null,
"e": 2282,
"s": 2158,
"text": "If the two tables have no... |
How To Generate SSH Key With ssh-keygen In Linux? - GeeksforGeeks | 30 Jun, 2021
Secure Shell(SSH) is a cryptographic network protocol used for operating remote services securely. It is used for remote operation of devices on secure channels using a client-server architecture that generally operates on Port 22. SSH is the successor of Telnet. SSH uses public and private keys to valida... | [
{
"code": null,
"e": 24944,
"s": 24913,
"text": " \n30 Jun, 2021\n"
},
{
"code": null,
"e": 25325,
"s": 24944,
"text": "Secure Shell(SSH) is a cryptographic network protocol used for operating remote services securely. It is used for remote operation of devices on secure channels... |
fmt.Scanln() Function in Golang With Examples - GeeksforGeeks | 05 May, 2020
In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Scanln() function in Go language scans the input texts which is given in the standard input, reads from there and stores the successive space-separated values into successive argument... | [
{
"code": null,
"e": 24404,
"s": 24376,
"text": "\n05 May, 2020"
},
{
"code": null,
"e": 24948,
"s": 24404,
"text": "In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Scanln() function in Go language scans ... |
VBA - Nested If Statement | An If or ElseIf statement inside another If or ElseIf statement(s). The inner If statements are executed based on the outermost If statements. This enables VBScript to handle complex conditions with ease.
Following is the syntax of an Nested If statement in VBScript.
If(boolean_expression) Then
Statement 1
.....
... | [
{
"code": null,
"e": 2140,
"s": 1935,
"text": "An If or ElseIf statement inside another If or ElseIf statement(s). The inner If statements are executed based on the outermost If statements. This enables VBScript to handle complex conditions with ease."
},
{
"code": null,
"e": 2203,
"... |
Quant’s Guide: Finding Key Metrics & Ratios Using Python | by Posey | Towards Data Science | We’ll use Yahoo Finance for this example. You can use your data source of choice. First, let’s import the libraries and grab the data used in this article...
The Efficient Frontier is a common subject of portfolio theory. It involves finding the portfolio(s) with the highest expected return with fixed risk OR the lowes... | [
{
"code": null,
"e": 330,
"s": 172,
"text": "We’ll use Yahoo Finance for this example. You can use your data source of choice. First, let’s import the libraries and grab the data used in this article..."
},
{
"code": null,
"e": 528,
"s": 330,
"text": "The Efficient Frontier is a ... |
How to set action to a RadioButton in JavaFX? | A radio button is a type of button, which is circular in shape. It has two states, selected and deselected. Generally, radio buttons are grouped using toggle groups, where you can only select one of them.
You can create a radio button in JavaFX by instantiating the javafx.scene.control.RadioButton class, which is the s... | [
{
"code": null,
"e": 1267,
"s": 1062,
"text": "A radio button is a type of button, which is circular in shape. It has two states, selected and deselected. Generally, radio buttons are grouped using toggle groups, where you can only select one of them."
},
{
"code": null,
"e": 1558,
"... |
Statistical Functions in Python | Set 2 ( Measure of Spread) - GeeksforGeeks | 10 Feb, 2020
Statistical Functions in Python | Set 1(Averages and Measure of Central Location)
Measure of spread functions of statistics are discussed in this article.
1. variance() :- This function calculates the variance i.e measure of deviation of data, more the value of variance, more the data values are spread. Sa... | [
{
"code": null,
"e": 24286,
"s": 24258,
"text": "\n10 Feb, 2020"
},
{
"code": null,
"e": 24368,
"s": 24286,
"text": "Statistical Functions in Python | Set 1(Averages and Measure of Central Location)"
},
{
"code": null,
"e": 24441,
"s": 24368,
"text": "Measure ... |
Deep Reinforcement Learning for Video Games Made Easy | by Andreas Holm Nielsen | Towards Data Science | In this post, we will investigate how easily we can train a Deep Q-Network (DQN) agent (Mnih et al., 2015) for Atari 2600 games using the Google reinforcement learning library Dopamine. While many RL libraries exist, this library is specifically designed with four essential features in mind:
Easy experimentation
Flexib... | [
{
"code": null,
"e": 465,
"s": 172,
"text": "In this post, we will investigate how easily we can train a Deep Q-Network (DQN) agent (Mnih et al., 2015) for Atari 2600 games using the Google reinforcement learning library Dopamine. While many RL libraries exist, this library is specifically designed ... |
Select and add result of multiplying two columns from a table in MySQL? | You can use aggregate function SUM() for this. Let us first create a table −
mysql> create table DemoTable
(
CustomerId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
CustomerProductName varchar(100),
CustomerProductQuantity int,
CustomerPrice int
);
Query OK, 0 rows affected (0.17 sec)
Insert some records ... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "You can use aggregate function SUM() for this. Let us first create a table −"
},
{
"code": null,
"e": 1362,
"s": 1139,
"text": "mysql> create table DemoTable\n (\n CustomerId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n CustomerP... |
Ext.js - Yes NO Cancel Box | This is like a confirm box which asks the user for some confirmation, such as whether the user wants to do the task or decline or cancel the task. Based on the user selection different methods get called.
Following is a simple syntax.
Ext.MessageBox.show ({
title: 'Details',
msg: 'Please enter your details:',
... | [
{
"code": null,
"e": 2228,
"s": 2023,
"text": "This is like a confirm box which asks the user for some confirmation, such as whether the user wants to do the task or decline or cancel the task. Based on the user selection different methods get called."
},
{
"code": null,
"e": 2258,
"... |
How to Scrape Tweets From Twitter | by Martin Beck | Towards Data Science | Social media can be a gold mine of data in regards to consumer sentiment. Platforms such as Twitter lend themselves to holding useful information since users may post unfiltered opinions that are able to be retrieved with ease. Combining this with other internal company information can help with providing insight into ... | [
{
"code": null,
"e": 570,
"s": 172,
"text": "Social media can be a gold mine of data in regards to consumer sentiment. Platforms such as Twitter lend themselves to holding useful information since users may post unfiltered opinions that are able to be retrieved with ease. Combining this with other i... |
How to show node name in Matplotlib graphs using networkx? | To show node name in graphs using networkx, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Initialize a graph with edges, name, or graph attributes.
Add multiple nodes using add_nodes_from() method.
Add all the edges using add_edge_from() method.
Draw the g... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "To show node name in graphs using networkx, we can take the following steps −"
},
{
"code": null,
"e": 1216,
"s": 1140,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
... |
How to create a transparent polygon using ggplot2 in R? | A transparent polygon just represents the border lines and a hollow area; thus, we can only understand the area covered but it becomes a little difficult to understand the scales. Hence, this visualisation technique is not as useful as others that fills the area with a different color. But it could be used if the range... | [
{
"code": null,
"e": 1409,
"s": 1062,
"text": "A transparent polygon just represents the border lines and a hollow area; thus, we can only understand the area covered but it becomes a little difficult to understand the scales. Hence, this visualisation technique is not as useful as others that fills... |
13 Key Code Blocks for EDA-Classification Task | by Susan Maina | Towards Data Science | Following my previous article on the 11 code blocks for EDA which covered a regression task (predicting a continuous variable), here are the 13 code blocks for performing EDA on a classification task (predicting a categorical or binary feature).
EDA or Exploratory Data Analysis is an important machine learning step tha... | [
{
"code": null,
"e": 418,
"s": 172,
"text": "Following my previous article on the 11 code blocks for EDA which covered a regression task (predicting a continuous variable), here are the 13 code blocks for performing EDA on a classification task (predicting a categorical or binary feature)."
},
{... |
How to skip first 10 results in MySQL? | To skip first 10 results, use “limit offset”. The syntax is as follows −
select *from yourTableName limit 10 offset lastValue;
Let us create a table to understand the above syntax. The following is the query to create a table −
mysql> create table SkipFirstTenRecords
−> (
−> StudentId int,
−> StudentName... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "To skip first 10 results, use “limit offset”. The syntax is as follows −"
},
{
"code": null,
"e": 1189,
"s": 1135,
"text": "select *from yourTableName limit 10 offset lastValue;"
},
{
"code": null,
"e": 1290,
"s": 118... |
Travelling Salesman Problem | A traveler needs to visit all the cities from a list, where distances between all the cities are known and each city should be visited just once. What is the shortest possible route that he visits each city exactly once and returns to the origin city?
Travelling salesman problem is the most notorious computational prob... | [
{
"code": null,
"e": 2851,
"s": 2599,
"text": "A traveler needs to visit all the cities from a list, where distances between all the cities are known and each city should be visited just once. What is the shortest possible route that he visits each city exactly once and returns to the origin city?"
... |
How to Paraphrase Text using Python | by Chanin Nantasenamat | Towards Data Science | As writers, we often seek out tools to help us become more efficient or productive. Tools such as Grammarly can help with language editing. Text generation tools can help to rapidly generate original contents by just giving the AI a few keyword ideas to work with.
Perhaps this could help end writer’s block? This is a d... | [
{
"code": null,
"e": 436,
"s": 171,
"text": "As writers, we often seek out tools to help us become more efficient or productive. Tools such as Grammarly can help with language editing. Text generation tools can help to rapidly generate original contents by just giving the AI a few keyword ideas to w... |
Python - Order Tuples by List - GeeksforGeeks | 10 Jul, 2020
Sometimes, while working with Python tuples, we can have a problem in which we need to perform ordering of all the tuples keys using external list. This problem can have application in data domains such as Data Science. Let’s discuss certain ways in which this task can be performed.
Input : test_list = [(‘... | [
{
"code": null,
"e": 23927,
"s": 23899,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 24211,
"s": 23927,
"text": "Sometimes, while working with Python tuples, we can have a problem in which we need to perform ordering of all the tuples keys using external list. This problem ca... |
Problems on min-max normalization - GeeksforGeeks | 16 Jul, 2021
Overview :The measurement unit used can affect the data analysis. For instance, changing the measurement unit from kg to pounds. Expressing an attribute in smaller units will lead to a larger range for that attribute and thus give inefficient results. To avoid the dependence on the choice of measurement un... | [
{
"code": null,
"e": 25893,
"s": 25865,
"text": "\n16 Jul, 2021"
},
{
"code": null,
"e": 26400,
"s": 25893,
"text": "Overview :The measurement unit used can affect the data analysis. For instance, changing the measurement unit from kg to pounds. Expressing an attribute in smaller... |
Best First Search (Informed Search) - GeeksforGeeks | 12 Apr, 2022
Prerequisites : BFS, DFS In BFS and DFS, when we are at a node, we can consider any of the adjacent as next node. So both BFS and DFS blindly explore paths without considering any cost function. The idea of Best First Search is to use an evaluation function to decide which adjacent is most promising and th... | [
{
"code": null,
"e": 26263,
"s": 26235,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 26665,
"s": 26263,
"text": "Prerequisites : BFS, DFS In BFS and DFS, when we are at a node, we can consider any of the adjacent as next node. So both BFS and DFS blindly explore paths without... |
Corona Fighter Game using JavaScript - GeeksforGeeks | 14 Dec, 2020
In this article, we will create a covid fighter game using HTML, CSS, and JavaScript. In this game, we will create three objects the first object will represent the user which have to cross several hurdles to reach the final object.
Approach: We will create the HTML layout first, style it using CSS, and th... | [
{
"code": null,
"e": 26243,
"s": 26215,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 26476,
"s": 26243,
"text": "In this article, we will create a covid fighter game using HTML, CSS, and JavaScript. In this game, we will create three objects the first object will represent th... |
Python - Unnest single Key Nested Dictionary List - GeeksforGeeks | 14 May, 2020
Sometimes, while working with Python data, we can have a problem in which we need to perform unnesting of all the dictionaries which have single nesting of keys, i.e a single key and value and can easily be pointed to outer key directly. This kind of problem is common in domains requiring data optimization... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n14 May, 2020"
},
{
"code": null,
"e": 26524,
"s": 26151,
"text": "Sometimes, while working with Python data, we can have a problem in which we need to perform unnesting of all the dictionaries which have single nesting of keys, i... |
CSS | Number Data Type - GeeksforGeeks | 11 Jun, 2020
CSS Value is represented by <number> which takes an integer as a parameter or a number with a fractional component. They can be used by the symbol (+) or (-). The number can be positive or negative. All the digits of the number are 0 to 9 and all are of numeric types.
Syntax:
<number>
Note: No unit associa... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n11 Jun, 2020"
},
{
"code": null,
"e": 26890,
"s": 26621,
"text": "CSS Value is represented by <number> which takes an integer as a parameter or a number with a fractional component. They can be used by the symbol (+) or (-). The ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.