Coding

Coding

Python Learning: Automate Boring Stuff with Python | Chapter 8 : My Solution to Project Multiclipboard

# mcb.pyw : Saves and loads pieces of text to the clipboard # Usage: py.exe mcb.pyw save <keyword> – Saves clipboard to keyword # py.exe mcb.pyw <keyword> – Loads keyword to clipboard # py.exe mcb.pyw list – Loads all keywords to clipboard # py.exe mcb.pyw read <path text file> <keyword> import shelve import pyperclip import […]

Coding

Python Learning: Automate Boring Stuff with Python | Solution to Part II Chapter 7 Practice Project II

import re #first argument – string to be stripped #second argument – char or default ” ” def customStrip(string: str, stripChar: str=”\s”)->str: ”’ Removes specified character from the beginning and end of a given string arguments: string: str stripChar: str returns: string ”’ if stripChar == “” or stripChar == ” “: stripChar = “\s” […]

Coding

Python Learning: Automate Boring Stuff with Python | Solution to Part II Chapter 7 Practice Project I

Solution import re #eight chars long #upper and lower case chars #at least one digit patternHasDigit = re.compile(r”\d+”) patternHasLower = re.compile(r”[a-z]+”) patternHasUpper = re.compile(r”[A-Z]+”) patterns = (patternHasDigit, patternHasLower, patternHasUpper) tests = [“asdfgh57887”, “Asfkg35a”, “23454990-“,”ASHGFDSFGHFDSDFGDS”] for test in tests: status = True for pattern in patterns: if pattern.search(test) == None: print(“{} failed {} test”.format(test, pattern.pattern)) status = False […]

Coding, JavaScript, Software Development

What I learned today | Functional Javascript: Variables Scope and Closures

Remember the Book: Functional JavaScript   So chapter 3 right?…hm Scopes From my understanding, where a variable lives, while the extent of a scope means how long a variable holds a value. Global Scope This has the longest lifespan when you declare a variable without the var, you are defining a global variable (accessible to […]

Coding, JavaScript, Software Development

What I learned today | Functional Javascript | Chapter 2 | First-Class Functions and Applicative Programming

Hey!! you missed me ? no..okay .. so chapter 2 First Class Functions According to the author, I quote, “the term first class means that soething is just a value. Is one that can go anywhere that any other value can go”. Therefore a first class function is as shown below: var number = function(){return […]

Coding, JavaScript, Software Development

What I learned today | Functional Programming in JavaScript | Chapter 1

In my most recent Coding Blog Post I briefed on what I learned while reading the Book “DOM Enlightment“. The book improved my knowledge of DOM transversing, specific and list selection, style manipulation  etc. This time I have decided on reading the book “Functional JavaScript” by Michael Fogus. I hope to prevent redundancy in my […]

Coding, JavaScript, Software Development

Interesting ways to manipulate the DOM using (vanilla) JavaScript Part 2

Hope you found the part 1 helpful.. Okay, let’s begin… Styling style property to access a specific style property e.g. border-width, use selection.style.borderWidth or for background-color backgroundColor. getProperty, setProperty, removeProperty methods get – takes in only one argument; returns the value of that property e.g. selection.getProperty(“background-color”) set – updates the value of a specific property; […]

Coding

Menu Icon with Transition without JS

  the Video / Tutorial https://www.youtube.com/watch?v=g3rodjSPfPI     These might interest you:React Transitions for Dummies | Part 1 : Transition,…I am learning Python in 2020 – Beginner – Making a…DropDown Menu with ONLY CSS and HTMLReact Transition for Dummies | Difference between…