Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@niklasbuschmann
niklasbuschmann / chatroulette.js
Created October 29, 2020 23:32
Discord Chatroulette Bot
const Discord = require('discord.js');
const BOT_TOKEN = /* TOKEN */;
const client = new Discord.Client();
const createChannel = (name, hidden, guild) => guild.channels.create(name, {
type: 'voice',
parent: guild.channels.cache.filter(channel => channel.type === 'category').last(),
permissionOverwrites: hidden && [{
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;
class Node {
private:
double value;
Node* left;
Node* right;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <iostream>
#include <cmath>
using namespace std;
bool signchange (double a, double b) {
return (a > 0 && b < 0) || (a < 0 && b > 0);
}
string bisection(double a, double b, double epsilon_x, double epsilon_y, double (*f)(double), int n) {
double average = (a + b) / 2.0;