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
var testCount = 101; | |
// Main elements | |
var $table = $("<table>", { | |
'border':'1' | |
}); | |
var $thead = $("<thead>"); | |
var $tbody = $("<tbody>"); | |
// Add some headers |
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 | |
/* GPW - Generate pronounceable passwords | |
This program uses statistics on the frequency of three-letter sequences | |
in English to generate passwords. The statistics are | |
generated from your dictionary by the program load_trigram. | |
See www.multicians.org/thvv/gpw.html for history and info. | |
Tom Van Vleck |
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
#include <stdio.h> | |
#include <stdarg.h> | |
#include <stdbool.h> | |
#define VAR_DUMP(var) _var_dump(#var, var) | |
void _var_dump(const char *var_name, ...); | |
int main() { | |
int i = 42; |
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 | |
// Define the code to modify | |
$code = <<<EOT | |
<?php | |
echo "Hello, world!"; | |
?> | |
EOT; | |
// Modify the code | |
$code = str_replace('world', 'PHP', $code); |
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 | |
function displayProgressBar(int $current, int $total): void { | |
$width = 50; // The width of the progress bar | |
$percent = (int)(($current / $total) * 100); | |
$progress = (int)(($current / $total) * $width); | |
// Build the progress bar string | |
$progressBar = '['; | |
for ($i = 0; $i < $width; $i++) { |
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 | |
class LatticeRandomWalk { | |
private int $width; | |
private int $height; | |
private int $steps; | |
private array $color; | |
private int $stepLength; | |
public function __construct(int $width, int $height, int $steps, int $stepLength = 1, array $color = [0, 0, 0]) { | |
$this->width = $width; |
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 | |
require 'vendor/autoload.php'; | |
/** | |
* composer require martinlindhe/php-noisegenerator | |
*/ | |
class RPGMapGenerator | |
{ | |
private int $width; |
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 | |
require 'vendor/autoload.php'; | |
/** | |
* composer require lunakid/anim-gif | |
*/ | |
class AnimatedGifCreator | |
{ | |
private string $imageFolderPath; | |
private int $animationDelay; |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<style> | |
.mech { | |
position: relative; | |
height: 200px; |
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> | |
<style> | |
#myCanvas { | |
border: 1px solid black; | |
} | |
</style> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/matter-js/0.14.2/matter.min.js"></script> | |
</head> |
OlderNewer