Skip to content

Instantly share code, notes, and snippets.

View kylethedeveloper's full-sized avatar
trying to reinvent time

Kyle kylethedeveloper

trying to reinvent time
View GitHub Profile
@kylethedeveloper
kylethedeveloper / selenium-hub.yml
Created October 19, 2020 05:24
Selenium Grid docker-compose
version: "3"
services:
selenium-hub:
image: selenium/hub
container_name: selenium_hub
ports:
- "4444:4444"
environment:
GRID_MAX_SESSION: 16
GRID_BROWSER_TIMEOUT: 3000
@kylethedeveloper
kylethedeveloper / simple_word.cpp
Created April 28, 2019 09:05
Simple program that prints out the number of letters, vowels and consonants in a word.
#include <iostream>
#include <string>
using namespace std;
int main() {
int vowel;
bool space = true;
string word;
@kylethedeveloper
kylethedeveloper / p10_projecteuler.cpp
Last active April 27, 2019 13:09
Project Euler - Problem 10 - Summation of primes
/*
Project_10.cpp : Summation of primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
*/
#include <iostream>
using namespace std;
int main()
@kylethedeveloper
kylethedeveloper / p8_projecteuler.cpp
Created April 11, 2018 11:57
Project Euler - Problem 8 - Largest product in a series
/*
Project_8.cpp : Largest product in a series
The four adjacent digits in the 1000-digit number
that have the greatest product are 9 × 9 × 8 × 9 = 5832.
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
@kylethedeveloper
kylethedeveloper / p7_projecteuler.cpp
Last active April 11, 2018 09:45
Project Euler - Problem 7 - 10001st prime
/*
Project_7.cpp : 10001st prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13,
we can see that the 6th prime is 13.
What is the 10 001st prime number?
*/
#include <iostream>
using namespace std;
@kylethedeveloper
kylethedeveloper / p6_projecteuler.cpp
Created April 11, 2018 08:57
Project Euler - Problem 6 - Sum square difference
/*
Project_6.cpp : Sum square difference
The sum of the squares of the first ten natural numbers is,
1^2 + 2^2 + ... + 10^2 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)^2 = 55^2 = 3025
Hence the difference between the sum of the squares of the first ten natural numbers
and the square of the sum is 3025 − 385 = 2640.
@kylethedeveloper
kylethedeveloper / p5_projecteuler.cpp
Created April 9, 2018 18:44
Project Euler - Problem 5 - Smallest multiple
/*
Project_5.cpp : Smallest multiple
2520 is the smallest number that can be divided by each of the numbers
from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by
all of the numbers from 1 to 20?
*/
#include <iostream>
using namespace std;
@kylethedeveloper
kylethedeveloper / p4_projecteuler.cpp
Created April 9, 2018 18:42
Project Euler - Problem 4 - Largest palindrome product
/*
Project_4.cpp : Largest palindrome product
A palindromic number reads the same both ways.
The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest palindrome made from the product of two 3-digit numbers.
*/
#include <iostream>
using namespace std;
@kylethedeveloper
kylethedeveloper / p3_projecteuler.cpp
Last active April 9, 2018 18:36
Project Euler - Problem 3 - Largest prime factor
/*
Project_3.cpp : Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
*/
#include <iostream>
using namespace std;
int main()
@kylethedeveloper
kylethedeveloper / p2_projecteuler.cpp
Created April 9, 2018 18:32
Project Euler - Problem 2 - Even Fibonacci numbers
/*
Project_2.cpp : Even Fibonacci numbers
Each new term in the Fibonacci sequence is generated by adding the previous two terms.
By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million,
find the sum of the even-valued terms.
*/