This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>First Javascript Program</title> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| File_Name -> index.html | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>First Javascript Program</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function random() { | |
| var crypto = window.crypto; | |
| var typedArray = new Uint8Array(10); // 10 elements | |
| crypto.getRandomValues(typedArray); | |
| console.log(typedArray); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // util function to convert the input to string type | |
| function convertToString(input) { | |
| if(input) { | |
| if(typeof input === "string") { | |
| return input; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="red-container"> | |
| <span> hello(green) </span> | |
| <span > 👋 </span> | |
| <span> Javascript Jeep </span> | |
| I am red | |
| </div> | |
| // css |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .two { | |
| --textcolor: red; | |
| } | |
| .three { | |
| --textcolor: blue; | |
| } | |
| .two { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Search { | |
| constructor(input) { | |
| this.input = input | |
| } | |
| linearSearch(target) { | |
| const array = this.input | |
| const len = array.length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .dice { | |
| padding: 4px; | |
| background-color: #e7e7e7; | |
| width: 104px; | |
| height: 104px; | |
| border-radius: 10%; | |
| } | |
| .dot { | |
| display: block; | |
| width: 24px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <canvas id="pdf_canvas"></canvas> | |
| <div class="container"> | |
| <button id="prev_page">Previos Page</button> | |
| <button id="next_page">next Page</button> | |
| <span id="current_page_num"></span> | |
| of | |
| <span id="total_page_num"></span> | |
| <input type="text" id="page_num"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let pdf ; // to store pdf data | |
| let canvas; // to render pdf | |
| let isPageRendering; // to check if the pdf is currently rendering | |
| let pageRenderingQueue = null; // to store next page number to render | |
| let canvasContext; // context of canvas | |
| let totalPages; // total pages of pdf | |
| let currentPageNum = 1; |
OlderNewer