title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to run SQL script in MySQL?
To run SQL script in MySQL, use the MySQL workbench. First, you need to open MySQL workbench. The snapshot is as follows − Now, File -> Open SQL Script to open the SQL script. Alternatively, use the following shortcut key − Ctrl+Shift+O After that an option would be visible for you to choose your .sql file from the dis...
[ { "code": null, "e": 1156, "s": 1062, "text": "To run SQL script in MySQL, use the MySQL workbench. First, you need to open MySQL workbench." }, { "code": null, "e": 1185, "s": 1156, "text": "The snapshot is as follows −" }, { "code": null, "e": 1238, "s": 1185, ...
5 Best Python Project Ideas With Full Code Snippets And Useful Links! | by Bharath K | Towards Data Science
Python is an exceptional programming language for users ranging from beginners to advanced. It is emerging out as an extremely popular language, and also the most talked-about coding language today thanks to its flexibility. The coding language python is not only easy to learn and implement but also provides a wide div...
[ { "code": null, "e": 397, "s": 172, "text": "Python is an exceptional programming language for users ranging from beginners to advanced. It is emerging out as an extremely popular language, and also the most talked-about coding language today thanks to its flexibility." }, { "code": null, ...
How to return a value from a JavaScript function?
To return a value from a JavaScript function, use the return statement in JavaScript. You need to run the following code to learn how to return a value − <html> <head> <script> function concatenate(name, age) { var val; val = name + age; return val; } ...
[ { "code": null, "e": 1216, "s": 1062, "text": "To return a value from a JavaScript function, use the return statement in JavaScript. You need to run the following code to learn how to return a value −" }, { "code": null, "e": 1761, "s": 1216, "text": "<html>\n <head>\n <sc...
DAX Filter - ALLEXCEPT function
Removes all context filters in the table except filters that have been applied to the specified columns. ALLEXCEPT (<table>, <column>, [<column>] ...) table The table over which all context filters are removed, except filters on those columns that are specified in subsequent arguments. column One or more columns that...
[ { "code": null, "e": 2106, "s": 2001, "text": "Removes all context filters in the table except filters that have been applied to the specified columns." }, { "code": null, "e": 2154, "s": 2106, "text": "ALLEXCEPT (<table>, <column>, [<column>] ...) \n" }, { "code": null, ...
Why and how are Python functions hashable?
31 Aug, 2020 So start with the question i.e. Why and how are Python functions hashable? First, one should know what actually hashable means in Python. So, hashable is a feature of Python objects that tells if the object has a hash value or not. If the object has a hash value then it can be used as a key for a dictionar...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 Aug, 2020" }, { "code": null, "e": 388, "s": 52, "text": "So start with the question i.e. Why and how are Python functions hashable? First, one should know what actually hashable means in Python. So, hashable is a feature of Python ...
Sorting Big Integers
21 Apr, 2022 Given a array of n positive integers where each integer can have digits upto 106, print the array elements in ascending order. Input: arr[] = {54, 724523015759812365462, 870112101220845, 8723} Output: 54 8723 870112101220845 724523015759812365462 Explanation: All elements of array are sorted in non-desc...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Apr, 2022" }, { "code": null, "e": 183, "s": 54, "text": "Given a array of n positive integers where each integer can have digits upto 106, print the array elements in ascending order. " }, { "code": null, "e": 579, ...
R – Data Types
23 Feb, 2022 Each variable in R has an associated data type. Each data type requires different amounts of memory and has some specific operations which can be performed over it. R Programming language has the following basic data types and the following table shows the data type and the values that each data type can t...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Feb, 2022" }, { "code": null, "e": 340, "s": 28, "text": "Each variable in R has an associated data type. Each data type requires different amounts of memory and has some specific operations which can be performed over it. R Programm...
Find the length of a JavaScript object
26 Jul, 2021 Method 1: Using the Object.keys() method: The Object.keys() method is used to return the object property name as an array. The length property is used to get the number of keys present in the object. It gives the length of the object. Syntax: objectLength = Object.keys(exampleObject).length Example: <!DOCT...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jul, 2021" }, { "code": null, "e": 263, "s": 28, "text": "Method 1: Using the Object.keys() method: The Object.keys() method is used to return the object property name as an array. The length property is used to get the number of key...
Lodash _.union() Method
01 Sep, 2020 The _.union() method is used to take n number of arrays and creates an array of unique values in order, from all given arrays using SameValueZero for equality comparisons. Syntax: _.union(*arrays) Parameters: This method accepts a single parameter as mentioned above and described below: arrays: This param...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Sep, 2020" }, { "code": null, "e": 200, "s": 28, "text": "The _.union() method is used to take n number of arrays and creates an array of unique values in order, from all given arrays using SameValueZero for equality comparisons." ...
ReactJS Portals
31 Mar, 2021 React portals come up with a way to render children into a DOM node that occurs outside the DOM hierarchy of the parent component. The portals were introduced in React 16.0 version. So far we were having one DOM element in the HTML into which we were mounting our react application, i.e., the root element o...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Mar, 2021" }, { "code": null, "e": 210, "s": 28, "text": "React portals come up with a way to render children into a DOM node that occurs outside the DOM hierarchy of the parent component. The portals were introduced in React 16.0 ve...
Set of Vectors in C++ STL with Examples
17 Mar, 2020 Set in STL Sets are a type of associative containers in which each element has to be unique, because the value of the element identifies it. The value of the element cannot be modified once it is added to the set, though it is possible to remove and add the modified value of that element. Vector in STL Vec...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Mar, 2020" }, { "code": null, "e": 344, "s": 54, "text": "Set in STL Sets are a type of associative containers in which each element has to be unique, because the value of the element identifies it. The value of the element cannot b...
\shoveleft - Tex Command
\shoveleft - Used for forces flush left typesetting in a \multline or \multline* environment. { \shoveleft } \shoveleft command is used for forces flush left typesetting in a \multline or \multline* environment. \begin{multline} (a+b+c+d)^2 \\ + (e+f)^2 + (g+h)^2 + (i+j)^2 + (k+l)^2 \\ + (m+n)^2 + (o+p)^2 + (q+r)^2 ...
[ { "code": null, "e": 8215, "s": 8120, "text": "\\shoveleft - Used for forces flush left typesetting in a \\multline or \\multline* environment." }, { "code": null, "e": 8230, "s": 8215, "text": "{ \\shoveleft }" }, { "code": null, "e": 8334, "s": 8230, "text"...
Java Program to Reverse a Number & Check if it is a Palindrome
04 Nov, 2020 Given number can be said palindromic in nature if the reverse of the given number is the same as that of a given number. Length of number is log10(n), i.e. For BigIntegers using string operation like creation reverse and check palindrome will take log10(n) time. A. Number under Java int limit Example : ...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Nov, 2020" }, { "code": null, "e": 316, "s": 52, "text": "Given number can be said palindromic in nature if the reverse of the given number is the same as that of a given number. Length of number is log10(n), i.e. For BigIntegers us...
Flutter – ListTile Widget
14 Jun, 2022 ListTile widget is used to populate a ListView in Flutter. It contains title as well as leading or trailing icons. Let’s understand this with the help of an example. ListTile({Key key, Widget leading, Widget title, Widget subtitle, Widget trailing, bool isThree...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Jun, 2022" }, { "code": null, "e": 218, "s": 52, "text": "ListTile widget is used to populate a ListView in Flutter. It contains title as well as leading or trailing icons. Let’s understand this with the help of an example." }, ...
Python – Itertools Combinations() function
22 Feb, 2020 Itertool is a module of Python which is used to creation of iterators which helps us in efficient looping in terms of space as well as time. This module helps us to solve complex problems easily with the help of different sub-functions of itertools. The different sub-functions are divided into 3 subgroups ...
[ { "code": null, "e": 53, "s": 25, "text": "\n22 Feb, 2020" }, { "code": null, "e": 372, "s": 53, "text": "Itertool is a module of Python which is used to creation of iterators which helps us in efficient looping in terms of space as well as time. This module helps us to solve com...
Merge two Pandas DataFrames with complex conditions
07 Apr, 2021 In this article, we let’s discuss how to merge two Pandas Dataframe with some complex conditions. Dataframes in Pandas can be merged using pandas.merge() method. Syntax: pandas.merge(parameters) Returns : A DataFrame of the two merged objects. While working on datasets there may be a need to merge two data...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Apr, 2021" }, { "code": null, "e": 190, "s": 28, "text": "In this article, we let’s discuss how to merge two Pandas Dataframe with some complex conditions. Dataframes in Pandas can be merged using pandas.merge() method." }, { ...
Software Engineering | Iterative Waterfall Model
29 Sep, 2021 In a practical software development project, the classical waterfall model is hard to use. So, the Iterative waterfall model can be thought of as incorporating the necessary changes to the classical waterfall model to make it usable in practical software development projects. It is almost the same as the c...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Sep, 2021" }, { "code": null, "e": 470, "s": 52, "text": "In a practical software development project, the classical waterfall model is hard to use. So, the Iterative waterfall model can be thought of as incorporating the necessary ...
MongoDB $concat Operator
01 Aug, 2020 MongoDB provides different types of string expression operators that are used in the aggregation pipeline stages $concat operator is one of them. This operator is used to concatenate two or more strings and returns a single string. Syntax: { $concat: [ <expression1>, <expression2>, ... ] } Here, the arg...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Aug, 2020" }, { "code": null, "e": 260, "s": 28, "text": "MongoDB provides different types of string expression operators that are used in the aggregation pipeline stages $concat operator is one of them. This operator is used to conc...
How to encrypt and decrypt passwords using PHP ?
31 Jul, 2021 The best way to encrypt and decrypt passwords is to use a standard library in PHP because the method of properly encrypting and decrypting passwords from scratch is complex and involves multiple possibilities of security vulnerabilities. Using the standard library ensures that the hashing implementation is...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2021" }, { "code": null, "e": 358, "s": 28, "text": "The best way to encrypt and decrypt passwords is to use a standard library in PHP because the method of properly encrypting and decrypting passwords from scratch is complex an...
How to validate an IP address using ReGex
07 Jun, 2022 Given an IP address, the task is to validate this IP address with the help of Regex (Regular Expression) in C++ as a valid IPv4 address or IPv6 address. If the IP address is not valid then print an invalid IP address. Examples: Input: str = “203.120.223.13” Output: Valid IPv4 Input: str = “000.12.234.23.2...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2022" }, { "code": null, "e": 246, "s": 28, "text": "Given an IP address, the task is to validate this IP address with the help of Regex (Regular Expression) in C++ as a valid IPv4 address or IPv6 address. If the IP address is n...
Difference Between GIT and SVN
21 Jun, 2022 GIT: Git is an open-source distributed version control system developed by Linus Torvalds in 2005. Its emphasis on speed and data integrity in which there is no centralized connectivity is needed. It is powerful and cheap branching with easy merge in which each developer has his repository and have a local...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 497, "s": 52, "text": "GIT: Git is an open-source distributed version control system developed by Linus Torvalds in 2005. Its emphasis on speed and data integrity in which there is no centralized c...
ML | Training Image Classifier using Tensorflow Object Detection API
28 Oct, 2019 This article aims to learn how to build an object detector using Tensorflow’s object detection API. Requirement : Python Programming Basics of Machine Learning Basics of neural networks (Not Mandatory) An enthusiasm to build a Cool project(Mandatory) :p Even though if you don’t have the first three essenti...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Oct, 2019" }, { "code": null, "e": 154, "s": 54, "text": "This article aims to learn how to build an object detector using Tensorflow’s object detection API." }, { "code": null, "e": 168, "s": 154, "text": "Requi...
The New Era of App – Intelligent Apps
17 Dec, 2021 From the early 2000s, a series of development and modification into the existing mobile phones carved the smartphone that we all use today. It is capable of doing many of our tasks hence making it an essential component in our lives. With smartphones, apps come into existence that programs to perform a spe...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Dec, 2021" }, { "code": null, "e": 783, "s": 28, "text": "From the early 2000s, a series of development and modification into the existing mobile phones carved the smartphone that we all use today. It is capable of doing many of our ...
Impala - Group By Clause
The Impala GROUP BY clause is used in collaboration with the SELECT statement to arrange identical data into groups. Following is the syntax of the GROUP BY clause. select data from table_name Group BY col_name; Assume we have a table named customers in the database my_db and its contents are as follows − [quickstart....
[ { "code": null, "e": 2402, "s": 2285, "text": "The Impala GROUP BY clause is used in collaboration with the SELECT statement to arrange identical data into groups." }, { "code": null, "e": 2450, "s": 2402, "text": "Following is the syntax of the GROUP BY clause." }, { "co...
Android - Single Fragments
Single Frame Fragment Single frame fragment is designed for small screen devices such as hand hold devices(mobiles) and it should be above android 3.0 version. This example will explain you how to create your own Fragments. Here we will create two fragments and one of them will be used when device is in landscape mode ...
[ { "code": null, "e": 3629, "s": 3607, "text": "Single Frame Fragment" }, { "code": null, "e": 3767, "s": 3629, "text": "Single frame fragment is designed for small screen devices such as hand hold devices(mobiles) and it should be above android 3.0 version." }, { "code": ...
How to change background color of Tkinter OptionMenu widget? - GeeksforGeeks
16 Mar, 2021 Prerequisites: Tkinter While creating GUI applications, there occur various instances in which you need to make selections among various options available. For making such choices, the Option Menu widget was introduced. In this article, we will be discussing the procedure of changing menu background color ...
[ { "code": null, "e": 25673, "s": 25645, "text": "\n16 Mar, 2021" }, { "code": null, "e": 25696, "s": 25673, "text": "Prerequisites: Tkinter" }, { "code": null, "e": 26014, "s": 25696, "text": "While creating GUI applications, there occur various instances in w...
Program to find sum of series 1*2*3 + 2*3*4+ 3*4*5 + . . . + n*(n+1)*(n+2) - GeeksforGeeks
25 Mar, 2021 Given a positive integer n and the task is to find the sum of series 1*2*3 + 2*3*4 + 4*5*6 + . . .+ n*(n+1)*(n+2).Examples: Input : n = 10 Output : 4290 1*2*3 + 2*3*4 + 3*4*5 + 4*5*6 + 5*6*7 + 6*7*8 + 7*8*9 + 8*9*10 + 9*10*11 + 10*11*12 = 6 + 24 + 60 + 120 + 210 + 336 + 504 + 720 + 990 + 1320...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n25 Mar, 2021" }, { "code": null, "e": 26197, "s": 26071, "text": "Given a positive integer n and the task is to find the sum of series 1*2*3 + 2*3*4 + 4*5*6 + . . .+ n*(n+1)*(n+2).Examples: " }, { "code": null, "e": ...
Maximum sum rectangle in a 2D matrix | DP-27 - GeeksforGeeks
11 Nov, 2021 Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with blue rectangle and sum of this subarray is 29. This problem is mainly an extension of Largest Sum Contiguous Subarray for 1D array. The Naive Solution for this probl...
[ { "code": null, "e": 25290, "s": 25262, "text": "\n11 Nov, 2021" }, { "code": null, "e": 25477, "s": 25290, "text": "Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with blue rectangle and sum ...
How to extract extension from a filename using PHP ? - GeeksforGeeks
06 Dec, 2021 In this article, we will see how to extract the filename extension in PHP, along with understanding their implementation through the examples. There are a few different ways to extract the extension from a filename with PHP, which is given below: Using pathinfo() function: This function returns information...
[ { "code": null, "e": 32677, "s": 32649, "text": "\n06 Dec, 2021" }, { "code": null, "e": 32924, "s": 32677, "text": "In this article, we will see how to extract the filename extension in PHP, along with understanding their implementation through the examples. There are a few diff...
How to invoke the Chrome browser in Selenium with python?
We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package. For invoking chrome browser, we have to select the Chrome class. Then cre...
[ { "code": null, "e": 1309, "s": 1062, "text": "We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package." }, ...
Node.js fs.writeFile() Method - GeeksforGeeks
11 Oct, 2021 The fs.writeFile() method is used to asynchronously write the specified data to a file. By default, the file would be replaced if it exists. The ‘options’ parameter can be used to modify the functionality of the method. Syntax: fs.writeFile( file, data, options, callback ) Parameters: This method accept fo...
[ { "code": null, "e": 25819, "s": 25791, "text": "\n11 Oct, 2021" }, { "code": null, "e": 26039, "s": 25819, "text": "The fs.writeFile() method is used to asynchronously write the specified data to a file. By default, the file would be replaced if it exists. The ‘options’ paramete...
Matplotlib.pyplot.margins() function in Python - GeeksforGeeks
03 Jan, 2021 Prerequisites: Matplotlib Matplotlib.pyplot.margins() is a function used to set the margins of the x and y axes. All input parameters must be a float that too within the range [0, 1]. We cannot pass both positional and keyword arguments at once as that will raise a TypeError. The padding added to each limi...
[ { "code": null, "e": 25581, "s": 25553, "text": "\n03 Jan, 2021" }, { "code": null, "e": 25607, "s": 25581, "text": "Prerequisites: Matplotlib" }, { "code": null, "e": 26065, "s": 25607, "text": "Matplotlib.pyplot.margins() is a function used to set the margin...
Lodash _.forIn() Method - GeeksforGeeks
14 Sep, 2020 The Lodash _.forIn() Method Iterates over keys and values of the given object and invokes iteratee function for each property. The iteratee is invoked with three arguments: (value, key, object). Iteratee functions may exit iteration early by explicitly returning false. Syntax: _.forIn( object, iteratee_fun...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n14 Sep, 2020" }, { "code": null, "e": 26815, "s": 26545, "text": "The Lodash _.forIn() Method Iterates over keys and values of the given object and invokes iteratee function for each property. The iteratee is invoked with three a...
How to merge two PHP objects? - GeeksforGeeks
15 Nov, 2021 Given two objects of same class and the task is to merge both objects into single object.Approach 1: Convert object into data array and merge them using array_merge() function and convert this merged array back into object of class stdClass.Note: While merging the objects using array_merge(), elements of a...
[ { "code": null, "e": 32677, "s": 32649, "text": "\n15 Nov, 2021" }, { "code": null, "e": 33266, "s": 32677, "text": "Given two objects of same class and the task is to merge both objects into single object.Approach 1: Convert object into data array and merge them using array_merg...
Python program to find the sum of dictionary keys - GeeksforGeeks
01 Oct, 2020 Given a dictionary with integer keys. The task is to find the sum of all the keys. Examples: Input : test_dict = {3 : 4, 9 : 10, 15 : 10, 5 : 7} Output : 32 Explanation : 3 + 9 + 15 + 5 = 32, sum of keys. Input : test_dict = {3 : 4, 9 : 10, 15 : 10} Output : 27 Explanation : 3 + 9 + 15 = 27, sum of ke...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n01 Oct, 2020" }, { "code": null, "e": 25620, "s": 25537, "text": "Given a dictionary with integer keys. The task is to find the sum of all the keys." }, { "code": null, "e": 25630, "s": 25620, "text": "Example...
Dynamic CheckedTextView in Kotlin - GeeksforGeeks
18 Feb, 2021 CheckedTextView is used to implement checkable interface where one can tick or check the needed or required items and leave out the rest.In this article, we will be discussing how to make a CheckedTextView dynamically or programmatically. The first step is to make or create a project in Android Studio. Her...
[ { "code": null, "e": 26381, "s": 26353, "text": "\n18 Feb, 2021" }, { "code": null, "e": 26620, "s": 26381, "text": "CheckedTextView is used to implement checkable interface where one can tick or check the needed or required items and leave out the rest.In this article, we will b...
Maximum points of intersection n circles - GeeksforGeeks
17 Dec, 2021 Given a number n, we need to find the maximum number of times n circles intersect. Examples: Input : n = 2 Output : 2 Input : n = 3 Output : 6 As we can see in above diagram, for each pair of circles, there can be maximum two intersection points. Therefore if we have n circles then there can be nC2 pai...
[ { "code": null, "e": 26721, "s": 26693, "text": "\n17 Dec, 2021" }, { "code": null, "e": 26804, "s": 26721, "text": "Given a number n, we need to find the maximum number of times n circles intersect." }, { "code": null, "e": 26815, "s": 26804, "text": "Example...
Design Dragon's World Game using HTML CSS and JavaScript - GeeksforGeeks
14 Dec, 2020 Project Introduction: “Dragon’s World” is a game in which one dragon tries to save itself from the other dragon by jumping over the dragon which comes in its way. The score is updated when one dragon saves himself from the other dragon. The project will contain HTML, CSS and JavaScript files. The HTML fil...
[ { "code": null, "e": 26647, "s": 26619, "text": "\n14 Dec, 2020" }, { "code": null, "e": 26885, "s": 26647, "text": "Project Introduction: “Dragon’s World” is a game in which one dragon tries to save itself from the other dragon by jumping over the dragon which comes in its way. ...
PyQt5 - QDial - GeeksforGeeks
07 Jul, 2020 QDial is a class in PyQt5 which provide user to select the value within a program-definable range, and the range either wraps around (for example, with angles measured from 0 to 359 degrees). Also, it can be used to show the current value in a similar way of speedometer. Below is how the QDial looks like E...
[ { "code": null, "e": 25562, "s": 25534, "text": "\n07 Jul, 2020" }, { "code": null, "e": 25868, "s": 25562, "text": "QDial is a class in PyQt5 which provide user to select the value within a program-definable range, and the range either wraps around (for example, with angles meas...
HTML | readonly Attribute - GeeksforGeeks
25 Mar, 2020 It is a Boolean attribute that is used to specify that the text written in input or text area Element is read-only. It means that a user can not modify or changes a content already present in a particular Element (However, a user can tab to it, highlight it, and copy the text from it). Whereas a JavaScript...
[ { "code": null, "e": 25076, "s": 25048, "text": "\n25 Mar, 2020" }, { "code": null, "e": 25461, "s": 25076, "text": "It is a Boolean attribute that is used to specify that the text written in input or text area Element is read-only. It means that a user can not modify or changes ...
Connect MySQL database using MySQL-Connector Python - GeeksforGeeks
13 Sep, 2021 While working with Python we need to work with databases, they may be of different types like MySQL, SQLite, NoSQL, etc. In this article, we will be looking forward to how to connect MySQL databases using MySQL Connector/Python.MySQL Connector module of Python is used to connect MySQL databases with the Py...
[ { "code": null, "e": 42675, "s": 42647, "text": "\n13 Sep, 2021" }, { "code": null, "e": 43132, "s": 42675, "text": "While working with Python we need to work with databases, they may be of different types like MySQL, SQLite, NoSQL, etc. In this article, we will be looking forwar...
Minimum number of given operations required to convert a string to another string - GeeksforGeeks
28 May, 2021 Given two strings S and T of equal length. Both strings contain only the characters ‘0’ and ‘1’. The task is to find the minimum number of operations to convert string S to T. There are 2 types of operations allowed on string S: Swap any two characters of the string. Replace a ‘0’ with a ‘1’ or vice versa...
[ { "code": null, "e": 26191, "s": 26163, "text": "\n28 May, 2021" }, { "code": null, "e": 26421, "s": 26191, "text": "Given two strings S and T of equal length. Both strings contain only the characters ‘0’ and ‘1’. The task is to find the minimum number of operations to convert st...
Strings in C
09 Dec, 2020 Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’. Declaration of strings: Declaring a string is as simple as declaring a one-dimensional array. Below is the basic syntax for declaring a string. cha...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Dec, 2020" }, { "code": null, "e": 212, "s": 52, "text": "Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\\0’." }, { ...
numpy.diag() in Python
09 Mar, 2022 numpy.diag(a, k=0) : Extracts and construct a diagonal array Parameters : a : array_like k : [int, optional, 0 by default] Diagonal we require; k>0 means diagonal above main diagonal or vice versa. Returns : ndarray Python # Python Programming illustrating# numpy.diag method import numpy as g...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Mar, 2022" }, { "code": null, "e": 103, "s": 28, "text": "numpy.diag(a, k=0) : Extracts and construct a diagonal array Parameters : " }, { "code": null, "e": 238, "s": 103, "text": "a : array_like \nk : [int, opti...
JavaFX | AnchorPane Class
11 Sep, 2018 AnchorPane class is a part of JavaFX. AnchorPane allows the edges of child nodes to be anchored to an offset from the anchor pane’s edges. If the anchor pane has a border and/or padding set, the offsets will be measured from the inside edge of those insets. AnchorPane inherits Pane class. Constructors of t...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Sep, 2018" }, { "code": null, "e": 318, "s": 28, "text": "AnchorPane class is a part of JavaFX. AnchorPane allows the edges of child nodes to be anchored to an offset from the anchor pane’s edges. If the anchor pane has a border and/...
How can we find the employees from MySQL table whose age is greater than say 30 years, providing the only date of birth on the table?
To understand this concept, we are using the data from table ‘emp_tbl’ as follows − mysql> Select * from emp_tbl; +--------+------------+ | Name | DOB | +--------+------------+ | Gaurav | 1984-01-17 | | Gaurav | 1990-01-17 | | Rahul | 1980-05-22 | | Gurdas | 1981-05-25 | | Naveen | 1991-04-25 | | Sohan | 198...
[ { "code": null, "e": 1271, "s": 1187, "text": "To understand this concept, we are using the data from table ‘emp_tbl’ as follows −" }, { "code": null, "e": 2161, "s": 1271, "text": "mysql> Select * from emp_tbl;\n+--------+------------+\n| Name | DOB |\n+--------+-------...
How to use :: Namespace Alias Qualifier in C#
06 Mar, 2019 Namespace Alias Qualifier(::) makes the use of alias name in place of longer namespace and it provides a way to avoid ambiguous definitions of the classes. It is always positioned between two identifiers. The qualifier looks like two colons(::) with an alias name and the class name. It can be global. Thus ...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Mar, 2019" }, { "code": null, "e": 416, "s": 28, "text": "Namespace Alias Qualifier(::) makes the use of alias name in place of longer namespace and it provides a way to avoid ambiguous definitions of the classes. It is always positi...
How to combine two vectors in R ?
05 Apr, 2021 In this article, we will learn how to combine two vectors in R Programming Language. We can combine two or more vectors using function c() itself. While using function c() All arguments are coerced to a common type which is the type of the returned value. Syntax: c(...) Parameters: ...: arguments to be com...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Apr, 2021" }, { "code": null, "e": 284, "s": 28, "text": "In this article, we will learn how to combine two vectors in R Programming Language. We can combine two or more vectors using function c() itself. While using function c() All...
Print bitwise AND set of a number N
03 May, 2021 Given a number N, print all the numbers which are a bitwise AND set of the binary representation of N. Bitwise AND set of a number N is all possible numbers x smaller than or equal N such that N & i is equal to x for some number i. Examples : Input : N = 5 Output : 0, 1, 4, 5 Explanation: 0 & 5 = 0 ...
[ { "code": null, "e": 54, "s": 26, "text": "\n03 May, 2021" }, { "code": null, "e": 287, "s": 54, "text": "Given a number N, print all the numbers which are a bitwise AND set of the binary representation of N. Bitwise AND set of a number N is all possible numbers x smaller than or...
Count of Unique elements in a very large sorted Array
28 Feb, 2022 Given a sorted array arr[] of size N, the task is to find the number of unique elements in this array. Note: The array is very large, and unique numbers are significantly less. i.e., (unique elements <<size of the array). Examples: Input: arr[] = {1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 5, 5, 7, 7, 8, 8, 9, 9, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Feb, 2022" }, { "code": null, "e": 156, "s": 52, "text": "Given a sorted array arr[] of size N, the task is to find the number of unique elements in this array. " }, { "code": null, "e": 275, "s": 156, "text": "N...
Understanding constexpr Specifier in C++
03 Jun, 2022 constexpr is a feature added in C++ 11. The main idea is a performance improvement of programs by doing computations at compile time rather than run time. Note that once a program is compiled and finalized by the developer, it is run multiple times by users. The idea is to spend time in compilation and sav...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jun, 2022" }, { "code": null, "e": 576, "s": 52, "text": "constexpr is a feature added in C++ 11. The main idea is a performance improvement of programs by doing computations at compile time rather than run time. Note that once a pr...
Count of subarrays having exactly K distinct elements
20 Dec, 2021 Given an array arr[] of size N and an integer K. The task is to find the count of subarrays such that each subarray has exactly K distinct elements. Examples: Input: arr[] = {2, 1, 2, 1, 6}, K = 2 Output: 7 {2, 1}, {1, 2}, {2, 1}, {1, 6}, {2, 1, 2}, {1, 2, 1} and {2, 1, 2, 1} are the only valid subarrays. ...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Dec, 2021" }, { "code": null, "e": 201, "s": 52, "text": "Given an array arr[] of size N and an integer K. The task is to find the count of subarrays such that each subarray has exactly K distinct elements." }, { "code": nul...
How to dynamically insert id into table element using JavaScript ?
29 May, 2021 This article explains how to dynamically insert “id” into the table element. This can be done by simply looping over the tables and add “id”s dynamically. Syntax: The setAttribute() method adds the specified attribute to an element and gives the specified value.table.setAttribute("id", "Dynamically Generat...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 May, 2021" }, { "code": null, "e": 183, "s": 28, "text": "This article explains how to dynamically insert “id” into the table element. This can be done by simply looping over the tables and add “id”s dynamically." }, { "code"...
Single and Double Quotes | Python
14 Jul, 2019 Python string functions are very popular. There are two ways to represent strings in python. String is enclosed either with single quotes or double quotes. Both the ways (single or double quotes) are correct depending upon the requirement. Sometimes we have to use quotes (single or double quotes) together ...
[ { "code": null, "e": 53, "s": 25, "text": "\n14 Jul, 2019" }, { "code": null, "e": 476, "s": 53, "text": "Python string functions are very popular. There are two ways to represent strings in python. String is enclosed either with single quotes or double quotes. Both the ways (sin...
Converting Pandas Crosstab into Stacked DataFrame
11 Jan, 2022 In this article, we will discuss how to convert a pandas crosstab to a stacked dataframe. A stacked DataFrame is a multi-level index with one or more new inner levels as compared to the original DataFrame. If the columns have a single level, then the result is a series object. The panda’s crosstab functi...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jan, 2022" }, { "code": null, "e": 118, "s": 28, "text": "In this article, we will discuss how to convert a pandas crosstab to a stacked dataframe." }, { "code": null, "e": 308, "s": 118, "text": "A stacked DataFr...
Swipe to Delete and Undo in Android RecyclerView
05 Oct, 2021 We have seen many apps having a RecyclerView present in them and along with that, we have seen many functionalities in that RecyclerView for swipe to delete and many more. We have seen this type of feature in Gmail apps where we can swipe or item right or left to delete or add to the archive. In this artic...
[ { "code": null, "e": 53, "s": 25, "text": "\n05 Oct, 2021" }, { "code": null, "e": 487, "s": 53, "text": "We have seen many apps having a RecyclerView present in them and along with that, we have seen many functionalities in that RecyclerView for swipe to delete and many more. We...
rand vs normal in Numpy.random in Python
17 Nov, 2020 In this article, we will look into the principal difference between the Numpy.random.rand() method and the Numpy.random.normal() method in detail. About random: For random we are taking .rand()numpy.random.rand(d0, d1, ..., dn) :creates an array of specified shape andfills it with random values.Parameters ...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Nov, 2020" }, { "code": null, "e": 175, "s": 28, "text": "In this article, we will look into the principal difference between the Numpy.random.rand() method and the Numpy.random.normal() method in detail." }, { "code": null, ...
What is the syntax for input parameters (variables) in a MySQL query?
To set a variable in MySQL, you need to use the SET command. Following is the syntax: set @yourVariableName:=yourValue; select *from yourTableName where yourColumnName=@yourVariableName; Let us first create a table: mysql> create table DemoTable ( Id int, FirstName varchar(20), LastName varchar(20) ); Query OK...
[ { "code": null, "e": 1148, "s": 1062, "text": "To set a variable in MySQL, you need to use the SET command. Following is the syntax:" }, { "code": null, "e": 1249, "s": 1148, "text": "set @yourVariableName:=yourValue;\nselect *from yourTableName where yourColumnName=@yourVariable...
PySpark and SparkSQL Basics. How to implement Spark with Python... | by Pınar Ersoy | Towards Data Science
Python is revealed the Spark programming model to work with structured data by the Spark Python API which is called as PySpark. This post’s objective is to demonstrate how to run Spark with PySpark and execute common functions. Python programming language requires an installed IDE. The easiest way to use Python with An...
[ { "code": null, "e": 300, "s": 172, "text": "Python is revealed the Spark programming model to work with structured data by the Spark Python API which is called as PySpark." }, { "code": null, "e": 400, "s": 300, "text": "This post’s objective is to demonstrate how to run Spark w...
What is getContext in HTML5 Canvas?
The canvas element has a DOM method called getContext, used to obtain the rendering context and its drawing functions. This function takes one parameter, the type of context 2d. Following is the code to get required context along with a check if your browser supports <canvas> element: var canvas = document.getElementBy...
[ { "code": null, "e": 1240, "s": 1062, "text": "The canvas element has a DOM method called getContext, used to obtain the rendering context and its drawing functions. This function takes one parameter, the type of context 2d." }, { "code": null, "e": 1348, "s": 1240, "text": "Foll...
C++ Program to Perform Fermat Primality Test
Fermat Primality test performs to check a given number is prime or not. Here is a C++ code of this algorithm. Begin modulo(base, e, mod) a = 1 b = base while (e > 0) if (e mod 2 == 1) a = (a * b) % mod b = (b * b) % mod e = e / 2 return a % mod End Begin Fermat(ll ...
[ { "code": null, "e": 1172, "s": 1062, "text": "Fermat Primality test performs to check a given number is prime or not. Here is a C++ code of this algorithm." }, { "code": null, "e": 1607, "s": 1172, "text": "Begin\n modulo(base, e, mod)\n a = 1\n b = base\n while (e > 0)\...
C++ Program to Implement a Heuristic to Find the Vertex Cover of a Graph
Vertex Cover of a Graph is to find a set of vertices V, such that for every edge connecting M to N in graph, either M or N (or both) are present in V. In this program, we Implement a Heuristic to Find the Vertex Cover of a Graph. Begin 1) Initialize a set S as empty. 2) Take an edge E of the connecting graph Say ...
[ { "code": null, "e": 1292, "s": 1062, "text": "Vertex Cover of a Graph is to find a set of vertices V, such that for every edge connecting M to N in graph, either M or N (or both) are present in V. In this program, we Implement a Heuristic to Find the Vertex Cover of a Graph." }, { "code": n...
Bootstrap Dropdowns
A dropdown menu is a toggleable menu that allows the user to choose one value from a predefined list: HTML CSS JavaScript About Us The .dropdown class indicates a dropdown menu. To open the dropdown menu, use a button or a link with a class of .dropdown-toggle and the data-toggle="dropdown" attribute. The .caret cla...
[ { "code": null, "e": 103, "s": 0, "text": "A dropdown menu is a toggleable menu that allows the user to choose one value \nfrom a predefined list:" }, { "code": null, "e": 108, "s": 103, "text": "HTML" }, { "code": null, "e": 112, "s": 108, "text": "CSS" }, ...
How to Change Column Type in PySpark Dataframe ? - GeeksforGeeks
18 Jul, 2021 In this article, we are going to see how to change the column type of pyspark dataframe. Creating dataframe for demonstration: Python # Create a spark sessionfrom pyspark.sql import SparkSessionspark = SparkSession.builder.appName('SparkExamples').getOrCreate() # Create a spark dataframecolumns = ["Name",...
[ { "code": null, "e": 24238, "s": 24210, "text": "\n18 Jul, 2021" }, { "code": null, "e": 24327, "s": 24238, "text": "In this article, we are going to see how to change the column type of pyspark dataframe." }, { "code": null, "e": 24365, "s": 24327, "text": "C...
Inorder Traversal | Practice | GeeksforGeeks
Given a Binary Tree, find the In-Order Traversal of it. Example 1: Input: 1 / \ 3 2 Output: 3 1 2 Example 2: Input: 10 / \ 20 30 / \ / 40 60 50 Output: 40 20 60 10 50 30 Your Task: You don't need to read input or print anything. Your task is to complete...
[ { "code": null, "e": 282, "s": 226, "text": "Given a Binary Tree, find the In-Order Traversal of it." }, { "code": null, "e": 293, "s": 282, "text": "Example 1:" }, { "code": null, "e": 346, "s": 293, "text": "Input:\n 1\n / \\\n 3 2\nOutput: ...
Minimum Number of Jumps Problem
In this problem, a list of positive integers is given. Each integer is denoting that how many maximum steps that can be made from the current element. Starting from the first element, we have to find the minimum number of jumps to reach the end item of the list. For the dynamic programming approach, a jumps array is de...
[ { "code": null, "e": 1325, "s": 1062, "text": "In this problem, a list of positive integers is given. Each integer is denoting that how many maximum steps that can be made from the current element. Starting from the first element, we have to find the minimum number of jumps to reach the end item of ...
Apache IVY - Environment Setup
Apache Ivy needs Java and ANT installed on your machine as the only requirement. Apache Ant is distributed under the Apache Software License, a fully-fledged open source license certified by the open source initiative. The latest Apache Ant version, including its full-source code, class files, and documentation can be ...
[ { "code": null, "e": 2085, "s": 2004, "text": "Apache Ivy needs Java and ANT installed on your machine as the only requirement." }, { "code": null, "e": 2223, "s": 2085, "text": "Apache Ant is distributed under the Apache Software License, a fully-fledged open source license cert...
Building an Image Cartoonization Web App with Python | by Ruben Winastwan | Towards Data Science
As an avid street-photography person who spend almost every weekend wandering around the city to hunt some photos, Adobe Lightroom is always my go-to software to edit my raw photos to make it more “instagrammable”. This got me thinking, wouldn’t it be awesome if I can somehow create my own simple image editing software...
[ { "code": null, "e": 387, "s": 172, "text": "As an avid street-photography person who spend almost every weekend wandering around the city to hunt some photos, Adobe Lightroom is always my go-to software to edit my raw photos to make it more “instagrammable”." }, { "code": null, "e": 494...
C# program to check if all the values in a list that are greater than a given value
Let’s say you need to find the elements in the following list to be greater than 80. int[] arr = new int[] {55, 100, 87, 45}; For that, loop until the array length. Here, res = 80 i.e. the given element. for (int i = 0; i < arr.Length; i++) { if(arr[i]<res) { Console.WriteLine(arr[i]); } } The following is ...
[ { "code": null, "e": 1147, "s": 1062, "text": "Let’s say you need to find the elements in the following list to be greater than 80." }, { "code": null, "e": 1188, "s": 1147, "text": "int[] arr = new int[] {55, 100, 87, 45};" }, { "code": null, "e": 1266, "s": 1188...
Calendar setTime() Method in Java with Examples - GeeksforGeeks
06 Mar, 2019 The setTime(Date dt) method in Calendar class is used to set Calendars time represented by this Calendar’s time value, with the given or passed date as a parameter. Syntax: public final void setTime(Date dt)) Parameters: The method takes one parameter dt of Date type and refers to the given date that is to...
[ { "code": null, "e": 24149, "s": 24121, "text": "\n06 Mar, 2019" }, { "code": null, "e": 24314, "s": 24149, "text": "The setTime(Date dt) method in Calendar class is used to set Calendars time represented by this Calendar’s time value, with the given or passed date as a parameter...
JSON with Ajax
AJAX is Asynchronous JavaScript and XML, which is used on the client side as a group of interrelated web development techniques, in order to create asynchronous web applications. According to the AJAX model, web applications can send and retrieve data from a server asynchronously without interfering with the display an...
[ { "code": null, "e": 2137, "s": 1780, "text": "AJAX is Asynchronous JavaScript and XML, which is used on the client side as a group of interrelated web development techniques, in order to create asynchronous web applications. According to the AJAX model, web applications can send and retrieve data f...
Using Jupyter Notebook in Virtual Environments for Python Data Science Projects | by Christine Egan | Towards Data Science
This blog is part of a series of tutorials called Data in Day. Follow these tutorials to create your first end-to-end data science project in just one day. This is a fun easy project that will teach you the basics of setting up your computer for a data science project and introduce you to some of the most popular tools...
[ { "code": null, "e": 628, "s": 171, "text": "This blog is part of a series of tutorials called Data in Day. Follow these tutorials to create your first end-to-end data science project in just one day. This is a fun easy project that will teach you the basics of setting up your computer for a data sc...
Powershell - Regular Expression - Match Quantifiers
Following is the example of supported quantifiers in Windows PowerShell #Format: * #Logic Specifies zero or more matches; for example, \wor (abc). Equivalent # to {0,}. "abc" -match "\w*" #Format: + #Logic: Matches repeating instances of the preceding characters. "xyxyxy" -match "xy+" #Format: ? #Lo...
[ { "code": null, "e": 2106, "s": 2034, "text": "Following is the example of supported quantifiers in Windows PowerShell" }, { "code": null, "e": 2777, "s": 2106, "text": "#Format: *\n#Logic Specifies zero or more matches; for example, \\wor (abc). Equivalent\n# to {0,}...
Calculate interest amount by using formula in C language
Write a C program to calculate the deposited amount incremented after some years with interest The formula for calculating interest is − M=((r/100) * t); A=P*exp(M); Where r= rate of interest t=no. of years P=amount to be deposited M=temporary variable A= Final amount aft...
[ { "code": null, "e": 1157, "s": 1062, "text": "Write a C program to calculate the deposited amount incremented after some years with interest" }, { "code": null, "e": 1199, "s": 1157, "text": "The formula for calculating interest is −" }, { "code": null, "e": 1228, ...
How to list out the hidden files in a Directory using Java program?
The class named File of the java.io package represents a file or directory (path names) in the system. This class provides various methods to perform various operations on files/directories. The isHidden() method of the File class verifies weather the (abstract path of) file/directory represented by the current File ob...
[ { "code": null, "e": 1253, "s": 1062, "text": "The class named File of the java.io package represents a file or directory (path names) in the system. This class provides various methods to perform various operations on files/directories." }, { "code": null, "e": 1399, "s": 1253, ...
Full Stack Deep Learning Steps and Tools | by Haryo Akbarianto Wibowo | Towards Data Science
Hi everyone, How’s everything? Today, I’m going to write article about what I have learned from seeing the Full Stack Deep Learning (FSDL) March 2019 courses. It is a great online courses that tell us to do project with Full Stack Deep Learning. What I love the most is how they teach us a project and teach us not only ...
[ { "code": null, "e": 647, "s": 172, "text": "Hi everyone, How’s everything? Today, I’m going to write article about what I have learned from seeing the Full Stack Deep Learning (FSDL) March 2019 courses. It is a great online courses that tell us to do project with Full Stack Deep Learning. What I lo...
Jupyter Notebook in a AWS EC2 Instance using Docker Image | Towards Data Science
Most of the data science and machine learning professionals are in love with the Jupyter notebook. Barring few anomalies, most of the data science and machine learning works are happening in the cloud. So there is no option but to use Jupyter on the cloud. In my previous article, I explained how you can download the Ju...
[ { "code": null, "e": 429, "s": 172, "text": "Most of the data science and machine learning professionals are in love with the Jupyter notebook. Barring few anomalies, most of the data science and machine learning works are happening in the cloud. So there is no option but to use Jupyter on the cloud...
Get the Current Working Directory in Java
The method java.lang.System.getProperty() is used to obtain the system property. This system property is specified by the key which is the parameter for the method. To obtain the current working directory, the key used is user.dir. A program that demonstrates this is given as follows − Live Demo public class Demo { ...
[ { "code": null, "e": 1294, "s": 1062, "text": "The method java.lang.System.getProperty() is used to obtain the system property. This system property is specified by the key which is the parameter for the method. To obtain the current working directory, the key used is user.dir." }, { "code":...
JavaScript Number - valueOf()
This method returns the primitive value of the specified number object. Its syntax is as follows − number.valueOf() Returns the primitive value of the specified number object. Try the following example. <html> <head> <title>JavaScript valueOf() Method </title> </head> <body> <script type...
[ { "code": null, "e": 2538, "s": 2466, "text": "This method returns the primitive value of the specified number object." }, { "code": null, "e": 2565, "s": 2538, "text": "Its syntax is as follows −" }, { "code": null, "e": 2583, "s": 2565, "text": "number.value...
7 Tips To Write Clean And Better Code in 2020 - GeeksforGeeks
16 Dec, 2019 Software engineering is not just all about learning a language and building some software. As a software engineer or software developer, you are expected to write good software. So the question is what makes good software?. Good software can be judged by reading some piece of code written in the project. I...
[ { "code": null, "e": 24533, "s": 24505, "text": "\n16 Dec, 2019" }, { "code": null, "e": 24966, "s": 24533, "text": "Software engineering is not just all about learning a language and building some software. As a software engineer or software developer, you are expected to write ...
C# program to check if string is panagram or not
A pangram has all the 26 letters of an alphabet. Below, we have entered a string, and will check whether it is a pangram or not − string str = "The quick brown fox jumps over the lazy dog"; Now, check using the ToLower(), isLetter() and Count() functions that the string has all the 26 letters of not since pangram has a...
[ { "code": null, "e": 1111, "s": 1062, "text": "A pangram has all the 26 letters of an alphabet." }, { "code": null, "e": 1192, "s": 1111, "text": "Below, we have entered a string, and will check whether it is a pangram or not −" }, { "code": null, "e": 1252, "s": ...
QlikView - Dimensions and Measures
Dimensions and Measures are fundamental entities, which are always used in data analysis. For example, consider the result of the analysis, “what is the percentage change in volume of sales for each quarter?” In this case, each quarter represents the Dimensions, which is the name of the quarter. The percentage change i...
[ { "code": null, "e": 3404, "s": 2920, "text": "Dimensions and Measures are fundamental entities, which are always used in data analysis. For example, consider the result of the analysis, “what is the percentage change in volume of sales for each quarter?” In this case, each quarter represents the Di...
3-Way Radix Quicksort in Java - GeeksforGeeks
28 Jan, 2022 Basically, as the name suggests that 3-Way Radix Quicksort is a combination of both radix and 3-way quicksort. It is a hybrid sort which is in between of both radix and 3-way quicksort. This algorithm is mainly used to sort strings. The main idea behind the radix sort is to use the digits (beginning from L...
[ { "code": null, "e": 23894, "s": 23866, "text": "\n28 Jan, 2022" }, { "code": null, "e": 24127, "s": 23894, "text": "Basically, as the name suggests that 3-Way Radix Quicksort is a combination of both radix and 3-way quicksort. It is a hybrid sort which is in between of both radi...
PHP - Function openssl_public_encrypt()
The openssl_public_encrypt() function will encrypt the data with public key. Using function openssl_public_encrypt() the data will be encrypted and it can be decrypted using openssl_private_decrypt(). openssl_public_encrypt ( string $data , string &$crypted , mixed $key [, int $padding = OPENSSL_PKCS1_PADDING ] ) : boo...
[ { "code": null, "e": 2834, "s": 2757, "text": "The openssl_public_encrypt() function will encrypt the data with public key." }, { "code": null, "e": 2958, "s": 2834, "text": "Using function openssl_public_encrypt() the data will be encrypted and it can be decrypted using openssl_...
Adding Glitches to Images using Python - GeeksforGeeks
08 Sep, 2021 One of the filters currently popular is to add random glitches to the images. These create a random effect that comes out to be a natural glitch. Usually, glitches are introduced by the corruption of frames of images or adding a layer over them. In this article, we will use the two different modules of Pyt...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n08 Sep, 2021" }, { "code": null, "e": 24633, "s": 24292, "text": "One of the filters currently popular is to add random glitches to the images. These create a random effect that comes out to be a natural glitch. Usually, glitches...
Flask – Static Files
A web application often requires a static file such as a javascript file or a CSS file supporting the display of a web page. Usually, the web server is configured to serve them for you, but during the development, these files are served from static folder in your package or next to your module and it will be available ...
[ { "code": null, "e": 2384, "s": 2033, "text": "A web application often requires a static file such as a javascript file or a CSS file supporting the display of a web page. Usually, the web server is configured to serve them for you, but during the development, these files are served from static fold...
How to find all the foreign keys of a DB2 table TAB1?
The foreign key of a DB2 table can be found using SYSIBM.SYSFOREIGNKEYS table and SYSIBM.SYSRELS table. The SYSFOREIGNKEYS is a DB2 system table which contains one row for every column of every foreign key. The SYSRELS table contains details about the referential constraints. In order to find out the foreign key(s) of ...
[ { "code": null, "e": 1425, "s": 1062, "text": "The foreign key of a DB2 table can be found using SYSIBM.SYSFOREIGNKEYS table and SYSIBM.SYSRELS table. The SYSFOREIGNKEYS is a DB2 system table which contains one row for every column of every foreign key. The SYSRELS table contains details about the r...
Mining Twitter Data for Sentiment Analysis of Events | by Sanket Gupta | Towards Data Science
Twitter is a rich source for information. From minute-to-minute trends to general discussions around topics, Twitter is a great source of data for a project. Also, Twitter has built an amazing API for developers to use this data. Could we track an event and see what people are thinking? Is it possible to run sentiment ...
[ { "code": null, "e": 750, "s": 172, "text": "Twitter is a rich source for information. From minute-to-minute trends to general discussions around topics, Twitter is a great source of data for a project. Also, Twitter has built an amazing API for developers to use this data. Could we track an event a...
JavaScript Number toFixed( ) Method - GeeksforGeeks
22 Dec, 2021 Below is the example of the Number toFixed( ) Method. Example:<script type="text/javascript"> var test=213.73145; document.write(test.toFixed(1)); </script> <script type="text/javascript"> var test=213.73145; document.write(test.toFixed(1)); </script> Output:213.7 213.7 The to...
[ { "code": null, "e": 24960, "s": 24932, "text": "\n22 Dec, 2021" }, { "code": null, "e": 25014, "s": 24960, "text": "Below is the example of the Number toFixed( ) Method." }, { "code": null, "e": 25132, "s": 25014, "text": "Example:<script type=\"text/javascri...
Two cool features of Python NumPy: Mutating by slicing and Broadcasting | by Tirthajyoti Sarkar | Towards Data Science
It turns out that if you use simple slicing/indexing with NumPy to create a sub-array, the sub-array actually points to the main array. Simply put, the in-memory diagram looks like, Therefore, if the sliced array is changed, it affects the parent array too. This could be a useful feature to propagate the desired chain ...
[ { "code": null, "e": 354, "s": 172, "text": "It turns out that if you use simple slicing/indexing with NumPy to create a sub-array, the sub-array actually points to the main array. Simply put, the in-memory diagram looks like," }, { "code": null, "e": 804, "s": 354, "text": "Ther...
The Bechdel Test: Analyzing gender disparity in Hollywood | by Natassha Selvaraj | Towards Data Science
What is the Bechdel test? The Bechdel test is named after cartoonist Alison Bechdel, who introduced the idea in a comic strip in the year 1985. To pass the test, a story needs to have: At least two women The women need to talk to each other They need to talk to each other about something other than a man I first heard ...
[ { "code": null, "e": 197, "s": 171, "text": "What is the Bechdel test?" }, { "code": null, "e": 356, "s": 197, "text": "The Bechdel test is named after cartoonist Alison Bechdel, who introduced the idea in a comic strip in the year 1985. To pass the test, a story needs to have:" ...
PL/SQL - Records
In this chapter, we will discuss Records in PL/SQL. A record is a data structure that can hold data items of different kinds. Records consist of different fields, similar to a row of a database table. For example, you want to keep track of your books in a library. You might want to track the following attributes about ...
[ { "code": null, "e": 2266, "s": 2065, "text": "In this chapter, we will discuss Records in PL/SQL. A record is a data structure that can hold data items of different kinds. Records consist of different fields, similar to a row of a database table." }, { "code": null, "e": 2604, "s": ...
How can I create a dropdown menu from a List in Tkinter?
Let us suppose we want to create a dropdown menu of a list in an application using tkinter. In this case, we can use the Tkinter OptionMenu(win, menu_to_set, options) function. First, we will instantiate an object of StringVar(), then we will set the initial value of the dropdown menu. We will create the dropdown menu ...
[ { "code": null, "e": 1239, "s": 1062, "text": "Let us suppose we want to create a dropdown menu of a list in an application using tkinter. In this case, we can use the Tkinter OptionMenu(win, menu_to_set, options) function." }, { "code": null, "e": 1503, "s": 1239, "text": "First...
Collapsible Pane in Tkinter | Python
07 Jul, 2022 A collapsible pane, as the name suggests, is a pane which can be collapsed. User can expand pane so that they can perform some task and when task is completed, pane can be collapsed. In Tkinter, Collapsible pane is a container with an embedded button-like control which is used to expand or collapse this co...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jul, 2022" }, { "code": null, "e": 360, "s": 28, "text": "A collapsible pane, as the name suggests, is a pane which can be collapsed. User can expand pane so that they can perform some task and when task is completed, pane can be col...
Overlay Multiple Images in a Single ImageView in Android
11 Aug, 2021 In Android, an image can be displayed inside an ImageView in the layout. ImageView accepts only a single image at a time as input. However, there can be a need to display two or more images in the same ImageView. Let us say, our application shows the status of airplane mode. When airplane mode is enabled, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Aug, 2021" }, { "code": null, "e": 859, "s": 28, "text": "In Android, an image can be displayed inside an ImageView in the layout. ImageView accepts only a single image at a time as input. However, there can be a need to display two ...
Why card images use data-src (not src) for image in Bootstrap 4 ?
09 Jul, 2020 Bootstrap 4 card images use src in image tags to providing the location to be loaded in the given image tag and data-src to provide additional information that can be used by JavaScript for improving the users’ experience. For data-src and src tag we can conclude as follows:src: If you want to load and dis...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Jul, 2020" }, { "code": null, "e": 308, "s": 28, "text": "Bootstrap 4 card images use src in image tags to providing the location to be loaded in the given image tag and data-src to provide additional information that can be used by ...
jQuery - jQuery.post() Method
The jQuery.post( url, [data], [callback], [type] ) method loads a page from the server using a POST HTTP request. The method returns XMLHttpRequest object. Here is the simple syntax to use this method − $.post( url, [data], [callback], [type] ) Here is the description of all the parameters used by this method − url − ...
[ { "code": null, "e": 2903, "s": 2789, "text": "The jQuery.post( url, [data], [callback], [type] ) method loads a page from the server using a POST HTTP request." }, { "code": null, "e": 2945, "s": 2903, "text": "The method returns XMLHttpRequest object." }, { "code": null...
PyQt5 - isChecked() method for Check Box - GeeksforGeeks
22 Apr, 2020 isChecked method is used to know if the check box is checked or not. This method will return true if the check box is checked else it will return false. If we use this method after creating the check box it will always return False as by default check box is not checked. Syntax : checkbox.isChecked() Argum...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n22 Apr, 2020" }, { "code": null, "e": 25809, "s": 25537, "text": "isChecked method is used to know if the check box is checked or not. This method will return true if the check box is checked else it will return false. If we use ...
ByteBuffer allocateDirect() method in Java with Examples - GeeksforGeeks
19 Sep, 2018 The allocateDirect() method of java.nio.ByteBuffer class is used Allocates a new direct byte buffer. The new buffer’s position will be zero, its limit will be its capacity, its mark will be undefined, and each of its elements will be initialized to zero. Whether or not it has a backing array is unspecified...
[ { "code": null, "e": 25857, "s": 25829, "text": "\n19 Sep, 2018" }, { "code": null, "e": 25958, "s": 25857, "text": "The allocateDirect() method of java.nio.ByteBuffer class is used Allocates a new direct byte buffer." }, { "code": null, "e": 26166, "s": 25958, ...
Python - Multiply Consecutive elements in list - GeeksforGeeks
29 Dec, 2019 While working with python, we usually come by many problems that we need to solve in day-day and in development. Specially in development, small tasks of python are desired to be performed in just one line. We discuss some ways to compute a list consisting of elements that are successive product in the lis...
[ { "code": null, "e": 25739, "s": 25711, "text": "\n29 Dec, 2019" }, { "code": null, "e": 26049, "s": 25739, "text": "While working with python, we usually come by many problems that we need to solve in day-day and in development. Specially in development, small tasks of python ar...