title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Matplotlib.axes.Axes.add_artist() in Python - GeeksforGeeks
21 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 25667, "s": 25639, "text": "\n21 Apr, 2020" }, { "code": null, "e": 25967, "s": 25667, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, ...
Null-Coalescing Operator in C# - GeeksforGeeks
11 Dec, 2019 In C#, ?? operator is known as Null-coalescing operator. It will return the value of its left-hand operand if it is not null. If it is null, then it will evaluate the right-hand operand and returns its result. Or if the left-hand operand evaluates to non-null, then it does not evaluate its right-hand opera...
[ { "code": null, "e": 25607, "s": 25579, "text": "\n11 Dec, 2019" }, { "code": null, "e": 25918, "s": 25607, "text": "In C#, ?? operator is known as Null-coalescing operator. It will return the value of its left-hand operand if it is not null. If it is null, then it will evaluate ...
N/3 repeated number in an array with O(1) space - GeeksforGeeks
27 May, 2021 We are given a read only array of n integers. Find any element that appears more than n/3 times in the array in linear time and constant additional space. If no such element exists, return -1. Examples: Input : [10, 10, 20, 30, 10, 10] Output : 10 10 occurs 4 times which is more than 6/3. Input : [20, 3...
[ { "code": null, "e": 24741, "s": 24713, "text": "\n27 May, 2021" }, { "code": null, "e": 24934, "s": 24741, "text": "We are given a read only array of n integers. Find any element that appears more than n/3 times in the array in linear time and constant additional space. If no su...
Java Program to enable cell selection in a JTable
To enable cell selection, use the setCellSelectionEnabled() method and set it to TRUE − table.setCellSelectionEnabled(true); The above sets whether this table allows both a column selection and arow selection to exist simultaneously. The following is an example to enable cell selection in a JTable − package my; import ...
[ { "code": null, "e": 1150, "s": 1062, "text": "To enable cell selection, use the setCellSelectionEnabled() method and set it to TRUE −" }, { "code": null, "e": 1187, "s": 1150, "text": "table.setCellSelectionEnabled(true);" }, { "code": null, "e": 1296, "s": 1187,...
Not showing a placeholder for input type=“date” field with HTML5. How to solve it?
To show it, use the following − <input placeholder = "Date" class = "textbox-n" type = "text" onfocus = "(this.type = 'date')" id = "date"> You can also go for CSS − input[type="date"]::before{ color: #ffffff; content: attr(placeholder) ": "; } input[type="date"]:focus::before { content: "" !important; }
[ { "code": null, "e": 1094, "s": 1062, "text": "To show it, use the following −" }, { "code": null, "e": 1203, "s": 1094, "text": "<input placeholder = \"Date\" class = \"textbox-n\" type = \"text\" onfocus = \"(this.type = 'date')\" id = \"date\">" }, { "code": null, ...
Python Pandas Data Frame Basics. Let us understand the basics of Pandas... | by Tanu N Prabhu | Towards Data Science
Before getting started let me introduce you to Pandas, Pandas is a python library that provides high-performance, easy-to-use data structures such as a series, Data Frame, and Panel for data analysis tools for Python programming language. Moreover, Pandas Data Frame consists of main components, the data, rows, and colu...
[ { "code": null, "e": 749, "s": 172, "text": "Before getting started let me introduce you to Pandas, Pandas is a python library that provides high-performance, easy-to-use data structures such as a series, Data Frame, and Panel for data analysis tools for Python programming language. Moreover, Pandas...
How can we create a LOG filter for Logging purposes in C# ASP.NET WebAPI?
Action filters are used to add extra logic before or after action methods execution. The OnActionExecuting and OnActionExecuted methods are used to add our logic before and after an action method is executed. Let us create create a LogAttribute that implemets ActionFilterAttribute which logs some information before and...
[ { "code": null, "e": 1271, "s": 1062, "text": "Action filters are used to add extra logic before or after action methods execution.\nThe OnActionExecuting and OnActionExecuted methods are used to add our logic\nbefore and after an action method is executed." }, { "code": null, "e": 1414,...
Java Program to replace a word with asterisks in a sentence
To replace a word with asterisks in a sentence, the Java program is as follows − Live Demo public class Demo{ static String replace_word(String sentence, String pattern){ String[] word_list = sentence.split("\\s+"); String my_result = ""; String asterisk_val = ""; for (int i = 0; i < pattern...
[ { "code": null, "e": 1143, "s": 1062, "text": "To replace a word with asterisks in a sentence, the Java program is as follows −" }, { "code": null, "e": 1154, "s": 1143, "text": " Live Demo" }, { "code": null, "e": 1924, "s": 1154, "text": "public class Demo{\...
Compare Version Numbers in Python
Suppose we have to compare two version numbers version1 and version2. If the version1 > version2 then return 1; otherwise when version1 < version2 return -1; otherwise return 0. We can assume that the version strings are non-empty and contain only digits and the dot (.) characters. The dot character does not represent ...
[ { "code": null, "e": 1589, "s": 1062, "text": "Suppose we have to compare two version numbers version1 and version2. If the version1 > version2 then return 1; otherwise when version1 < version2 return -1; otherwise return 0. We can assume that the version strings are non-empty and contain only digit...
Count values greater and less than a specific number and display count in separate MySQL columns?
For this, you can use COUNT() along with CASE STATEMENT. Let us first create a table − mysql> create table DemoTable ( Score int ); Query OK, 0 rows affected (0.71 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values(40); Query OK, 1 row affected (0.77 sec) mysql> insert i...
[ { "code": null, "e": 1149, "s": 1062, "text": "For this, you can use COUNT() along with CASE STATEMENT. Let us first create a table −" }, { "code": null, "e": 1234, "s": 1149, "text": "mysql> create table DemoTable\n(\n Score int\n);\nQuery OK, 0 rows affected (0.71 sec)" }, ...
How to delete text from document using HTML ? - GeeksforGeeks
11 Jun, 2020 In this article, we delete text from an HTML document by using the <del> tag in the document. This tag stands for delete and is used to mark a portion of text which has been deleted from the document. Syntax: <del> Contents... </del> Example: In the following example, deletion of a text from a document is ...
[ { "code": null, "e": 26047, "s": 26019, "text": "\n11 Jun, 2020" }, { "code": null, "e": 26248, "s": 26047, "text": "In this article, we delete text from an HTML document by using the <del> tag in the document. This tag stands for delete and is used to mark a portion of text whic...
Link your GitHub Account with R Studio - GeeksforGeeks
02 Jul, 2020 R Studio is an integrated development environment(IDE) for R Language. IDE is a GUI, where you can write your quotes, see the results and also see the variables that are generated during the course of programming. R Studio is available as both Open source and Commercial software. It is also available as bo...
[ { "code": null, "e": 25869, "s": 25841, "text": "\n02 Jul, 2020" }, { "code": null, "e": 26283, "s": 25869, "text": "R Studio is an integrated development environment(IDE) for R Language. IDE is a GUI, where you can write your quotes, see the results and also see the variables th...
Python | Execute and parse Linux commands - GeeksforGeeks
25 Jun, 2019 Prerequisite: Introduction to Linux Shell and Shell Scripting Linux is one of the most popular operating systems and is a common choice for developers. It is popular because it is open source, it’s free and customizable, it is very robust and adaptable. An operating system mainly consists of two parts: The...
[ { "code": null, "e": 25617, "s": 25589, "text": "\n25 Jun, 2019" }, { "code": null, "e": 25679, "s": 25617, "text": "Prerequisite: Introduction to Linux Shell and Shell Scripting" }, { "code": null, "e": 25871, "s": 25679, "text": "Linux is one of the most pop...
JavaScript | RegExp test() Method - GeeksforGeeks
12 Apr, 2021 The RegExp test() Method in JavaScript is used to test for match in a string. If there is a match this method returns true else it returns false.Syntax: RegExpObject.test(str) Where str is the string to be searched. This is required field.Example 1: This example searches for the string “computer” in the ...
[ { "code": null, "e": 25891, "s": 25863, "text": "\n12 Apr, 2021" }, { "code": null, "e": 26046, "s": 25891, "text": "The RegExp test() Method in JavaScript is used to test for match in a string. If there is a match this method returns true else it returns false.Syntax: " }, ...
Create a list from rows in Pandas DataFrame | Set 2 - GeeksforGeeks
29 Jan, 2019 In an earlier post, we had discussed some approaches to extract the rows of the dataframe as a Python’s list. In this post, we will see some more methods to achieve that goal. Note : For link to the CSV file used in the code, click here. Solution #1: In order to access the data of each row of the Pandas da...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n29 Jan, 2019" }, { "code": null, "e": 25713, "s": 25537, "text": "In an earlier post, we had discussed some approaches to extract the rows of the dataframe as a Python’s list. In this post, we will see some more methods to achiev...
Python - Copy contents of one file to another file - GeeksforGeeks
22 Nov, 2021 Given two text files, the task is to write a Python program to copy contents of the first file into the second file. The text files which are going to be used are second.txt and first.txt: Method #1: Using File handling to read and append We will open first.txt in ‘r’ mode and will read the contents of fir...
[ { "code": null, "e": 25717, "s": 25689, "text": "\n22 Nov, 2021" }, { "code": null, "e": 25834, "s": 25717, "text": "Given two text files, the task is to write a Python program to copy contents of the first file into the second file." }, { "code": null, "e": 25906, ...
Array sum in C++ STL - GeeksforGeeks
28 Oct, 2017 In C++, we can quickly find array sum using accumulate() // C++ program to demonstrate working of accumulate()#include <iostream> #include <numeric> using namespace std; // User defined function that returns sum of// arr[] using accumulate() library function.int arraySum(int a[], int n) { int init...
[ { "code": null, "e": 25984, "s": 25956, "text": "\n28 Oct, 2017" }, { "code": null, "e": 26041, "s": 25984, "text": "In C++, we can quickly find array sum using accumulate()" }, { "code": "// C++ program to demonstrate working of accumulate()#include <iostream> #include <...
C program to check if a given year is leap year using Conditional operator - GeeksforGeeks
16 Jan, 2020 Given an integer which represents the year, the task is to check if this is a leap year, with the help of Ternary Operator. A year is a leap year if the following conditions are satisfied: Year is multiple of 400.Year is multiple of 4 and not multiple of 100. Year is multiple of 400. Year is multiple of 4 ...
[ { "code": null, "e": 26175, "s": 26147, "text": "\n16 Jan, 2020" }, { "code": null, "e": 26299, "s": 26175, "text": "Given an integer which represents the year, the task is to check if this is a leap year, with the help of Ternary Operator." }, { "code": null, "e": 26...
C# | Math.Max() Method - GeeksforGeeks
13 Aug, 2021 In C#, Max() is a Math class method which is used to returns the larger of the two specified numbers. This method always takes two arguments and it can be overloaded by changing the data type of the passed arguments as follows: Math.Max(Byte, Byte): Returns the larger of the two 8-bit unsigned integers. M...
[ { "code": null, "e": 25777, "s": 25749, "text": "\n13 Aug, 2021" }, { "code": null, "e": 26006, "s": 25777, "text": "In C#, Max() is a Math class method which is used to returns the larger of the two specified numbers. This method always takes two arguments and it can be overload...
Count inversions in an array | Set 3 (Using BIT) - GeeksforGeeks
27 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. If the array is sorted in the reverse order that inversion count is the maximum. Two elements a[i] and a[j] form an inversion if a[i] > a[j] and i < j. F...
[ { "code": null, "e": 25513, "s": 25485, "text": "\n27 Apr, 2022" }, { "code": null, "e": 25888, "s": 25513, "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. If the ar...
Python | Get specific keys' values - GeeksforGeeks
24 Oct, 2019 Sometimes, we require all the values, but many times, we have specified keys of whose value list we require. This is quite common problem for web development. Let’s discuss certain ways in which this problem can be solved. Method #1 : Using list comprehensionThis task can be performed using list comprehens...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n24 Oct, 2019" }, { "code": null, "e": 25760, "s": 25537, "text": "Sometimes, we require all the values, but many times, we have specified keys of whose value list we require. This is quite common problem for web development. Let’...
The Worst Ramen in the World — Learn EDA in Python with Ramen Rating | by Ha Dinh | Towards Data Science
I used to be a huge ramen consumer. And predictably, I reached the peak of my consumption over college days. Who doesn’t love to slurp a bowl of ramen during days of snowstorms and bad food from the college dining hall? Like any other food we eat everyday, there are good and bad ramen. In this article, I would love to ...
[ { "code": null, "e": 392, "s": 172, "text": "I used to be a huge ramen consumer. And predictably, I reached the peak of my consumption over college days. Who doesn’t love to slurp a bowl of ramen during days of snowstorms and bad food from the college dining hall?" }, { "code": null, "e"...
BufferedReader readLine() method in Java with Examples - GeeksforGeeks
28 May, 2020 The readLine() method of BufferedReader class in Java is used to read one line text at a time. The end of a line is to be understood by ‘\n’ or ‘\r’ or EOF. Syntax: public String readLine() throws IOException Parameters: This method does not accept any parameter. Return value: This method retur...
[ { "code": null, "e": 24009, "s": 23981, "text": "\n28 May, 2020" }, { "code": null, "e": 24166, "s": 24009, "text": "The readLine() method of BufferedReader class in Java is used to read one line text at a time. The end of a line is to be understood by ‘\\n’ or ‘\\r’ or EOF." }...
How do I get the width and height of a Tkinter window?
Tkinter initially creates an instance of a window which is a container that contains all the widgets and the elements. If we want to resize the window, we can use the geometry method by defining the value of width and height. In order to get the width and height of the tkinter window, we can use winfo_width() and winfo...
[ { "code": null, "e": 1288, "s": 1062, "text": "Tkinter initially creates an instance of a window which is a container that contains all the widgets and the elements. If we want to resize the window, we can use the geometry method by defining the value of width and height." }, { "code": null,...
Finding longest substring between two same characters JavaScript
We are required to write a JavaScript function that takes in a string. The function should find and return the length of the longest substring that is sandwiched between two same letters. For example − If the input string is − const str = 'avbghvh'; Then the output should be − const output = 3; because the desired lon...
[ { "code": null, "e": 1250, "s": 1062, "text": "We are required to write a JavaScript function that takes in a string. The function should find and return the length of the longest substring that is sandwiched between two same letters." }, { "code": null, "e": 1265, "s": 1250, "te...
Announcing YOLTv4: Improved Satellite Imagery Object Detection | by Adam Van Etten | Towards Data Science
Preface: Though CosmiQ Works (and its associated blog: The DownLinQ) has unfortunately been shut down, there remains much to be done in the geospatial analytics domain. Accordingly, this blog details work performed independently of IQT and in my spare time. In a number of previous blogs [e.g. 1, 2, 3] and academic pape...
[ { "code": null, "e": 430, "s": 172, "text": "Preface: Though CosmiQ Works (and its associated blog: The DownLinQ) has unfortunately been shut down, there remains much to be done in the geospatial analytics domain. Accordingly, this blog details work performed independently of IQT and in my spare tim...
Kth character from the Nth string obtained by the given operations
06 Oct, 2021 Given two positive integers N and K, the task is to find the Kth character of a string obtained by performing the following operation on a string S( initially “A”) N times. Every ith operation generates following string (Si): Si = Si – 1 + ‘B’ + rev(comp(Si – 1)) where, comp() denotes the complement of str...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Oct, 2021" }, { "code": null, "e": 201, "s": 28, "text": "Given two positive integers N and K, the task is to find the Kth character of a string obtained by performing the following operation on a string S( initially “A”) N times." ...
OpenCV Panorama Stitching
13 Jan, 2022 This article describes how to “stitch” images using OpenCV and python. Panorama is basically a photograph stretched horizontally without distortion. We will stitch 3 images together in today’s discussion to create our own panorama. To achieve this, the images must have some common key-points between imag...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jan, 2022" }, { "code": null, "e": 99, "s": 28, "text": "This article describes how to “stitch” images using OpenCV and python." }, { "code": null, "e": 179, "s": 99, "text": "Panorama is basically a photograph st...
Python – Append given number with every element of the list
26 Nov, 2020 Given a list and a number, write a Python program to append the number with every element of the list. Examples: input = [1,2,3,4,5] key = 5 (number to be appended) output = [1,5,2,5,3,5,4,5,5,5] The following are ways to achieve this functionality: Method 1: Using for loop Python input = [1, 2, 3, 4, 5]ke...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Nov, 2020" }, { "code": null, "e": 131, "s": 28, "text": "Given a list and a number, write a Python program to append the number with every element of the list." }, { "code": null, "e": 141, "s": 131, "text": "Exa...
C# | String Operators
22 Feb, 2021 The string is an array of characters. The String class represents the text as a series of Unicode characters and it is defined in the .NET base class library. The main use of the String class is to provide the properties, operators and methods so that it becomes easy to work with strings.There are two type...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Feb, 2021" }, { "code": null, "e": 381, "s": 28, "text": "The string is an array of characters. The String class represents the text as a series of Unicode characters and it is defined in the .NET base class library. The main use of ...
List all files of certain type in a directory using Python
06 Aug, 2021 In python, there are several built-in modules and methods for file handling. These functions are present in different modules such as os, glob, etc. This article helps you find out many of the functions in one place which gives you a brief knowledge about how to list all the files of a certain type in a di...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Aug, 2021" }, { "code": null, "e": 398, "s": 54, "text": "In python, there are several built-in modules and methods for file handling. These functions are present in different modules such as os, glob, etc. This article helps you fi...
HTML | <table> border Attribute
31 Dec, 2021 The HTML <table> border Attribute is used to specify the border of a table. It sets the border around the table cells. Syntax: <table border="1|0"> Attribute Values: 1: It sets the border around the table cells. 0: It removes (not set) the border around the table cells. Note: The Example: Output: Supported...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Dec, 2021" }, { "code": null, "e": 147, "s": 28, "text": "The HTML <table> border Attribute is used to specify the border of a table. It sets the border around the table cells." }, { "code": null, "e": 155, "s": 147, ...
How to set the foreground color of the TextBox in C#?
29 Nov, 2019 In Windows forms, TextBox plays an important role. With the help of TextBox, the user can enter data in the application, it can be of a single line or of multiple lines. In TextBox, you are allowed to set the foreground color of the TextBox with the help of ForeColor property which makes your textbox more ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2019" }, { "code": null, "e": 413, "s": 28, "text": "In Windows forms, TextBox plays an important role. With the help of TextBox, the user can enter data in the application, it can be of a single line or of multiple lines. In Te...
PHP | array_fill() function
09 Mar, 2018 The array_fill() is an inbuilt-function in PHP and is used to fill an array with values. This function basically creates an user-defined array with a given pre-filled value. Syntax: array_fill($start_index, $number_elements, $values) Parameter:The array_fill() function takes three parameters and are descri...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Mar, 2018" }, { "code": null, "e": 202, "s": 28, "text": "The array_fill() is an inbuilt-function in PHP and is used to fill an array with values. This function basically creates an user-defined array with a given pre-filled value." ...
CHAR_BIT in C
27 May, 2022 CHAR_BIT : It is the number of bits in char. These days, almost all architectures use 8 bits per byte (But it is not the case always, some older machines used to have 7-bit byte). It can be found in Let us see an application of it. Suppose we wish to print byte by byte representation of an integer. Exampl...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 May, 2022" }, { "code": null, "e": 355, "s": 54, "text": "CHAR_BIT : It is the number of bits in char. These days, almost all architectures use 8 bits per byte (But it is not the case always, some older machines used to have 7-bit b...
BST to a Tree with sum of all smaller keys
13 Oct, 2021 Given a Binary Search Tree(BST), convert it to a Binary Tree such that every key of the original BST is changed to key plus sum of all smaller keys in BST.Given a BST with N Nodes we have to convert into Binary Tree Given above BST with N=5 Nodes. The values at Node being 9, 6, 15, 3, 21Binary Tree after...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Oct, 2021" }, { "code": null, "e": 270, "s": 52, "text": "Given a Binary Search Tree(BST), convert it to a Binary Tree such that every key of the original BST is changed to key plus sum of all smaller keys in BST.Given a BST with N ...
HTML Course | First Web Page | Printing Hello World
09 Dec, 2021 Course Navigation So far, we already have learned about the structure of an HTML document, tags etc. Let us use this knowledge to create our first web page which will print the text “Hello World!” on the screen.Open your text editor, and type the below code in it and save it with the name “index.html”. N...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Dec, 2021" }, { "code": null, "e": 72, "s": 52, "text": "Course Navigation " }, { "code": null, "e": 358, "s": 72, "text": "So far, we already have learned about the structure of an HTML document, tags etc. Let ...
Python - Extract String after Nth occurrence of K character - GeeksforGeeks
14 Oct, 2020 Given a String, extract the string after Nth occurrence of a character. Input : test_str = ‘geekforgeeks’, K = “e”, N = 2Output : kforgeeksExplanation : After 2nd occur. of “e” string is extracted. Input : test_str = ‘geekforgeeks’, K = “e”, N = 4Output : ksExplanation : After 4th occur. of “e” string is ...
[ { "code": null, "e": 24390, "s": 24362, "text": "\n14 Oct, 2020" }, { "code": null, "e": 24463, "s": 24390, "text": "Given a String, extract the string after Nth occurrence of a character. " }, { "code": null, "e": 24589, "s": 24463, "text": "Input : test_str ...
basic_istream::get() in C++ with Examples - GeeksforGeeks
28 May, 2020 The basic_istream::get() is used to get the character. This function returns a one character if available, otherwise it will return end of the file. Header File: <iostream> Syntax: int_type get(); Parameters: The method basic_istream::get() doesn’t accept any parameter. Return Value: The method basic_ist...
[ { "code": null, "e": 24196, "s": 24168, "text": "\n28 May, 2020" }, { "code": null, "e": 24345, "s": 24196, "text": "The basic_istream::get() is used to get the character. This function returns a one character if available, otherwise it will return end of the file." }, { ...
Radio Button Vs Checkbox in HTML - GeeksforGeeks
27 Mar, 2020 Radio button: It is generally used in HTML forms. HTML forms are required when you need to collect some data from the site visitors. A radio button is used when you want to select only one option out of several available options. Example: <html> <head> <title> Radio Button <title></head> <bo...
[ { "code": null, "e": 24919, "s": 24891, "text": "\n27 Mar, 2020" }, { "code": null, "e": 25149, "s": 24919, "text": "Radio button: It is generally used in HTML forms. HTML forms are required when you need to collect some data from the site visitors. A radio button is used when yo...
Python Lists vs Sets. When to use lists and when to use sets? | by Jacob Toftgaard Rasmussen | Towards Data Science
You will learn about the differences between lists and sets in this article. You will also see a practical example where a set performs far better than a list does. This post has the following structure: Introduction Why lists are cool and also uncool Why sets are uncool and also cool A practical example showing differ...
[ { "code": null, "e": 337, "s": 172, "text": "You will learn about the differences between lists and sets in this article. You will also see a practical example where a set performs far better than a list does." }, { "code": null, "e": 376, "s": 337, "text": "This post has the fol...
Use Apache Drill with Spring Boot or Java to query data using SQL queries | by Sunny Srinidhi | Towards Data Science
Originally published here: https://blog.contactsunny.com/tech/use-apache-drill-with-spring-boot-or-java-to-query-data-using-sql-queries In the last few posts, we saw how to connect Apache Drill with MongoDB and also how we can connect it to Kafka to query data using simple SQL queries. But when you want to move this to...
[ { "code": null, "e": 308, "s": 172, "text": "Originally published here: https://blog.contactsunny.com/tech/use-apache-drill-with-spring-boot-or-java-to-query-data-using-sql-queries" }, { "code": null, "e": 813, "s": 308, "text": "In the last few posts, we saw how to connect Apach...
LocalDateTime parse() method in Java with Examples - GeeksforGeeks
31 Dec, 2018 In LocalDateTime class, there are two types of parse() method depending upon the parameters passed to it. parse() method of a LocalDateTime class used to get an instance of LocalDateTime from a string such as ‘2018-10-23T17:19:33’ passed as parameter.The string must have a valid date-time and is parsed usi...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n31 Dec, 2018" }, { "code": null, "e": 23663, "s": 23557, "text": "In LocalDateTime class, there are two types of parse() method depending upon the parameters passed to it." }, { "code": null, "e": 23906, "s": 2366...
Nine Rules for Writing Python Extensions in Rust | by Carl M. Kadie | Towards Data Science
One year ago, I got fed up with our package’s C++ extension. I rewrote it in Rust. The resulting extension was as fast a C/C++ but with better compatibility and safety. Along the way, I learned nine rules that can help you create better extension code: Create a single repository containing both Rust and Python projects...
[ { "code": null, "e": 425, "s": 172, "text": "One year ago, I got fed up with our package’s C++ extension. I rewrote it in Rust. The resulting extension was as fast a C/C++ but with better compatibility and safety. Along the way, I learned nine rules that can help you create better extension code:" ...
Analyze the data through data visualization using Seaborn | by Sanket Doshi | Towards Data Science
Data visualization is an important part of any data analysis. It helps us to recognize relations between variables and also to find which variables are significant or which variable can affect the predicted variable. In machine learning model while training any model you need to first find which features are important ...
[ { "code": null, "e": 388, "s": 171, "text": "Data visualization is an important part of any data analysis. It helps us to recognize relations between variables and also to find which variables are significant or which variable can affect the predicted variable." }, { "code": null, "e": 5...
DB2 - Alias
This chapter describes the creation of alias and retrieving data using alias of database objects. Alias is an alternative name for database objects. It can be used to reference the database object. You can say, it is a nick name for database objects. Alias are defined for the objects to make their name short, thereby r...
[ { "code": null, "e": 2026, "s": 1928, "text": "This chapter describes the creation of alias and retrieving data using alias of database objects." }, { "code": null, "e": 2312, "s": 2026, "text": "Alias is an alternative name for database objects. It can be used to reference the d...
Get all the IDs of the Time Zone in Java
To get all the IDs of the TimeZone in Java, we use the getAvailableIDs() method. The getAvailableIDs() method returns all the available IDs which are compatible. Declaration −The java.util.TimeZone.getAvailableIDs() method is declared as follows − public static String[] getAvailableIDs() Let us see a Java program which...
[ { "code": null, "e": 1224, "s": 1062, "text": "To get all the IDs of the TimeZone in Java, we use the getAvailableIDs() method. The getAvailableIDs() method returns all the available IDs which are compatible." }, { "code": null, "e": 1310, "s": 1224, "text": "Declaration −The jav...
How to print a variable name in C?
The following is an example to print variable name. Live Demo #include <stdio.h> #define VariableName(name) #name int main() { int name; char ch; printf("The variable name : %s", VariableName(name)); printf("\nThe variable name : %s", VariableName(ch)); return 0; } The variable name : name The variable ...
[ { "code": null, "e": 1114, "s": 1062, "text": "The following is an example to print variable name." }, { "code": null, "e": 1125, "s": 1114, "text": " Live Demo" }, { "code": null, "e": 1344, "s": 1125, "text": "#include <stdio.h>\n#define VariableName(name) #...
Compute Cumulative Log Normal Probability Density in R Programming - plnorm() Function - GeeksforGeeks
25 Jun, 2020 plnorm() function in R Language is used to compute the log normal value of the cumulative probability density function. It also creates a plot of the cumulative distribution of log normal density. Syntax: plnorm(vec) Parameters:vec: x-values for normal density Example 1: # R program to compute cumulative# ...
[ { "code": null, "e": 25314, "s": 25286, "text": "\n25 Jun, 2020" }, { "code": null, "e": 25511, "s": 25314, "text": "plnorm() function in R Language is used to compute the log normal value of the cumulative probability density function. It also creates a plot of the cumulative di...
Metasploit - Payload
Payload, in simple terms, are simple scripts that the hackers utilize to interact with a hacked system. Using payloads, they can transfer data to a victim system. Metasploit payloads can be of three types − Singles − Singles are very small and designed to create some kind of communication, then move to the next stage. ...
[ { "code": null, "e": 2334, "s": 2171, "text": "Payload, in simple terms, are simple scripts that the hackers utilize to interact with a hacked system. Using payloads, they can transfer data to a victim system." }, { "code": null, "e": 2378, "s": 2334, "text": "Metasploit payloads...
Matplotlib.axes.Axes.get_xticks() in Python - GeeksforGeeks
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 25665, "s": 25637, "text": "\n19 Apr, 2020" }, { "code": null, "e": 25965, "s": 25665, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, ...
How to Reverse a String using Unix Shell Programming?
Bash is a shell or command line interpreter. It is a layer programming language that understands and executes the command that a user enters or can read commands from a script. Essentially Bash or Shell allows users of Unix-like systems and Windows via a Windows subsystem for Linux to control the innermost components o...
[ { "code": null, "e": 1432, "s": 1062, "text": "Bash is a shell or command line interpreter. It is a layer programming language that understands and executes the command that a user enters or can read commands from a script. Essentially Bash or Shell allows users of Unix-like systems and Windows via ...
MongoDB $toLower Operator - GeeksforGeeks
01 Aug, 2020 MongoDB provides different types of string expression operators that are used in the aggregation pipeline stages $toLower operator is one of them. This operator is used to convert the given string into lowercase. Syntax: { $toLower: <expression> } Here, the argument passed in this operator can be any v...
[ { "code": null, "e": 23829, "s": 23801, "text": "\n01 Aug, 2020" }, { "code": null, "e": 24042, "s": 23829, "text": "MongoDB provides different types of string expression operators that are used in the aggregation pipeline stages $toLower operator is one of them. This operator is...
How to count number of occurrences of repeated names in an array - JavaScript?
Let’s say the following is our array − var details = [ { studentName: "John", studentAge: 23 }, { studentName: "David", studentAge: 24 }, { studentName: "John", studentAge: 21 }, { studentName: "John", studentAge: 25 }, { studentName: "Bob...
[ { "code": null, "e": 1101, "s": 1062, "text": "Let’s say the following is our array −" }, { "code": null, "e": 1473, "s": 1101, "text": "var details = [\n {\n studentName: \"John\",\n studentAge: 23\n },\n {\n studentName: \"David\",\n studentAge: 24\n ...
Unix Socket - Quick Guide
Sockets allow communication between two different processes on the same or different machines. To be more precise, it's a way to talk to other computers using standard Unix file descriptors. In Unix, every I/O action is done by writing or reading a file descriptor. A file descriptor is just an integer associated with a...
[ { "code": null, "e": 2415, "s": 2003, "text": "Sockets allow communication between two different processes on the same or different machines. To be more precise, it's a way to talk to other computers using standard Unix file descriptors. In Unix, every I/O action is done by writing or reading a file...
CICS - Quick Guide
CICS is a DB/DC system which is used in online applications. CICS was developed because batch operating system can execute only batch programs. CICS programs can be written in COBOL, C, C++, Java, etc. These days, users want information within seconds and in real time. To provide such quick service, we need a system wh...
[ { "code": null, "e": 2534, "s": 1926, "text": "CICS is a DB/DC system which is used in online applications. CICS was developed because batch operating system can execute only batch programs. CICS programs can be written in COBOL, C, C++, Java, etc. These days, users want information within seconds a...
Geospatial adventures. Step 1: Shapely. | by Dmitry Selemir | Towards Data Science
This is a first in a series of posts summarising some of the key outtakes from working with geospatial data with a PropTech twist over the last couple of years. These are going to have a bit of everything — geospatial datasets, geometric shapes, raster files, maps, visualisations. Starting from the very basics and buil...
[ { "code": null, "e": 569, "s": 171, "text": "This is a first in a series of posts summarising some of the key outtakes from working with geospatial data with a PropTech twist over the last couple of years. These are going to have a bit of everything — geospatial datasets, geometric shapes, raster fi...
SQL – count() with Group By clause
25 Oct, 2021 The count() function is an aggregate function use to find the count of the rows that satisfy the fixed conditions. The count() function with the GROUP BY clause is used to count the data which were grouped on a particular attribute of the table. Syntax: SELECT attribute1 , COUNT(attribute2) FROM table_nam...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Oct, 2021" }, { "code": null, "e": 275, "s": 28, "text": "The count() function is an aggregate function use to find the count of the rows that satisfy the fixed conditions. The count() function with the GROUP BY clause is used to cou...
Python – Get Hardware and System information using platform module
26 Mar, 2020 In this article, we will see how we can show information about our system i.e processor name, name of system etc. The Platform module is used to retrieve as much possible information about the platform on which the program is being currently executed. Now by platform info, it means information about the de...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Mar, 2020" }, { "code": null, "e": 142, "s": 28, "text": "In this article, we will see how we can show information about our system i.e processor name, name of system etc." }, { "code": null, "e": 615, "s": 142, "...
Swift – For-in Loop
05 Dec, 2021 The for-in loop in Swift is very similar to for loop in Python. In Python, we write for iteration in range(). Here iteration is just a variable for iteration. In swift, also we write for iteration in range. We have collections like sets, arrays, dictionaries, so we can iterate their items using a for-in lo...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Dec, 2021" }, { "code": null, "e": 865, "s": 28, "text": "The for-in loop in Swift is very similar to for loop in Python. In Python, we write for iteration in range(). Here iteration is just a variable for iteration. In swift, also w...
PHP | Coding Standards - GeeksforGeeks
17 Feb, 2021 PHP follows few rules and maintains its style of coding. As there are many developers all over the world, if each of them follows different coding styles and standards this will raise great confusion and difficulty for a developer to understand another developer’s code. It will be very hard to manage and s...
[ { "code": null, "e": 40920, "s": 40892, "text": "\n17 Feb, 2021" }, { "code": null, "e": 41264, "s": 40920, "text": "PHP follows few rules and maintains its style of coding. As there are many developers all over the world, if each of them follows different coding styles and stand...
Java NIO - File Channel
As already mentioned FileChannel implementation of Java NIO channel is introduced to access meta data properties of the file including creation, modification, size etc.Along with this File Channels are multi threaded which again makes Java NIO more efficient than Java IO. In general we can say that FileChannel is a ch...
[ { "code": null, "e": 2258, "s": 1984, "text": "As already mentioned FileChannel implementation of Java NIO channel is introduced to access meta data properties of the file including creation, modification, size etc.Along with this File Channels are multi threaded which again makes Java NIO more eff...
Django - Models
A model is a class that represents table or collection in our DB, and where every attribute of the class is a field of the table or collection. Models are defined in the app/models.py (in our example: myapp/models.py) Following is a Dreamreal model created as an example − from django.db import models class Dreamreal(m...
[ { "code": null, "e": 2263, "s": 2045, "text": "A model is a class that represents table or collection in our DB, and where every attribute of the class is a field of the table or collection. Models are defined in the app/models.py (in our example: myapp/models.py)" }, { "code": null, "e"...
Plotly - Distplots Density Plot and Error Bar Plot
In this chapter, we will understand about distplots, density plot and error bar plot in detail. Let us begin by learning about distplots. The distplot figure factory displays a combination of statistical representations of numerical data, such as histogram, kernel density estimation or normal curve, and rug plot. The d...
[ { "code": null, "e": 2498, "s": 2360, "text": "In this chapter, we will understand about distplots, density plot and error bar plot in detail. Let us begin by learning about distplots." }, { "code": null, "e": 2675, "s": 2498, "text": "The distplot figure factory displays a combi...
Automating project management with deep learning | by Euan Wielewski | Towards Data Science
In the data-driven future of project management, project managers will be augmented by artificial intelligence that can highlight project risks, determine the optimal allocation of resources and automate project management tasks. For example, many organisations require project managers to provide regular project status...
[ { "code": null, "e": 402, "s": 172, "text": "In the data-driven future of project management, project managers will be augmented by artificial intelligence that can highlight project risks, determine the optimal allocation of resources and automate project management tasks." }, { "code": nul...
Matplotlib.colors.LinearSegmentedColormap class in Python - GeeksforGeeks
25 Oct, 2021 Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. The matplotlib.colors.LinearSegmentedColarmap class belongs to the matplotlib.colors module. T...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n25 Oct, 2021" }, { "code": null, "e": 24114, "s": 23901, "text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays an...
ReactJS – componentWillUnmount() Method
In this article, we are going to see how to execute a function when the component is deleted from the DOM tree. This method is called during the unmounting phase of the React Lifecycle, i.e., before the component is destroyed or unmounted from the DOM tree. This method is majorly used to cancel all the subscriptions th...
[ { "code": null, "e": 1174, "s": 1062, "text": "In this article, we are going to see how to execute a function when the component is deleted from the DOM tree." }, { "code": null, "e": 1443, "s": 1174, "text": "This method is called during the unmounting phase of the React Lifecyc...
What are the best practices to organize Python modules?
Here is a sample project that shows a very good way to structure your projects: https://github.com/kennethreitz/samplemod. The project is about creating the "sample" module. The directory structure looks as follows: README.rst LICENSE setup.py requirements.txt sample/__init__.py sample/core.py sample/helpers.py docs/co...
[ { "code": null, "e": 1278, "s": 1062, "text": "Here is a sample project that shows a very good way to structure your projects: https://github.com/kennethreitz/samplemod. The project is about creating the \"sample\" module. The directory structure looks as follows:" }, { "code": null, "e"...
How to add an attribute to the XML file using Powershell?
To add the attribute to the XML, we first need to add the Element and then we will add an attribute for it. Below is a sample of the XML file. <?xml version="1.0"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <...
[ { "code": null, "e": 1170, "s": 1062, "text": "To add the attribute to the XML, we first need to add the Element and then we will add an attribute for it." }, { "code": null, "e": 1205, "s": 1170, "text": "Below is a sample of the XML file." }, { "code": null, "e": 15...
HTML | charset Attribute - GeeksforGeeks
14 Dec, 2021 The charset attribute in HTML is used to define the character encoding. The charset attribute is used with the <meta> and <script> element.Charset attribute in <meta> Tag: The charset attribute is present in the meta element. It specifies the character encoding for the HTML document. Supported Tags: <met...
[ { "code": null, "e": 23723, "s": 23695, "text": "\n14 Dec, 2021" }, { "code": null, "e": 24009, "s": 23723, "text": "The charset attribute in HTML is used to define the character encoding. The charset attribute is used with the <meta> and <script> element.Charset attribute in <me...
How to Install pywin32 on Windows? - GeeksforGeeks
22 Sep, 2021 Pywin32 is a Python extension for windows that is used to access Windows API. In this article, we will look into the process of installing Pywin32 on a windows machine. The only thing that you need for installing Numpy on Windows are: Python PIP or Conda (depending upon user preference) If you want the i...
[ { "code": null, "e": 24421, "s": 24393, "text": "\n22 Sep, 2021" }, { "code": null, "e": 24591, "s": 24421, "text": "Pywin32 is a Python extension for windows that is used to access Windows API. In this article, we will look into the process of installing Pywin32 on a windows ma...
How to set default Field Value in MySQL?
To set default field value, use the “default”. Let us first create a table − mysql> create table DemoTable -> ( -> Age int -> ); Query OK, 0 rows affected (0.58 sec) Here is the query to set default field value in MySQL − mysql> alter table DemoTable MODIFY Age int default 18; Query OK, 0 rows affected (0.25 sec) Recor...
[ { "code": null, "e": 1139, "s": 1062, "text": "To set default field value, use the “default”. Let us first create a table −" }, { "code": null, "e": 1228, "s": 1139, "text": "mysql> create table DemoTable\n-> (\n-> Age int\n-> );\nQuery OK, 0 rows affected (0.58 sec)" }, { ...
C Arrays - GeeksforGeeks
02 Nov, 2020 Consider the following C-function in which a[n] and b[m] are two sorted integer arrays and c[n + m] be another integer array. C Which of the following condition(s) hold(s) after the termination of the while loop? (GATE CS 2006) (i) j < m, k = n+j-1, and a[n-1] < b[j] if i = n (ii) i < n, k = m+i-1, and b[...
[ { "code": null, "e": 27610, "s": 27582, "text": "\n02 Nov, 2020" }, { "code": null, "e": 27737, "s": 27610, "text": "Consider the following C-function in which a[n] and b[m] are two sorted integer arrays and c[n + m] be another integer array. " }, { "code": null, "e":...
Excel Fill
Filling makes your life easier and is used to fill ranges with values, so that you do not have to type manual entries. Filling can be used for: Copying Sequences Dates Functions (*) For now, do not think of functions. We will cover that in a later chapter. Filling is done by selecting a cell, clicking the fill icon and...
[ { "code": null, "e": 119, "s": 0, "text": "Filling makes your life easier and is used to fill ranges with values, so that you do not have to type manual entries." }, { "code": null, "e": 144, "s": 119, "text": "Filling can be used for:" }, { "code": null, "e": 152, ...
How to place cursor position at end of text in text input field using JavaScript ? - GeeksforGeeks
05 Jan, 2021 In this article, we are going to learn about how to place the cursor at end of the text in a text input element using JavaScript. At first, we are going to create a text input box where some value will be given and a button to place the cursor at the end. We can place the cursor at the end of the text in ...
[ { "code": null, "e": 24481, "s": 24453, "text": "\n05 Jan, 2021" }, { "code": null, "e": 24612, "s": 24481, "text": "In this article, we are going to learn about how to place the cursor at end of the text in a text input element using JavaScript. " }, { "code": null, ...
HTML - Figcaption Tag
The HTML <figcaption> tag specifies a caption for an element. <!DOCTYPE html> <html> <head> <title>HTML Figcaption Tag</title> </head> <body> <figure><img src = "http://www.tutorialspoint.com/scripts/img/logo.png"/> <figcaption>Tutorials Point Logo</figcaption> </figure> </body>...
[ { "code": null, "e": 2436, "s": 2374, "text": "The HTML <figcaption> tag specifies a caption for an element." }, { "code": null, "e": 2704, "s": 2436, "text": "<!DOCTYPE html>\n<html>\n\n <head>\n <title>HTML Figcaption Tag</title>\n </head>\n\n <body>\n <figure><...
Using OpenCV to Cartoonize an Image | by Himanshu Sharma | Towards Data Science
OpenCV is an open-source python library used for computer vision and machine learning. It is mainly aimed at real-time computer vision and image processing. It is used to perform different operations on images which transform them using different techniques. It majorly supports all languages like Python, C++, Android, ...
[ { "code": null, "e": 431, "s": 172, "text": "OpenCV is an open-source python library used for computer vision and machine learning. It is mainly aimed at real-time computer vision and image processing. It is used to perform different operations on images which transform them using different techniqu...
Integrate Jupyter Notebook into Data Pipelines | Towards Data Science
For years, I have been using Jupyter notebooks for program profiling, performance optimization, data analysis, and all kinds of data preparation works. There are a couple of posts from Netflix TechBlog that are very inspiring for me, as they truly broaden my knowledge of how Jupyter Notebooks can be immensely adopted e...
[ { "code": null, "e": 527, "s": 172, "text": "For years, I have been using Jupyter notebooks for program profiling, performance optimization, data analysis, and all kinds of data preparation works. There are a couple of posts from Netflix TechBlog that are very inspiring for me, as they truly broaden...
Python - Extract ith element of K key's value - GeeksforGeeks
11 Sep, 2021 Given a dictionary, extract ith element of K key’s value list. Input : test_dict = {‘Gfg’ : [6, 7, 3, 1], ‘is’ : [9, 1, 4], ‘best’ : [10, 7, 4]}, K = ‘Gfg’, i = 1 Output : 7 Explanation : 1st index of ‘Gfg”s value is 7. Input : test_dict = {‘Gfg’ : [6, 7, 3, 1], ‘is’ : [9, 1, 4], ‘best’ : [10, 7, 4]}, K = ...
[ { "code": null, "e": 24510, "s": 24482, "text": "\n11 Sep, 2021" }, { "code": null, "e": 24573, "s": 24510, "text": "Given a dictionary, extract ith element of K key’s value list." }, { "code": null, "e": 24730, "s": 24573, "text": "Input : test_dict = {‘Gfg’ ...
Minimum Coin Change Problem
There is a list of coin C(c1, c2, ......Cn) is given and a value V is also given. Now the problem is to use the minimum number of coins to make the chance V. Note − Assume there are an infinite number of coins C In this problem, we will consider a set of different coins C{1, 2, 5, 10} are given, There is an infinite nu...
[ { "code": null, "e": 1220, "s": 1062, "text": "There is a list of coin C(c1, c2, ......Cn) is given and a value V is also given. Now the problem is to use the minimum number of coins to make the chance V." }, { "code": null, "e": 1274, "s": 1220, "text": "Note − Assume there are ...
Largest Gap in Python
Suppose we have a list of numbers called nums, we have to find the largest difference of two consecutive numbers in the sorted version of nums. So, if the input is like [5, 2, 3, 9, 10, 11], then the output will be 4, as the largest gap between 5 and 9 is 4. To solve this, we will follow these steps − n := sorted list ...
[ { "code": null, "e": 1206, "s": 1062, "text": "Suppose we have a list of numbers called nums, we have to find the largest difference of two\nconsecutive numbers in the sorted version of nums." }, { "code": null, "e": 1321, "s": 1206, "text": "So, if the input is like [5, 2, 3, 9,...
Android Working with Recycler View
Recycler view is a more advanced version of listview and works based on View holder design pattern. Using recyclerview we can show grids as well as a list of items. This example demonstrates how to integrate RecyclerView by creating a beautiful student records app that displays student name with age. Step 1 − Create a ...
[ { "code": null, "e": 1227, "s": 1062, "text": "Recycler view is a more advanced version of listview and works based on View holder design pattern. Using recyclerview we can show grids as well as a list of items." }, { "code": null, "e": 1364, "s": 1227, "text": "This example demo...
Difference Between exit(0) and exit(1)
In this post, we will understand the difference between exit(0) and exit(1). It is portable. It is portable. It tells about the successful termination or completion of the program. It tells about the successful termination or completion of the program. It tells about the termination when the program is executed without...
[ { "code": null, "e": 1139, "s": 1062, "text": "In this post, we will understand the difference between exit(0) and exit(1)." }, { "code": null, "e": 1155, "s": 1139, "text": "It is portable." }, { "code": null, "e": 1171, "s": 1155, "text": "It is portable." ...
MySQL | Hexadecimal Literals - GeeksforGeeks
25 Nov, 2019 Literal:It can be defined as the value given to variables or constants. Example: int f = 2 Here f is the variable and 2 is the numeric literal. Hexadecimal literal:These are the whole numbers whose base is 16 (in numbering system). Example: int y = X'12A' A hexadecimal literal should be preceded by 0x or...
[ { "code": null, "e": 23887, "s": 23859, "text": "\n25 Nov, 2019" }, { "code": null, "e": 23959, "s": 23887, "text": "Literal:It can be defined as the value given to variables or constants." }, { "code": null, "e": 23968, "s": 23959, "text": "Example:" }, {...
Spruce up your GR visualizations in Julia | by Emmett Boudreau | Towards Data Science
That’s right, it’s Julia again, I promise R, Scala, and Python are still in this love-circle Plots.JL is such a diverse package when it comes to visualization in Julia. Although most of the back-ends use Python, using Plots.jl is comprable to using Plotly, Matplotlib(PyPlot), and even more tools inside of one package. ...
[ { "code": null, "e": 265, "s": 172, "text": "That’s right, it’s Julia again, I promise R, Scala, and Python are still in this love-circle" }, { "code": null, "e": 634, "s": 265, "text": "Plots.JL is such a diverse package when it comes to visualization in Julia. Although most of ...
Batch Script - Right String
This is used to extract characters from the end of a string. @echo off set str = This message needs changed. echo %str% set str = %str:~-8% echo %str% The key thing to note about the above program is, the right hand of the string is extracted by using the ~-‘number of characters to extract’ operator. The above com...
[ { "code": null, "e": 2230, "s": 2169, "text": "This is used to extract characters from the end of a string." }, { "code": null, "e": 2325, "s": 2230, "text": "@echo off \nset str = This message needs changed. \necho %str% \n\nset str = %str:~-8% \necho %str%" }, { "code":...
JavaScript Arrays
An array is a special variable, which can hold more than one value: If you have a list of items (a list of car names, for example), storing the cars in single variables could look like this: However, what if you want to loop through the cars and find a specific one? And what if you had not 3 cars, but 300? The soluti...
[ { "code": null, "e": 68, "s": 0, "text": "An array is a special variable, which can hold more than one value:" }, { "code": null, "e": 192, "s": 68, "text": "If you have a list of items (a list of car names, for example), storing the \ncars in single variables could look like thi...
What are control statements in C#?
The flow of program control is specified by control statements in C#. It includes the following − An if statement consists of a boolean expression followed by one or more statements. The following is the syntax − if(boolean_expression) { /* statement(s) will execute if the boolean expression is true */ } An if state...
[ { "code": null, "e": 1160, "s": 1062, "text": "The flow of program control is specified by control statements in C#. It includes the following −" }, { "code": null, "e": 1245, "s": 1160, "text": "An if statement consists of a boolean expression followed by one or more statements....
Different ways to iterate over rows in a Pandas Dataframe — performance comparison | by A Hung | Towards Data Science
Why I am interested in the performance of iteration If you are a python user constantly dealing with structured datasets like myself, you probably use pandas a lot for many good reasons. This package includes plenty of useful functions that are already optimised for its usages and purposes (e.g. descriptive statistics,...
[ { "code": null, "e": 224, "s": 172, "text": "Why I am interested in the performance of iteration" }, { "code": null, "e": 739, "s": 224, "text": "If you are a python user constantly dealing with structured datasets like myself, you probably use pandas a lot for many good reasons....
PL/SQL - FOR LOOP Statement
A FOR LOOP is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times. FOR counter IN initial_value .. final_value LOOP sequence_of_statements; END LOOP; Following is the flow of control in a For Loop − The initial step is executed first, and onl...
[ { "code": null, "e": 2204, "s": 2065, "text": "A FOR LOOP is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times." }, { "code": null, "e": 2293, "s": 2204, "text": "FOR counter IN initial_value .. final_value...
C++ Program to Print Number Entered by User
The objects “cin” and “cout” are used in C++ for input and output respectively. cin is an instance of the istream class and is attached to the standard input device such as the keyboard. cout is an instance of the ostream class and is connected to the standard output device such as the display screen. A program that pr...
[ { "code": null, "e": 1365, "s": 1062, "text": "The objects “cin” and “cout” are used in C++ for input and output respectively. cin is an instance of the istream class and is attached to the standard input device such as the keyboard. cout is an instance of the ostream class and is connected to the s...
How to make a primary key start from 1000?
To make a primary key start from 1000, you need to alter your table and set to auto_increment with value 1000. The syntax is as follows − alter table yourTableName auto_increment=1000; To understand the above syntax, let us first create a table. The query to create a table is as follows − mysql> create table PrimaryKey...
[ { "code": null, "e": 1200, "s": 1062, "text": "To make a primary key start from 1000, you need to alter your table and set to auto_increment with value 1000. The syntax is as follows −" }, { "code": null, "e": 1247, "s": 1200, "text": "alter table yourTableName auto_increment=100...
Longest path in a directed Acyclic graph | Dynamic Programming - GeeksforGeeks
30 Dec, 2021 Given a directed graph G with N vertices and M edges. The task is to find the length of the longest directed path in Graph.Note: Length of a directed path is the number of edges in it. Examples: Input: N = 4, M = 5 Output: 3 The directed path 1->3->2->4 Input: N = 5, M = 8 Output: 3 Simple Approa...
[ { "code": null, "e": 25232, "s": 25201, "text": " \n30 Dec, 2021\n" }, { "code": null, "e": 25429, "s": 25232, "text": "Given a directed graph G with N vertices and M edges. The task is to find the length of the longest directed path in Graph.Note: Length of a directed path is th...
Causal Discovery. Learning causation from data using... | by Shawhin Talebi | Towards Data Science
This is the final post in a series of three on causality. In previous posts, the “new science” [1] of causality was introduced and the topic of causal inference was discussed. The focus of this article is a related idea, causal discovery. I will start with a description of what causal discovery is, give a sketch of how...
[ { "code": null, "e": 554, "s": 172, "text": "This is the final post in a series of three on causality. In previous posts, the “new science” [1] of causality was introduced and the topic of causal inference was discussed. The focus of this article is a related idea, causal discovery. I will start wit...
Get number of fields in MySQL table?
To display number of fields in MySQL, use the COUNT(*). Following is the syntax − select COUNT(*) AS anyAliasName from INFORMATION_SCHEMA.COLUMNS where table_name = yourTableName AND TABLE_SCHEMA = yourDatabaseName; Let us first create a table − mysql> create table DemoTable794 ( ClientId int NOT NULL AUTO_INCREMENT...
[ { "code": null, "e": 1144, "s": 1062, "text": "To display number of fields in MySQL, use the COUNT(*). Following is the syntax −" }, { "code": null, "e": 1278, "s": 1144, "text": "select COUNT(*) AS anyAliasName\nfrom INFORMATION_SCHEMA.COLUMNS\nwhere table_name = yourTableName A...
PyQt5 - QStatusBar Widget
QMainWindow object reserves a horizontal bar at the bottom as the status bar. It is used to display either permanent or contextual status information. There are three types of status indicators − Temporary − Briefly occupies most of the status bar. For example, used to explain tool tip texts or menu entries. Normal − O...
[ { "code": null, "e": 2114, "s": 1963, "text": "QMainWindow object reserves a horizontal bar at the bottom as the status bar. It is used to display either permanent or contextual status information." }, { "code": null, "e": 2159, "s": 2114, "text": "There are three types of status...
Airtable & Python Made Possible II: Uploading Data into Airtable from Python using Airtable’s API | by Kaleb Nyquist | Towards Data Science
—Understanding Relational Data & Record IDs—Matching Field Values to Record IDs — Creating New Records in Airtable — Matching (& Uploading) Multiple Records—Updating Records in Airtable — From pandas to Airtable — 🎉 Copy-and-Paste Airtable Functions — ⏮️ Part I: Downloading Airtable Data into Python Python is a mature...
[ { "code": null, "e": 472, "s": 171, "text": "—Understanding Relational Data & Record IDs—Matching Field Values to Record IDs — Creating New Records in Airtable — Matching (& Uploading) Multiple Records—Updating Records in Airtable — From pandas to Airtable — 🎉 Copy-and-Paste Airtable Functions — ⏮️...
Tailwind CSS Object Position - GeeksforGeeks
23 Mar, 2022 This class accepts more than one value in tailwind CSS. All the properties are covered as in class form. It is the alternative to the CSS object-position property. This class is used to specify, how an image or video element is positioned with x/y coordinates within its content box. It also controls the re...
[ { "code": null, "e": 35773, "s": 35745, "text": "\n23 Mar, 2022" }, { "code": null, "e": 36149, "s": 35773, "text": "This class accepts more than one value in tailwind CSS. All the properties are covered as in class form. It is the alternative to the CSS object-position property....
Java double Keyword
❮ Java Keywords double myNum = 19.99d; System.out.println(myNum); Try it Yourself » The double keyword is a data type that can store fractional numbers from 1.7e−308 to 1.7e+308. Note that you should end the value with a "d": Read more about data types in our Java Data Types Tutorial. ❮ Java Keywords We just laun...
[ { "code": null, "e": 18, "s": 0, "text": "\n❮ Java Keywords\n" }, { "code": null, "e": 69, "s": 18, "text": "double myNum = 19.99d;\nSystem.out.println(myNum);\n" }, { "code": null, "e": 89, "s": 69, "text": "\nTry it Yourself »\n" }, { "code": null, ...
How to iterate through a tuple in Python?
There are different ways to iterate through a tuple object. The for statement in Python has a variant which traverses a tuple till it is exhausted. It is equivalent to foreach statement in Java. Its syntax is − for var in tuple: stmt1 stmt2 Following script will print all items in the list T = (10,20,30,40,50) for var ...
[ { "code": null, "e": 1273, "s": 1062, "text": "There are different ways to iterate through a tuple object. The for statement in Python has a variant which traverses a tuple till it is exhausted. It is equivalent to foreach statement in Java. Its syntax is −" }, { "code": null, "e": 1303,...