Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Daniol Thomas
Page 7 of 13
Collectors partitioningBy() method in Java 8
The partioningBy() method returns a Collector that partitions the input elements according to a Predicate, and organizes them into a Map.The syntax is as follows.static Collector partitioningBy(Predicate
Read MoreNon-Nav (standard) links in Bootstrap
Use the standard links that are not within the regular navbar navigation component, and then use the class navbar-link to add proper colors for the default and inverse navbar options.You can try to run the following code to set standard links −Example Bootstrap Example Website Copyright TP
Read MoreUsage of Bootstrap thumbnail
With the thumbnail class in Bootstrap, you can easily create a thumbnail.Follow the below-given steps &minus − Add an tag with the class of .thumbnail around an image.This adds four pixels of padding and a gray border.On hover, an animated glow outlines the image.You can try to run the following code to create thumbnail −Example Bootstrap Example
Read MoreAdd a blue background color to an element to set key stuff with Bootstrap
To set key stuff on an element, use the .bg-primary class in Bootstrap.You can try to run the following code to implement .bg-primary class that is blue in color −Example Bootstrap Example Example Danger Key text!
Read MoreMake an element look like a heading with Bootstrap
To make an element look like a heading, you can try to run the following code −Example Bootstrap Example Planet Earth Asia India Hyderabad Madhapur
Read MoreC++ Program to Perform Partition of an Integer in All Possible Ways
In this article, we have a positive integer 'n'. Our task is to generate all possible unique ways to represent 'n' as the sum of positive integers in C++. Each partition should give a sum equal to the given 'n'. Here is an example: Input: n = 4 Output: 4 3 1 2 2 2 1 1 1 1 1 1 Steps to Perform Unique Partition of Integer We start with the current partition i.e. with an initial value of n. Then we print the current partition. ...
Read MoreWhat are the differences between Stored procedures and functions?
Following are the main differences between functions and procedures:FunctionsProceduresA function has a return type and returns a value.A procedure does not have a return type. But it returns values using the OUT parameters.You cannot use a function with Data Manipulation queries. Only Select queries are allowed in functions.You can use DML queries such as insert, update, select etc… with procedures.A function does not allow output parametersA procedure allows both input and output parameters.You cannot manage transactions inside a function.You can manage transactions inside a procedure.You cannot call stored procedures from a functionYou can call a function from a stored procedure.You ...
Read MorePython Utilities for with-statement contexts (contextlib)
contextlib module of Python's standard library defines ContextManager class whose object properly manages the resources within a program. Python has with keyword that works with context managers. The file object (which is returned by the built-in open() function) supports ContextManager API. Hence we often find with keyword used while working with files.Following code block opens a file and writes some data in it. After the operation is over, the file is closed, failing which file descriptor is likely to leak leading to file corruption.f = open("file.txt", "w") f.write("hello world") f.close()However same file operation is done using file's context manager capability ...
Read MoreWhat are undefined reference/unresolved external symbol errors in C++?
As the name suggests, a symbol you declared was not defined by you. This may occur due to many cases. Let's have a look at three of them −You forgot to define the declared name. For example, you declared a function in a file and used it somewhere. But you did not provide its definition. Code −#include void foo(); int main() { foo(); // Declared but not defined }You defined it but did not use the qualified name. Say you created a class with a method and defined that method but forgot using scope resolution to link that function ...
Read MoreWhat happens when we use COMMIT in MySQL stored procedure and one of the transaction, under START transaction, fails?
Suppose one of the queries fails or generates errors and another query (s) properly executed the MySQL still commit the changes of the properly executed query(s). It can be understood from the following example in which we are using the table ‘employee.tbl’ having the following data −Examplemysql> Select * from employee.tbl; +----+---------+ | Id | Name | +----+---------+ | 1 | Mohan | | 2 | Gaurav | | 3 | Sohan | | 4 | Saurabh | | 5 | Yash | +----+---------+ ...
Read More