Daniol Thomas has Published 235 Answers

C++ Program to Solve the Fractional Knapsack Problem

Daniol Thomas

Daniol Thomas

Updated on 17-Feb-2022 13:07:35

In Fractional knapsack problem, a set of items are given, each with a weight and a value. We need to break items for maximizing the total value of knapsack and this can be done in greedy approach.AlgorithmBegin Take an array of structure Item Declare value, weight, knapsack weight and density ... Read More

How to draw shapes using SVG in HTML5?

Daniol Thomas

Daniol Thomas

Updated on 16-Dec-2021 08:48:41

SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.You can draw shapes like circle, ... Read More

What are the differences between Stored procedures and functions?

Daniol Thomas

Daniol Thomas

Updated on 31-May-2021 17:04:41

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 ... Read More

Set the width of the rule between columns with CSS

Daniol Thomas

Daniol Thomas

Updated on 03-Jul-2020 11:39:26

Use the column-rule-width property to set the width of the rule between columns.ExampleYou can try to run the following code to implement the column-rule-width property:Live Demo<!DOCTYPE html> <html>    <head>       <style>          .demo {             column-count: 4;       ... Read More

Specify the order of a flexible item relative to the rest of the flex items inside the same container with CSS

Daniol Thomas

Daniol Thomas

Updated on 03-Jul-2020 10:45:06

Use the order property to specify the order of a flexible item relative to the rest of the flex items inside the same container.ExampleYou can try to run the following code to implement the order property −Live Demo<!DOCTYPE html> <html>    <head>       <style>          .mycontainer { ... Read More

Set the speed of the hover effect with CSS

Daniol Thomas

Daniol Thomas

Updated on 03-Jul-2020 07:43:50

To set the speed of the hover, use the transition-duration property. To set the hover, use the :hover selector.ExampleYou can try to run the following code to speed the hover effect −Live Demo<!DOCTYPE html> <html>    <head>       <style>          .btn {         ... Read More

How to add rounded corners to a button with CSS?

Daniol Thomas

Daniol Thomas

Updated on 02-Jul-2020 14:01:59

To add rounded corners to a button, use the border-radius property.ExampleYou can try to run the following code to add rounded corners −Live Demo<!DOCTYPE html> <html>    <head>       <style>          .button {             background-color: yellow;         ... Read More

Set how many seconds or milliseconds a CSS transition effect takes to complete

Daniol Thomas

Daniol Thomas

Updated on 02-Jul-2020 08:25:03

Use the transition-duration property in CSS to set how many seconds or milliseconds a CSS transition effect takes to complete −ExampleLive Demo<!DOCTYPE html> <html>    <head>       <style>          div {             width: 150px;             height: ... Read More

pprint module (Data pretty printer)

Daniol Thomas

Daniol Thomas

Updated on 27-Jun-2020 14:59:38

The pprint module (lib/pprint.py) is a part of Python’s standard library which is distributed along with standard Python distribution. The name pprint stands for pretty printer. The pprint module’s functionality enables aesthetically good looking appearance of Python data structures. Any data structure that can be correctly parsed by Python interpreter ... Read More

Python Program Exit handlers (atexit)

Daniol Thomas

Daniol Thomas

Updated on 27-Jun-2020 14:38:59

The atexit module in the standard distribution of Python has two functions – register() and unregister(). Both functions take some existing function as an argument. Registered functions are executed automatically when the interpreter session is terminated normally.If more than one functions are registered, their execution is in the reverse order ... Read More

1 2 3 4 5 6 7 ... 24 Next
Advertisements