- Visual Studio Build Tools 2022
- Visual Studio Build Tools 2019
- Visual Studio Build Tools 2017
- Visual Studio Build Tools 2015
Visual Studio 2022:
def sqrt_julia_regression(x, first_trial_root=1): | |
""" | |
Function that calculates the square root of an natural number using the Julia Regression Method. | |
Params: | |
x (int) - Natural input number | |
first_trial_root (int) - First root to try | |
Return (int): natural root found or None | |
""" | |
current_root = first_trial_root | |
current_square = first_trial_root**2 |
For fun, I had ChatGPT take the free response section of the 2022 AP Computer Science A exam. (The exam also has a multiple-choice section, but the College Board doesn't publish this.) It scored 32/36.
from random import sample | |
from typing import List | |
def thanos_sort(items: List, reverse: bool = False) -> List: | |
""" Sorts a list by snapping the list until it is sorted. | |
"Because you murdered half the planet!" | |
"A small price to pay for salvation." |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
Warning: Do not try those command in your main PC, I test in a virtual Machine
Note: Most of commands are from the Dockerfile
in Reference section. If you want to test wine, just run their docker container
sudo dpkg --add-architecture i386
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo tee /etc/apt/trusted.gpg.d/winehq.asc
@Test(testName = "Listen for Sound", description = "Check that, when clicking the 'A' key, a sound is played", groups = {"01Drums"}) | |
public void soundPlayTest() throws InterruptedException { | |
driver.findElement(By.xpath("/html/body/div[2]/div[1]")).click(); | |
WebElement aKey = driver.findElement(By.xpath("/html/body/div/div[1]")); | |
Actions builder = new Actions(driver); | |
Action sendAKey = builder.moveToElement(aKey).sendKeys("A").build(); | |
sendAKey.perform(); | |
Thread.sleep(1000); | |
WebElement audio = driver.findElement(By.tagName("audio")); |