Implementing Checksum Using Java

AmitDiwan
Updated on 04-Jul-2020 08:09:40

2K+ Views

Following is the code to implement Checksum using Java −Example Live Demoimport java.util.*; public class Demo{    public static void main(String args[]){       Scanner my_scan = new Scanner(System.in);       System.out.println("Enter the input string ");       String my_in = my_scan.next();       int my_checksum = generate_checksum(my_in);       System.out.println("The checksum that has been generated is " + Integer.toHexString(my_checksum));       System.out.println("Enter the data that needs to be sent to the receiver ");       my_in = my_scan.next();       System.out.println("Enter the checksum that needs to be sent to the receiver "); ... Read More

Set Initial Length of a Flex Item with CSS

Samual Sam
Updated on 04-Jul-2020 08:09:38

123 Views

Set the length of a flex item with the flex-basis CSS property.ExampleYou can try to run the following code to implement the flex-basis property −Live Demo                    .mycontainer {             display: flex;             background-color: orange;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          Q9          

Set Flex Items Vertically from Bottom to Top with CSS

karthikeya Boyini
Updated on 04-Jul-2020 08:01:29

773 Views

Use the flex-direction property with column-reverse value to set the flex-items vertically, from top to bottomExampleYou can try to run the following code to implement the column-reverse value −Live Demo                    .mycontainer {             display: flex;             flex-direction: column-reverse;             background-color: orange;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          

Usage of CSS grid auto-rows Property

Chandu yadav
Updated on 04-Jul-2020 08:00:41

87 Views

Use the grid-auto-rows property to set size for the rows.ExampleYou can try to run the following code to implement the grid-auto-rows property −Live Demo                    .container {             display: grid;             grid-auto-rows: 50px;             grid-gap: 10px;             background-color: red;             padding: 10px;          }          .container>div {             background-color: yellow;             text-align: center;             padding:10px 0;             font-size: 20px;          }                              1          2          3          4          5          6          

Set Flex Items Horizontally from Right to Left with CSS

Samual Sam
Updated on 04-Jul-2020 07:59:28

206 Views

Use the flex-direction property with row-reverse value to set the flex-items horizontally from right to left.ExampleYou can try to run the following code to implement the row-reverse valueLive Demo                    .mycontainer {             display: flex;             flex-direction: row-reverse;             background-color: orange;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          

CSS Hanging Punctuation Property

Lakshmi Srinivas
Updated on 04-Jul-2020 07:56:42

143 Views

Use the hanging-punctuation property to set whether a punctuation character may be placed outside the line box.It has the following valuesS.NoProperty Value & Description1.NoneNo punctuation mark2.FirstPunctuation outside the start edge of the first line3.LastPunctuation outside the end edge of the last lineSet it like this in your web page −hanging-punctuation: none; hanging-punctuation: first; hanging-punctuation: last;

Usage of var CSS Function

karthikeya Boyini
Updated on 04-Jul-2020 07:03:47

99 Views

The var() function in CSS is used to add custom property values to your web page. Set a custom name of the property and set value for it.ExampleYou can try to run the following code to implement var() functionLive Demo                    :root {             --my-bg-color: blue;             --my-color: white;          }          #demo {             background-color: var(--my-bg-color);             color: var(--my-color);          }                     Heading One                This is demo text. This is demo text. This is demo text.          This is demo text. This is demo text. This is demo text.          This is demo text. This is demo text. This is demo text.                

Return Attribute Value of Selected Element Using CSS

Arjun Thakur
Updated on 04-Jul-2020 07:03:06

290 Views

The attr() CSS function returns the value of an attribute of the selected element using CSSExampleYou can try to run the following code to implement the attr() function in CSSLive Demo                    a:before {content: " (" attr(href) ")";}                     Information Resource                Resource:Welcome to Qries          

Find N-th Node from the End of a Linked List in C

Sunidhi Bansal
Updated on 04-Jul-2020 07:01:13

2K+ Views

Given with n nodes the task is to print the nth node from the end of a linked list. The program must not change the order of nodes in a list instead it should only print the nth node from the last of a linked list.ExampleInput -: 10 20 30 40 50 60    N=3 Output -: 40In the above example, starting from first node the nodes till count-n nodes are traversed i.e 10, 20 30, 40, 50, 60 and so the third node from the last is 40.Instead of traversing the entire list this efficient approach can be followed ... Read More

Define Colors Using RGBA Model with CSS

George John
Updated on 04-Jul-2020 06:59:05

206 Views

Use the CSS rgb() function to define color using the RGB Model.Use the CSS rgba() function to set RGB colors with opacity.ExampleYou can try to run the following code to set the color with rgba() functionLive Demo                    h1 {             background-color:hsl(0,100%,50%);          }          h2 {             background-color:rgb(0,0,255);             color: rgb(255,255,255);          }          p {             background-color:rgba(255,0,0,0.9);          }                     Red Background       Blue Background       This is demo text!    

Advertisements