#1
score:2.0
kotlin3 lines
123
if (x == true) { return true; }
else if (x == false) { return false; }
else { return !false; }// the most roasted code on the internet
if (x == true) { return true; }
else if (x == false) { return false; }
else { return !false; }import { Ratelimit } from "@upstash/ratelimit";
import { Redis } from "@upstash/redis";
function createRateLimiter() {
const url = process.env.UPSTASH_REDIS_REST_URL;
const token = process.env.UPSTASH_REDIS_REST_TOKEN;
if (!url || !token) {
return null;
}
const redis = new Redis({ url, token });
return new Ratelimit({
redis,
limiter: Ratelimit.slidingWindow(5, "60 s"),
analytics: true,
prefix: "devroast:ratelimit",
});
}
export const rateLimiter = createRateLimiter();
<?php
function factorial($n) {
if ($n <= 1) return 1;
return $n * factorial($n - 1);
}
echo factorial(10);
?>