Skip to content

Instantly share code, notes, and snippets.

View TottoMoe's full-sized avatar

Jenny Deng TottoMoe

View GitHub Profile
@TottoMoe
TottoMoe / 724.FindPivotIndex.md
Last active November 8, 2022 23:48
LeetCode_724_solution

LeetCode_Find Pivot Index

(Google Interview Question)

Solution

 var pivotIndex = function(nums) {
    let leftSum = 0;
    let n = nums.length;

let total = 0;

@TottoMoe
TottoMoe / regex.md
Last active October 11, 2022 20:58
Regex Tutorial

Regex Tutorial for Matching an Email

Matching an Email – /^([a-z0-9_.-]+)@([\da-z.-]+).([a-z.]{2,6})$/i

Summary

Regulare expression is a sequence of characters that specifies a search pattern in text. In my Regex Tutorial, I used /^([a-z0-9_.-]+)@([\da-z.-]+).([a-z.]{2,6})$/i to matching an email address. Any email address, can be used by a programmer to check whether the user entered a properly formatted email address, in juest one line of code.

Table of Contents

@TottoMoe
TottoMoe / mysql_cheat_sheet.md
Created September 2, 2022 21:04 — forked from bradtraversy/mysql_cheat_sheet.md
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH