Advent of Code 2022 Day 3

Challenge – Part 1 https://adventofcode.com/2022/day/3 Problem vJrwpWtwJgWrhcsFMMfFFhFp jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL PmmdzqPrVvPwwTWBwg wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn ttgJtRGJQctTZtZT CrZsJsPPZsGzwwsLwLmpwMDw The first rucksack contains the items vJrwpWtwJgWrhcsFMMfFFhFp, which means its first compartment contains the items vJrwpWtwJgWr, while the second compartment contains the items hcsFMMfFFhFp. The only item type that appears in both compartments is lowercase p. The second rucksack’s compartments contain jqHRNqRjqzjGDLGL and…

Advent of Code 2022 Day 2

Challenge – Part 1 https://adventofcode.com/2022/day/2 Example For example, suppose you were given the following strategy guide: A Y B X C Z This strategy guide predicts and recommends the following: In the first round, your opponent will choose Rock (A), and you should choose Paper (Y). This ends in a win for you with a…

How to deal with date and time in SQLite

Motivation When dealing with databases you will need the ability to store certain dates and/or timestamps in your tables. Let’s find out how you can do that in an SQLite database. SQL table creation SQLite has the data type TIMESTAMP for storing date-times CREATE TABLE social_media ( social_media_id INTEGER, insertion_date TIMESTAMP, yt_subs INTEGER fb_pg INTEGER…