Posts

one to many : product has many quantites | get Data by quantity using product id

 public interface CreateQuantityRepo extends JpaRepository<CreateQuantity, Long> { @Query("from CreateQuantity as d where d.createProduct.id=:createProductId") public List<CreateQuantity> getByIdCreateQuantity(@Param("createProductId") long createProductId); }

one to many jpa : one product have many Quantity

product.java  @OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY,mappedBy = "createProduct") private List<CreateQuantity> quantities; Quantity.java @ManyToOne @JoinColumn(name="productID") private CreateProduct createProduct;

search bar on top navbar html css javascript

 <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <style> * {box-sizing: border-box;} body {   margin: 0;   font-family: Arial, Helvetica, sans-serif; } .topnav {   overflow: hidden;   background-color: #e9e9e9; } .topnav a {   float: left;   display: block;   color: black;   text-align: center;   padding: 14px 16px;   text-decoration: none;   font-size: 17px; } .topnav a:hover {   background-color: #ddd;   color: black; } .topnav a.active {   background-color: #2196F3;   color: white; } .topnav .search-container {   float: right; } .topnav input[type=text] {   padding: 6px;   margin-top: 8px;   font-size: 17px;   border: none; } .topnav .search-container button {   float: right;   padding: 6px 10px;   margin-top: 8px;   margin-right: 16px; ...

top Navigation html css javascript

 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <style> body {   margin: 0;   font-family: Arial, Helvetica, sans-serif; } .topnav {   overflow: hidden;   background-color: #333; } .topnav a {   float: left;   display: block;   color: #f2f2f2;   text-align: center;   padding: 14px 16px;   text-decoration: none;   font-size: 17px; } .topnav a:hover {   background-color: #ddd;   color: black; } .topnav a.active {   background-color: #04AA6D;   color: white; } .topnav .icon {   display: none; } @media screen and (max-width: 600px) {   .topnav a:not(:first-child) {display: none;}   .topnav a.icon {     float: right;     display: block;   } } @media screen and (max-width: 600...

password hide and show data

 <!DOCTYPE html> <html> <body> <p>Click the radio button to toggle between password visibility:</p> Password: <input type="password" value="FakePSW" id="myInput"><br><br> <input type="checkbox" onclick="myFunction()">Show Password <script> function myFunction() {   var x = document.getElementById("myInput");   if (x.type === "password") {     x.type = "text";   } else {     x.type = "password";   } } </script> </body> </html>

Table in Html css

 <!DOCTYPE html> <html> <head> <style> * {   box-sizing: border-box; } .row {   margin-left:-5px;   margin-right:-5px; }    .column {   float: left;   width: 50%;   padding: 5px; } /* Clearfix (clear floats) */ .row::after {   content: "";   clear: both;   display: table; } table {   border-collapse: collapse;   border-spacing: 0;   width: 100%;   border: 1px solid #ddd; } th, td {   text-align: left;   padding: 16px; } tr:nth-child(even) {   background-color: #f2f2f2; } </style> </head> <body> <h2>Tables Side by Side</h2> <p>How to create side-by-side tables with CSS:</p> <div class="row">   <div class="column">     <table>       <tr>         <th>First Name</th>         <th>Last Name</th>       ...

thymeleaf including fragements | thymeleaf page add | thymeleaf parts add

-: including fragments  :-  footer.html <footer th:fragement="footer1"> ............................................... </footer> <footer th:fragement="footer2"> ............................................... </footer> <footer th:fragement="footer3"> ............................................... </footer> index.html <footer th:replace="footer::footer1"> ......................................................... </footer>