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
| import json | |
| import discord | |
| config_file = open('config.json') | |
| TOKEN = json.load(config_file)['token'] | |
| client = discord.Client() | |
| @client.event | |
| async def on_raw_reaction_add(payload): |
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
| // config/passport.js | |
| // load all the things we need | |
| var LocalStrategy = require('passport-local').Strategy; | |
| var mysql = require('mysql'); | |
| var connection = mysql.createConnection({ | |
| host : 'localhost', | |
| user : 'root', |
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
| import discord | |
| import os | |
| import mysql.connector | |
| import json | |
| import random | |
| import threading | |
| from discord.ext import commands | |
| bucket = commands.CooldownMapping.from_cooldown(5, 2, commands.BucketType.member) |
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
| 'use strict'; | |
| /*****************NATIVE forEACH*********************/ | |
| Array.prototype.myEach = function(callback) { | |
| for (var i = 0; i < this.length; i++) | |
| callback(this[i], i, this); | |
| }; | |
| //tests |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Task List</title> | |
| <style> | |
| body { | |
| font-family: sans-serif; | |
| } | |
| .taskBody { | |
| margin: 0 auto; |
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
| public class Quicksort { | |
| private int partitionIndex; | |
| public void quickSort(int array[], int low, int high) | |
| { | |
| if(low < high) // If the low index is less than the high index. | |
| { | |
| partitionIndex = partition(array, low, high); |
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
| public class Person { | |
| int height; | |
| int weight; | |
| int age; | |
| String name; | |
| String favClass; | |
| static int numOfPersons; | |
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
| // Javascript Linked List | |
| // Author: Anson Foong, 5/28/2017 | |
| function Node(data) | |
| { | |
| this.data = data; | |
| this.next = null; | |
| } | |
| function LinkedList() |
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
| package LinkedList; | |
| public class ListDriver { | |
| public static void main(String[] args) | |
| { | |
| SinglyLinkedList list = new SinglyLinkedList(); | |
| list.addNode(50); | |
| list.addNode(22); | |
| list.addNode(33); |
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
| public class ApartmentComplex { | |
| private LivingRoom apartmentLivingRoom; | |
| private Kitchen apartmentKitchen; | |
| private Bedroom apartmentBedroom; | |
| private Bathroom apartmentBathroom; | |
| public static int apartmentCount; | |
| private final int MAX_HEIGHT = 90; | |
NewerOlder