- What is RegExp
- Simple example vs advanced example
- Character groups
- Quantifiers
- Capture groups
- Re-visit simple example and break it down
- Re-visit advanced example and break it down
- How you can use it in your everyday life (Show how vsc can do regex searches to match all etc)
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
#!/bin/sh | |
tmux new-session -n "Name of window 1" -s "dev" -c "/home/<User>/workspace" -d '<command to run e.g. nano file.txt>' | |
tmux new-window -n "Name of Window 2" -c "/home/<User>/workspace" '<command to run e.g. nano file.txt>' | |
tmux next-window # Selects the next window, since we're currently selecting the last window, the next window is the first window | |
tmux -2 a # now we attach to the newly created session using 256 color mode |
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
#ifndef BINARYSEARCHTREE_H | |
#define BINARYSEARCHTREE_H | |
#include <iostream> | |
using namespace std; | |
template<typename AnyType> | |
class BinarySearchTree | |
{ | |
private: | |
class Node | |
{ |
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
const originalWords = "makes my dick hard"; | |
const wordArray = originalWords.split(" "); | |
function perm(xs) { | |
let ret = []; | |
for (let i = 0; i < xs.length; i = i + 1) { | |
let rest = perm(xs.slice(0, i).concat(xs.slice(i + 1))); | |
if (!rest.length) { | |
ret.push([xs[i]]) | |
} else { |
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
// rotation variable is the rotation of the rect in radians | |
// rectWidth is the width of the rectangle in question | |
// rectX is the x position of the top left most corner of the rectangle | |
// rectY is the y position of the top left most corner of the rectangle | |
const rotatedXDelta = rectWidth * Math.cos(rotation); | |
const rotatedYDelta = rectWidth * Math.sin(rotation); | |
const rotatedX = rectX + rotatedXDelta; | |
const rotatedY = rectY + rotatedYDelta; |
Poerves [Support] (Captain) Twitch: https://www.twitch.tv/poerves
- Alexstraza (P:5 | W:2 | L:3)
- Whitemane (P:5 | W:2 | L:3)
- Deckard (P:1 | W:1 | L:0)
- Malfurion (P:1 | W:0 | L:1)
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
javascript:(function() { | |
let d = new Date(); | |
let ch = d.getHours(); | |
let cm = d.getMinutes(); | |
let cY = d.getFullYear(); | |
let cM = d.getMonth(); | |
let cD = d.getDate(); | |
let cd = cY+"-"+cM+"-"+cD; |
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
public findDistanceBetweenPoints(pointA, pointB) { | |
var a = pointA["x"] - pointB["x"] | |
var b = pointA["y"] - pointB["y"] | |
var length = Math.sqrt(a*a + b*b) | |
return length | |
} | |
public findSlope(pointA, pointB) { | |
var a = pointB["y"] - pointA["y"] |
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
def find_diagonal_match(matrix, y, x, searchLeft=False): | |
negator = -1 if searchLeft else 1 | |
match = True | |
if len(matrix) < y+5 or (len(matrix[y]) < x+5 and x-5 > 0): | |
match = False | |
for i in range(1, 5): | |
if not match: | |
break | |
newX = x + (negator*i) | |
match = matrix[y+i][newX] == matrix[y][x] |
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
tArgs = {...} | |
local rows = tonumber(tArgs[1]) | |
local columns = tonumber(tArgs[2]) | |
local enderchest_index = tonumber(tArgs[3] or -1) | |
y = 0 | |
print(string.format("Filling %s by %s area with refill chest on index %s", rows, columns, enderchest_index)) | |
function refillFromEnderchest() | |
turtle.select(enderchest_index) |
NewerOlder