Daniol Thomas

Daniol Thomas

124 Articles Published

Articles by Daniol Thomas

Page 7 of 13

Collectors partitioningBy() method in Java 8

Daniol Thomas
Daniol Thomas
Updated on 11-Mar-2026 2K+ Views

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 More

Non-Nav (standard) links in Bootstrap

Daniol Thomas
Daniol Thomas
Updated on 11-Mar-2026 241 Views

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 More

Usage of Bootstrap thumbnail

Daniol Thomas
Daniol Thomas
Updated on 11-Mar-2026 152 Views

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 More

Add a blue background color to an element to set key stuff with Bootstrap

Daniol Thomas
Daniol Thomas
Updated on 11-Mar-2026 190 Views

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 More

Make an element look like a heading with Bootstrap

Daniol Thomas
Daniol Thomas
Updated on 11-Mar-2026 199 Views

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 More

C++ Program to Perform Partition of an Integer in All Possible Ways

Daniol Thomas
Daniol Thomas
Updated on 28-Apr-2025 1K+ Views

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 More

What are the differences between Stored procedures and functions?

Daniol Thomas
Daniol Thomas
Updated on 01-Nov-2023 46K+ Views

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 More

Python Utilities for with-statement contexts (contextlib)

Daniol Thomas
Daniol Thomas
Updated on 27-Jun-2020 492 Views

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 More

What are undefined reference/unresolved external symbol errors in C++?

Daniol Thomas
Daniol Thomas
Updated on 23-Jun-2020 1K+ Views

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 More

What happens when we use COMMIT in MySQL stored procedure and one of the transaction, under START transaction, fails?

Daniol Thomas
Daniol Thomas
Updated on 22-Jun-2020 687 Views

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
Showing 61–70 of 124 articles
« Prev 1 5 6 7 8 9 13 Next »
Advertisements