File detailing what I've worked out so far from investigating the Show My Homework API.
API requests are made in the form of a HTTPS GET request to the SMH API endpoint.
File detailing what I've worked out so far from investigating the Show My Homework API.
API requests are made in the form of a HTTPS GET request to the SMH API endpoint.
double closest = Double.MAX_VALUE; | |
Player closestp = null; | |
for(Player i : Bukkit.getOnlinePlayers()){ | |
double dist = i.getLocation().distance(event.getPlayer().getLocation()); | |
if (closest == Double.MAX_VALUE || dist < closest){ | |
closest = dist; | |
closestp = i; | |
} | |
} | |
if (closestp == null){ |
import subprocess | |
import sys | |
def inp(prmpt): | |
result = input(prmpt) | |
if result == "redo": | |
raise IndexError # lol | |
elif result == "quit": | |
sys.exit(0) |
n : 10 | |
i : 0 | |
sq : [n - i : ( @s | |
's' : 0 | |
'c' : 0 | |
'sum': [i - 'c' : (@c | |
's' : 's' + i | |
'c' : 'c' + 1 | |
) |
Hi Victor,
I'm a reasonably experienced programmer and I've identified some areas in which I feel you could improve your program. Firstly, I'd like to congratulate you on building a working version of your game. I remember working on a similar project about five years ago and it was the first non-trivial program I completed in Python. It was then that I first felt the satisfaction of creating something meaningful with a keyboard and a text editor. Enjoy that feeling - it makes up for the frustration of fighting errors after crashes after bugs.
The first suggestion I would make to you would be to reduce your use of global variables. Beginner programmers tend to overuse global variables, as they are very simple to use. If all the information about your program (commonly called 'state') is stored in global variables, you don't have to think very hard about where it is stored when you need to use it. This might seem like a good thing, but when your programs start to get more complex global variables will qu
On the one hand I feel like JWS could do with putting their younger kids into IQ to develop their skills in the proverbial shallow-end and reduce the sheer number of their robots in VRC UK. On the other hand they do a reasonable job of bringing their younger kids up to a competitive level quickly, and there's a strong argument that the best training for VRC is to compete in VRC!
Besides - is it my place to say that an organisation should restrict the number of robots they enter? Perhaps it is not. Clearly VEX has a great positive impact on the students who participate in it. From my experience, I can say with absolute certainty that you don't have to be competing to be the best team in the country to take a great deal away from VEX competition. Even if you're just building a squarebot and are coming into competitions expecting to be back on the M25 by midday - not to insinuate that JWS teams do that, because they rarely enter genuinely weak teams - there are few more worthwhile extra-curricular pursuits than
import math | |
import random | |
class Buffer: | |
def __init__(self, one, two): | |
self.one = str(one) | |
self.two = str(two) | |
self.length = max((len(self.one), len(self.two))) + 1 | |
def __call__(self, obj): |
import requests | |
params = {"country": "United Kingdom", "grade": "High school"} | |
r = requests.get("https://api.vexdb.io/v1/get_teams", params = params) | |
j = r.json() | |
if j["status"] == 1: | |
print(len(j["result"])) |
/* | |
======= Vanwall Library Code ======= | |
- Vanwall is a VEX Robotics library intended to streamline the process of programming VEX Robots | |
- It provides intuitive interfaces for working with Motors and Controllers | |
*/ | |
/* Motor Types, for the _type member of Motor structs */ | |
typedef enum {HIGH_SPEED, TORQUE} MotorType; | |
/* Coefficient Presets, for the _coeff member of Motor structs */ |