This guide shows per example the installation of the Java SDK versions 8
(LTS, already installed) and 11
(LTS).
apt --names-only search "openjdk-.*jre$"
> Sorting... Done
with open('file.txt', 'r') as file: | |
lines = file.read().split('\n') # lines is a list of the lines of the file | |
dictionary: dict = {} | |
for index, line in enumerate(lines): | |
line = line.split(' ') | |
dictionary[str(index)] = { | |
"white": line[0], | |
"black": line[1], | |
"white score": line[2], | |
"black score": line[4] |
This gist shows how to make the bot wait for a message or reaction after doing a command. This should not be copypasted.
Check the discord.py docs for a detailed explanation of how it all works internally and which kwargs it takes.
See here two commands, one waiting for any message in a channel and the other waiting for a reaction with a specific emoji.
DROP DATABASE IF EXISTS ๐; | |
CREATE DATABASE ๐; | |
USE ๐; | |
CREATE TABLE ๐ค( | |
๐ INTEGER PRIMARY KEY, | |
๐ฃ varchar(64), -- name | |
๐ DATE -- date of registration |
Development Status :: 1 - Planning | |
Development Status :: 2 - Pre-Alpha | |
Development Status :: 3 - Alpha | |
Development Status :: 4 - Beta | |
Development Status :: 5 - Production/Stable | |
Development Status :: 6 - Mature | |
Development Status :: 7 - Inactive | |
Environment :: Console | |
Environment :: Console :: Curses | |
Environment :: Console :: Framebuffer |
#!/usr/bin/python | |
import time | |
def new_d(): | |
return { | |
1: 2, 3: 4, 5: 6, 7: 8, 9: 10, | |
11: 12, 13: 14, 15: 16, 17: 18, 19: 20 | |
} |
/* --- Usage --- */ | |
g++ server.c -o server | |
g++ client.c -o client | |
./server | |
./client 127.0.0.1 | |
/* --- server.c --- */ | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> |