title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Sensor Network Architecture - GeeksforGeeks | 30 Jan, 2020
Sensor Network Architecture is used in Wireless Sensor Network (WSN). It can be used in various places like schools, hospitals, buildings, roads, etc for various applications like disaster management, security management, crisis management, etc.
There are 2 types of architecture used in WSN: Layered Networ... | [
{
"code": null,
"e": 24446,
"s": 24418,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 24692,
"s": 24446,
"text": "Sensor Network Architecture is used in Wireless Sensor Network (WSN). It can be used in various places like schools, hospitals, buildings, roads, etc for various a... |
WSDL - <types> Element | A web service needs to define its inputs and outputs and how they are mapped into and out of the services. WSDL <types> element takes care of defining the data types that are used by the web service. Types are XML documents, or document parts.
The types element describes all the data types used between the client and t... | [
{
"code": null,
"e": 2048,
"s": 1804,
"text": "A web service needs to define its inputs and outputs and how they are mapped into and out of the services. WSDL <types> element takes care of defining the data types that are used by the web service. Types are XML documents, or document parts."
},
{... |
Filter the rows – Python Pandas | To filter the rows and fetch specific column value, use the Pandas contains() method. At first, let us import the required library with alias −
import pandas as pd
Read the CSV file using the read_csv(). Our CSV file is on the Desktop −
dataFrame = pd.read_csv("C:\\Users\\amit_\\Desktop\\CarRecords.csv")
Now, let us f... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "To filter the rows and fetch specific column value, use the Pandas contains() method. At first, let us import the required library with alias −"
},
{
"code": null,
"e": 1226,
"s": 1206,
"text": "import pandas as pd"
},
{
"cod... |
verify - Unix, Linux Command | verify [generic Postfix daemon options]
Addresses are verified by injecting probe messages into the
Postfix queue. Probe messages are run through all the routing
and rewriting machinery except for final delivery, and are
discarded rather than being deferred or bounced.
Address verification relies on the answer from... | [
{
"code": null,
"e": 10618,
"s": 10577,
"text": "verify [generic Postfix daemon options]\n"
},
{
"code": null,
"e": 10850,
"s": 10618,
"text": "\nAddresses are verified by injecting probe messages into the\nPostfix queue. Probe messages are run through all the routing\nand rewrit... |
What is JDBC Clob data type? how to store and read data from it? | CLOB stands for Character Large Object in general, an SQL Clob is a built-in datatype and is used to store large amount of textual data. Using this datatype, you can store data up to 2,147,483,647 characters.
The java.sql.Clob interface of the JDBC API represents the CLOB datatype. Since the Clob object in JDBC is impl... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "CLOB stands for Character Large Object in general, an SQL Clob is a built-in datatype and is used to store large amount of textual data. Using this datatype, you can store data up to 2,147,483,647 characters."
},
{
"code": null,
"e": 1471,
... |
Command to check read/write ratio in MySQL? | To check the read/write ratio, you need to use SHOW STATUS command. This will give all the ratios.
Case 1 − The syntax is as follows to get the read/write ratio −
SHOW STATUS LIKE ‘Com_%’;
Case 2 − If you want the insert, update, select and delete ratio, use the below syntax −
SHOW GLOBAL STATUS WHERE Variable_name = '... | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "To check the read/write ratio, you need to use SHOW STATUS command. This will give all the ratios."
},
{
"code": null,
"e": 1225,
"s": 1161,
"text": "Case 1 − The syntax is as follows to get the read/write ratio −"
},
{
"code... |
How to Write a Winning Data Science Resume | Towards Data Science | IntroductionAestheticGoalExperiencesSkillsEducation/ExtracurricularsSummaryReferences
Introduction
Aesthetic
Goal
Experiences
Skills
Education/Extracurriculars
Summary
References
Attracting top tech companies can not only be extremely difficult but intimidating as well. However, I am here to tell you that you can indee... | [
{
"code": null,
"e": 258,
"s": 172,
"text": "IntroductionAestheticGoalExperiencesSkillsEducation/ExtracurricularsSummaryReferences"
},
{
"code": null,
"e": 271,
"s": 258,
"text": "Introduction"
},
{
"code": null,
"e": 281,
"s": 271,
"text": "Aesthetic"
},
... |
Python 3 - Number exp() Method | The exp() method returns exponential of x: ex.
Following is the syntax for the exp() method −
import math
math.exp( x )
Note − This function is not accessible directly. Therefore, we need to import the math module and then we need to call this function using the math static object.
x − This is a numeric expression.
T... | [
{
"code": null,
"e": 2387,
"s": 2340,
"text": "The exp() method returns exponential of x: ex."
},
{
"code": null,
"e": 2434,
"s": 2387,
"text": "Following is the syntax for the exp() method −"
},
{
"code": null,
"e": 2462,
"s": 2434,
"text": "import math\n\nma... |
Python Program to Detect the Cycle in a Linked List | When it is required to detect a cycle in a linked list, a method to add elements to the linked list, and a method to get the element in the linked list are defined. Another method is defined that checks if the head and rear values are same or not. Based on this result, cycles are detected.
Below is a demonstration for ... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "When it is required to detect a cycle in a linked list, a method to add elements to the linked list, and a method to get the element in the linked list are defined. Another method is defined that checks if the head and rear values are same or not. Based... |
Geocoding Singapore Coordinates: OneMap API | by Shawn Tham | Towards Data Science | Geocoding with Google API is the widely known way. However, it costs money once you finish your free credits. As a data analyst who does geospatial visualisation regularly with Tableau and Python, coordinates are very essential for plotting. In this article, I will demonstrate how to geocode Singapore coordinates using... | [
{
"code": null,
"e": 576,
"s": 172,
"text": "Geocoding with Google API is the widely known way. However, it costs money once you finish your free credits. As a data analyst who does geospatial visualisation regularly with Tableau and Python, coordinates are very essential for plotting. In this artic... |
DateTime.ToFileTimeUtc() Method in C# | The DateTime.ToFileTimeUtc() method in C# is used to convert the value of the current DateTime object to a Windows file time.
Following is the syntax −
public long ToFileTimeUtc ();
Let us now see an example to implement the DateTime.ToFileTimeUtc() method −
using System;
public class Demo {
public static void Main(... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "The DateTime.ToFileTimeUtc() method in C# is used to convert the value of the current DateTime object to a Windows file time."
},
{
"code": null,
"e": 1214,
"s": 1188,
"text": "Following is the syntax −"
},
{
"code": null,
... |
How to save a Python Dictionary to a CSV File? - GeeksforGeeks | 01 Jul, 2020
Prerequisites: Working with csv files in Python
CSV (comma-separated values) files are one of the easiest ways to transfer data in form of string especially to any spreadsheet program like Microsoft Excel or Google spreadsheet. In this article, we will see how to save a PYthon dictionary to a CSV file. Fol... | [
{
"code": null,
"e": 24774,
"s": 24746,
"text": "\n01 Jul, 2020"
},
{
"code": null,
"e": 24822,
"s": 24774,
"text": "Prerequisites: Working with csv files in Python"
},
{
"code": null,
"e": 25115,
"s": 24822,
"text": "CSV (comma-separated values) files are one... |
C/C++ Programming to Count trailing zeroes in factorial of a number? | Counting the number of trailing zeroes in a factorial number is done by counting the number of 2s and 5s in the factors of the number. Because 2*5 gives 10 which is a trailing 0 in the factorial of a number.
Factorial of 7 = 5040, the number of trailing 0’s is 1.
Based on our logic 7! = 2*3*4*5*6*7, it has 3 2s and 1 5... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "Counting the number of trailing zeroes in a factorial number is done by counting the number of 2s and 5s in the factors of the number. Because 2*5 gives 10 which is a trailing 0 in the factorial of a number."
},
{
"code": null,
"e": 1326,
... |
What is the use of the Get-Error cmdlet in PowerShell? | Get-Error cmdlet was introduced in PowerShell v7. It displays the most recent error messages from the
current session.
When you check the get member of this command, its output is in the form of PSExtendedError so whatever the output is produced by this command is in a detailed manner and so this command is very helpfu... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "Get-Error cmdlet was introduced in PowerShell v7. It displays the most recent error messages from the\ncurrent session."
},
{
"code": null,
"e": 1419,
"s": 1181,
"text": "When you check the get member of this command, its output is i... |
Socket.IO - Namespaces | Socket.IO allows you to "namespace" your sockets, which essentially means assigning different endpoints or paths. This is a useful feature to minimize the number of resources (TCP connections) and at the same time separate concerns within your application by introducing separation between communication channels. Multip... | [
{
"code": null,
"e": 2288,
"s": 1865,
"text": "Socket.IO allows you to \"namespace\" your sockets, which essentially means assigning different endpoints or paths. This is a useful feature to minimize the number of resources (TCP connections) and at the same time separate concerns within your applica... |
Check if a string contains an anagram of another string as its substring - GeeksforGeeks | 03 Jun, 2021
Given two strings S1 and S2, the task is to check if S2 contains an anagram of S1 as its substring.
Examples:
Input: S1 = “ab”, S2 = “bbpobac”Output: YesExplanation: String S2 contains anagram “ba” of S1 (“ba”).
Input: S1 = “ab”, S2 = “cbddaoo”Output: No
Approach: Follow the steps below to solve the ... | [
{
"code": null,
"e": 25158,
"s": 25130,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 25258,
"s": 25158,
"text": "Given two strings S1 and S2, the task is to check if S2 contains an anagram of S1 as its substring."
},
{
"code": null,
"e": 25270,
"s": 25258,
... |
Python program to find number of days between two given dates | 31 Aug, 2021
Given two dates, Write a Python program to find the total number of days between them.
Examples:
Input : dt1 = 13/12/2018, dt2 = 25/2/2019
Output : 74 days
Input : dt1 = 01/01/2004, dt2 = 01/01/2005
Output : 366 days
Naive Approach: One Naive Solution is to start from dt1 and keep counting days till dt... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 140,
"s": 52,
"text": "Given two dates, Write a Python program to find the total number of days between them. "
},
{
"code": null,
"e": 151,
"s": 140,
"text": "Examples: "
},
... |
Delete a Git Branch Locally and Remotely | 23 Jun, 2021
It is common for a git repo to have different branches. They are a good way to work on different features and fixes while isolating the new code from the main codebase. Repos often have a master branch or a main branch for the main codebase and developers create other branches with names of their choice (o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 810,
"s": 28,
"text": "It is common for a git repo to have different branches. They are a good way to work on different features and fixes while isolating the new code from the main codebase. Repos ... |
TextView widget in Android using Java with Examples | 01 Oct, 2021
Widget refers to the elements of the UI (User Interface) that helps user interacts with the Android App. TextView is one of many such widgets which can be used to improve the UI of the app.
TextView refers to the widget which displays some text on the screen based on the layout, size, colour, etc set for t... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 243,
"s": 53,
"text": "Widget refers to the elements of the UI (User Interface) that helps user interacts with the Android App. TextView is one of many such widgets which can be used to improve the... |
Generate all cyclic permutations of a number | 03 May, 2022
Given a number N, our task is to generate all the possible cyclic permutations of the number. A cyclic permutation shifts all the elements of a set by a fixed offset. For a set with elements , , ..., , a cyclic permutation of one place to the left would yield , ..., , , and a cyclic permutation of one plac... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 May, 2022"
},
{
"code": null,
"e": 409,
"s": 53,
"text": "Given a number N, our task is to generate all the possible cyclic permutations of the number. A cyclic permutation shifts all the elements of a set by a fixed offset. For a s... |
Data Structures | Binary Search Trees | Question 1 | 02 Feb, 2013
What is the worst case time complexity for search, insert and delete operations in a general Binary Search Tree?(A) O(n) for all(B) O(Logn) for all(C) O(Logn) for search and insert, and O(n) for delete(D) O(Logn) for search, and O(n) for insert and deleteAnswer: (A)Explanation: In skewed Binary Search Tree... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2013"
},
{
"code": null,
"e": 425,
"s": 28,
"text": "What is the worst case time complexity for search, insert and delete operations in a general Binary Search Tree?(A) O(n) for all(B) O(Logn) for all(C) O(Logn) for search and i... |
Bootstrap .form-control-static class | Use the class .form-control-static on a <p> when you need to place plain text next to a form label within a horizontal form.
You can try to run the following code to implement the .form-control-static class −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<meta name = "viewport"... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "Use the class .form-control-static on a <p> when you need to place plain text next to a form label within a horizontal form."
},
{
"code": null,
"e": 1271,
"s": 1187,
"text": "You can try to run the following code to implement the .f... |
What are unreachable catch blocks in Java? | A block of statements to which the control can never reach under any case can be called as unreachable blocks. Unreachable blocks are not supported by Java. The catch block mentioned with the reference of Exception class should and must be always last catch block because Exception is the superclass of all exceptions. W... | [
{
"code": null,
"e": 1677,
"s": 1062,
"text": "A block of statements to which the control can never reach under any case can be called as unreachable blocks. Unreachable blocks are not supported by Java. The catch block mentioned with the reference of Exception class should and must be always last c... |
Create a New Maven Project from Command Prompt - GeeksforGeeks | 14 Dec, 2020
Maven is a powerful project management tool that is based on POM (project object model). It is used for projects build, dependency and documentation. It simplifies the build process like ANT. But it is too much advanced than ANT.In short, maven is a tool that can be used for building and managing any Java-... | [
{
"code": null,
"e": 24525,
"s": 24497,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 24974,
"s": 24525,
"text": "Maven is a powerful project management tool that is based on POM (project object model). It is used for projects build, dependency and documentation. It simplifies... |
Chef - Overview | Chef is an open source technology developed by Opscode. Adam Jacob, co-founder of Opscode is known as the founder of Chef. This technology uses Ruby encoding to develop basic building blocks like recipe and cookbooks. Chef is used in infrastructure automation and helps in reducing manual and repetitive tasks for infras... | [
{
"code": null,
"e": 2721,
"s": 2380,
"text": "Chef is an open source technology developed by Opscode. Adam Jacob, co-founder of Opscode is known as the founder of Chef. This technology uses Ruby encoding to develop basic building blocks like recipe and cookbooks. Chef is used in infrastructure auto... |
Count Leaves in Binary Tree | Practice | GeeksforGeeks | Given a Binary Tree of size N , You have to count leaves in it. For example, there are two leaves in following tree
1
/ \
10 39
/
5
Example 1:
Input:
Given Tree is
4
/ \
8 10
/ / \
7 5 1
/
... | [
{
"code": null,
"e": 354,
"s": 238,
"text": "Given a Binary Tree of size N , You have to count leaves in it. For example, there are two leaves in following tree"
},
{
"code": null,
"e": 401,
"s": 354,
"text": " 1\n / \\\n 10 39\n /\n5\n\n "
},
{
"c... |
C# Program For Hierarchical Inheritance - GeeksforGeeks | 30 Sep, 2021
Inheritance is a basic aspect of object-oriented programming. A superclass, also known as a base class, is a class whose members are inherited, whereas a subclass, also known as a derived class, is a class that inherits from a superclass. They are also known as the parent and child classes, respectively. I... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 24803,
"s": 24302,
"text": "Inheritance is a basic aspect of object-oriented programming. A superclass, also known as a base class, is a class whose members are inherited, whereas a subclass,... |
Flask App for Data Science. Data scientists generally work in the... | by Kayli Leung | Towards Data Science | Data scientists generally work in the back end. Building an interactive app is not a strength of mine, but it can be a great way to show off the work that you can do. In this post, I will discuss some tips for creating a Flask App that I have learned while building a website for my Travel Recommendation System.
Before ... | [
{
"code": null,
"e": 485,
"s": 172,
"text": "Data scientists generally work in the back end. Building an interactive app is not a strength of mine, but it can be a great way to show off the work that you can do. In this post, I will discuss some tips for creating a Flask App that I have learned whil... |
PHP | Spreadsheet_Excel_Writer | setBold() Function - GeeksforGeeks | 04 Oct, 2021
The setBold() function is an inbuilt function in PHP | Spreadsheet_Excel_Writer which is used to set the boldness of the text.
Syntax:
void Format::setBold( $weight = 1 )
Parameters: This function accepts a single parameter $weight which is used to set the weight of the text. The default value of text wei... | [
{
"code": null,
"e": 24998,
"s": 24970,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 25125,
"s": 24998,
"text": "The setBold() function is an inbuilt function in PHP | Spreadsheet_Excel_Writer which is used to set the boldness of the text."
},
{
"code": null,
"e":... |
curl command in Linux with Examples - GeeksforGeeks | 10 Mar, 2022
curl is a command-line tool to transfer data to or from a server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP, or FILE). curl is powered by Libcurl. This tool is preferred for automation since it is designed to work without user interaction. curl can tra... | [
{
"code": null,
"e": 23958,
"s": 23930,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 24305,
"s": 23958,
"text": "curl is a command-line tool to transfer data to or from a server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP,... |
Python - Ways to convert array of strings to array of floats | String literals in python are surrounded by either single quotation marks, or double quotation marks. Assigning a string to a variable is done with the variable name followed by an equal sign and the string. You can assign a multiline string to a variable by using three quotes.
Live Demo
# array of strings to array of... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "String literals in python are surrounded by either single quotation marks, or double quotation marks. Assigning a string to a variable is done with the variable name followed by an equal sign and the string. You can assign a multiline string to a variab... |
Find minimum element of HashSet in Java | To get the minimum element of HashSet, use the Collections.min() method.
Declare the HashSet −
Set<Integer> hs = new HashSet<Integer>();
Now let us add the elements −
hs.add(29);
hs.add(879);
hs.add(88);
hs.add(788);
hs.add(456);
Let us now get the minimum element −
Object obj = Collections.min(hs);
The following is an... | [
{
"code": null,
"e": 1135,
"s": 1062,
"text": "To get the minimum element of HashSet, use the Collections.min() method."
},
{
"code": null,
"e": 1157,
"s": 1135,
"text": "Declare the HashSet −"
},
{
"code": null,
"e": 1199,
"s": 1157,
"text": "Set<Integer> hs ... |
How to find minimum element in an array using linear search in C language? | C programming language provides two types of searching techniques. They are as follows −
Linear search
Binary search
Searching for the key element is done in a linear fashion.
It is the simplest searching technique.
It does not expect the list to be sorted.
Limitation − It consumes more time and reduce the power of sys... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "C programming language provides two types of searching techniques. They are as follows −"
},
{
"code": null,
"e": 1165,
"s": 1151,
"text": "Linear search"
},
{
"code": null,
"e": 1179,
"s": 1165,
"text": "Binary s... |
Gold Mine Problem - GeeksforGeeks | 27 Apr, 2022
Given a gold mine of n*m dimensions. Each field in this mine contains a positive integer which is the amount of gold in tons. Initially the miner is at first column but can be at any row. He can move only (right->,right up /,right down\) that is from a given cell, the miner can move to the cell diagonally ... | [
{
"code": null,
"e": 24580,
"s": 24552,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 25015,
"s": 24580,
"text": "Given a gold mine of n*m dimensions. Each field in this mine contains a positive integer which is the amount of gold in tons. Initially the miner is at first colum... |
pushd Command in Linux with Examples - GeeksforGeeks | 02 Nov, 2020
pushd is a shell built-in command which allows us to easily manipulate the directory stack. This appends a directory to the top of the directory stack, or rotates the stack, making the new top of the stack the present working directory. The “d” in pushd stands for the directory as it pushes the directory p... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n02 Nov, 2020"
},
{
"code": null,
"e": 25013,
"s": 24431,
"text": "pushd is a shell built-in command which allows us to easily manipulate the directory stack. This appends a directory to the top of the directory stack, or rotates ... |
JavaScript Chart.js | Chart.js is an open source JavaScript library. Using Chart.js, add animated, interactive graphs on your website.
Following is the code for Chart.js library in JavaScript −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
</script>
</head>
<body>
<canva... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "Chart.js is an open source JavaScript library. Using Chart.js, add animated, interactive graphs on your website."
},
{
"code": null,
"e": 1234,
"s": 1175,
"text": "Following is the code for Chart.js library in JavaScript −"
},
{
... |
Machine Learning on GCP — Choosing GPUs to Train Your Models | by Komal Venkatesh Ganesan | Towards Data Science | Google cloud platform offers a wide range of GPU options to choose from. GPUs can boost your ML processing, especially when it comes to matrix computations. The CPU on our machine, however, isn’t optimized for this. They struggle with image or video processing and can often delay the model training process.
In Tensorfl... | [
{
"code": null,
"e": 481,
"s": 172,
"text": "Google cloud platform offers a wide range of GPU options to choose from. GPUs can boost your ML processing, especially when it comes to matrix computations. The CPU on our machine, however, isn’t optimized for this. They struggle with image or video proce... |
Find the Kth number which is not divisible by N - GeeksforGeeks | 14 Jun, 2021
Given two integers N and K, the task is to find the Kth number which is not divisible by N.Note: The value of N is greater than 1, because every number is divisible by 1.
Examples:
Input: N = 3, K = 6 Output: 8 Explanation: Numbers which is not divisible by N = 3 – {1, 2, 4, 5, 7, 8, 10} 6th non-divisible... | [
{
"code": null,
"e": 24918,
"s": 24890,
"text": "\n14 Jun, 2021"
},
{
"code": null,
"e": 25090,
"s": 24918,
"text": "Given two integers N and K, the task is to find the Kth number which is not divisible by N.Note: The value of N is greater than 1, because every number is divisibl... |
Text Animation with changing the color of the text using HTML & CSS - GeeksforGeeks | 11 Jun, 2020
Text animation is the creation of beautiful and colourful letters, words and paragraphs with a decorative movable effect. The movement can be seen in some fashion within the area or across the screen following some regular pattern.
HTML Code: In this section, the basic structure of the code is designed by ... | [
{
"code": null,
"e": 24788,
"s": 24760,
"text": "\n11 Jun, 2020"
},
{
"code": null,
"e": 25020,
"s": 24788,
"text": "Text animation is the creation of beautiful and colourful letters, words and paragraphs with a decorative movable effect. The movement can be seen in some fashion ... |
Add a new column and set values in it on the basis of conditions in MySQL? | To set values on the basis of conditions, use IF() method. Let us first create a table −
mysql> create table DemoTable
-> (
-> Age int
-> );
Query OK, 0 rows affected (0.55 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(19);
Query OK, 1 row affected (0.20 sec)
... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "To set values on the basis of conditions, use IF() method. Let us first create a table −"
},
{
"code": null,
"e": 1249,
"s": 1151,
"text": "mysql> create table DemoTable\n -> (\n -> Age int\n -> );\nQuery OK, 0 rows affected (0... |
C++ Program to Check the Connectivity of Undirected Graph Using BFS | To check connectivity of a graph, we will try to traverse all nodes using any traversal algorithm. After completing the traversal, if there is any node, which is not visited, then the graph is not connected.
For the undirected graph, we will select one node and traverse from it.
In this case the traversal algorithm is ... | [
{
"code": null,
"e": 1270,
"s": 1062,
"text": "To check connectivity of a graph, we will try to traverse all nodes using any traversal algorithm. After completing the traversal, if there is any node, which is not visited, then the graph is not connected."
},
{
"code": null,
"e": 1342,
... |
Check if URL is valid or not in Java - GeeksforGeeks | 30 May, 2018
Given a URL as string, we need to find if the given URL is valid or not.
Input : str = "https://www.geeksforgeeks.org/"
Output : Yes
Input : str = "https:// www.geeksforgeeks.org/"
Output : No
Note that there is a space after https://
Using java.net.urlWe can use java.net.url class to validate a URL. Th... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n30 May, 2018"
},
{
"code": null,
"e": 25420,
"s": 25347,
"text": "Given a URL as string, we need to find if the given URL is valid or not."
},
{
"code": null,
"e": 25585,
"s": 25420,
"text": "Input : str = \"h... |
How to retrieve android API version programmatically? | This example demonstrates how do I retrieve android API version 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"?>
<Rela... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "This example demonstrates how do I retrieve android API version programmatically."
},
{
"code": null,
"e": 1273,
"s": 1144,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required deta... |
Count Full Prime numbers in a given range - GeeksforGeeks | 08 Feb, 2022
Given two integers L and R, the task is to count the number of full prime numbers that are present in the given range.
A number is said to be Full prime if the number itself is prime and all its digits are also prime.
Examples:
53 is Full Prime because it is prime and all its digits (5 and 3) are also pr... | [
{
"code": null,
"e": 26695,
"s": 26667,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 26814,
"s": 26695,
"text": "Given two integers L and R, the task is to count the number of full prime numbers that are present in the given range."
},
{
"code": null,
"e": 26914,
... |
Binomial Coefficient | DP-9 - GeeksforGeeks | 28 Mar, 2022
The following are the common definitions of Binomial Coefficients.
A binomial coefficient C(n, k) can be defined as the coefficient of x^k in the expansion of (1 + x)^n.
A binomial coefficient C(n, k) also gives the number of ways, disregarding order, that k objects can be chosen from among n objects more... | [
{
"code": null,
"e": 34596,
"s": 34568,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 34664,
"s": 34596,
"text": "The following are the common definitions of Binomial Coefficients. "
},
{
"code": null,
"e": 34767,
"s": 34664,
"text": "A binomial coefficient... |
Bootstrap - Buttons | This chapter covers the use age of Bootstrap button with examples. Anything that is given a class of .btn will inherit the default look of a gray button with rounded corners. However, Bootstrap provides some options to style buttons, which are summarized in the following table −
btn
Default/ Standard button.
btn-primar... | [
{
"code": null,
"e": 3611,
"s": 3331,
"text": "This chapter covers the use age of Bootstrap button with examples. Anything that is given a class of .btn will inherit the default look of a gray button with rounded corners. However, Bootstrap provides some options to style buttons, which are summarize... |
iOS - Delegates | Let's assume an object A calls an object B to perform an action. Once the action is complete, object A should know that B has completed the task and take necessary action. This is achieved with the help of delegates.
The key concepts in the above example are −
A is a delegate object of B.
A is a delegate object of B.
B... | [
{
"code": null,
"e": 2308,
"s": 2091,
"text": "Let's assume an object A calls an object B to perform an action. Once the action is complete, object A should know that B has completed the task and take necessary action. This is achieved with the help of delegates."
},
{
"code": null,
"e":... |
Angular 8 - Backward Compatibility | Angular framework provides maximum compatibility with previous versions. If Angular Team deprecate a feature in a release, it will wait for 3 more release to completely remove the feature. Angular Team release a major version for every six months. Every version will have active maintenance period of six months and then... | [
{
"code": null,
"e": 2949,
"s": 2388,
"text": "Angular framework provides maximum compatibility with previous versions. If Angular Team deprecate a feature in a release, it will wait for 3 more release to completely remove the feature. Angular Team release a major version for every six months. Every... |
Set up a standalone HBase local instance and connect to it with Python Happybase | by Andrea Guidi | Towards Data Science | Recently, in my starting adventure as a Data Science consultant, I was involved in a project where the database we are taking the data from is the famous Apache HBase.
HBase is a distributed, Hadoop non-relational database which is really powerful at handling massive amounts of data.
In the HBase data model, rows are i... | [
{
"code": null,
"e": 339,
"s": 171,
"text": "Recently, in my starting adventure as a Data Science consultant, I was involved in a project where the database we are taking the data from is the famous Apache HBase."
},
{
"code": null,
"e": 456,
"s": 339,
"text": "HBase is a distrib... |
Java Program to Find the Cube Root of a Given Number Using Binary Search - GeeksforGeeks | 03 Mar, 2021
Given a non-negative number find the cube root of a number using the binary search approach.
Examples :
Input: x = 27
Output: 3
Explanation: The cube root of 16 is 4.
Input: x = 120
Output: 4
Explanation: The cube root of 120 lies in between
4 and 5 so floor of the cube root is 4.
Naive Approach:
Check ... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 25318,
"s": 25225,
"text": "Given a non-negative number find the cube root of a number using the binary search approach."
},
{
"code": null,
"e": 25329,
"s": 25318,
"text"... |
Implode an array with jQuery/JavaScript - GeeksforGeeks | 31 May, 2019
Given an array of elements and the task is to implode (join the elements of an array) the array elements.
Method 1: Using join() method: The join() method can be used to join an array with a separator and return it as a string. The join() method takes in the optional parameter of a separator. The separator... | [
{
"code": null,
"e": 25901,
"s": 25873,
"text": "\n31 May, 2019"
},
{
"code": null,
"e": 26007,
"s": 25901,
"text": "Given an array of elements and the task is to implode (join the elements of an array) the array elements."
},
{
"code": null,
"e": 26341,
"s": 2600... |
Prototype in JavaScript - GeeksforGeeks | 10 Aug, 2021
JavaScript is a prototype based language, so, whenever we create a function using JavaScript, JavaScript engine adds a prototype property inside a function, Prototype property is basically an object (also known as Prototype object), where we can attach methods and properties in a prototype object, which en... | [
{
"code": null,
"e": 25692,
"s": 25664,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 26068,
"s": 25692,
"text": "JavaScript is a prototype based language, so, whenever we create a function using JavaScript, JavaScript engine adds a prototype property inside a function, Protot... |
Using mkvirtualenv to create new Virtual Environment - Python - GeeksforGeeks | 08 Jun, 2020
Virtual Environment are used If you already have a python version installed and you want to use a different version for a project without bothering the older ones. it is good practice to use a new virtual environment for different projects.
There are multiple ways of creating that, today we will create one... | [
{
"code": null,
"e": 25833,
"s": 25805,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 26074,
"s": 25833,
"text": "Virtual Environment are used If you already have a python version installed and you want to use a different version for a project without bothering the older ones.... |
Right rotate given Array K times using Pointers - GeeksforGeeks | 19 Jan, 2022
Given an array arr[] of size N and an integer K, the task is to right rotate the array K times.
Examples:
Input: arr[] = {1, 3, 5, 7, 9}, K = 2Output: 7 9 1 3 5Explanation: After 1st rotation – {9, 1, 3, 5, 7}After 2nd rotation – {7, 9, 1, 3, 5}
Input: {1, 2, 3, 4, 5, 6}, K = 2Output: 5 6 1 2 3 4
Approach... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 26137,
"s": 26041,
"text": "Given an array arr[] of size N and an integer K, the task is to right rotate the array K times."
},
{
"code": null,
"e": 26148,
"s": 26137,
"te... |
Python | Pandas DatetimeIndex.week - GeeksforGeeks | 24 Dec, 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 DatetimeIndex.week attribute outputs the ordinal value of the week for each entries of... | [
{
"code": null,
"e": 26097,
"s": 26069,
"text": "\n24 Dec, 2018"
},
{
"code": null,
"e": 26311,
"s": 26097,
"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 a... |
GATE | GATE-CS-2015 (Set 3) | Question 65 - GeeksforGeeks | 28 Jun, 2021
In a room there are only two types of people, namely Type 1 and Type 2. Type 1 people always tell the truth and Type 2 people always lie. You give a fair coin to a person in that room, without knowing which type he is from and tell him to toss it and hide the result from you till you ask for it. Upon askin... | [
{
"code": null,
"e": 25673,
"s": 25645,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26017,
"s": 25673,
"text": "In a room there are only two types of people, namely Type 1 and Type 2. Type 1 people always tell the truth and Type 2 people always lie. You give a fair coin to a... |
How to modify URL without reloading the page using JavaScript ? - GeeksforGeeks | 31 Oct, 2019
Method 1: Replacing the current state with replaceState() Method: The history interface of the browser manages the browser session history. It includes the page visited in the tab or frame where the current page is located. Manipulating this state can be used to change the URL of the browser without reload... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 26942,
"s": 26621,
"text": "Method 1: Replacing the current state with replaceState() Method: The history interface of the browser manages the browser session history. It includes the page vi... |
Extract all the URLs from the webpage Using Python - GeeksforGeeks | 07 Jan, 2021
Scraping is a very essential skill for everyone to get data from any website. In this article, we are going to write Python scripts to extract all the URLs from the website or you can save it as a CSV file.
Module Needed:
bs4: Beautiful Soup(bs4) is a Python library for pulling data out of HTML and XML fil... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n07 Jan, 2021"
},
{
"code": null,
"e": 25744,
"s": 25537,
"text": "Scraping is a very essential skill for everyone to get data from any website. In this article, we are going to write Python scripts to extract all the URLs from th... |
Python - Convert Lists of List to Dictionary - GeeksforGeeks | 22 Apr, 2020
Sometimes, while working with Python records, we can have problem in which we have data in form of Lists of list and we need to allocate certain elements as keys and certain as values to form a dictionary. This type of application can occur in data domains. Lets discuss certain ways in which this task can ... | [
{
"code": null,
"e": 25485,
"s": 25457,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 25806,
"s": 25485,
"text": "Sometimes, while working with Python records, we can have problem in which we have data in form of Lists of list and we need to allocate certain elements as keys a... |
Solve the Slide Puzzle with Hill Climbing Search Algorithm | by Rahul Aware | Towards Data Science | Hill climbing search algorithm is one of the simplest algorithms which falls under local search and optimization techniques. Here’s how it’s defined in ‘An Introduction to Machine Learning’ book by Miroslav Kubat:
Evaluation function at step 3 calculates the distance of the current state from the final state. So in cas... | [
{
"code": null,
"e": 386,
"s": 172,
"text": "Hill climbing search algorithm is one of the simplest algorithms which falls under local search and optimization techniques. Here’s how it’s defined in ‘An Introduction to Machine Learning’ book by Miroslav Kubat:"
},
{
"code": null,
"e": 523,... |
Creating a table with a TIMESTAMP field in MySQL? | For this, you can use TIMESTAMP keyword in MySQL.
Let us create a table −
mysql> create table demo50
−> (
−> id int not null auto_increment primary key,
−> start_date timestamp default current_timestamp not null,
−> end_date timestamp default current_timestamp not null
−> );
Query OK, 0 rows affected (1.35 sec)
Insert ... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "For this, you can use TIMESTAMP keyword in MySQL."
},
{
"code": null,
"e": 1136,
"s": 1112,
"text": "Let us create a table −"
},
{
"code": null,
"e": 1375,
"s": 1136,
"text": "mysql> create table demo50\n−> (\n−> ... |
Word Embedding Techniques: Word2Vec and TF-IDF Explained | by Adem Akdogan | Towards Data Science | The words need to be made meaningful for machine learning or deep learning algorithms. Therefore, they must be expressed numerically. Algorithms such as One Hot Encoding, TF-IDF, Word2Vec, FastText enable words to be expressed mathematically as word embedding techniques used to solve such problems.
The word embedding t... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "The words need to be made meaningful for machine learning or deep learning algorithms. Therefore, they must be expressed numerically. Algorithms such as One Hot Encoding, TF-IDF, Word2Vec, FastText enable words to be expressed mathematically as word embed... |
What is a Webcrawler and where is it used? - GeeksforGeeks | 09 Jul, 2021
Web Crawler is a bot that downloads the content from the internet and indexes it. The main purpose of this bot is to learn about the different web pages on the internet. This kind of bots is mostly operated by search engines. By applying the search algorithms to the data collected by the web crawlers, sear... | [
{
"code": null,
"e": 24585,
"s": 24557,
"text": "\n09 Jul, 2021"
},
{
"code": null,
"e": 25057,
"s": 24585,
"text": "Web Crawler is a bot that downloads the content from the internet and indexes it. The main purpose of this bot is to learn about the different web pages on the int... |
PHP Prime Number Program | Theory of Computation
A prime number is a whole number greater than 1 whose only factors are 1 and itself, like -2, 3, 5, 7, 11 etc. For example, 17 is a prime number because it is only divisible by 1 and 17. On the other hand, 18 is not a prime number because it is divisible by 2, 3, 6, 9 and the number itself. These ... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 501,
"s": 112,
"text": "A prime number is a whole number greater than 1 whose only factors are 1 and itself, like -2, 3, 5, 7, 11 etc. For example, 17 is a prime number because it is only d... |
Bootstrap alert-danger class | The alert-danger class in Bootstrap is used to set danger action.
You can try to run the following code to implement the alert-danger class in Bootstrap −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<sc... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "The alert-danger class in Bootstrap is used to set danger action."
},
{
"code": null,
"e": 1217,
"s": 1128,
"text": "You can try to run the following code to implement the alert-danger class in Bootstrap −"
},
{
"code": null,... |
AngularJS and W3.CSS - GeeksforGeeks | 27 Oct, 2021
What is W3.CSS?
W3.CSS is a modern framework with built-in reponsiveness and easy to learn and use compared to other CSS framework.
Its aim is to speed up and simplify web development and support modern responsive devices like Mobile, Laptop, Tablet and Desktop
W3.CSS was designed to be a high quality alte... | [
{
"code": null,
"e": 28271,
"s": 28243,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 28287,
"s": 28271,
"text": "What is W3.CSS?"
},
{
"code": null,
"e": 28403,
"s": 28287,
"text": "W3.CSS is a modern framework with built-in reponsiveness and easy to learn... |
Time Series Analysis using Pandas in Python | by Dr. Varshita Sher | Towards Data Science | Right off the bat, time-series data is not your average dataset! You might have worked with housing data wherein each row represents features of a particular house (such as total area, number of bedrooms, year in which it was built) or student dataset wherein each row represents such information about a student (such a... | [
{
"code": null,
"e": 746,
"s": 47,
"text": "Right off the bat, time-series data is not your average dataset! You might have worked with housing data wherein each row represents features of a particular house (such as total area, number of bedrooms, year in which it was built) or student dataset wher... |
Sorting 2D Vector in C++ | Set 2 (In descending order by row and column) - GeeksforGeeks | 29 May, 2017
We have discussed some of the cases of sorting 2D vector in below set 1.
Sorting 2D Vector in C++ | Set 1 (By row and column)
More cases are discussed in this article
Case 3 : To sort a particular row of 2D vector in descending orderThis type of sorting arranges a selected row of 2D vector in descending or... | [
{
"code": null,
"e": 24533,
"s": 24505,
"text": "\n29 May, 2017"
},
{
"code": null,
"e": 24606,
"s": 24533,
"text": "We have discussed some of the cases of sorting 2D vector in below set 1."
},
{
"code": null,
"e": 24659,
"s": 24606,
"text": "Sorting 2D Vector... |
Style the active link with CSS | To style the active links, use the CSS :active selector. You can try to run the following code to style the active links
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
a:active {
background-color: green;
}
</style>
</head>
<body>
<a href = "https://qries.com">We... | [
{
"code": null,
"e": 1183,
"s": 1062,
"text": "To style the active links, use the CSS :active selector. You can try to run the following code to style the active links"
},
{
"code": null,
"e": 1193,
"s": 1183,
"text": "Live Demo"
},
{
"code": null,
"e": 1476,
"s":... |
C# Program To Check For Balanced Brackets In An Expression (Well-Formedness) Using Stack - GeeksforGeeks | 15 Dec, 2021
Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp.
Example:
Input: exp = “[()]{}{[()()]()}” Output: Balanced
Input: exp = “[(])” Output: Not Balanced
Algorithm:
Declare a character stack S.
Now traverse the expr... | [
{
"code": null,
"e": 25008,
"s": 24980,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 25152,
"s": 25008,
"text": "Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp."
},
{
"code... |
C library function - cosh() | The C library function double cosh(double x) returns the hypebolic cosine of x.
Following is the declaration for cosh() function.
double cosh(double x)
x − This is the floating point value.
x − This is the floating point value.
This function returns hyperbolic cosine of x.
The following example shows the usage of cosh(... | [
{
"code": null,
"e": 2087,
"s": 2007,
"text": "The C library function double cosh(double x) returns the hypebolic cosine of x."
},
{
"code": null,
"e": 2137,
"s": 2087,
"text": "Following is the declaration for cosh() function."
},
{
"code": null,
"e": 2159,
"s": ... |
Python String swapcase() Method | Python string method swapcase() returns a copy of the string in which all the case-based characters have had their case swapped.
Following is the syntax for swapcase() method −
str.swapcase();
NA
NA
This method returns a copy of the string in which all the case-based characters have had their case swapped.
The follow... | [
{
"code": null,
"e": 2374,
"s": 2244,
"text": "Python string method swapcase() returns a copy of the string in which all the case-based characters have had their case swapped."
},
{
"code": null,
"e": 2422,
"s": 2374,
"text": "Following is the syntax for swapcase() method −"
}... |
Logo - Repetition | We often repeat a sequence of commands. Computer programs often perform repetitive tasks. Just about every programming system has a way of carrying out this repetition, or iteration, as computer scientists call it. Let us consider the following example −
Let us assume we want to draw a square with sides of length 100, ... | [
{
"code": null,
"e": 2089,
"s": 1834,
"text": "We often repeat a sequence of commands. Computer programs often perform repetitive tasks. Just about every programming system has a way of carrying out this repetition, or iteration, as computer scientists call it. Let us consider the following example ... |
Explain the PowerShell Advanced Function. | Before starting the Advance PowerShell function, assuming we know about the PowerShell function. You can check the explanation on the PowerShell function below.
https://www.tutorialspoint.com/explain-the-powershell-function
Here, we will take the math function example that calculates the different types of operations. ... | [
{
"code": null,
"e": 1223,
"s": 1062,
"text": "Before starting the Advance PowerShell function, assuming we know about the PowerShell function. You can check the explanation on the PowerShell function below."
},
{
"code": null,
"e": 1286,
"s": 1223,
"text": "https://www.tutorials... |
Graph Theory Basics. What you need to know as graph theory... | by Miguel Saldana | Towards Data Science | In programming and mathematical terms, graph theory is really nothing new, but the implementation and usage of it in code has grown in advances in Machine Learning and AI. One big reason for this is that advances in computing power to power large-scale models allow for complex models to be developed that can represent ... | [
{
"code": null,
"e": 1590,
"s": 172,
"text": "In programming and mathematical terms, graph theory is really nothing new, but the implementation and usage of it in code has grown in advances in Machine Learning and AI. One big reason for this is that advances in computing power to power large-scale m... |
Python program to find the second largest number in a list | In this article, we will learn about the solution to the problem statement given below.
Problem statement − We are given a list, we need to display the second largest number in a list.
There are three approaches to solve the problem−
Live Demo
list1 = [11,22,1,2,5,67,21,32]
# to get unique elements
new_list = set(list... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "In this article, we will learn about the solution to the problem statement given below."
},
{
"code": null,
"e": 1247,
"s": 1150,
"text": "Problem statement − We are given a list, we need to display the second largest number in a lis... |
Matplotlib vs. ggplot2: Which to Choose for 2020 and Beyond? | by Dario Radečić | Towards Data Science | 2020 is coming to an end (finally), and data visualization was never more important. Presenting something that looks like a 5-year-old made it is no longer an option, so data scientists need an attractive and simple-to-use data visualization library. We’ll compare two of these today — Matplotlib and ggplot2.
So, why th... | [
{
"code": null,
"e": 482,
"s": 172,
"text": "2020 is coming to an end (finally), and data visualization was never more important. Presenting something that looks like a 5-year-old made it is no longer an option, so data scientists need an attractive and simple-to-use data visualization library. We’l... |
MySQL Tryit Editor v1.0 | SELECT * FROM Customers
WHERE Country='Mexico';
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-versi... | [
{
"code": null,
"e": 24,
"s": 0,
"text": "SELECT * FROM Customers"
},
{
"code": null,
"e": 48,
"s": 24,
"text": "WHERE Country='Mexico';"
},
{
"code": null,
"e": 50,
"s": 48,
"text": ""
},
{
"code": null,
"e": 122,
"s": 59,
"text": "Edit t... |
IntStream summaryStatistics() in Java - GeeksforGeeks | 21 Mar, 2018
IntStream summaryStatistics() returns an IntSummaryStatistics describing various summary data about the elements of this stream like count of number of elements in the IntStream, average of all elements present in IntStream, minimum and maximum element in the IntStream and so on. This is a terminal operati... | [
{
"code": null,
"e": 23687,
"s": 23659,
"text": "\n21 Mar, 2018"
},
{
"code": null,
"e": 24067,
"s": 23687,
"text": "IntStream summaryStatistics() returns an IntSummaryStatistics describing various summary data about the elements of this stream like count of number of elements in... |
How can we fetch all the records from a particular MySQL table? | We can fetch all the record from a MySQL table by using SELECT * from table_name; query. An example is as follows, fetched all the records from ‘Employee’ table −
mysql> Select * from Employee;
+------+--------+
| Id | Name |
+------+--------+
| 100 | Ram |
| 200 | Gaurav |
| 300 | Mohan |
+------+--------+
... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "We can fetch all the record from a MySQL table by using SELECT * from table_name; query. An example is as follows, fetched all the records from ‘Employee’ table −"
},
{
"code": null,
"e": 1407,
"s": 1225,
"text": "mysql> Select * fro... |
Callable and Future in Java
| java.util.concurrent.The callable object can return the computed result done by a thread in contrast to a runnable interface which can only run the thread. The Callable object returns a Future object which provides methods to monitor the progress of a task being executed by a thread. The future object can be used to ch... | [
{
"code": null,
"e": 1523,
"s": 1062,
"text": "java.util.concurrent.The callable object can return the computed result done by a thread in contrast to a runnable interface which can only run the thread. The Callable object returns a Future object which provides methods to monitor the progress of a t... |
Change tinyint default value to 1 in MySQL? | You can use DEFAULT command for this. Following is the syntax −
alter table yourTableName change yourColumnName yourColumnName TINYINT(1) DEFAULT 1 NOT NULL;
Let us first create a table −
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
UserName varchar(20),
UserAge int,
isMarried... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "You can use DEFAULT command for this. Following is the syntax −"
},
{
"code": null,
"e": 1220,
"s": 1126,
"text": "alter table yourTableName change yourColumnName yourColumnName TINYINT(1) DEFAULT 1 NOT NULL;"
},
{
"code": nu... |
How to convert a JSON array to CSV in Java? | The JSON can be used as a data-interchange format and is lightweight and language independent. A JSONArray can parse text from a String to produce a vector-like object and supports java.util.List interface. We can convert a JSON Array to CSV format using org.json.CDL class, it can provide a static method toString(), to... | [
{
"code": null,
"e": 1558,
"s": 1062,
"text": "The JSON can be used as a data-interchange format and is lightweight and language independent. A JSONArray can parse text from a String to produce a vector-like object and supports java.util.List interface. We can convert a JSON Array to CSV format usin... |
Simulated Annealing - GeeksforGeeks | 01 Nov, 2021
Problem : Given a cost function f: R^n –> R, find an n-tuple that minimizes the value of f. Note that minimizing the value of a function is algorithmically equivalent to maximization (since we can redefine the cost function as 1-f).Many of you with a background in calculus/analysis are likely familiar with... | [
{
"code": null,
"e": 25963,
"s": 25935,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 26734,
"s": 25963,
"text": "Problem : Given a cost function f: R^n –> R, find an n-tuple that minimizes the value of f. Note that minimizing the value of a function is algorithmically equival... |
SQL Query to Get Only Numbers From a String - GeeksforGeeks | 25 Oct, 2021
As we know in an SQL database we can insert any type of data. Sometimes in the productions server, the data gets corrupted by two or more rows being merged and being saved in a column. In that case, we can extract the numeric part from that string and save it again. So in this article, we will learn how to... | [
{
"code": null,
"e": 25513,
"s": 25485,
"text": "\n25 Oct, 2021"
},
{
"code": null,
"e": 25912,
"s": 25513,
"text": "As we know in an SQL database we can insert any type of data. Sometimes in the productions server, the data gets corrupted by two or more rows being merged and bei... |
Number Guessing Game using JavaScript - GeeksforGeeks | 15 Feb, 2019
Prerequisites:
Basic Knowledge of HTML
Basic Knowledge of Javascript
The game is to guess a random number generated by computer in range 1 – 10 in minimum number of Guesses.
Functions to be used:
1. document.getElementById(“id given”): document.getElementById() is used to fetch an element from the HTML pag... | [
{
"code": null,
"e": 26325,
"s": 26297,
"text": "\n15 Feb, 2019"
},
{
"code": null,
"e": 26340,
"s": 26325,
"text": "Prerequisites:"
},
{
"code": null,
"e": 26364,
"s": 26340,
"text": "Basic Knowledge of HTML"
},
{
"code": null,
"e": 26394,
"s"... |
Python: Map VS For Loop - GeeksforGeeks | 05 Aug, 2021
Map in Python :
Map is used to compute a function for different values ‘in a single line of code ‘ .
It takes two arguments, first is function name, that is defined already and the other is list, tuple or any other iterables .
It is a way of applying same function for multiple numbers .
It generates a map ... | [
{
"code": null,
"e": 25563,
"s": 25535,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 25579,
"s": 25563,
"text": "Map in Python :"
},
{
"code": null,
"e": 25664,
"s": 25579,
"text": "Map is used to compute a function for different values ‘in a single line o... |
reflect.Swapper() Function in Golang with Examples - GeeksforGeeks | 28 Apr, 2020
Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.Swapper() Function in Golang is used to swaps the elements in the provided slice. To access this function, one needs to ... | [
{
"code": null,
"e": 25703,
"s": 25675,
"text": "\n28 Apr, 2020"
},
{
"code": null,
"e": 26054,
"s": 25703,
"text": "Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of refle... |
C Program to Count Inversions in an array | Set 1 (Using Merge Sort) - GeeksforGeeks | 20 Apr, 2022
Inversion Count for an array indicates – how far (or close) the array is from being sorted. If the array is already sorted, then the inversion count is 0, but if the array is sorted in the reverse order, the inversion count is the maximum. Formally speaking, two elements a[i] and a[j] form an inversion if ... | [
{
"code": null,
"e": 26199,
"s": 26171,
"text": "\n20 Apr, 2022"
},
{
"code": null,
"e": 26538,
"s": 26199,
"text": "Inversion Count for an array indicates – how far (or close) the array is from being sorted. If the array is already sorted, then the inversion count is 0, but if t... |
How to write a:hover in inline CSS? - GeeksforGeeks | 30 Jul, 2021
It is called pseudo-selector and used to select all the elements when the user move mouse over the elements. It can be used on all the element. A <!DOCTYPE html> element must be declared in the document to see the working of this selector in all the elements.
Example 1:
<!DOCTYPE html><html> <head> ... | [
{
"code": null,
"e": 25923,
"s": 25895,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 26183,
"s": 25923,
"text": "It is called pseudo-selector and used to select all the elements when the user move mouse over the elements. It can be used on all the element. A <!DOCTYPE html> e... |
What are Chrome Flags or Experiments? - GeeksforGeeks | 31 Mar, 2021
Chrome Flags also called Experiments are the experimental features that are provided by the Chrome browser but are not a part of the default chrome experience. Anyone can use them by following some simple steps and transform their chrome browsing experience. Some flags eventually become a part of the defau... | [
{
"code": null,
"e": 26599,
"s": 26571,
"text": "\n31 Mar, 2021"
},
{
"code": null,
"e": 27088,
"s": 26599,
"text": "Chrome Flags also called Experiments are the experimental features that are provided by the Chrome browser but are not a part of the default chrome experience. Any... |
Convert Array to HashSet in Java - GeeksforGeeks | 28 Dec, 2020
The Single Data structure cannot be able to fulfill the requirements of the programmers that’s why there are a lot of inbuilt Data-Structures in Programming languages.
Arrays are the most commonly used Data-Structure in most programming languages. The advantage of this Data-Structure is O(1) accessing the... | [
{
"code": null,
"e": 25447,
"s": 25419,
"text": "\n28 Dec, 2020"
},
{
"code": null,
"e": 25616,
"s": 25447,
"text": "The Single Data structure cannot be able to fulfill the requirements of the programmers that’s why there are a lot of inbuilt Data-Structures in Programming langua... |
GATE | GATE-CS-2015 (Set 1) | Question 65 - GeeksforGeeks | 28 Jun, 2021
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are(A) 63 and 6, respectively(B) 64 and 5, respectively(C) 32 and 6, respectively(D) 31 and 5, respectivelyAnswer: (A)Explanation:
Number of nodes is maximum for a... | [
{
"code": null,
"e": 25719,
"s": 25691,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25994,
"s": 25719,
"text": "The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are(A) 63 and 6, re... |
C# Program to Sort a List of Employees Based on Salary in Descending Order and Whose Department is XYZ using LINQ - GeeksforGeeks | 28 Feb, 2022
Given a list of employees, now we sort the list according to the salary in descending order and whose department is XYZ. So we use the OrderByDescending() method of LINQ along with the Where() method. The OrderByDescending() is used to sort the specified list in descending order. To solve the given problem... | [
{
"code": null,
"e": 25571,
"s": 25543,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 25912,
"s": 25571,
"text": "Given a list of employees, now we sort the list according to the salary in descending order and whose department is XYZ. So we use the OrderByDescending() method o... |
Sum of the Series 1 + x/1 + x^2/2 + x^3/3 + .. + x^n/n - GeeksforGeeks | 12 Apr, 2021
This is a mathematical series program where a user must enter the number of terms up to which the sum of the series is to be found. Following this, we also need the value of x, which forms the base of the series.Examples :
Input : base = 2, range = 5
Output : 18.07
Input : base = 1, range = 10
Output : ... | [
{
"code": null,
"e": 26583,
"s": 26555,
"text": "\n12 Apr, 2021"
},
{
"code": null,
"e": 26808,
"s": 26583,
"text": "This is a mathematical series program where a user must enter the number of terms up to which the sum of the series is to be found. Following this, we also need th... |
numpy.arccosh() in Python - GeeksforGeeks | 29 Nov, 2018
numpy.arccosh() : This mathematical function helps user to calculate inverse hyperbolic cosine, element-wise for all arr.
Syntax :
numpy.arccosh(arr, /, out=None, *, where=True,casting=’same_kind’, order=’K’, dtype=None, ufunc ‘arccosh’)
Parameters :
arr : array_likeInput array.out : [ndarray, optional] A ... | [
{
"code": null,
"e": 25665,
"s": 25637,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 25787,
"s": 25665,
"text": "numpy.arccosh() : This mathematical function helps user to calculate inverse hyperbolic cosine, element-wise for all arr."
},
{
"code": null,
"e": 2579... |
Program to find the diameter, cycles and edges of a Wheel Graph in C++ | In this problem, we are given a number that denotes the number of vertices of a Wheel Graph. Our task is to create a Program to find the diameter,
cycles and edges of a Wheel Graph in C++.
Problem description − Here, we need to find the number of cycles, number of edges, and the diameter of Wheel Graph with n vertices.... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "In this problem, we are given a number that denotes the number of vertices of a Wheel Graph. Our task is to create a Program to find the diameter,\ncycles and edges of a Wheel Graph in C++."
},
{
"code": null,
"e": 1383,
"s": 1251,
"... |
Pytorch vs Tensorflow in 2020. How the two popular frameworks have... | by Moiz Saifee | Towards Data Science | Pytorch and Tensorflow are by far two of the most popular frameworks for Deep Learning. It’s always a lot of work to learn and be comfortable with a new framework, so a lot of people face the dilemma of which one to choose out of the two
The two frameworks had a lot of major differences in terms of design, paradigm, sy... | [
{
"code": null,
"e": 410,
"s": 172,
"text": "Pytorch and Tensorflow are by far two of the most popular frameworks for Deep Learning. It’s always a lot of work to learn and be comfortable with a new framework, so a lot of people face the dilemma of which one to choose out of the two"
},
{
"co... |
Ruby | String Basics - GeeksforGeeks | 30 Jul, 2018
In Ruby, string is a sequence of one or more characters. It may consist of numbers, letters, or symbols. Here strings are the objects, and apart from other languages, strings are mutable, i.e. strings can be changed in place instead of creating new strings. String’s object holds and manipulates an arbitrar... | [
{
"code": null,
"e": 24011,
"s": 23983,
"text": "\n30 Jul, 2018"
},
{
"code": null,
"e": 24393,
"s": 24011,
"text": "In Ruby, string is a sequence of one or more characters. It may consist of numbers, letters, or symbols. Here strings are the objects, and apart from other languag... |
jQuery | delegate() Method - GeeksforGeeks | 19 Feb, 2019
The delegate() Method in jQuery is used to add one or more event handlers to the specified element that are children of selected elements and are also used to specify a function to run whenever the event occurs.
Syntax
$(selector).delegate( childSelector, event, data, function )
Parameter: This method acce... | [
{
"code": null,
"e": 40723,
"s": 40695,
"text": "\n19 Feb, 2019"
},
{
"code": null,
"e": 40935,
"s": 40723,
"text": "The delegate() Method in jQuery is used to add one or more event handlers to the specified element that are children of selected elements and are also used to spec... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.