Posts

Showing posts from May, 2020

HTML Table

HTML Table important things to remember <th> table header <td>table data <tr> table row <!DOCTYPE html> <html> <head> <title>HTML Table By Pranay</title> <style> table, th, td {   border: 1px solid black;    border-collapse: collapse; } </style> <body> <table style="width:100%">   <tr>     <th>Firstname</th>     <th>Lastname</th>     <th>Age</th> <th><label for="inputid">Textbox</label> <th><label for="inputchkboxid">Select records</label>   </tr>   <tr>     <td>Jill</td>     <td>Smith</td>     <td>50</td> <td><input type="text" id="inputid" name="inputid" required pattern="^[a-zA-Z]+$"</td> <td><input type="checkbox" id="inputchkboxid" name=...

Displaying Multiple Rows in ADF Page

Image
In this exercise, we will learn to access multi records through checkox selection.  Create an ADF  application  Create an Application module and view the object EmpVo with below query select * from xx_employee_info Once view object created now its time to add Transient attribute to display a checkbox Now select the checkbox for the transient attribute as shown in the below code snippet.  Now create a page and drop this View object from data control on to the page as Table.  Select row selection as Multiple Rows as shown in below code snippet.  Add button in the panel accordion for the table  to print the checked records  Create Binding for the table "enpTable"and create actionlistener event for the button Write below code in manage bean package tgr.oracle.apps.fnd.PranayMultiChkBox; import java.util.Iterator; import java.util.List; import ...

HTML5 Canvas

Image
This is Sample Code for HTML Animation. getContext():-this is used to draw 2d graphic s <!DOCTYPE html> <html> <title>HTML Drawing using Canvas</title> <head> <!-- After title -- Style Comes -->    <style>    #canv{                 border:solid 2px red;             }    </style>     </head> <body> <canvas id="canv" width="500" height="300"></canvas>  <script>  let canvas=document.getElementById("canv");  let graphic=canvas.getContext("2d");   console.log(graphic);        graphic.font="40px courier";  graphic.fillText("Pranay Canvas",50,50);  graphic.strokeStyle="orange"; </script> </body> </html> _________________________________________________________________________________ Output of Above code ...

Password generator through Java Code

Image
Below code can be used to generate password package encryptiondemo; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; public class EncryptionDemo {     public EncryptionDemo() {     }     Cipher ecipher;       Cipher dcipher;       EncryptionDemo(SecretKey key) throws Exception {         ecipher = Cipher.getInstance("AES");         dcipher = Cipher.getInstance("AES");         ecipher.init(Cipher.ENCRYPT_MODE, key);         dcipher.init(Cipher.DECRYPT_MODE, key);       }       public String encrypt(String str) throws Exception {         // Encode the string into bytes using utf-8         byte[] utf8 = str.getBytes("UTF8");         // Encrypt   ...

HTML5 Drag and Drop Feature

Image
Code Snippet  for Drag and Drop Image <!DOCTYPE html> <html> <title></title> <!--Internal CSS To declare box out line--> <style> .box,.box2{       width:300px;       height:300px;   border:solid 2px red;   }     .box2{                 margin-top: 5px;             } </style> <!--declaration ends--> <h1></h1> <body> <!--delcaring box1 class--> <div class="box" > <!-- image to be dragged--> <img src="https://i.picsum.photos/id/1025/200/200.jpg" id="imagedragitem"> </div> <div class="box2" id="targetbox"></div> <!--box2 declared to received dragged image from box1--> </form> <script> document.getElementById("imagedragitem").ondragstart=function(e){ console.log(e); console.log("calling on drop"); let data...

HTML5 Sample scripts for Enabling/Disabling Fields,Defaulting field,Opening URL based on condition

Sample Code snippet for Defaulting the textbox values  <!DOCTYPE html> <html> <title> </title> <h1>Defaulting the text box by pranay tiwari</h1> <body> <form> <div> <label for="firstbox">First Box</label> <input type="textbox" id="firstbox" name="firstbox"></input> </div> <div> <label for="firstbox">Second Box</label> <input type="textbox" id="secondbox" name="secondbox"></input> </div> </form> <script> let val; document.getElementById("firstbox").oninput=function(){   val=this.value; document.getElementById("secondbox").value=val; document.getElementById("secondbox").disabled=true; } </script> </body> </html> Improving above code for reusability <!DOCTYPE html> <html> <title>...