Convert Binary Tree to Logical and Property Tree in C++

Ayush Gupta
Updated on 06-Jan-2020 11:16:54

176 Views

In this tutorial, we will be discussing a program to convert a given Binary tree to a tree that holds Logical AND property.For this we will be provided with a binary tree. Our task is to convert it into a tree that holds the logical AND property means that a node has a value of the AND operation of its children nodes. Note that every node can have a value either zero or one.Example Live Demo#include using namespace std; //node structure of binary tree struct Node{    int data;    struct Node* left;    struct Node* right; }; //creation of a ... Read More

Understanding CSS Units

AmitDiwan
Updated on 06-Jan-2020 10:53:39

125 Views

CSS Units come in a variety of categories such as font-sizes, character-sizes, viewport dimensions, etc. Broadly there are two categories of absolute and relative units which consist of above mentioned sub categories.Following are the CSS absolute units −Sr.NoUnit & Name1cmCentimeters (1 cm = 100 mm)2inInches (1 in = 2.54 cm)3mmMillimeters4pcPicas (1 pc = 12 pt)5ptPoints (1 pt = 1/72 in)6pxPixels (1 px = 0.75 pt)Let us see an example of CSS absolute units −Example Live Demo CSS Absolute Units form {    width:70%;    margin: 0 auto;    text-align: center; } * {    padding: 2px;    margin:5px; ... Read More

Setting Line Height in CSS

AmitDiwan
Updated on 06-Jan-2020 10:37:33

80 Views

The height of a line can be defined by the CSS line-height property. It accepts only positive values.SyntaxThe syntax of CSS line-height property is as follows −Selector {    line-height: /*value*/ }ExampleThe following examples illustrate the CSS line-height property. Live Demo div * {    margin: 1.5em;    box-shadow: -13px -10px 10px 1px crimson; } #demo {    line-height: 60%; } p {    box-shadow: 13px -10px 10px 1px grey;    line-height: 50px; } Demo Heading This is demo text one. This is demo text two. This is demo text three. OutputThis ... Read More

Controlling the Position of Table Caption Using CSS

AmitDiwan
Updated on 06-Jan-2020 10:07:09

789 Views

The CSS caption-side property is used to vertically position the table caption box. It can take top and bottom as values. By default, table caption is placed at the top.SyntaxThe syntax of CSS list-style property is as follows−Selector {    caption-side: /*value*/ }ExampleThe following examples illustrate the CSS caption-side property. Live Demo table * {    border: ridge skyblue;    padding: 0.5rem; } table {    margin: 20px;    box-shadow: 0 0 6px 3px indianred;    empty-cells: show; } caption {    border-top-style: none;    caption-side: bottom;    border-color: darkkhaki;    border-radius: 50%; } ... Read More

Cross Browser Solution for Image Marker in CSS

AmitDiwan
Updated on 06-Jan-2020 09:51:43

199 Views

In order to display an image marker properly in all browsers, a cross-browser solution is required. The text alignment after the image marker is sometimes distorted. To achieve a uniform output, we specify the image to be used as a marker as background and align it accordingly.ExampleThe following examples illustrate styling of lists − Live Demo ul{    list-style-type: none;    padding: 0px;    margin: 0px;    font-size: 1.5em; } ul li{    background-image: url("https://www.tutorialspoint.com/images/spring.png");    background-repeat: no-repeat;    background-position: 0px 5px;    padding-left: 24px; } Tutorials Java C# C C++ Spring Hibernate ... Read More

Using Images as List Markers in CSS

AmitDiwan
Updated on 06-Jan-2020 09:47:29

890 Views

The CSS list-style-image property is used to set an image as a marker for the list item.SyntaxThe syntax of CSS list-style-image property is as follows −Selector {    list-style-image: /*value*/ }ExampleThe following examples illustrate CSS list-style-image property − Live Demo ul {    width: 150px;    list-style-image: url("https://www.tutorialspoint.com/images/Servlets.png");    background: goldenrod; } li {    text-align: center;    background: lavenderblush;    margin: 5px 30px; } Servlets Client Request Server Response Cookies Handling Session Tracking OutputThis gives the following output −Example Live Demo ul {    margin-left: 20px;    list-style-image: url("https://www.tutorialspoint.com/images/hibernate.png"); ... Read More

Setting List Style Type in CSS

AmitDiwan
Updated on 06-Jan-2020 08:09:57

122 Views

The CSS list-style-type property is used to style the marker of list items. We can apply these styles to both unordered and ordered lists.SyntaxThe syntax of CSS list-style-type property is as follows −Selector {    list-style-type: /*value*/ }ExampleThe following examples illustrate the styling of lists Live Demo ol li {    padding: 5px;    list-style-type: lower-roman; } li:last-child {    font-size: 1.2em;    font-style: italic;    list-style-type: circle; } demo1 demo 2 demo a demo b demo 3 OutputThis gives the following output −Example Live Demo ... Read More

CSS Background Properties

AmitDiwan
Updated on 06-Jan-2020 07:53:52

2K+ Views

CSS background properties help us style the background of elements. The CSS background property is a shorthand for specifying the background of an element. background-color, background-image, background-repeat, background-position, background-clip, background-size, background-origin and background-attachment together comprise the CSS background properties.SyntaxThe syntax of CSS background property is as follows−Selector {    background: /*value*/ }ExampleThe following examples illustrate CSS background property − Live Demo #main {    margin: auto;    width: 300px;    background-image: url("https://www.tutorialspoint.com/hadoop/images/hadoop-mini-logo.jpg");    background-repeat: no-repeat;    background-size: cover; } #im {    height: 200px;    width: 200px;    background-image: url("https://www.tutorialspoint.com/images/css.png");    background-repeat: no-repeat;    background-position: center; } ... Read More

Create and Style Borders Using CSS

AmitDiwan
Updated on 06-Jan-2020 07:41:25

113 Views

We can define borders for an element and style them using CSS. The CSS border property is used to define the border properties for an element. It is a shorthand for border-width, border-style and border-color. Furthermore, images can be specified as a border.SyntaxThe syntax of CSS border property is as follows −Selector {    border: /*value*/ }ExampleThe following examples illustrate CSS border property − Live Demo p {    border: 70px solid transparent;    margin: 15px;    padding: 3px;    border-image: url("https://www.tutorialspoint.com/tensorflow/images/tensorflow.jpg") 30 round;    background-color: beige; } TensorFlow is an open source machine learning ... Read More

Difference Between Managed and Unmanaged Code in .NET

Mahesh Parahar
Updated on 06-Jan-2020 06:48:33

3K+ Views

.NET Framework has CLR, Common Language Runtime which execute the code written in .NET languages. CLR manages the memory needs, security concern, code optimization, platform specific conversion etc. In case of Unmanaged code, no CLR is present, and code is directly executed by Operating system.Following are some of the important differences between Managed and Unmanaged code.Sr. No.KeyManaged CodeUnmanaged code1Executed ByExecuted by CLR, Common Language Runtime, also named as Managed Runtime Environment.Executed by Operating System directly on the underlying hardware.2SecurityCLR handles security concerns and provides inbuilt security to code written in .NET.No inbuilt security present. It is developer's responsibility to write ... Read More

Advertisements