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
// class you can modify based on the target | |
// count length of element base on the target | |
let arrayValue = []; | |
let element = document.querySelectorAll('.project-cell.gl-w-11 a'); | |
let length = document.querySelectorAll('.project-cell.gl-w-11 a').length; | |
for (let index = 0; index < length; index++) { | |
// get value of href in the element | |
// push value to array | |
let result = element[index].href; | |
arrayValue.push(result); |
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
package main | |
import ( | |
"fmt" | |
"strings" | |
"strconv" | |
) | |
// Timeconversion is your solution code. | |
func Timeconversion (s string) string { |
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
// checking if the text is palindrome | |
function palindrome(string) { | |
let result = true; | |
let lengthString = string.length; | |
let indexJ = lengthString - 1; | |
for (let index = 0; index < lengthString / 2; index++) { | |
if (string[index] != string[indexJ]) { |
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
{ | |
"query": "query($season:MediaSeason,$seasonYear:Int $nextSeason:MediaSeason,$nextYear:Int){trending:Page(page:1,perPage:6){media(sort:TRENDING_DESC,type:ANIME,isAdult:false){...media}}season:Page(page:1,perPage:6){media(season:$season,seasonYear:$seasonYear,sort:POPULARITY_DESC,type:ANIME,isAdult:false){...media}}nextSeason:Page(page:1,perPage:6){media(season:$nextSeason,seasonYear:$nextYear,sort:POPULARITY_DESC,type:ANIME,isAdult:false){...media}}popular:Page(page:1,perPage:6){media(sort:POPULARITY_DESC,type:ANIME,isAdult:false){...media}}top:Page(page:1,perPage:10){media(sort:SCORE_DESC,type:ANIME,isAdult:false){...media}}}fragment media on Media{id title{userPreferred}coverImage{extraLarge large color}startDate{year month day}endDate{year month day}bannerImage season seasonYear description type format status(version:2)episodes duration chapters volumes genres isAdult averageScore popularity mediaListEntry{id status}nextAiringEpisode{airingAt timeUntilAiring episode}studios(isMain:true){edges{isMain nod |
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 convertToSnakeCase(text) { | |
let snakeCaseText = ""; | |
const specialChars = `!"#$%&'()*+,-./:;<=>?@[\\]^\`{|}~`; | |
for (let index = 0; index < text.length; index++) { | |
const char = text[index]; | |
if (char === "_" || char === " ") { | |
snakeCaseText += "_"; // Preserve underscores and change spaces to underscores | |
} else if (!specialChars.includes(char)) { |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"os" | |
"strings" | |
"time" | |
) |
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 generateID() { | |
const date = new Date(); | |
const day = ("0" + date.getDate()).slice(-2); | |
const month = ("0" + (date.getMonth() + 1)).slice(-2); | |
const year = date.getFullYear().toString().substr(-2); | |
const random = Math.random().toString(36).substring(2, 6).toUpperCase(); | |
return `INV-DOL-${day}${month}${year}-${random}`; | |
} | |
const newID = generateID(); |
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
// Go program to illustrate how | |
// to put a goroutine to sleep | |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
// Here, the value of Sleep function is zero |
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
<template> | |
<div class="iframe-container"> | |
<iframe | |
class="iframe" | |
:src="iframeUrl" | |
allowfullscreen | |
scrolling="yes" | |
ref="iframe" | |
@load="handleIframeLoad" | |
></iframe> |
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
// Set initial countdown time to 60 seconds | |
var countdown = 60; | |
// Update the timer display every second | |
setInterval(function() { | |
countdown--; | |
var seconds = countdown % 60; | |
var minutes = Math.floor(countdown / 60); | |
// Add leading zero to seconds if less than 10 |
NewerOlder