let sayHello = new Promise(function(resolve, reject) {
// Hata durumunda reject kullanılır
Prevent Object from adding new Properties in JavaScript
Learn how to use preventExtensions to stop adding new properties to a JavaScript Object
The Object.preventExtensions() method prevents new properties from added to an object.
`` "use strict"; let user = { name : "Jagathish" };
This file contains 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
@keyframes appear { | |
from { | |
opacity: 0; | |
scale: 0.5; | |
} | |
to { | |
opacity: 1; | |
scale: 1; | |
} | |
} |
This file contains 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
/** | |
* @type {import('next').NextConfig} | |
*/ | |
const nextConfig = { | |
output: "export", | |
trailingSlash: true, | |
images: { unoptimized: true } | |
} | |
module.exports = nextConfig |
This file contains 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
<# | |
Note: Eliminate `-WhatIf` parameter to get action be actually done | |
Note: PS with version prior to 4.0 can't delete non-empty folders | |
#> | |
Get-ChildItem -Path "." -Include "node_modules" -Recurse -Directory | Remove-Item -Recurse -Force -WhatIf |
This file contains 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
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |
This file contains 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
As of 2023 | |
Open VSCode's command menu (F1), and type "Local History" and select "Local History: Find Entry to Restore." | |
Then type the name of the file you deleted. | |
This has worked for me when "undo" in the file tree has not. | |
Super easy, and has saved me from despair. |
This file contains 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 AddTableARIA() { | |
try { | |
var allTables = document.querySelectorAll('table'); | |
for (var i = 0; i < allTables.length; i++) { | |
allTables[i].setAttribute('role','table'); | |
} | |
var allCaptions = document.querySelectorAll('caption'); | |
for (var i = 0; i < allCaptions.length; i++) { | |
allCaptions[i].setAttribute('role','caption'); | |
} |
This file contains 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="container-all read-more-wrap mx-1"> | |
<div class="containered ${clssName}"> | |
<a class="example-image-link" href="${image}" data-lightbox="${title}" data-title="${bigTitle}"> | |
<img src="${image}" loading="lazy" alt="${bigDesc}"> | |
</a> | |
<span class="title">${bigTitle}</span> | |
<span class="text">${bigDesc}</span> | |
</div> | |
</div> |
This file contains 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
<input type="checkbox" class="read-more-state" id="el-1" /> | |
<div class="read-more-wrap"> | |
${ALLINONEPROJECTS} | |
</div> | |
<label for="homeprojects" class="read-more-trigger"></label> |
NewerOlder