title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Access Modifiers in C++ | Access Modifiers are used to implement data hiding in object oriented programming. There are three types of access modifiers used in C++. These are public, private and protected. Details about these are given as follows.
The data members and member functions in a class that are declared public are available to everyone... | [
{
"code": null,
"e": 1283,
"s": 1062,
"text": "Access Modifiers are used to implement data hiding in object oriented programming. There are three types of access modifiers used in C++. These are public, private and protected. Details about these are given as follows."
},
{
"code": null,
... |
Binary String | Practice | GeeksforGeeks | Given a binary string S. The task is to count the number of substrings that start and end with 1. For example, if the input string is β00100101β, then there are three substrings β1001β, β100101β and β101β.
Example 1:
Input:
N = 4
S = 1111
Output: 6
Explanation: There are 6 substrings from
the given string. They are 11,... | [
{
"code": null,
"e": 444,
"s": 238,
"text": "Given a binary string S. The task is to count the number of substrings that start and end with 1. For example, if the input string is β00100101β, then there are three substrings β1001β, β100101β and β101β."
},
{
"code": null,
"e": 455,
"s"... |
C library function - fputs() | The C library function int fputs(const char *str, FILE *stream) writes a string to the specified stream up to but not including the null character.
Following is the declaration for fputs() function.
int fputs(const char *str, FILE *stream)
str β This is an array containing the null-terminated sequence of characters to ... | [
{
"code": null,
"e": 2155,
"s": 2007,
"text": "The C library function int fputs(const char *str, FILE *stream) writes a string to the specified stream up to but not including the null character."
},
{
"code": null,
"e": 2206,
"s": 2155,
"text": "Following is the declaration for f... |
DAX Date & Time - DAY function | Returns the day of the month, a number from 1 to 31.
DAY (<date>)
date
A date in datetime format or a text representation of a date.
An integer indicating the day of the month.
The argument to the DAY function is the Date of the day. DAX handles the date values in datetime format.
You can specify Date as one of the f... | [
{
"code": null,
"e": 2054,
"s": 2001,
"text": "Returns the day of the month, a number from 1 to 31."
},
{
"code": null,
"e": 2069,
"s": 2054,
"text": "DAY (<date>) \n"
},
{
"code": null,
"e": 2074,
"s": 2069,
"text": "date"
},
{
"code": null,
"e": ... |
What kind of variables can we access in a lambda expression in Java? | The lambda expressions consist of two parts, one is parameter and another is an expression and these two parts have separated by an arrow (->) symbol. A lambda expression can access a variable of it's enclosing scope.
A Lambda expression has access to both instance and static variables of it's enclosing class and also... | [
{
"code": null,
"e": 1281,
"s": 1062,
"text": "The lambda expressions consist of two parts, one is parameter and another is an expression and these two parts have separated by an arrow (->) symbol. A lambda expression can access a variable of it's enclosing scope. "
},
{
"code": null,
"e... |
Vertically align numeric values in Java using Formatter | To vertically align numeric values in Java, use Formatter. For working with Formatter class, import the following package.
import java.util.Formatter;
Take an array β
double arr[] = { 2.5, 4.8, 5.7, 6.5, 9.4, 8.4, 9.5, 10.2, 11.5 };
While displaying this double array values, use the %f to set spaces β
for (double d : a... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "To vertically align numeric values in Java, use Formatter. For working with Formatter class, import the following package."
},
{
"code": null,
"e": 1213,
"s": 1185,
"text": "import java.util.Formatter;"
},
{
"code": null,
... |
Batch Script - Logging | Logging in is possible in Batch Script by using the redirection command.
test.bat > testlog.txt 2> testerrors.txt
Create a file called test.bat and enter the following command in the file.
net statistics /Server
The above command has an error because the option to the net statistics command is given in the wrong way.... | [
{
"code": null,
"e": 2242,
"s": 2169,
"text": "Logging in is possible in Batch Script by using the redirection command."
},
{
"code": null,
"e": 2284,
"s": 2242,
"text": "test.bat > testlog.txt 2> testerrors.txt\n"
},
{
"code": null,
"e": 2359,
"s": 2284,
"tex... |
How to handle swipe gestures in Kotlin? | This example demonstrates how to handle swipe gestures in an android device using Kotlin.
Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required details to create a new project.
Step 2 β Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "This example demonstrates how to handle swipe gestures in an android device using Kotlin."
},
{
"code": null,
"e": 1281,
"s": 1152,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill all requi... |
VBScript Date Function | The Function returns the current system Date.
date()
<!DOCTYPE html>
<html>
<body>
<script language = "vbscript" type = "text/vbscript">
a = date()
document.write("The Value of a : " & a)
</script>
</body>
</html>
When you save it as .html and execute it in Internet Explorer... | [
{
"code": null,
"e": 2126,
"s": 2080,
"text": "The Function returns the current system Date."
},
{
"code": null,
"e": 2134,
"s": 2126,
"text": "date()\n"
},
{
"code": null,
"e": 2339,
"s": 2134,
"text": "<!DOCTYPE html>\n<html>\n <body>\n <script langua... |
Check if a Queen can attack a given cell on chessboard in Python | Suppose we have two coordinates on a chessboard for queen and opponent. These points are Q and O respectively. We have to check whether the queen can attack the opponent or not. As we know that the queen can attack in the same row, same column and diagonally.
So, if the input is like Q = (1, 1) O = (4, 4), then the out... | [
{
"code": null,
"e": 1322,
"s": 1062,
"text": "Suppose we have two coordinates on a chessboard for queen and opponent. These points are Q and O respectively. We have to check whether the queen can attack the opponent or not. As we know that the queen can attack in the same row, same column and diago... |
Data Pipeline in GCP: Cloud Function Basics | by Mostafa Varzaneh | Towards Data Science | Most Data Scientists, prefer to own the end to end data pipeline of their models, but owning a pipeline requires a lot of engineering effort.
In this article, I will talk about Cloud Function, which is a serverless, easy, and cost-effective option.
GCP provides a simple scheduling tool called βCloud Schedulerβ. From th... | [
{
"code": null,
"e": 314,
"s": 172,
"text": "Most Data Scientists, prefer to own the end to end data pipeline of their models, but owning a pipeline requires a lot of engineering effort."
},
{
"code": null,
"e": 421,
"s": 314,
"text": "In this article, I will talk about Cloud Fun... |
Why I Use Plotly for Data Visualization | Towards Data Science | The amount of data in the world is growing every second. From sending a text to clicking a link, you are creating data points for companies to use. Insights that can be drawn from this collection of data can be extremely valuable. Every business has their own storage of data that they need to examine. One of the most i... | [
{
"code": null,
"e": 559,
"s": 172,
"text": "The amount of data in the world is growing every second. From sending a text to clicking a link, you are creating data points for companies to use. Insights that can be drawn from this collection of data can be extremely valuable. Every business has their... |
Hyperparameter Tuning to Reduce Overfitting β LightGBM | by Soner YΔ±ldΔ±rΔ±m | Towards Data Science | Easy access to an enormous amount of data and high computing power has made it possible to design complex machine learning algorithms. As the model complexity increases, the amount of data required to train it also increases.
Data is not the only factor in the performance of a model. Complex models have many hyperparam... | [
{
"code": null,
"e": 397,
"s": 171,
"text": "Easy access to an enormous amount of data and high computing power has made it possible to design complex machine learning algorithms. As the model complexity increases, the amount of data required to train it also increases."
},
{
"code": null,
... |
How to Rename SQL Server Schema? - GeeksforGeeks | 29 Dec, 2021
In SQL, we cannot RENAME a SCHEMA. To achieve this, we need to create a new SCHEMA, transfer all the contents(objects) from the old schema to new schema and then finally delete the old schema using the DROP command. The same is depicted in the below article. For this article, we will be using the Microsoft... | [
{
"code": null,
"e": 24952,
"s": 24924,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 25288,
"s": 24952,
"text": "In SQL, we cannot RENAME a SCHEMA. To achieve this, we need to create a new SCHEMA, transfer all the contents(objects) from the old schema to new schema and then f... |
Adding Images to a Slide in a PPT using Java - GeeksforGeeks | 28 Dec, 2020
In Java, using createPicture() method from XSLFSlide, images can be added to the PPT. Now the computer doesnβt understand, whatβs there in the picture, so internally, this method accepts the image in a byte array format β> (a series of non-understandable random numbers, letters, symbols, etc.) something li... | [
{
"code": null,
"e": 24056,
"s": 24028,
"text": "\n28 Dec, 2020"
},
{
"code": null,
"e": 24416,
"s": 24056,
"text": "In Java, using createPicture() method from XSLFSlide, images can be added to the PPT. Now the computer doesnβt understand, whatβs there in the picture, so internal... |
Pytest - Grouping the Tests | In this chapter, we will learn how to group the tests using markers.
Pytest allows us to use markers on test functions. Markers are used to set various features/attributes to test functions. Pytest provides many inbuilt markers such as xfail, skip and parametrize. Apart from that, users can create their own marker name... | [
{
"code": null,
"e": 2111,
"s": 2042,
"text": "In this chapter, we will learn how to group the tests using markers."
},
{
"code": null,
"e": 2429,
"s": 2111,
"text": "Pytest allows us to use markers on test functions. Markers are used to set various features/attributes to test fu... |
Anti Diagonal Traversal of Matrix | Practice | GeeksforGeeks | Give a N*N square matrix, return an array of its anti-diagonals. Look at the example for more details.
Example 1:
Input:
N = 2
matrix[][] = {{1,2},
{3,4}}
Output:
1 2 3 4
Explanation:
Matrix is as below:
1 2
3 4
Printing it in anti-diagonal form will lead
to the output as 1 2 3 4
Example 2:
Input:
N = 3
... | [
{
"code": null,
"e": 329,
"s": 226,
"text": "Give a N*N square matrix, return an array of its anti-diagonals. Look at the example for more details."
},
{
"code": null,
"e": 340,
"s": 329,
"text": "Example 1:"
},
{
"code": null,
"e": 521,
"s": 340,
"text": "Inp... |
How to check if a string is a subset of another string in R? | To check whether a string is a subset of another string we can use grepl function.
> Company <- "TutorialsPoint"
> Job <- "Tutor"
> grepl(Job, Company, fixed = TRUE)
[1] TRUE
Here we are getting TRUE because Tutor is a subset of TutorialsPoint.
> grepl(Company, Job, fixed = TRUE)
[1] FALSE
Here we are getting FALSE bec... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "To check whether a string is a subset of another string we can use grepl function."
},
{
"code": null,
"e": 1237,
"s": 1145,
"text": "> Company <- \"TutorialsPoint\"\n> Job <- \"Tutor\"\n> grepl(Job, Company, fixed = TRUE)\n[1] TRUE"... |
JRadioButton | Java Swing - GeeksforGeeks | 21 Aug, 2018
We use the JRadioButton class to create a radio button. Radio button is use to select one option from multiple options. It is used in filling forms, online objective papers and quiz.
We add radio buttons in a ButtonGroup so that we can select only one radio button at a time. We use βButtonGroupβ class to c... | [
{
"code": null,
"e": 24560,
"s": 24532,
"text": "\n21 Aug, 2018"
},
{
"code": null,
"e": 24743,
"s": 24560,
"text": "We use the JRadioButton class to create a radio button. Radio button is use to select one option from multiple options. It is used in filling forms, online objecti... |
Ruby on Rails - Views | A Rails View is an ERb program that shares data with controllers through mutually accessible variables.
If you look in the app/views directory of the library application, you will see one subdirectory for each of the controllers, we have created: book. Each of these subdirectories was created automatically when the sam... | [
{
"code": null,
"e": 2207,
"s": 2103,
"text": "A Rails View is an ERb program that shares data with controllers through mutually accessible variables."
},
{
"code": null,
"e": 2480,
"s": 2207,
"text": "If you look in the app/views directory of the library application, you will se... |
Can a C++ virtual functions have default parameters? | Yes, C++ virtual functions can have default parameters.
Live Demo
#include<iostream>
using namespace std;
class B {
public:
virtual void s(int a = 0) {
cout<<" In Base \n";
}
};
class D: public B {
public:
virtual void s(int a) {
cout<<"In Derived, a="<<a;
}
};
int mai... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "Yes, C++ virtual functions can have default parameters."
},
{
"code": null,
"e": 1129,
"s": 1118,
"text": " Live Demo"
},
{
"code": null,
"e": 1525,
"s": 1129,
"text": "#include<iostream>\nusing namespace std;\ncl... |
Reverse Geocoding in Android | 15 Feb, 2022
Reverse-Geocoding is a process used to convert coordinates (latitude and longitude) to human-readable addresses. This is not exactly the opposite of Geocoding. In Geocoding, the Place is associated with a name and fixed coordinates. These coordinates are Double in nature. Negligible change in these coordin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Feb, 2022"
},
{
"code": null,
"e": 743,
"s": 28,
"text": "Reverse-Geocoding is a process used to convert coordinates (latitude and longitude) to human-readable addresses. This is not exactly the opposite of Geocoding. In Geocoding, t... |
Apache POI | Getting Started | 11 Jul, 2022
POI stands For βPoor Obfuscation Implementationβ. Apache POI is an API provided by Apache foundation which is a collection of different java libraries. These libraries gives the facility to read, write and manipulate different Microsoft files such as excel sheet, power-point, and word files. Itβs first ver... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 369,
"s": 28,
"text": "POI stands For βPoor Obfuscation Implementationβ. Apache POI is an API provided by Apache foundation which is a collection of different java libraries. These libraries gives t... |
How are variables stored in Python β Stack or Heap? | 30 Jan, 2020
Memory allocation can be defined as allocating a block of space in the computer memory to a program. In Python memory allocation and deallocation method is automatic as the Python developers created a garbage collector for Python so that the user does not have to do manual garbage collection.
Garbage colle... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "Memory allocation can be defined as allocating a block of space in the computer memory to a program. In Python memory allocation and deallocation method is automatic as the Py... |
Python OpenCV: Epipolar Geometry | 26 Mar, 2020
The general setup of epipolar geometry. The gray region is the epipolar plane. The orange line is the baseline, while the two blue lines are the epipolar lines.
Often in multiple view geometry, there are interesting relationships between the multiple cameras, a 3D point, and that pointβs projections in eac... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 213,
"s": 52,
"text": "The general setup of epipolar geometry. The gray region is the epipolar plane. The orange line is the baseline, while the two blue lines are the epipolar lines."
},
{
... |
Introduction to PySimpleGUI | 10 May, 2020
It is easy to use with simple yet HIGHLY customizable features of GUI for Python. It is based solely on Tkinter. It is a Python GUI For Humans that Transforms Tkinter, PyQt, Remi, WxPython into portable user-friendly Pythonic interfaces.
The Steps for using the GUI package PySimpleGUI are:-
Install PySimpl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 266,
"s": 28,
"text": "It is easy to use with simple yet HIGHLY customizable features of GUI for Python. It is based solely on Tkinter. It is a Python GUI For Humans that Transforms Tkinter, PyQt, R... |
Python 3 - IF...ELIF...ELSE Statements | An else statement can be combined with an if statement. An else statement contains a block of code that executes if the conditional expression in the if statement resolves to 0 or a FALSE value.
The else statement is an optional statement and there could be at the most only one else statement following if.
The syntax o... | [
{
"code": null,
"e": 2669,
"s": 2474,
"text": "An else statement can be combined with an if statement. An else statement contains a block of code that executes if the conditional expression in the if statement resolves to 0 or a FALSE value."
},
{
"code": null,
"e": 2782,
"s": 2669,
... |
Dart β Advance Concepts of Iterable Collections | 07 Sep, 2021
In this article, we will look into some of the important concepts related to iterables in Dart.
In dart, there is no operator [ ] in Iterable. To better understand letβs take a look at the below example.
Example:
Dart
void main() { // invalid program Iterable<int> iterable = [1, 2, 3, 4, 5 ]; // lin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "In this article, we will look into some of the important concepts related to iterables in Dart. "
},
{
"code": null,
"e": 233,
"s": 125,
"text": "In dart, ... |
Python | time.clock_settime() method | 17 Sep, 2019
time.clock_settime() method of Time module is used to set the time (in seconds) of the specified clock clk_id. Basically, clk_id is a integer value which represents the id of the clock.
Syntax: time.clock_settime(clk_id, seconds)
Parameters:clk_id: A clk_id constant or an integer value representing clk_id ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 214,
"s": 28,
"text": "time.clock_settime() method of Time module is used to set the time (in seconds) of the specified clock clk_id. Basically, clk_id is a integer value which represents the id of ... |
Get timestamp date range with MySQL Select? | To select timestamp data range, use the below syntax β
SELECT *FROM yourTableName
where yourDataTimeField >= anyDateRange
and yourDataTimeField < anyDateRange
To understand the above syntax, let us create a table. The query to create a table is as follows β
mysql> create table DateRange
β> (
β> DueTime timestamp
... | [
{
"code": null,
"e": 1242,
"s": 1187,
"text": "To select timestamp data range, use the below syntax β"
},
{
"code": null,
"e": 1346,
"s": 1242,
"text": "SELECT *FROM yourTableName\nwhere yourDataTimeField >= anyDateRange\nand yourDataTimeField < anyDateRange"
},
{
"code":... |
PLSQL | FLOOR Function | 19 Feb, 2021
The FLOOR is an inbuilt function in PLSQL which is used to return the largest integer value which will be either equal to or less than from a given input number.
Syntax:
FLOOR(number)
Parameters Used: This function accepts a parameter number which is the input number on which FLOOR function is called.
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 191,
"s": 28,
"text": "The FLOOR is an inbuilt function in PLSQL which is used to return the largest integer value which will be either equal to or less than from a given input number. "
},
{
... |
Spring Boot β Customize the Jackson ObjectMapper | 07 Feb, 2022
When using JSON format, Spring Boot will use an ObjectMapper instance to serialize responses and deserialize requests. In this article, we will take a look at the most common ways to configure the serialization and deserialization options.
Let us do go through the default configuration. So by default, the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Feb, 2022"
},
{
"code": null,
"e": 268,
"s": 28,
"text": "When using JSON format, Spring Boot will use an ObjectMapper instance to serialize responses and deserialize requests. In this article, we will take a look at the most common ... |
Efficient program to print all prime factors of a given number | 11 Apr, 2022
Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then the output should be β2 2 3β. And if the input number is 315, then the output should be β3 3 5 7β.
First Approach:
Following are the steps to find all prime factors. 1) While n is div... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 275,
"s": 52,
"text": "Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then the output should be β2 2 3β. And if the input num... |
Python β Convert excel serial date to datetime | 14 Sep, 2021
This article will discuss the conversion of an excel serial date to DateTime in Python.
The Excel βserial dateβ format is actually the number of days since 1900-01-00 i.e., January 1st, 1900. For example, the excel serial date number 43831 represents January 1st, 2020, and after converting 43831 to a Date... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 117,
"s": 28,
"text": "This article will discuss the conversion of an excel serial date to DateTime in Python. "
},
{
"code": null,
"e": 360,
"s": 117,
"text": "The Excel βserial... |
Systematic Sampling in Pandas | 13 Sep, 2021
Sampling is the method where one can take subset (Sample) from the given data and will investigate on the sample without investigating each individual thing of data. For instance, suppose in a College, someone wants to check the average height of Students who are Studying in the college. One way is to Coll... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 647,
"s": 54,
"text": "Sampling is the method where one can take subset (Sample) from the given data and will investigate on the sample without investigating each individual thing of data. For inst... |
Python VLC MediaPlayer β Getting Media | 11 Apr, 2022
In this article we will see how we can get media of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediaPlayer object is the basic object in vlc module fo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 536,
"s": 28,
"text": "In this article we will see how we can get media of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media p... |
Python | Pandas dataframe.quantile() | 13 Jun, 2022
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.quantile() function return values at the given quantile over requested axis,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 545,
"s": 52,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im... |
PostgreSQL β REGEXP_REPLACE Function | 16 Aug, 2021
The PostgreSQL REGEXP_REPLACE() function is used to replaces substrings that match a POSIX regular expression with a new substring.
Syntax: REGEXP_REPLACE(source, pattern, replacement_string, [, flags])
Letβs analyze the above syntax:
The source is a string where the search and replace operation in execute... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 160,
"s": 28,
"text": "The PostgreSQL REGEXP_REPLACE() function is used to replaces substrings that match a POSIX regular expression with a new substring."
},
{
"code": null,
"e": 231,
... |
Replace nodes with duplicates in linked list | 24 Jun, 2021
Given a linked list that contains some random integers from 1 to n with many duplicates. Replace each duplicate element that is present in the linked list with the values n+1, n+2, n+3 and so on(starting from left to right in the given linked list).
Examples:
Input : 1 3 1 4 4 2 1
Output : 1 3 5 4 6 2 7
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 304,
"s": 54,
"text": "Given a linked list that contains some random integers from 1 to n with many duplicates. Replace each duplicate element that is present in the linked list with the values n+1... |
Construction of Longest Increasing Subsequence(LIS) and printing LIS sequence - GeeksforGeeks | 25 Apr, 2022
Java code:
The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order.
For example, the length of LIS for {10, 22, 9, 33, 21, 50, 41, 60, 80} is 6 and LIS is {10, 22, 33, 50,... | [
{
"code": null,
"e": 24924,
"s": 24896,
"text": "\n25 Apr, 2022"
},
{
"code": null,
"e": 24936,
"s": 24924,
"text": "Java code: "
},
{
"code": null,
"e": 25128,
"s": 24936,
"text": "The Longest Increasing Subsequence (LIS) problem is to find the length of the ... |
export - Unix, Linux Command | export - Set export attribute for shell variables.
export [-fn] [name[=value] ...] or export -p
export- command is one of the bash shell BUILTINS commands, which means it is part of your shell.
The export command is fairly simple to use as it has straightforward syntax with only three available command options.
In ge... | [
{
"code": null,
"e": 10628,
"s": 10577,
"text": "export - Set export attribute for shell variables."
},
{
"code": null,
"e": 10673,
"s": 10628,
"text": "export [-fn] [name[=value] ...] or export -p"
},
{
"code": null,
"e": 11075,
"s": 10673,
"text": "export- c... |
Tryit Editor v3.6 - Show Python | mydb = mysql.connector.connect(
host="localhost",
user="myusername",
password="mypassword",
database="mydatabase"
)
β
mycursor = mydb.cursor() | [
{
"code": null,
"e": 57,
"s": 25,
"text": "mydb = mysql.connector.connect("
},
{
"code": null,
"e": 77,
"s": 57,
"text": " host=\"localhost\","
},
{
"code": null,
"e": 98,
"s": 77,
"text": " user=\"myusername\","
},
{
"code": null,
"e": 123,
... |
Autowire by Constructor in Spring | Spring Autowiring Example | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, we are going to learn about... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
GATE | GATE CS 2013 | Question 25 - GeeksforGeeks | 28 Jun, 2021
Which of the following statements is/are TRUE for undirected graphs?
P: Number of odd degree vertices is even.
Q: Sum of degrees of all vertices is even.
(A) P only(B) Q only(C) Both P and Q(D) Neither P nor QAnswer: (C)Explanation: See https://www.geeksforgeeks.org/data-structures-graph-question-27/Quiz ... | [
{
"code": null,
"e": 24100,
"s": 24072,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24169,
"s": 24100,
"text": "Which of the following statements is/are TRUE for undirected graphs?"
},
{
"code": null,
"e": 24255,
"s": 24169,
"text": "P: Number of odd degr... |
Manage Files and Database Connections in Python Like a Pro | by Anna Geller | Towards Data Science | In data engineering and data science, we frequently need to retrieve data from databases or flat files. However, using data from external resources without closing the connections to the underlying databases or files may lead to unwanted consequences. In this article, we discuss how to build custom context managers tha... | [
{
"code": null,
"e": 559,
"s": 172,
"text": "In data engineering and data science, we frequently need to retrieve data from databases or flat files. However, using data from external resources without closing the connections to the underlying databases or files may lead to unwanted consequences. In ... |
Heap queue (or heapq) in Python - GeeksforGeeks | 11 Sep, 2020
Heap data structure is mainly used to represent a priority queue. In Python, it is available using βheapqβ module. The property of this data structure in Python is that each time the smallest of heap element is popped(min heap). Whenever elements are pushed or popped, heap structure in maintained. The heap... | [
{
"code": null,
"e": 41552,
"s": 41524,
"text": "\n11 Sep, 2020"
},
{
"code": null,
"e": 41916,
"s": 41552,
"text": "Heap data structure is mainly used to represent a priority queue. In Python, it is available using βheapqβ module. The property of this data structure in Python is... |
Threads Intercommunication | In real life, if a team of people is working on a common task then there should be communication between them for finishing the task properly. The same analogy is applicable to threads also. In programming, to reduce the ideal time of the processor we create multiple threads and assign different sub tasks to every thre... | [
{
"code": null,
"e": 2377,
"s": 1922,
"text": "In real life, if a team of people is working on a common task then there should be communication between them for finishing the task properly. The same analogy is applicable to threads also. In programming, to reduce the ideal time of the processor we c... |
How to create a bookmark link in HTML? | To create a bookmark link in HTML, you need to create a bookmark using the <a> tag name attribute. Now, add a link to the bookmark. Bookmarks are also known as named anchors. This is quite useful to take readers to a specific section of the web page.
Just keep in mind the <a> tag name attribute deprecated in HTML5. Do ... | [
{
"code": null,
"e": 1313,
"s": 1062,
"text": "To create a bookmark link in HTML, you need to create a bookmark using the <a> tag name attribute. Now, add a link to the bookmark. Bookmarks are also known as named anchors. This is quite useful to take readers to a specific section of the web page."
... |
How do I get a parent HTML Tag with Selenium WebDriver using Java? | We can get a parent HTML tag with Selenium webdriver. First of all we need to identify the child element with help of any of the locators like id, class, name, xpath or css. Then we have to identify the parent with the findElement(By.xpath()) method.
We can identify the parent from the child, by localizing it with the ... | [
{
"code": null,
"e": 1313,
"s": 1062,
"text": "We can get a parent HTML tag with Selenium webdriver. First of all we need to identify the child element with help of any of the locators like id, class, name, xpath or css. Then we have to identify the parent with the findElement(By.xpath()) method."
... |
How to create an image gallery with CSS | To create an image gallery with CSS is quite easy. You can try to run the following code to achieve this. A gallery of 3 images is created here,
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
div.myGallery {
margin: 3px;
border: 2px solid orange;
float: left;
... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "To create an image gallery with CSS is quite easy. You can try to run the following code to achieve this. A gallery of 3 images is created here,"
},
{
"code": null,
"e": 1217,
"s": 1207,
"text": "Live Demo"
},
{
"code": null,... |
C# | Copy the Stack to an Array - GeeksforGeeks | 01 Feb, 2019
Stack<T>.CopyTo(T[], Int32) Method is used to copy the Stack<T> to an existing 1-D Array which starts from the specified array index.
Properties:
The capacity of a Stack<T>is the number of elements the Stack<T> can hold. As elements are added to a Stack<T> , the capacity is automatically increased as requi... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24436,
"s": 24302,
"text": "Stack<T>.CopyTo(T[], Int32) Method is used to copy the Stack<T> to an existing 1-D Array which starts from the specified array index."
},
{
"code": null,
... |
What happens if loop till Maximum of Signed and Unsigned in C/C++? - GeeksforGeeks | 31 Mar, 2020
Let us have a look at following code snippet in C/C++.
C++
C
// An Unsigned char example#include <iostream>using namespace std;void fun1(){ unsigned char i; for (i = 0; i < 256; i++) cout << i << " ";} int main(){ fun1(); return 0;} // This code is contributed by shubhamsingh10
// An U... | [
{
"code": null,
"e": 25727,
"s": 25699,
"text": "\n31 Mar, 2020"
},
{
"code": null,
"e": 25782,
"s": 25727,
"text": "Let us have a look at following code snippet in C/C++."
},
{
"code": null,
"e": 25786,
"s": 25782,
"text": "C++"
},
{
"code": null,
... |
Lua - Error Handling | Error handling is quite critical since real-world operations often require the use of complex operations, which includes file operations, database transactions and web service calls.
In any programming, there is always a requirement for error handling. Errors can be of two types which includes,
Syntax errors
Run time e... | [
{
"code": null,
"e": 2286,
"s": 2103,
"text": "Error handling is quite critical since real-world operations often require the use of complex operations, which includes file operations, database transactions and web service calls."
},
{
"code": null,
"e": 2399,
"s": 2286,
"text": ... |
Python program to find average score of each students from dictionary of scores | Suppose we have a dictionary of students marks. The keys are names and the marks are list of numbers. We have to find the average of each students.
So, if the input is like scores = {'Amal' : [25,36,47,45],'Bimal' : [85,74,69,47],'Tarun' : [65,35,87,14],'Akash' : [74,12,36,75]}, then the output will be [38.25, 68.75, 5... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "Suppose we have a dictionary of students marks. The keys are names and the marks are list of numbers. We have to find the average of each students."
},
{
"code": null,
"e": 1475,
"s": 1210,
"text": "So, if the input is like scores = ... |
Model Parameters and Hyperparameters in Machine Learning β What is the difference? | by Benjamin Obi Tayo Ph.D. | Towards Data Science | In a machine learning model, there are 2 types of parameters:
Model Parameters: These are the parameters in the model that must be determined using the training data set. These are the fitted parameters.Hyperparameters: These are adjustable parameters that must be tuned in order to obtain a model with optimal performan... | [
{
"code": null,
"e": 234,
"s": 172,
"text": "In a machine learning model, there are 2 types of parameters:"
},
{
"code": null,
"e": 496,
"s": 234,
"text": "Model Parameters: These are the parameters in the model that must be determined using the training data set. These are the f... |
How to use <jsp:getProperty> action in JSP? | The getProperty action is used to retrieve the value of a given property and converts it to a string, and finally inserts it into the output.
The getProperty action has only two attributes, both of which are required. The syntax of the getProperty action is as follows β
<jsp:useBean id = "myName" ... />
...
<jsp:getPro... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "The getProperty action is used to retrieve the value of a given property and converts it to a string, and finally inserts it into the output."
},
{
"code": null,
"e": 1333,
"s": 1204,
"text": "The getProperty action has only two attr... |
Easily Query ORC Data in Python with PySpark | by Holly Emblem | Towards Data Science | Optimized Row Columnar, or ORC, is an column-oriented data storage format, that is part of the Apache Hadoop family. While ORC files and processing them might not be typically within the wheelhouse of a data scientist, there are occasions where youβll need to pull these files out and handle them using the data munging ... | [
{
"code": null,
"e": 518,
"s": 172,
"text": "Optimized Row Columnar, or ORC, is an column-oriented data storage format, that is part of the Apache Hadoop family. While ORC files and processing them might not be typically within the wheelhouse of a data scientist, there are occasions where youβll nee... |
Apex - For Loop | A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times. Consider a business case wherein, we are required to process or update the 100 records in one go. This is where the Loop syntax helps and makes work easier.
for (variable : list_or_... | [
{
"code": null,
"e": 2348,
"s": 2052,
"text": "A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times. Consider a business case wherein, we are required to process or update the 100 records in one go. This is where th... |
Solving Sudoku with AI. Iβm currently a teaching assistant for... | by Justin Svegliato | Towards Data Science | Iβm currently a teaching assistant for the graduate-level AI class taught by my advisor Shlomo Zilberstein at UMass Amherst. In one of the homework assignments, the students had to write some code that solves sudoku puzzles. This means Iβve been talking about how to use AI algorithms to solve sudoku way too much lately... | [
{
"code": null,
"e": 667,
"s": 171,
"text": "Iβm currently a teaching assistant for the graduate-level AI class taught by my advisor Shlomo Zilberstein at UMass Amherst. In one of the homework assignments, the students had to write some code that solves sudoku puzzles. This means Iβve been talking a... |
βlateinitβ Variable in Kotlin | 24 Jan, 2022
In Kotlin, there are some tokens that cannot be used as identifiers for naming variables, etc. Such tokens are known as keywords. In simple words, keywords are reserved and have special meaning to the compiler, hence they canβt be used as identifiers. For example,
as
break
class
continue
lateinit
βlateinit... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2022"
},
{
"code": null,
"e": 293,
"s": 28,
"text": "In Kotlin, there are some tokens that cannot be used as identifiers for naming variables, etc. Such tokens are known as keywords. In simple words, keywords are reserved and ha... |
Python | Pandas dataframe.pow() | 22 Nov, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas dataframe.pow() function calculates the exponential power of dataframe and other, elem... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Working with Titles and Heading β Python docx Module | 03 Jan, 2021
Prerequisites: docx
Word documents contain formatted text wrapped within three object levels. The Lowest level- run objects, middle level- paragraph objects and highest level- document object. So, we cannot work with these documents using normal text editors. But, we can manipulate these word documents in ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 48,
"s": 28,
"text": "Prerequisites: docx"
},
{
"code": null,
"e": 373,
"s": 48,
"text": "Word documents contain formatted text wrapped within three object levels. The Lowest lev... |
iOS - Location Handling | We can easily locate the user's current location in iOS, provided the user allows the application to access the information with the help of the core location framework.
Step 1 β Create a simple View based application.
Step 2 β Select your project file, then select targets and then add CoreLocation.framework as shown b... | [
{
"code": null,
"e": 2261,
"s": 2091,
"text": "We can easily locate the user's current location in iOS, provided the user allows the application to access the information with the help of the core location framework."
},
{
"code": null,
"e": 2310,
"s": 2261,
"text": "Step 1 β Cre... |
Box Plot using Plotly in Python - GeeksforGeeks | 20 Sep, 2021
Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.
A box... | [
{
"code": null,
"e": 23677,
"s": 23649,
"text": "\n20 Sep, 2021"
},
{
"code": null,
"e": 23979,
"s": 23677,
"text": "Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, s... |
Java Examples - Display different shapes | How to draw a solid rectangle using GUI?
Following example demonstrates how to display a solid rectangle using fillRect() method of Graphics class.
import java.awt.Graphics;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class Main extends JPanel {
public static void main(String[] a) {
JFrame f ... | [
{
"code": null,
"e": 2109,
"s": 2068,
"text": "How to draw a solid rectangle using GUI?"
},
{
"code": null,
"e": 2216,
"s": 2109,
"text": "Following example demonstrates how to display a solid rectangle using fillRect() method of Graphics class."
},
{
"code": null,
"e... |
C++ ios Library - Boolalpha Function | It is used to sets the boolalpha format flag for the str stream. When the boolalpha format flag is set, bool values are inserted/extracted by their textual representation: either true or false, instead of integral values.
Following is the declaration for std::boolalpha function.
ios_base& boolalpha (ios_base& str);
str... | [
{
"code": null,
"e": 2825,
"s": 2603,
"text": "It is used to sets the boolalpha format flag for the str stream. When the boolalpha format flag is set, bool values are inserted/extracted by their textual representation: either true or false, instead of integral values."
},
{
"code": null,
... |
What Bias-Variance Bulls-Eye Diagram Really Represents | by Angela Shi | Towards Data Science | When looking for Bias-Variance tradeoff, we can see the following bulls-eye diagram:
They seem intuitive and eye-catching to represent the bias and the variance, with some blue dots. But what do they really mean? The central point represents the target, but what do the blue dots really represent? And how these bulls-ey... | [
{
"code": null,
"e": 256,
"s": 171,
"text": "When looking for Bias-Variance tradeoff, we can see the following bulls-eye diagram:"
},
{
"code": null,
"e": 539,
"s": 256,
"text": "They seem intuitive and eye-catching to represent the bias and the variance, with some blue dots. But... |
Maximum value of an integer for which factorial can be calculated on a machine - GeeksforGeeks | 26 Jun, 2021
Program to find maximum value of an integer for which factorial can be calculated on a machine, assuming that factorial is stored using basic data type like long long int.
The idea is based on that fact that, in most of the machines, when we cross limit of integer, the values becomes negative.
C
Java
Pyth... | [
{
"code": null,
"e": 24638,
"s": 24610,
"text": "\n26 Jun, 2021"
},
{
"code": null,
"e": 24810,
"s": 24638,
"text": "Program to find maximum value of an integer for which factorial can be calculated on a machine, assuming that factorial is stored using basic data type like long l... |
How to Conditionally Remove Rows in R DataFrame? - GeeksforGeeks | 19 Dec, 2021
In this article, we will discuss how to conditionally remove rows from a dataframe in the R Programming Language. We need to remove some rows of data from the dataframe conditionally to prepare the data. For that, we use logical conditions on the basis of which data that doesnβt follow the condition is rem... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 26911,
"s": 26597,
"text": "In this article, we will discuss how to conditionally remove rows from a dataframe in the R Programming Language. We need to remove some rows of data from the data... |
How to set background drawable programmatically in android? | This example demonstrates how do I set background drawable programmatically in android.
Step 1 β Create a new project in Android Studio, go to File β New Project and fill all required details to create a new project.
Step 2 β Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "This example demonstrates how do I set background drawable programmatically in android."
},
{
"code": null,
"e": 1279,
"s": 1150,
"text": "Step 1 β Create a new project in Android Studio, go to File β New Project and fill all require... |
Angular PrimeNG TriCheckbox Component - GeeksforGeeks | 24 Aug, 2021
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the TriCheckbox component in Angular PrimeNG.
TriCheckbox componen... | [
{
"code": null,
"e": 26464,
"s": 26436,
"text": "\n24 Aug, 2021"
},
{
"code": null,
"e": 26751,
"s": 26464,
"text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp... |
How to change the Text Color of a Substring in android using SpannableString class? - GeeksforGeeks | 23 Feb, 2021
In this article, we will learn about how to change the text color of a substring of a string. It is easy to change the color of the whole string but to change the color of a substring we have to use a special class SpannableString. But SpannableString class is not really helpful when it comes to change the... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 25512,
"s": 25116,
"text": "In this article, we will learn about how to change the text color of a substring of a string. It is easy to change the color of the whole string but to change the ... |
How to get the last N records in MongoDB? | To get the last N records in MongoDB, you need to use limit(). The syntax is as follows:
db.yourCollectionName.find().sort({$natural:-1}).limit(yourValue);
To understand the above syntax, let us create a collection with document. The query to create a collection with document is as follows:
> db.getLastNRecordsDemo.ins... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "To get the last N records in MongoDB, you need to use limit(). The syntax is as follows:"
},
{
"code": null,
"e": 1218,
"s": 1151,
"text": "db.yourCollectionName.find().sort({$natural:-1}).limit(yourValue);"
},
{
"code": null... |
Display time zone with SimpleDateFormat(βzβ) in Java | You can display timezone easily in Java using SimpleDateFormat(βzβ).
Firstly, to work with SimpleDateFormat class in Java, import the following package β
import java.text.SimpleDateFormat;
Now, set the format with SimpleDateFormat(βzβ) to display timezone β
Format f = new SimpleDateFormat(βzβ);
Now, get the timezone in... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "You can display timezone easily in Java using SimpleDateFormat(βzβ)."
},
{
"code": null,
"e": 1216,
"s": 1131,
"text": "Firstly, to work with SimpleDateFormat class in Java, import the following package β"
},
{
"code": null,
... |
Apache Bench - Environment Setup | In this chapter, we will guide you how to set up your environment for Apache Bench on your VPS.
Memory β 128 MB
Memory β 128 MB
Disk Space β No minimum requirement
Disk Space β No minimum requirement
Operating System β No minimum requirement
Operating System β No minimum requirement
Apache Bench is a stand-alone applic... | [
{
"code": null,
"e": 1930,
"s": 1834,
"text": "In this chapter, we will guide you how to set up your environment for Apache Bench on your VPS."
},
{
"code": null,
"e": 1946,
"s": 1930,
"text": "Memory β 128 MB"
},
{
"code": null,
"e": 1962,
"s": 1946,
"text": ... |
How to install the specific version of the PowerShell module version? | To install the specific version of the PowerShell module, we need to use the -RequiredVersion parameter with the Install-Module command.
To find which module versions are available, we can use the Find-Module command with the -AllVersions parameter which retrieves all the versions of the module available in the PSGalle... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "To install the specific version of the PowerShell module, we need to use the -RequiredVersion parameter with the Install-Module command."
},
{
"code": null,
"e": 1386,
"s": 1199,
"text": "To find which module versions are available, ... |
MapStruct - Using defaultValue | Using Mapstruct we can pass the default value in case source property is null using defaultValue attribute of @Mapping annotation.
@Mapping(target = "target-property", source="source-property"
defaultValue = "default-value")
Here
default-value β target-property will be set as default-value in case source-property ... | [
{
"code": null,
"e": 2391,
"s": 2260,
"text": "Using Mapstruct we can pass the default value in case source property is null using defaultValue attribute of @Mapping annotation."
},
{
"code": null,
"e": 2490,
"s": 2391,
"text": "@Mapping(target = \"target-property\", source=\"sou... |
Predicting the impact of social media advertising on sales with linear regression | by Sonali Verghese | Towards Data Science | This article will detail the steps involved in performing a simple linear regression using the package R. It will also cover relevant and essential introductory statistics.
A linear regression measures the relationship between a response variable Y and a predictor variable X. Does Y increase with a unit increase in X? ... | [
{
"code": null,
"e": 345,
"s": 172,
"text": "This article will detail the steps involved in performing a simple linear regression using the package R. It will also cover relevant and essential introductory statistics."
},
{
"code": null,
"e": 694,
"s": 345,
"text": "A linear regr... |
amixer command in Linux with Examples - GeeksforGeeks | 15 Apr, 2019
amixer is a command-line mixer for ALSA(Advanced Linux Sound Architecture) sound-card driver. amixer can support multiple soundcards. amixer with no arguments will display the current mixer settings for the default soundcard as well as the device. This is a good way to see a list of the simple mixer contro... | [
{
"code": null,
"e": 24326,
"s": 24298,
"text": "\n15 Apr, 2019"
},
{
"code": null,
"e": 24654,
"s": 24326,
"text": "amixer is a command-line mixer for ALSA(Advanced Linux Sound Architecture) sound-card driver. amixer can support multiple soundcards. amixer with no arguments will... |
Animate CSS margin-left property | To implement animation on margin-left property in CSS, you can try to run the following code
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
div {
background-color: gray;
animation: myanim 3s infinite;
color: white;
}
@keyframes myanim {
... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "To implement animation on margin-left property in CSS, you can try to run the following code"
},
{
"code": null,
"e": 1165,
"s": 1155,
"text": "Live Demo"
},
{
"code": null,
"e": 1584,
"s": 1165,
"text": "<!DOCTYP... |
MS SQL Server - Assign Permissions | Permissions refer to the rules governing the levels of access that principals have to securables. You can grant, revoke and deny permissions in MS SQL Server.
To assign permissions either of the following two methods can be used.
Use <database name>
Grant <permission name> on <object name> to <username\principle>
To a... | [
{
"code": null,
"e": 2394,
"s": 2235,
"text": "Permissions refer to the rules governing the levels of access that principals have to securables. You can grant, revoke and deny permissions in MS SQL Server."
},
{
"code": null,
"e": 2465,
"s": 2394,
"text": "To assign permissions e... |
C++ Program For Flattening A Multilevel Linked List - GeeksforGeeks | 22 Dec, 2021
Given a linked list where in addition to the next pointer, each node has a child pointer, which may or may not point to a separate list. These child lists may have one or more children of their own, and so on, to produce a multilevel data structure, as shown below figure. You are given the head of the firs... | [
{
"code": null,
"e": 24096,
"s": 24068,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 24635,
"s": 24096,
"text": "Given a linked list where in addition to the next pointer, each node has a child pointer, which may or may not point to a separate list. These child lists may have... |
Insert in Middle of Linked List | Practice | GeeksforGeeks | Given a linked list of size N and a key. The task is to insert the key in the middle of the linked list.
Example 1:
Input:
LinkedList = 1->2->4
key = 3
Output: 1 2 3 4
Explanation: The new element is inserted
after the current middle element in the
linked list.
Example 2:
Input:
LinkedList = 10->20->40->50
key = 30
Out... | [
{
"code": null,
"e": 343,
"s": 238,
"text": "Given a linked list of size N and a key. The task is to insert the key in the middle of the linked list."
},
{
"code": null,
"e": 354,
"s": 343,
"text": "Example 1:"
},
{
"code": null,
"e": 500,
"s": 354,
"text": "I... |
What is Cross-Validation?. Testing your machine learning models... | by Mohammed Alhamid | Towards Data Science | Cross-Validation (CV) is one of the key topics around testing your learning models. Although the subject is widely known, I still find some misconceptions cover some of its aspects. When we train a model, we split the dataset into two main sets: training and testing. The training set represents all the examples that a ... | [
{
"code": null,
"e": 460,
"s": 47,
"text": "Cross-Validation (CV) is one of the key topics around testing your learning models. Although the subject is widely known, I still find some misconceptions cover some of its aspects. When we train a model, we split the dataset into two main sets: training a... |
Bootstrap 4 .justify-content-*-around class | Use the justify-content-*-around class in Bootstrap to align flex items around on different screen sizes β
justify-content-sm-around : Justify content on small screen size
justify-content-md-around : Justify content on medium screen size
justify-content-lg-around : Justify content on large screen size
For an example, l... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "Use the justify-content-*-around class in Bootstrap to align flex items around on different screen sizes β"
},
{
"code": null,
"e": 1365,
"s": 1169,
"text": "justify-content-sm-around : Justify content on small screen size\njustify-c... |
Calendar in Python Program | Python has a built-in module called calendar to work with calendars. We are going to learn about the calendar module in this article.
The week in the calendar modules starts on Monday and ends on Sunday. The module calendar follows the Gregorian calendar. Let's see some useful methods of the calendar module.
If you hav... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "Python has a built-in module called calendar to work with calendars. We are going to learn about the calendar module in this article."
},
{
"code": null,
"e": 1372,
"s": 1196,
"text": "The week in the calendar modules starts on Monda... |
Multi-selection of Checkboxes on button click in jQuery? | For this, use jQuery() with id property. Following is the code β
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initialscale=1.0">
<title>Document</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<s... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "For this, use jQuery() with id property. Following is the code β"
},
{
"code": null,
"e": 1138,
"s": 1127,
"text": " Live Demo"
},
{
"code": null,
"e": 2641,
"s": 1138,
"text": "<!DOCTYPE html>\n<html lang=\"en\">... |
How to rearrange MySQL columns? | To rearrange the MySQL columns, check the column arrangement with the help of show create command. The syntax is as follows β
show create table yourTableName;
The syntax to rearrange the MySQL columns is as follows β
alter table yourTableName change column yourColumnName yourColumnName dataType first
For the same purpo... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "To rearrange the MySQL columns, check the column arrangement with the help of show create command. The syntax is as follows β"
},
{
"code": null,
"e": 1221,
"s": 1188,
"text": "show create table yourTableName;"
},
{
"code": n... |
Tryit Editor v3.7 | Tryit: Responsive image | [] |
Count the number of times a Bulb switches its state - GeeksforGeeks | 19 Oct, 2021
Given two arrays switch[], consisting of binary integers denoting whether a switch is ON(0) or OFF(1), and query[], where query[i] denotes the switch to be toggled. The task after completing all the switch toggles is to print the number of times the bulb changes its state, i.e. from ON to OFF or vice-versa... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 25131,
"s": 24822,
"text": "Given two arrays switch[], consisting of binary integers denoting whether a switch is ON(0) or OFF(1), and query[], where query[i] denotes the switch to be toggled... |
Calculate the Sum of GCD over all subarrays - GeeksforGeeks | 10 Jun, 2021
Given an array of integers, the task is to calculate the sum of GCD of all the subarrays of an array. GCD of an array is defined as the GCD of all the elements present in it. More formally, . Summation of all the GCDs can be defined as where denotes the subarray starting from ith index and ending at jth in... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n10 Jun, 2021"
},
{
"code": null,
"e": 24729,
"s": 24406,
"text": "Given an array of integers, the task is to calculate the sum of GCD of all the subarrays of an array. GCD of an array is defined as the GCD of all the elements pre... |
What is JDBC Blob data type? how to store and read data from it? | A BLOB is binary large object that can hold a variable amount of data with a maximum length of 65535 characters.
These are used to store large amounts of binary data, such as images or other types of files. Fields defined as TEXT also hold large amounts of data. The difference between the two is that the sorts and comp... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "A BLOB is binary large object that can hold a variable amount of data with a maximum length of 65535 characters."
},
{
"code": null,
"e": 1527,
"s": 1175,
"text": "These are used to store large amounts of binary data, such as images ... |
MATLAB - Numbers | MATLAB supports various numeric classes that include signed and unsigned integers and single-precision and double-precision floating-point numbers. By default, MATLAB stores all numeric values as double-precision floating point numbers.
You can choose to store any number or array of numbers as integers or as single-pre... | [
{
"code": null,
"e": 2378,
"s": 2141,
"text": "MATLAB supports various numeric classes that include signed and unsigned integers and single-precision and double-precision floating-point numbers. By default, MATLAB stores all numeric values as double-precision floating point numbers."
},
{
"c... |
Build a Restricted Boltzmann Machine (RBM) as a recommendation system for Movie Review | Towards Data Science | This article is Part 2 of how to build a Restricted Boltzmann Machine (RBM) as a recommendation system.
In Part 1, we focus on data processing, and here the focus is on model creation. What you will learn is how to create an RBM model from scratch. It is split into 3 parts.
Model buildingModel trainingModel testing
Mod... | [
{
"code": null,
"e": 276,
"s": 172,
"text": "This article is Part 2 of how to build a Restricted Boltzmann Machine (RBM) as a recommendation system."
},
{
"code": null,
"e": 447,
"s": 276,
"text": "In Part 1, we focus on data processing, and here the focus is on model creation. W... |
How to perform back and refresh in a browser in Selenium with python? | We can perform back and refresh in the browser in Selenium.
For performing back operation in the browser, the back method is to be used.
For refreshing the browser, refresh method is to be used.
Both these methods can be used for testing browser navigations and reloading of web pages.
Code Implementation
from selenium ... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "We can perform back and refresh in the browser in Selenium."
},
{
"code": null,
"e": 1199,
"s": 1122,
"text": "For performing back operation in the browser, the back method is to be used."
},
{
"code": null,
"e": 1257,
... |
Python | Working with date and time using Pandas - GeeksforGeeks | 10 Mar, 2022
While working with data, encountering time series data is very usual. Pandas is a very useful tool while working with time series data.
Pandas provide a different set of tools using which we can perform all the necessary tasks on date-time data. Letβs try to understand with the examples discussed below.
C... | [
{
"code": null,
"e": 41163,
"s": 41135,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 41300,
"s": 41163,
"text": "While working with data, encountering time series data is very usual. Pandas is a very useful tool while working with time series data. "
},
{
"code": null... |
while and do while Loop in Scala - GeeksforGeeks | 11 Aug, 2021
Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. Loops make the programmers task simpler. Scala provides the different types of loops but in this article we understand while and do-while loops... | [
{
"code": null,
"e": 25117,
"s": 25089,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 25428,
"s": 25117,
"text": "Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true.... |
Python | numpy.copyto() function - GeeksforGeeks | 12 Apr, 2019
With the help of Numpy numpy.copyto() method, we can make a copy of all the data elements that is present in numpy array. If we change any data element in the copy, it will not affect the original numpy array.
Syntax : numpy.copyto(destination, source)
Return : Return copy of an array
Example #1 :In this e... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 25747,
"s": 25537,
"text": "With the help of Numpy numpy.copyto() method, we can make a copy of all the data elements that is present in numpy array. If we change any data element in the copy... |
Find Index of 0 to be replaced with 1 to get longest continuous sequence of 1s in a binary array - GeeksforGeeks | 15 Apr, 2021
Given an array of 0s and 1s, find the position of 0 to be replaced with 1 to get longest continuous sequence of 1s. Expected time complexity is O(n) and auxiliary space is O(1).
Example:
Input:
arr[] = {1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1}
Output:
Index 9
Assuming array index starts from 0, repl... | [
{
"code": null,
"e": 26007,
"s": 25979,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 26186,
"s": 26007,
"text": "Given an array of 0s and 1s, find the position of 0 to be replaced with 1 to get longest continuous sequence of 1s. Expected time complexity is O(n) and auxiliary ... |
PostgreSQL - Connect To PostgreSQL Database Server in Python - GeeksforGeeks | 29 Aug, 2020
The psycopg database adapter is used to connect with PostgreSQL database server through python.
Installing psycopg:
First, use the following command line from the terminal:
pip install psycopg
If you have downloaded the source package into your computer, you can use the setup.py as follows:
python setup.p... | [
{
"code": null,
"e": 25503,
"s": 25475,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 25599,
"s": 25503,
"text": "The psycopg database adapter is used to connect with PostgreSQL database server through python."
},
{
"code": null,
"e": 25619,
"s": 25599,
"te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.