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
| long startTime = Stopwatch.GetTimestamp(); | |
| TimeSpan delta = Stopwatch.GetElapsedTime(startTime); | |
| /* | |
| This method doesn't create a class or else, so no extra allocation for heap. | |
| Extra efficient and precise. | |
| */ |
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 handleSubmit (e) { | |
| e.preventDefault(); | |
| var form = document.getElementById("formId"); | |
| form.checkValidity(); | |
| form.reportValidity(); | |
| //return value of .checkValidity() can bu used for more detailed validation | |
| } |
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
| ## Pre-requisite: You have to know your last commit message from your deleted branch. | |
| git reflog | |
| # Search for message in the list | |
| # a901eda HEAD@{18}: commit: <last commit message> | |
| # Now you have two options, either checkout revision or HEAD | |
| git checkout a901eda | |
| # Or | |
| git checkout HEAD@{18} |