![]() |
![]() |
This file contains 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
#include <iostream> | |
#include <vector> | |
#include <random> | |
using namespace std; | |
/* Returns whether a list is sorted */ | |
bool isSorted(vector<int> & list); | |
/* Sorts a list using the standard merge sort algorithm everyone learns in school (requires O(nlog(n)) space) */ |
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
- Loop variables are scoped outside the loop.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }
This file contains 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
CXX = g++ | |
CXXFLAGS = -Wall | |
DOCUMENTATION = | |
BUILD_SYSTEM_FILES = Makefile | |
DATA_FILES = | |
SOURCE_FILES = main1.cpp main2.cpp ClassA.h ClassA.cpp ClassB.h ClassB.cpp |
This file contains 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
Richard II | |
Total Speeches - 554 | |
Total Lines - 2800 | |
Character Speeches Lines | |
KING RICHARD II 98 758 | |
JOHN OF GAUNT 28 191 | |
HENRY BOLINGBROKE 90 413 | |
THOMAS MOWBRAY 13 135 |
This file contains 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 time | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
driver = webdriver.Chrome() | |
driver.set_window_size(1024, 768) # optional | |
url1 = "https://registrar.princeton.edu/score/" | |
url2 = "https://puaccess.princeton.edu/psc/hsprod/EMPLOYEE/HRMS/c/SA_LEARNER_SERVICES.SSR_SSENRL_CART.GBL?Page=SSR_SSENRL_CART&Action=A&ACAD_CAREER=UGRD&EMPLID=960579807&ENRL_REQUEST_ID=&INSTITUTION=PRINU&STRM=1142" | |
driver.get(url1) |