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
| // Original code in Java (https://stackoverflow.com/a/26227947) converted to C++ with some extra features | |
| // Added most of math functions from standart C++ library | |
| // Added number handler in function names (e.g. log10(...)) | |
| // Gives out error wstring instead of throwing an exception, just check if error isn't empty | |
| // Added multiple arguments support for functions | |
| // Constants | |
| // Note that str will get modified, this is intented (I needed it, change this on your own) |
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
| <?php | |
| namespace Reader; | |
| class SimpleSessionReader | |
| { | |
| public $text; | |
| public $array = []; | |
| public function __construct(string $text = "") |
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
| //Btw, this is command handler, I have used this tutorial in https://anidiots.guide/first-bot/a-basic-command-handler | |
| const Discord = require("discord.js"); | |
| const fs = require("fs"); // <-- File system | |
| var prefix = "?"; // <-- Commands Prefix | |
| fs.readdir("./events/", (err, files) => { | |
| if (err) return console.error(err); | |
| files.forEach(file => { | |
| let eventFunction = require(`./events/${file}`); | |
| let eventName = file.split(".")[0]; |