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 NanoCache { | |
constructor({ cleanupInterval = 5 * 60 * 60 * 1000 } = {}) { // Default cleanup every 5 hours | |
this.cache = new Map(); | |
this.startCleanupInterval(cleanupInterval); | |
} | |
/** | |
* Set a key-value pair with optional TTL | |
* @param {string} key - The key to store | |
* @param {string} value - The value to store |
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> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>My Resume</title> | |
</head> | |
<body> |
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> | |
<head> | |
<title>Pi Remote Control</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" | |
crossorigin="anonymous"> | |
</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
#include <stdio.h> | |
int main(){ | |
int match = 21, comp, user, choice, c = 0; | |
printf(“Game Rules:\nYou have to pick 1, 2, 3 or 4 matchstick at a time.”); | |
printf(“\nAfter your picking, computer does its picking.”); | |
printf(“\nWhoever is forced to pick the last matchstick looses the game.”); | |
printf(“\nPress 1 to start the game:”); | |
scanf(“%d”, &choice); | |
while (choice == 1) { | |
do { |
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
#include<stdio.h> | |
int main(){ | |
int num, count = 0; | |
printf("Enter any number:"); | |
scanf("%d", &num); | |
if(num == 0) | |
count = 1; | |
else{ | |
while(num != 0){ | |
num = num / 10; |
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
#include <stdio.h> | |
#include <string.h> | |
int main(){ | |
char str[40]; | |
int i, word = 1; | |
printf("Enter a sentence:\n"); | |
scanf("%[^\n]s", str); | |
for( i = 0 ; str[i] != '\0' ; ++i){ | |
if(str[i] == ' ') | |
word++; |
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
#include <stdio.h> | |
#include <string.h> | |
int main(){ | |
char str[10] = "Hello"; | |
int i, length = strlen(str); | |
printf("Reverse of string Hello is "); | |
for(i = length - 1 ; i >= 0 ; i--){ | |
printf("%c", str[i]); | |
} | |
} |
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
#include <stdio.h> | |
int main(){ | |
char name[20]; | |
printf("Enter your full name: "); | |
scanf("%[^\n]s", name); | |
printf("Your name is %s.", name); | |
} |
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
#include <stdio.h> | |
#include <string.h> | |
int main(){ | |
char name[25]; | |
printf("Enter your full name: "); | |
gets(name); | |
puts(name); | |
} |
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
#include <stdio.h> | |
int main(){ | |
char str[20]; | |
scanf("%s", str); | |
printf("%s", str); | |
} |
NewerOlder