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
#![allow(unused)] // silence unused warnings while exploring (to comment out) | |
use sqlx::postgres::{PgPoolOptions, PgRow}; | |
use sqlx::{FromRow, Row}; | |
// Youtube episode: https://youtu.be/VuVOyUbFSI0 | |
// region: Section | |
// Start postgresql server docker image: |
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 requests | |
from lxml import html | |
pageContent=requests.get('https://www.doi.gov/pressreleases/interior-department-releases-list-monuments-under-review-announces-first-ever-formal') | |
tree = html.fromstring(pageContent.content) | |
#monument | |
tree.xpath('//*[@property="content:encoded"]//tr/td[1]/text()') | |
#location | |
tree.xpath('//*[@property="content:encoded"]//tr/td[2]/text()') | |
#years | |
tree.xpath('//*[@property="content:encoded"]//tr/td[3]/text()') |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>New Webpage</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/magnific-popup.css"> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src=" | |
https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/jquery.magnific-popup.js"></script> | |
<a class="image-link" href="https://www.kasandbox.org/programming-images/animals/butterfly.png">Open popup!</a> |
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
/** | |
* This function takes in a reference to a DOM element, | |
* assumes each of its children are <img> tags, | |
* and then makes a simple slideshow out of the images. | |
* @param container A DOM element | |
*/ | |
var slideShow = function(container) { | |
this.images = []; | |
this.curImage = 0; | |
for (i = 0; i < container.childElementCount; i++) { |