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 LCG { | |
constructor() { | |
this.seed = Date.now(); | |
this.a = 1664525; | |
this.c = 1013904223; | |
this.m = Math.pow(2, 32); | |
} | |
nextInt() { | |
this.seed = (this.a * this.seed + this.c) % this.m; |
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
import { log } from "https://cdn.skypack.dev/fp-ts/Console"; | |
log("hello world!")(); |
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
const mysql = require('mysql2/promise'); | |
const http = require('http'); | |
const pool = mysql.createPool({ | |
host: 'localhost', | |
user: 'root', | |
password: '', | |
database: 'nobarun', | |
waitForConnections: true, | |
connectionLimit: 10, |
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
<?php | |
// Create a new HTTP server on port 8080 | |
$server = new Swoole\Http\Server("0.0.0.0", 4000); | |
// Define a route handler for the root path | |
$server->on("request", function ($request, $response) { | |
// Get the request path | |
$path = $request->server['request_uri']; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Monaco Editor</title> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/min/vs/editor/editor.main.css"> | |
</head> | |
<body> |