title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Writing a For Loop to Evaluate a Factorial - JavaScript | We are required to write a simple JavaScript function that takes in a Number, say n and computes its factorial using a for loop and returns the factorial.
For example −
factorial(5) = 120,
factorial(6) = 720
Maintain a count and a result variable, keep multiplying the count into result, simultaneously decreasing the co... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "We are required to write a simple JavaScript function that takes in a Number, say n and computes its factorial using a for loop and returns the factorial."
},
{
"code": null,
"e": 1231,
"s": 1217,
"text": "For example −"
},
{
... |
AWT Frame Class | The class Frame is a top level window with border and title. It uses BorderLayout as default layout manager.
Following is the declaration for java.awt.Frame class:
public class Frame
extends Window
implements MenuContainer
Following are the fields for java.awt.Frame class:
static float BOTTOM_ALIGNMENT -- Ease... | [
{
"code": null,
"e": 1856,
"s": 1747,
"text": "The class Frame is a top level window with border and title. It uses BorderLayout as default layout manager."
},
{
"code": null,
"e": 1911,
"s": 1856,
"text": "Following is the declaration for java.awt.Frame class:"
},
{
"cod... |
Aptitude - Averages Examples | Q 1 - The average of 20 numbers is zero. Of them, at the most, how many may be greater than zero?
A - 19
B - 10
C - 0
D - 1
Answer - A
Explanation
Average of 20 numbers = 0.
Therefore Sum of 20 numbers = (0 x 20) = 0
It is quite possible that 19 of these numbers may be positive and if their sum is a, then 20th numbe... | [
{
"code": null,
"e": 3990,
"s": 3892,
"text": "Q 1 - The average of 20 numbers is zero. Of them, at the most, how many may be greater than zero?"
},
{
"code": null,
"e": 3997,
"s": 3990,
"text": "A - 19"
},
{
"code": null,
"e": 4004,
"s": 3997,
"text": "B - 10... |
array_sum() function in PHP | The array_sum() function returns the sum of the values in an array. The returned value can be integer or float. It returns 0 if the array is empty.
array_sum(arr)
arr − the specified array
The array_sum() function returns the sum of values. The returned value can be integer or float. It returns 0 if the array is empty.... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "The array_sum() function returns the sum of the values in an array. The returned value can be integer or float. It returns 0 if the array is empty."
},
{
"code": null,
"e": 1225,
"s": 1210,
"text": "array_sum(arr)"
},
{
"code... |
What is the difference between = and == operators in Python? | In Python = symbol is defined as assignment operator. It requires one variable on its left and an expression on its right. Value of the expression on right is assigned to variable on left. Expression and name of variable are not interchangeable.
>>> a=10
>>> b=20
>>> c=a+b
>>> a,b,c
(10, 20, 30)
>>> a+b=c
SyntaxError: ... | [
{
"code": null,
"e": 1308,
"s": 1062,
"text": "In Python = symbol is defined as assignment operator. It requires one variable on its left and an expression on its right. Value of the expression on right is assigned to variable on left. Expression and name of variable are not interchangeable."
},
... |
Float parseFloat() method in Java with examples - GeeksforGeeks | 26 Oct, 2018
The parseFloat() method in Float Class is a built in method in Java that returns a new float initialized to the value represented by the specified String, as done by the valueOf method of class Float.
Syntax:
public static float parseFloat(String s)
Parameters: It accepts a single mandatory parameter s whi... | [
{
"code": null,
"e": 24142,
"s": 24114,
"text": "\n26 Oct, 2018"
},
{
"code": null,
"e": 24343,
"s": 24142,
"text": "The parseFloat() method in Float Class is a built in method in Java that returns a new float initialized to the value represented by the specified String, as done ... |
How to copy from clipboard using tkinter without displaying a window | Let us suppose that in a particular application, we have to copy the content residing in the clipboard. We can access the clipboard using clipboard_get().
After copying the text from the clipboard, it will reside in the cache memory through
which we can debug the program and display the text in the frame, then we can
s... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "Let us suppose that in a particular application, we have to copy the content residing in the clipboard. We can access the clipboard using clipboard_get()."
},
{
"code": null,
"e": 1421,
"s": 1217,
"text": "After copying the text from... |
Extract unique values from an array - JavaScript | Suppose we have an array that contains duplicate elements like this −
const arr = [1,1,2,2,3,4,4,5];
We are required to write a JavaScript function that takes in one such array and returns a new array. The array should only contain the elements that only appear once in the original array.
Following is the code −
const ... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "Suppose we have an array that contains duplicate elements like this −"
},
{
"code": null,
"e": 1163,
"s": 1132,
"text": "const arr = [1,1,2,2,3,4,4,5];"
},
{
"code": null,
"e": 1352,
"s": 1163,
"text": "We are req... |
How to do a sum of previous row value with the current row and display the result in another row with MySQL cross join? | Let us first create a table −
mysql> create table DemoTable(Value int);
Query OK, 0 rows affected (1.79 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(50);
Query OK, 1 row affected (0.24 sec)
mysql> insert into DemoTable values(20);
Query OK, 1 row affected (0.68 sec)
m... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1171,
"s": 1092,
"text": "mysql> create table DemoTable(Value int);\nQuery OK, 0 rows affected (1.79 sec)"
},
{
"code": null,
"e": 1227,
"s": 1171,
"text": "I... |
How to write an image file in internal storage in android? | This example demonstrates How to write an image file in internal storage 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": 1147,
"s": 1062,
"text": "This example demonstrates How to write an image file in internal storage in android."
},
{
"code": null,
"e": 1276,
"s": 1147,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required d... |
remove null value from a String array in Java | Following program creates an array with null values. Convert it a list with not-null values only and then get the array of that list.
import java.util.ArrayList;
import java.util.List;
public class Tester {
public static void main(String[] args) {
String[] array = {"I", null, "love", null, "Java" };
List... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "Following program creates an array with null values. Convert it a list with not-null values only and then get the array of that list."
},
{
"code": null,
"e": 1691,
"s": 1196,
"text": "import java.util.ArrayList;\nimport java.util.Li... |
Foundation - Switch | It is used to switch between on and off state.
The following example demonstrates the use of switch in Foundation −
<!doctype html>
<head>
<meta charset = "utf-8" />
<meta http-equiv = "x-ua-compatible" content = "ie = edge" />
<meta name = "viewport" content = "width = device-width, initial-scale ... | [
{
"code": null,
"e": 2285,
"s": 2238,
"text": "It is used to switch between on and off state."
},
{
"code": null,
"e": 2354,
"s": 2285,
"text": "The following example demonstrates the use of switch in Foundation −"
},
{
"code": null,
"e": 4259,
"s": 2354,
"tex... |
GATE | GATE-CS-2007 | Question 58 - GeeksforGeeks | 28 Jun, 2021
Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:Here, wants1 and wants2 are shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct?v
/* P1 */
whil... | [
{
"code": null,
"e": 24588,
"s": 24560,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24880,
"s": 24588,
"text": "Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:Here, wants1 and wants2... |
Can namespaces be nested in C++? - GeeksforGeeks | 29 May, 2017
In C++, namespaces can be nested, and resolution of namespace variables is hierarchical. For example, in the following code, namespace inner is created inside namespace outer, which is inside the global namespace. In the line “int z = x”, x refers to outer::x. If x would not have been in outer then this x ... | [
{
"code": null,
"e": 24758,
"s": 24730,
"text": "\n29 May, 2017"
},
{
"code": null,
"e": 25111,
"s": 24758,
"text": "In C++, namespaces can be nested, and resolution of namespace variables is hierarchical. For example, in the following code, namespace inner is created inside name... |
Sum of the multiples of two numbers below N in C++ | In this problem, we have given three integers M1, M2, and N. Our task is to create a program to find the sum of multiples of two numbers below N.
Here, we will add all the elements below N which are multiples of either M1 or M2
Let’s take an example to understand the problem,
Input
N = 13, M1 = 4, M2 = 6
Output
20
E... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "In this problem, we have given three integers M1, M2, and N. Our task is to create a program to find the sum of multiples of two numbers below N."
},
{
"code": null,
"e": 1290,
"s": 1208,
"text": "Here, we will add all the elements b... |
Get Month Name from Month number in MySQL? | You can use MONTHNAME() function from MySQL to display Month name from number. The syntax is as follows.
SELECT MONTHNAME(STR_TO_DATE(yourColumnName,’%m’)) as anyVariableName from yourTableName;
To understand the above concept, let us first create a table. The query to create a table is as follows.
mysql> create table ... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "You can use MONTHNAME() function from MySQL to display Month name from number. The syntax is as follows."
},
{
"code": null,
"e": 1257,
"s": 1167,
"text": "SELECT MONTHNAME(STR_TO_DATE(yourColumnName,’%m’)) as anyVariableName from yo... |
Draw a circle using Turtlesim in ROS-Python - GeeksforGeeks | 27 Dec, 2021
In this article, we are going to see how to draw a circle using Turtlesim in ROS-Python.
ROS stands for Robot Operating System. ROS is a set of libraries and tools that help build robot applications. It’s extensively used in robotics projects. ROS is an open-source, meta-operating system for robots. The s... | [
{
"code": null,
"e": 24317,
"s": 24289,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 24407,
"s": 24317,
"text": "In this article, we are going to see how to draw a circle using Turtlesim in ROS-Python. "
},
{
"code": null,
"e": 24765,
"s": 24407,
"text": "... |
Run Pandas as Fast as Spark. Why the Pandas API on Spark is a total... | by Adrián González Carpintero | Towards Data Science | That’s it. It’s out. Spark now has a Pandas API.
It seems that, every time you want to work with Dataframes, you have to open a messy drawer where you keep all the tools, and carefully look for the right one.
If you work with structured data, you need SQL. Pandas is always there too. Spark is indispensable for Big Data... | [
{
"code": null,
"e": 221,
"s": 172,
"text": "That’s it. It’s out. Spark now has a Pandas API."
},
{
"code": null,
"e": 381,
"s": 221,
"text": "It seems that, every time you want to work with Dataframes, you have to open a messy drawer where you keep all the tools, and carefully l... |
How to create scrollable TextView on Android using Kotlin? | This example demonstrates how to create scrollable TextView on Android using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<R... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "This example demonstrates how to create scrollable TextView on Android using Kotlin."
},
{
"code": null,
"e": 1276,
"s": 1147,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required d... |
Here’s how you can speedup Pandas with cuDF and GPUs | by George Seif | Towards Data Science | Want to be inspired? Come join my Super Quotes newsletter. 😎
Pandas is the go-to data storage library for Data Scientists and Machine Learning practitioners. It allows for easy management, exploration, and manipulation of many different types of data, including both numbers and text.
Even on its own, Pandas is already... | [
{
"code": null,
"e": 233,
"s": 172,
"text": "Want to be inspired? Come join my Super Quotes newsletter. 😎"
},
{
"code": null,
"e": 457,
"s": 233,
"text": "Pandas is the go-to data storage library for Data Scientists and Machine Learning practitioners. It allows for easy manageme... |
Compare Strings in Arduino | Arduino has an inbuilt compareTo() function that helps compare which string comes before another. Very crudely, you can think of it as this: if you are given two strings, which one will come first in a dictionary.
String1.compareTo(String2)
Where String1 and String2 are the two strings to be compared. This function ret... | [
{
"code": null,
"e": 1276,
"s": 1062,
"text": "Arduino has an inbuilt compareTo() function that helps compare which string comes before another. Very crudely, you can think of it as this: if you are given two strings, which one will come first in a dictionary."
},
{
"code": null,
"e": 13... |
Sentiment Analysis with Python (Part 2) | by Aaron Kub | Towards Data Science | In part one of this series we built a barebones movie review sentiment classifier. The goal of this next post is to provide an overview of several techniques that can be used to enhance an NLP model. That being said, we won’t go too far in depth on any particular topic.
If you haven’t yet, you can read my first post he... | [
{
"code": null,
"e": 443,
"s": 172,
"text": "In part one of this series we built a barebones movie review sentiment classifier. The goal of this next post is to provide an overview of several techniques that can be used to enhance an NLP model. That being said, we won’t go too far in depth on any pa... |
mat-slide-toggle in Angular material - GeeksforGeeks | 27 Jan, 2021
Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to install it, we need to have angular installed in our project, once you have it you can enter the below command and can download it.
mat-slide-tog... | [
{
"code": null,
"e": 26464,
"s": 26436,
"text": "\n27 Jan, 2021"
},
{
"code": null,
"e": 26758,
"s": 26464,
"text": "Angular Material is a UI component library that is developed by the Angular team to build design components for desktop and mobile web applications. In order to in... |
Excel Delete Cells | Cells can be deleted by selecting them, and pressing the delete button.
Note: The delete function will not delete the formatting of the cell, just the value inside of it.
Let's have a look at three examples.
Pressing the delete button:
Pressing the delete button:
With formatting:
Pressing the delete button:
Note that i... | [
{
"code": null,
"e": 72,
"s": 0,
"text": "Cells can be deleted by selecting them, and pressing the delete button."
},
{
"code": null,
"e": 171,
"s": 72,
"text": "Note: The delete function will not delete the formatting of the cell, just the value inside of it."
},
{
"code... |
Git Ignore and .gitignore | When sharing your code with others, there are often files or parts of your project, you do not want to share.
Examples
log files
temporary files
hidden files
personal files
etc.
Git can specify which files or parts of your project should be
ignored by Git using a .gitignore file.
Git will not track files and folders s... | [
{
"code": null,
"e": 110,
"s": 0,
"text": "When sharing your code with others, there are often files or parts of your project, you do not want to share."
},
{
"code": null,
"e": 119,
"s": 110,
"text": "Examples"
},
{
"code": null,
"e": 129,
"s": 119,
"text": "... |
How to find all uppercase strings in a MySQL table? | To find all upper case strings in a MySQL table, you need to use BINARY UPPER() function. The syntax is as follows:
SELECT *FROM yourTableName WHERE yourColumnName=BINARY UPPER(yourColumnName);
To understand the above syntax, let us create a table. The query to create a table is as follows:
mysql> create table FindUppe... | [
{
"code": null,
"e": 1178,
"s": 1062,
"text": "To find all upper case strings in a MySQL table, you need to use BINARY UPPER() function. The syntax is as follows:"
},
{
"code": null,
"e": 1256,
"s": 1178,
"text": "SELECT *FROM yourTableName WHERE yourColumnName=BINARY UPPER(yourC... |
MFC - Messages & Events | An application is made of various objects. Most of the time, more than one application is running on the computer and the operating system is constantly asked to perform some assignments. Because there can be so many requests presented unpredictably, the operating system leaves it up to the objects to specify what they... | [
{
"code": null,
"e": 2454,
"s": 2067,
"text": "An application is made of various objects. Most of the time, more than one application is running on the computer and the operating system is constantly asked to perform some assignments. Because there can be so many requests presented unpredictably, th... |
How to detect click on HTML button through javascript in Android WebView? | This example demonstrate about How to lock the Android device programmatically.
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" ?>
<Rel... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "This example demonstrate about How to lock the Android device programmatically."
},
{
"code": null,
"e": 1271,
"s": 1142,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required detail... |
Using the new keyword in C# | Use the new keyword to create an instance of the array. The new operator is used to create an object or instantiate an object. Here in the example an object is created for the class using the new.
The following is an example.
Calculate c = new Calculate();
You can also use the new keyword to create an instance of the a... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "Use the new keyword to create an instance of the array. The new operator is used to create an object or instantiate an object. Here in the example an object is created for the class using the new."
},
{
"code": null,
"e": 1288,
"s": 1259... |
Calculate Hyperbolic sine of a value in R Programming - sinh() Function - GeeksforGeeks | 01 Jun, 2020
sinh() function in R Language is used to calculate the hyperbolic sine value of the numeric value passed to it as argument.
Syntax: sinh(x)
Parameter:x: Numeric value
Example 1:
# R code to calculate hyperbolic sine of a value # Assigning values to variablesx1 <- -90x2 <- -30 # Using sinh() Functionsinh(... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 25366,
"s": 25242,
"text": "sinh() function in R Language is used to calculate the hyperbolic sine value of the numeric value passed to it as argument."
},
{
"code": null,
"e": 25... |
C program to sort an array of ten elements in an ascending order | An array is a group of related data items that are stored with single name.
For example, int student[30];
Here, student is an array name which holds 30 collection of data items, with a single variable name.
The operations of an array are explained below −
Searching − It is used to find whether a particular element is p... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "An array is a group of related data items that are stored with single name."
},
{
"code": null,
"e": 1168,
"s": 1138,
"text": "For example, int student[30];"
},
{
"code": null,
"e": 1269,
"s": 1168,
"text": "Here,... |
C library function - isspace() | The C library function int isspace(char c) checks whether the passed character is white-space.
Standard white-space characters are −
' ' (0x20) space (SPC)
'\t' (0x09) horizontal tab (TAB)
'\n' (0x0a) newline (LF)
'\v' (0x0b) vertical tab (VT)
'\f' (0x0c) feed (FF)
'\r' (0x0d) carriage return (CR)
Following is the de... | [
{
"code": null,
"e": 2102,
"s": 2007,
"text": "The C library function int isspace(char c) checks whether the passed character is white-space."
},
{
"code": null,
"e": 2140,
"s": 2102,
"text": "Standard white-space characters are −"
},
{
"code": null,
"e": 2308,
"s... |
Count of occurrences of each prefix in a string using modified KMP algorithm - GeeksforGeeks | 13 Dec, 2021
Given a string S of size N, the task is to count the occurrences of all the prefixes of the given string S.
Examples:
Input: S = “AAAA” Output: A occurs 4 times AA occurs 3 times. AAA occurs 2 times. AAAA occurs 1 times. Explanation: Below is the illustration of all the prefix:
Input: S = “ABACABA” Out... | [
{
"code": null,
"e": 24713,
"s": 24685,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 24821,
"s": 24713,
"text": "Given a string S of size N, the task is to count the occurrences of all the prefixes of the given string S."
},
{
"code": null,
"e": 24833,
"s": 24... |
Data Structures | Stack | Question 1 - GeeksforGeeks | 08 Jan, 2013
Following is C like pseudo code of a function that takes a number as an argument, and uses a stack S to do processing.
void fun(int n){ Stack S; // Say it creates an empty stack S while (n > 0) { // This line pushes the value of n%2 to stack S push(&S, n%2); n = n/2; } //... | [
{
"code": null,
"e": 24830,
"s": 24802,
"text": "\n08 Jan, 2013"
},
{
"code": null,
"e": 24949,
"s": 24830,
"text": "Following is C like pseudo code of a function that takes a number as an argument, and uses a stack S to do processing."
},
{
"code": "void fun(int n){ S... |
Erlang - Case Statements | Erlang offers the case statement, which can be used to execute expressions based on the output of the case statement.
The general form of this statement is −
case expression of
value1 -> statement#1;
value2 -> statement#2;
valueN -> statement#N
end.
The general working of this statement is as follows −
The ex... | [
{
"code": null,
"e": 2419,
"s": 2301,
"text": "Erlang offers the case statement, which can be used to execute expressions based on the output of the case statement."
},
{
"code": null,
"e": 2459,
"s": 2419,
"text": "The general form of this statement is −"
},
{
"code": nu... |
Python - Data Structure | Computers store and process data with an extra ordinary speed and accuracy. So it is highly essential that the data is stored efficiently and can be accessed fast.
Also the processing of data should happen in the smallest possible time but without losing the accuracy.
Data structures deal with how the data is organiz... | [
{
"code": null,
"e": 2515,
"s": 2244,
"text": "Computers store and process data with an extra ordinary speed and accuracy. So it is highly essential that the data is stored efficiently and can be accessed fast. \nAlso the processing of data should happen in the smallest possible time but without los... |
How to create a flip card with CSS? | To create a flip card with CSS, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin:20px;
}
.flipCard {
background-color: tran... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "To create a flip card with CSS, the code is as follows −"
},
{
"code": null,
"e": 1130,
"s": 1119,
"text": " Live Demo"
},
{
"code": null,
"e": 2632,
"s": 1130,
"text": "<!DOCTYPE html>\n<html>\n<head>\n<meta name... |
Mouse over Actions with Cypress | The mouseover actions are very common in web pages where a list of elements becomes visible once we hover on it. Cypress does not support mouse over actions like other automation tools like Selenium as it considers it to be flaky.
Cypress shall manipulate DOM elements to perform mouse over actions. Cypress takes the he... | [
{
"code": null,
"e": 1293,
"s": 1062,
"text": "The mouseover actions are very common in web pages where a list of elements becomes visible once we hover on it. Cypress does not support mouse over actions like other automation tools like Selenium as it considers it to be flaky."
},
{
"code": ... |
numpy.any() in Python - GeeksforGeeks | 28 Mar, 2022
The numpy.any() function tests whether any array elements along the mentioned axis evaluate to True. Syntax :
numpy.any(a,
axis = None,
out = None,
keepdims = class numpy._globals._NoValue at 0x40ba726c)
Parameters :
array :[array_like]Input array or object whose elements... | [
{
"code": null,
"e": 24694,
"s": 24666,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 24805,
"s": 24694,
"text": "The numpy.any() function tests whether any array elements along the mentioned axis evaluate to True. Syntax : "
},
{
"code": null,
"e": 24929,
"s":... |
Semantic similarity classifier and clustering sentences based on semantic similarity. | by Manish Chablani | Towards Data Science | Recently we have been doing some experiments to cluster semantically similar messages, by leveraging pre-trained models so we can get something off the ground using no labelled data. Task here is given a list of sentences we cluster them such that semantically similar sentences are in same cluster and number of cluster... | [
{
"code": null,
"e": 516,
"s": 172,
"text": "Recently we have been doing some experiments to cluster semantically similar messages, by leveraging pre-trained models so we can get something off the ground using no labelled data. Task here is given a list of sentences we cluster them such that semanti... |
C# | Graphics.DrawLine() Method | Set - 1 - GeeksforGeeks | 17 Apr, 2019
Graphics.DrawLine() Method is used to draw a line connecting the two points specified by the coordinate pairs. There are 4 methods in the overload list of this method as follows:
DrawLine(Pen, PointF, PointF) Method
DrawLine(Pen, Int32, Int32, Int32, Int32) Method
DrawLine(Pen, Single, Single, Single, Sing... | [
{
"code": null,
"e": 23543,
"s": 23515,
"text": "\n17 Apr, 2019"
},
{
"code": null,
"e": 23722,
"s": 23543,
"text": "Graphics.DrawLine() Method is used to draw a line connecting the two points specified by the coordinate pairs. There are 4 methods in the overload list of this met... |
How to make a Bootstrap 4 accordion collapse when clicking the whole header div ? - GeeksforGeeks | 28 Nov, 2019
In Bootstrap 4, Accordion collapse when anchor or button tag is clicked but lets see how to make a Bootstrap 4 accordion collapse when clicking the whole header with the help of following simple approach.
First you have to remove anchor tag and button tag within div of class=”card-header” except card title... | [
{
"code": null,
"e": 25145,
"s": 25117,
"text": "\n28 Nov, 2019"
},
{
"code": null,
"e": 25350,
"s": 25145,
"text": "In Bootstrap 4, Accordion collapse when anchor or button tag is clicked but lets see how to make a Bootstrap 4 accordion collapse when clicking the whole header wi... |
Elm - List | The List, Tuples and Record data structures can be used to store a collection of values.
This chapter discusses how to use List in Elm.
A List is a collection of homogeneous values. The values in a list must all be of the same data type.
Consider the following limitations while using variables to store values −
Variabl... | [
{
"code": null,
"e": 1969,
"s": 1880,
"text": "The List, Tuples and Record data structures can be used to store a collection of values."
},
{
"code": null,
"e": 2016,
"s": 1969,
"text": "This chapter discusses how to use List in Elm."
},
{
"code": null,
"e": 2118,
... |
How to change Entry.get() into an integer in Tkinter? | The Entry widget in Tkinter is generally used to accept one-line input in the text field. We can get the output from the Entry widget using .get() method. However, the .get() method returns the output in string format. For example, if the user types an integer number in the Entry widget, it gets converted to a string. ... | [
{
"code": null,
"e": 1475,
"s": 1062,
"text": "The Entry widget in Tkinter is generally used to accept one-line input in the text field. We can get the output from the Entry widget using .get() method. However, the .get() method returns the output in string format. For example, if the user types an ... |
Collect.js | diff() Function - GeeksforGeeks | 11 Jun, 2020
The diff() function compares the main collection against the given collection and returns the values which are in original collection but not in the given collection. In JavaScript, the array is first converted to a collection and then the function is applied to the collection.
Syntax:
data.diff(collectio... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n11 Jun, 2020"
},
{
"code": null,
"e": 25579,
"s": 25300,
"text": "The diff() function compares the main collection against the given collection and returns the values which are in original collection but not in the given collecti... |
How to convert Java Array to Iterable? | To make an array iterable either you need to convert it to a stream or as a list using the asList() or stream() methods respectively. Then you can get an iterator for these objects using the iterator() method.
Live Demo
import java.util.Arrays;
import java.util.Iterator;
public class ArrayToIterable {
public static... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "To make an array iterable either you need to convert it to a stream or as a list using the asList() or stream() methods respectively. Then you can get an iterator for these objects using the iterator() method."
},
{
"code": null,
"e": 1282,
... |
How to hide ticks label in Python but keep the ticks in place? | To hide ticks label and keep the ticks in place, we can take the following steps −
Initialize x1 and x10 variables to get the x and y points, using numpy.
Initialize x1 and x10 variables to get the x and y points, using numpy.
Plot points x and y using the plot() method.
Plot points x and y using the plot() method.
Usi... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "To hide ticks label and keep the ticks in place, we can take the following steps −"
},
{
"code": null,
"e": 1217,
"s": 1145,
"text": "Initialize x1 and x10 variables to get the x and y points, using numpy."
},
{
"code": null,... |
Bringing More Humans into the AI Lifecycle | by Daniel Vila Suero | Towards Data Science | Starting AI projects has become easier than ever before. Initiatives like the Hugging Face Hub or Papers with Code give developers instant access to the latest research. The rise of transfer learning and AutoML methods means you don’t need to spend months to train a model for your project. However, in my experience, th... | [
{
"code": null,
"e": 532,
"s": 172,
"text": "Starting AI projects has become easier than ever before. Initiatives like the Hugging Face Hub or Papers with Code give developers instant access to the latest research. The rise of transfer learning and AutoML methods means you don’t need to spend months... |
Fisher’s F-Test in R Programming - GeeksforGeeks | 22 Jul, 2020
Fisher’s F test calculates the ratio between the larger variance and the smaller variance. We use the F test when we want to check where means of three or more groups are different or not. F-test is used to assess whether the variances of two populations (A and B) are equal. The method is simple; it consis... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n22 Jul, 2020"
},
{
"code": null,
"e": 25778,
"s": 25242,
"text": "Fisher’s F test calculates the ratio between the larger variance and the smaller variance. We use the F test when we want to check where means of three or more gro... |
Python 3 - Tkinter pack() Method | This geometry manager organizes widgets in blocks before placing them in the parent widget.
widget.pack( pack_options )
Here is the list of possible options −
expand − When set to true, widget expands to fill any space not otherwise used in widget's parent.
expand − When set to true, widget expands to fill any space ... | [
{
"code": null,
"e": 2432,
"s": 2340,
"text": "This geometry manager organizes widgets in blocks before placing them in the parent widget."
},
{
"code": null,
"e": 2461,
"s": 2432,
"text": "widget.pack( pack_options )\n"
},
{
"code": null,
"e": 2501,
"s": 2461,
... |
Flutter - Introduction to Package | Dart’s way of organizing and sharing a set of functionality is through Package. Dart Package is simply sharable libraries or modules. In general, the Dart Package is same as that of Dart Application except Dart Package does not have application entry point, main.
The general structure of Package (consider a demo packag... | [
{
"code": null,
"e": 2482,
"s": 2218,
"text": "Dart’s way of organizing and sharing a set of functionality is through Package. Dart Package is simply sharable libraries or modules. In general, the Dart Package is same as that of Dart Application except Dart Package does not have application entry po... |
C# program to find IP Address of the client | Firstly find the hostname using the Dns.GetHostName() method in C# −
String hostName = string.Empty;
hostName = Dns.GetHostName();
Console.WriteLine("Hostname: "+hostName);
Now, use the IPHostEntry.AddressList Property to get IP Address −
IPHostEntry myIP = Dns.GetHostEntry(hostName);
IPAddress[] address = myIP.Address... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "Firstly find the hostname using the Dns.GetHostName() method in C# −"
},
{
"code": null,
"e": 1235,
"s": 1131,
"text": "String hostName = string.Empty;\nhostName = Dns.GetHostName();\nConsole.WriteLine(\"Hostname: \"+hostName);"
},... |
PyQt - QList Widget | QListWidget class is an item-based interface to add or remove items from a list. Each item in the list is a QListWidgetItem object. ListWidget can be set to be multiselectable.
Following are the frequently used methods of QListWidget class −
addItem()
Adds QListWidgetItem object or string in the list
addItems()
Adds ea... | [
{
"code": null,
"e": 2103,
"s": 1926,
"text": "QListWidget class is an item-based interface to add or remove items from a list. Each item in the list is a QListWidgetItem object. ListWidget can be set to be multiselectable."
},
{
"code": null,
"e": 2168,
"s": 2103,
"text": "Follo... |
Working with APIs using Flask, Flask-RESTPlus and Swagger UI | by Karan Bhanot | Towards Data Science | While working on Machine Learning projects, I decided that I would like to develop complete applications. This would require developing APIs, so that we can post values and get responses of predictions. This is where Flask and Flask-RESTPlus come into the picture.
Flask enables exposure of Python functions as APIs. Fla... | [
{
"code": null,
"e": 437,
"s": 172,
"text": "While working on Machine Learning projects, I decided that I would like to develop complete applications. This would require developing APIs, so that we can post values and get responses of predictions. This is where Flask and Flask-RESTPlus come into the... |
What are getters and setters methods in PHP? | In this article, we learn the best way to create getter and setter strategies in PHP. Getter and setter strategies are utilized when we need to restrict the direct access to the variables by end-users. Getters and setters are methods used to define or retrieve the values of variables, normally private ones.
Just as the... | [
{
"code": null,
"e": 1371,
"s": 1062,
"text": "In this article, we learn the best way to create getter and setter strategies in PHP. Getter and setter strategies are utilized when we need to restrict the direct access to the variables by end-users. Getters and setters are methods used to define or r... |
Java Examples - View classpath? | How to view current classpath?
Following example demonstrates how to view current classpath using echo command.
C:> echo %CLASSPATH%
The above code sample will produce the following result.
.;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip
Print
Add Notes
Bookmark this page | [
{
"code": null,
"e": 2099,
"s": 2068,
"text": "How to view current classpath?"
},
{
"code": null,
"e": 2180,
"s": 2099,
"text": "Following example demonstrates how to view current classpath using echo command."
},
{
"code": null,
"e": 2202,
"s": 2180,
"text": ... |
How I Taught Myself Linked Lists. Breaking down the definition of linked... | by Cleon W | Towards Data Science | Linked lists are amongst the simplest and most common data structures. If you have ever attempted to learn more about basic data structures, it is likely that you’ve come across linked lists and have read definitions similar to the following:
A linked list is a data structure where the objects are arranged in a linear ... | [
{
"code": null,
"e": 415,
"s": 172,
"text": "Linked lists are amongst the simplest and most common data structures. If you have ever attempted to learn more about basic data structures, it is likely that you’ve come across linked lists and have read definitions similar to the following:"
},
{
... |
How do malloc() and free() work in C/C++? | The function malloc() is used to allocate the requested size of bytes and it returns a pointer to the first byte of allocated memory. It returns null pointer, if it fails.
Here is the syntax of malloc() in C language,
pointer_name = (cast-type*) malloc(size);
Here,
pointer_name − Any name given to the pointer.
pointer... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "The function malloc() is used to allocate the requested size of bytes and it returns a pointer to the first byte of allocated memory. It returns null pointer, if it fails."
},
{
"code": null,
"e": 1280,
"s": 1234,
"text": "Here is th... |
CountDownLatch in Java - GeeksforGeeks | 19 Apr, 2018
CountDownLatch is used to make sure that a task waits for other threads before it starts. To understand its application, let us consider a server where the main task can only start when all the required services have started.
Working of CountDownLatch:When we create an object of CountDownLatch, we specify ... | [
{
"code": null,
"e": 23559,
"s": 23531,
"text": "\n19 Apr, 2018"
},
{
"code": null,
"e": 23785,
"s": 23559,
"text": "CountDownLatch is used to make sure that a task waits for other threads before it starts. To understand its application, let us consider a server where the main ta... |
Docly: Generate Comments Automatically for Python Code | by Satyam Kumar | Towards Data Science | Artificial Intelligence is extensively used for developing models to help developers write better source code. Various AI models are used to accelerate the work of developers, such as code autocompletion, autosuggestions, unit test assistance, bug detection, code summarization, etc.
Documentation of code is essential w... | [
{
"code": null,
"e": 456,
"s": 172,
"text": "Artificial Intelligence is extensively used for developing models to help developers write better source code. Various AI models are used to accelerate the work of developers, such as code autocompletion, autosuggestions, unit test assistance, bug detecti... |
Python - Grouping columns in Pandas Dataframe | To group columns in Pandas dataframe, use the groupby(). At first, let us create Pandas dataframe −
dataFrame = pd.DataFrame(
{
"Car": ["Audi", "Lexus", "Audi", "Mercedes", "Audi", "Lexus", "Mercedes", "Lexus", "Mercedes"],
"Reg_Price": [1000, 1400, 1100, 900, 1700, 1800, 1300, 1150, 1350]
}
)
Let us ... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "To group columns in Pandas dataframe, use the groupby(). At first, let us create Pandas dataframe −"
},
{
"code": null,
"e": 1375,
"s": 1162,
"text": "dataFrame = pd.DataFrame(\n {\n \"Car\": [\"Audi\", \"Lexus\", \"Audi\", \"... |
Use of fflush(stdin) in C | The function fflush(stdin) is used to flush the output buffer of the stream. It returns zero, if successful otherwise, returns EOF and feof error indicator is set.
Here is the syntax of fflush(stdin) in C language,
int fflush(FILE *stream);
Here is an example of fflush(stdin) in C language,
Live Demo
#include
#include... | [
{
"code": null,
"e": 1226,
"s": 1062,
"text": "The function fflush(stdin) is used to flush the output buffer of the stream. It returns zero, if successful otherwise, returns EOF and feof error indicator is set."
},
{
"code": null,
"e": 1277,
"s": 1226,
"text": "Here is the syntax... |
What to press ctrl +f on a page in Selenium with python? | We can perform the action of pressing ctrl+f keys in Selenium. There are multiple special Keys available that enable the act of pressing keys via a keyboard like ctrl+c, ctrl+v, ctrl+f and many more. These special Keys are a part of selenium.webdriver.common.keys.Keys class.
key_up() – This method releases a modifier k... | [
{
"code": null,
"e": 1338,
"s": 1062,
"text": "We can perform the action of pressing ctrl+f keys in Selenium. There are multiple special Keys available that enable the act of pressing keys via a keyboard like ctrl+c, ctrl+v, ctrl+f and many more. These special Keys are a part of selenium.webdriver.c... |
Triangle in C++ | Suppose we have a triangle. We have to find the minimum path sum from top to the bottom. In each step, we can move to adjacent numbers on the row below.
For example, if the following triangle is like
[
[2],
[3,4],
[6,5,7],
[4,1,8,3]
]
The minimum path sum from top to bottom is 11 (2 + 3 + 5 + 1 = 11).... | [
{
"code": null,
"e": 1215,
"s": 1062,
"text": "Suppose we have a triangle. We have to find the minimum path sum from top to the bottom. In each step, we can move to adjacent numbers on the row below."
},
{
"code": null,
"e": 1262,
"s": 1215,
"text": "For example, if the following... |
Pandas to_csv - Pandas Save Dataframe to CSV file - onlinetutorialspoint | 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 will see how we can save... | [
{
"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,
... |
Count Occurences of Anagrams | Practice | GeeksforGeeks | Given a word pat and a text txt. Return the count of the occurences of anagrams of the word in the text.
Example 1:
Input:
txt = forxxorfxdofr
pat = for
Output: 3
Explanation: for, orf and ofr appears
in the txt, hence answer is 3.
Example 2:
Input:
txt = aabaabaa
pat = aaba
Output: 4
Explanation: aaba is present 4 ti... | [
{
"code": null,
"e": 331,
"s": 226,
"text": "Given a word pat and a text txt. Return the count of the occurences of anagrams of the word in the text."
},
{
"code": null,
"e": 342,
"s": 331,
"text": "Example 1:"
},
{
"code": null,
"e": 459,
"s": 342,
"text": "I... |
Count of distinct permutations of length N having no similar adjacent characters - GeeksforGeeks | 29 Apr, 2021
Given an integer N, the task is to calculate the total number of distinct permutations of length N, consisting only of letters ‘a’, ‘b’, and ‘c’, with repetitions allowed, such that no two adjacent characters are the same.
Input: N = 3 Output: 12 Explanation: Possible permutations satisfying the required c... | [
{
"code": null,
"e": 25398,
"s": 25370,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 25621,
"s": 25398,
"text": "Given an integer N, the task is to calculate the total number of distinct permutations of length N, consisting only of letters ‘a’, ‘b’, and ‘c’, with repetitions ... |
Amazon Internship Interview Experience | On-Campus 2021 - GeeksforGeeks | 11 Oct, 2021
Amazon arrived for hiring in the last week of Sept 2021 on our campus for the 6 months Software Development Engineer Role. We had a total of 3 rounds (1 Online Coding on Amazon’s Assessment Portal + 2 Technical Interviews).
Round 1: Online Assessment Round
The coding round comprised of 4 sections:
Debuggin... | [
{
"code": null,
"e": 25156,
"s": 25128,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 25380,
"s": 25156,
"text": "Amazon arrived for hiring in the last week of Sept 2021 on our campus for the 6 months Software Development Engineer Role. We had a total of 3 rounds (1 Online Cod... |
DAX Time Intelligence - TOTALYTD function | Evaluates the year-to-date value of the expression in the current context.
TOTALYTD (<expression>, <dates>, [<filter>], [<year_end_date>])
expression
An expression that returns a scalar value.
dates
A column that contains dates.
filter
Optional.
An expression that specifies a filter to apply to the current context.
y... | [
{
"code": null,
"e": 2076,
"s": 2001,
"text": "Evaluates the year-to-date value of the expression in the current context."
},
{
"code": null,
"e": 2142,
"s": 2076,
"text": "TOTALYTD (<expression>, <dates>, [<filter>], [<year_end_date>]) \n"
},
{
"code": null,
"e": 215... |
C# | Math.DivRem() Method - GeeksforGeeks | 01 Feb, 2019
In C#, Math.DivRem() is a Math class method which divides two numbers and returns the remainder. By using Division operator, we do not get the remainder in a separate variable but using DivRem() method, we get both.This method can be overloaded by passing different type and number of arguments to it.
Math.... | [
{
"code": null,
"e": 24009,
"s": 23981,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24311,
"s": 24009,
"text": "In C#, Math.DivRem() is a Math class method which divides two numbers and returns the remainder. By using Division operator, we do not get the remainder in a separ... |
How to center a popup window on screen? - GeeksforGeeks | 28 Mar, 2022
JavaScript window.open() method is used to open a popup window. This popup window will place into the center of the screen.
popupWinHeight: The height of pop up window on the screen.
popupWinWidth: The width of pop up window on the screen.
Example 1: This example creates the pop up window without placing i... | [
{
"code": null,
"e": 25558,
"s": 25530,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 25682,
"s": 25558,
"text": "JavaScript window.open() method is used to open a popup window. This popup window will place into the center of the screen."
},
{
"code": null,
"e": 25... |
Print the nodes having exactly one child in a Binary tree - GeeksforGeeks | 06 Mar, 2022
Given a binary tree, the task is to print all the nodes having exactly one child. Print “-1” if no such node exists.Examples:
Input:
2
/ \
3 5
/ / \
7 8 6
Output: 3
Explanation:
There is only one node having
single child that is 3.
Input:
... | [
{
"code": null,
"e": 26201,
"s": 26173,
"text": "\n06 Mar, 2022"
},
{
"code": null,
"e": 26328,
"s": 26201,
"text": "Given a binary tree, the task is to print all the nodes having exactly one child. Print “-1” if no such node exists.Examples: "
},
{
"code": null,
"e":... |
Introduction To Machine Learning using Python - GeeksforGeeks | 30 Nov, 2021
Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. Machine learning focuses on the development of Computer Programs that can change when exposed to new data. In this article, we’ll see basics of Machine Learning,... | [
{
"code": null,
"e": 25519,
"s": 25491,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 25900,
"s": 25519,
"text": "Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. Machine learning ... |
How to lowercase column names in Pandas dataframe - GeeksforGeeks | 06 Dec, 2018
Analyzing real-world data is somewhat difficult because we need to take various things into consideration. Apart from getting the useful data from large datasets, keeping data in required format is also very important.
One might encounter a situation where we need to lowercase each letter in any specific c... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 25756,
"s": 25537,
"text": "Analyzing real-world data is somewhat difficult because we need to take various things into consideration. Apart from getting the useful data from large datasets, ... |
C++ program to divide a number by 3 without using *, / , +, -, % operators - GeeksforGeeks | 07 Sep, 2021
For a given positive number we need to divide a number by 3 without using any of these *, /, +, – % operatorsExamples:
Input : 48
Output : 16
Input : 16
Output : 5
Algorithm
Take a number num, sum = 0while(num>3), shift the number left by 2 bits and sum = add(num >> 2, sum). Create a function ad... | [
{
"code": null,
"e": 25961,
"s": 25933,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 26082,
"s": 25961,
"text": "For a given positive number we need to divide a number by 3 without using any of these *, /, +, – % operatorsExamples: "
},
{
"code": null,
"e": 26132... |
JavaScript JSON - GeeksforGeeks | 23 Feb, 2022
What is JSON?JSON or JavaScript Object Notation is a format for structuring data.
What is it used for?Like XML, it is one of the way of formatting the data. Such format of data is used by web applications to communicate with each other.
Why JSON?
The fact that whenever we declare a variable and assign a va... | [
{
"code": null,
"e": 31327,
"s": 31299,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 31409,
"s": 31327,
"text": "What is JSON?JSON or JavaScript Object Notation is a format for structuring data."
},
{
"code": null,
"e": 31564,
"s": 31409,
"text": "What is ... |
Maximum and Minimum Values of an Algebraic Expression - GeeksforGeeks | 11 Oct, 2021
Given an algebraic expression of the form (x1 + x2 + x3 + . . . + xn) * (y1 + y2 + . . . + ym) and (n + m) integers. Find the maximum and minimum value of the expression using the given integers.
Constraint : n <= 50 m <= 50 -50 <= x1, x2, .. xn <= 50
Examples :
Input : n = 2, m = 2
arr[] = {1,... | [
{
"code": null,
"e": 26411,
"s": 26383,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 26609,
"s": 26411,
"text": "Given an algebraic expression of the form (x1 + x2 + x3 + . . . + xn) * (y1 + y2 + . . . + ym) and (n + m) integers. Find the maximum and minimum value of the expr... |
How to Update Two Tables in One Statement in SQL Server? - GeeksforGeeks | 16 Dec, 2021
In SQL, there is a requirement of a single query/statement to simultaneously perform 2 tasks at the same time. For instance, updating 2 different tables together in a single query/statement. This involves the use of the BEGIN TRANSACTION clause and the COMMIT clause. The individual UPDATE clauses are writt... | [
{
"code": null,
"e": 25513,
"s": 25485,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 26014,
"s": 25513,
"text": "In SQL, there is a requirement of a single query/statement to simultaneously perform 2 tasks at the same time. For instance, updating 2 different tables together i... |
GATE 2017 Mock - GeeksforGeeks | 28 Jun, 2021
Time Remaining ::
In the present-day world, no individual or organization even
think to plough a lonely furrow.
The plane _______ by the time we arrive at the airport in this slow traffic.
Call the doctor at once.
A B C D (fix pen 2 in A)
2 1 4 3
2 4 1 3
2 3 4 1 - 3 ca... | [
{
"code": null,
"e": 28855,
"s": 28827,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 28873,
"s": 28855,
"text": "Time Remaining ::"
},
{
"code": null,
"e": 28969,
"s": 28873,
"text": " In the present-day world, no individual or organization even \nthink to... |
Count of Equilateral Triangles of unit length possible from a given Hexagon - GeeksforGeeks | 10 May, 2021
Given an array S[] consisting of the lengths of the 6 sides of a Hexagon, the task is to calculate the number of equilateral triangles of unit length that can be made from the given hexagon.
Examples:
Input: S = {1, 1, 1, 1, 1, 1} Output: 6 Explanation:
Input: S = {2, 2, 1, 3, 1, 2} Output: 19 Explanat... | [
{
"code": null,
"e": 26547,
"s": 26519,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 26738,
"s": 26547,
"text": "Given an array S[] consisting of the lengths of the 6 sides of a Hexagon, the task is to calculate the number of equilateral triangles of unit length that can be m... |
Socialphish- Phishing Tool in Kali Linux - GeeksforGeeks | 28 Apr, 2021
Socialphish is a powerful open source tool Phishing Tool. Socialphish is becoming very popular nowadays that is used to do phishing attacks on Target. Socialphish is easy then Social Engineering Toolkit. Socialphish contain some templates generated by another tool called Socialphish. Socialphish offers ph... | [
{
"code": null,
"e": 25851,
"s": 25823,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 26575,
"s": 25851,
"text": "Socialphish is a powerful open source tool Phishing Tool. Socialphish is becoming very popular nowadays that is used to do phishing attacks on Target. Socialphish ... |
D3.js transform.toString() Function - GeeksforGeeks | 02 Sep, 2020
The transform.toString() Function in D3.js is used to get a string representing the SVG transform corresponding to this transform.
Syntax:
transform.toString()
Parameters: This function does not accept any parameter.
Return Value: This function returns a string value that can be used to set zoom behavior.... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 26676,
"s": 26545,
"text": "The transform.toString() Function in D3.js is used to get a string representing the SVG transform corresponding to this transform."
},
{
"code": null,
... |
Python – tensorflow.math.multiply() | 10 Jun, 2020
TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning neural networks. multiply() is used to find element wise x*y. It supports broadcasting.
Syntax: tf.math.multiply(x, y, name)
Parameter:
x: It’s the input tensor. Allowed dtype for this tensor a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jun, 2020"
},
{
"code": null,
"e": 230,
"s": 28,
"text": "TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning neural networks. multiply() is used to find element wise x*y.... |
Python regex to find sequences of one upper case letter followed by lower case letters | 29 Dec, 2020
Write a Python Program to find sequences of one upper case letter followed by lower case letters. If found, print ‘Yes’, otherwise ‘No’.
Examples:
Input : Geeks
Output : Yes
Input : geeksforgeeks
Output : No
Approach: Using re.search()
To check if the sequence of one upper case letter followed by lower... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 189,
"s": 52,
"text": "Write a Python Program to find sequences of one upper case letter followed by lower case letters. If found, print ‘Yes’, otherwise ‘No’."
},
{
"code": null,
"e": ... |
How to Solve ConcurrentModificationException in Java? | 02 Mar, 2022
An unaccepted, unwanted event that disturbed the normal flow of a program is called an Exception. Most of the time exception is caused by our program and these are recoverable. Example: If our program requirement is to read data from the remote file locating in the U.S.A. At runtime, if a remote file is no... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 544,
"s": 28,
"text": "An unaccepted, unwanted event that disturbed the normal flow of a program is called an Exception. Most of the time exception is caused by our program and these are recoverable... |
Design Smiley Face Eyes that follow Mouse Cursor using CSS and JS | 26 Apr, 2021
An animated face by using HTML and CSS and JavaScript. Where the face will follow the cursor. It is one of the simple CSS and JavaScript effects. For a beginner, it is one of the best examples to learn the concept of pseudo-elements.
Approach: The Basic idea of a face is comes from CSS.Here the whole anima... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 262,
"s": 28,
"text": "An animated face by using HTML and CSS and JavaScript. Where the face will follow the cursor. It is one of the simple CSS and JavaScript effects. For a beginner, it is one of ... |
Python min() Function | 13 Aug, 2020
Python min() function returns the smallest of the value or smallest item in an iterable passed as its parameter. There are two types of min function –
min() functions with objects
min() functions with an iterable
Unlike the min() function of C/C++, the min() function in Python can take any type of object a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Aug, 2020"
},
{
"code": null,
"e": 179,
"s": 28,
"text": "Python min() function returns the smallest of the value or smallest item in an iterable passed as its parameter. There are two types of min function –"
},
{
"code": nu... |
How to Update Current Timestamp in MySQL? | 30 Nov, 2021
MySQL is an easy-to-use RDBMS. Many organizations prefer to use it because of its easy maintainability, easier to prepare schemas, stored procedures, triggers, and database maintenance. In this article, let us see how to update to Current Timestamp in MySQL.
Step 1: Database creation
Firstly we create the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 287,
"s": 28,
"text": "MySQL is an easy-to-use RDBMS. Many organizations prefer to use it because of its easy maintainability, easier to prepare schemas, stored procedures, triggers, and database ma... |
unordered_map operator[] in C++ STL | 14 Dec, 2018
The std::unordered_map::operator[] is a built in function in C++ STL which returns the reference of value if key matches in the container. If no key is found then it inserts that key into container.Syntax:
mapped_type& operator[](key_type&& k);
Parameter: It takes parameter as key whose mapped value is ac... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Dec, 2018"
},
{
"code": null,
"e": 234,
"s": 28,
"text": "The std::unordered_map::operator[] is a built in function in C++ STL which returns the reference of value if key matches in the container. If no key is found then it inserts t... |
JavaScript | Date Objects | 08 Jul, 2019
The Date object is an inbuilt datatype of JavaScript language. It is used to work with dates and times. The Date object is created by using new keyword, i.e. new Date(). The Date object can be used date and time in terms of millisecond precision within 100 million days before or after 1/1/1970. But using a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2019"
},
{
"code": null,
"e": 683,
"s": 28,
"text": "The Date object is an inbuilt datatype of JavaScript language. It is used to work with dates and times. The Date object is created by using new keyword, i.e. new Date(). The D... |
Given an example of C pointer addition and subtraction | Pointers have many but easy concepts and they are very important to C programming.
Two of the arithmetic pointer concepts are explained below, which are C pointer addition and subtraction respectively.
C pointer addition refers to adding a value to the pointer variable.
The formula is as follows −
new_address= current_... | [
{
"code": null,
"e": 1270,
"s": 1187,
"text": "Pointers have many but easy concepts and they are very important to C programming."
},
{
"code": null,
"e": 1389,
"s": 1270,
"text": "Two of the arithmetic pointer concepts are explained below, which are C pointer addition and subtra... |
Form minimum number from given sequence | 29 Jun, 2022
Given a pattern containing only I’s and D’s. I for increasing and D for decreasing. Device an algorithm to print the minimum number following that pattern. Digits from 1-9 and digits can’t repeat.
Examples:
Input: D Output: 21
Input: I Output: 12
Input: DD Output: 321
Input... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 249,
"s": 52,
"text": "Given a pattern containing only I’s and D’s. I for increasing and D for decreasing. Device an algorithm to print the minimum number following that pattern. Digits from 1-9 an... |
Hive – Alter Table | 24 Nov, 2020
Hive provides us the functionality to perform Alteration on the Tables and Databases. ALTER TABLE command can be used to perform alterations on the tables. We can modify multiple numbers of properties associated with the table schema in the Hive. Alteration on table modify’s or changes its metadata and doe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Nov, 2020"
},
{
"code": null,
"e": 674,
"s": 28,
"text": "Hive provides us the functionality to perform Alteration on the Tables and Databases. ALTER TABLE command can be used to perform alterations on the tables. We can modify multi... |
Insecure Direct Object Reference (IDOR) Vulnerability | 12 Sep, 2021
One of the most crucial Vulnerabilities listed in top 10 of OWASP is Insecure Direct Object Reference Vulnerability (IDOR Vulnerability). In this article we will discuss IDOR Vulnerability. Before moving ahead, let us first discuss Authentication. Authentication means to verify the identity of a person and... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Sep, 2021"
},
{
"code": null,
"e": 725,
"s": 52,
"text": "One of the most crucial Vulnerabilities listed in top 10 of OWASP is Insecure Direct Object Reference Vulnerability (IDOR Vulnerability). In this article we will discuss IDOR... |
How to communicate between Activity and Service in Android using Kotlin? | This example demonstrates how to communicate between Activity and Service in Android using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encodin... | [
{
"code": null,
"e": 1286,
"s": 1187,
"text": "This example demonstrates how to communicate between Activity and Service in Android using Kotlin."
},
{
"code": null,
"e": 1415,
"s": 1286,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill ... |
XSD - Element | Simple Element is an XML element which can only have text. It can not contain any attribute.
<xs:element name = "element-name" type = "element-type"/>
<xs:element name = "firstname" type = "xs:string"/>
defines following element
<firstname></firstname>
<xs:element name = "firstname" type = "xs:string"/>
<firstnam... | [
{
"code": null,
"e": 1931,
"s": 1838,
"text": "Simple Element is an XML element which can only have text. It can not contain any attribute."
},
{
"code": null,
"e": 1990,
"s": 1931,
"text": "<xs:element name = \"element-name\" type = \"element-type\"/>\n"
},
{
"code": nul... |
execute_async_script driver method – Selenium Python | 15 May, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2020"
},
{
"code": null,
"e": 767,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ... |
Sum Of Two Numbers in PL/SQL | 29 Dec, 2020
Prerequisite – PL/SQL introductionIn PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements.
In declare part, we declare variables and between begin and end part, we perform the operations.
Here, first, we take three variables x, y, and z and assign th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 201,
"s": 53,
"text": "Prerequisite – PL/SQL introductionIn PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. "
},
{
"code": null... |
Kali Linux – Terminal and Shell | 30 Jun, 2020
Generally, operating systems have 2 interfaces GUI(Graphical User Interface) and CLI(Command Line Interface) and the same is the case with Linux Based Operating Systems. Linux Operating Systems are generally packed with terminal emulator packages for CLI based functioning and Desktop environment packages f... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 420,
"s": 52,
"text": "Generally, operating systems have 2 interfaces GUI(Graphical User Interface) and CLI(Command Line Interface) and the same is the case with Linux Based Operating Systems. Linu... |
Java Examples - Update Table Contents | How to update(delete, insert or update) contents of a table using JDBC connection?
Following method uses update, delete & insert SQL commands to edit or delete row contents.
import java.sql.*;
public class updateTable {
public static void main(String[] args) {
try {
Class.forName("org.apache.derby.jd... | [
{
"code": null,
"e": 2151,
"s": 2068,
"text": "How to update(delete, insert or update) contents of a table using JDBC connection?"
},
{
"code": null,
"e": 2242,
"s": 2151,
"text": "Following method uses update, delete & insert SQL commands to edit or delete row contents."
},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.