There are 50 horses and 50 kings riding along an old dirt road. (We still have Kings? WTH?!) They came to a peach tree with 50 peaches (peach tree grows well somewhere I guess!). Each took one, yet there were still 49 left. How is this possible? Well, capitalization may be of importance, or not. […]
Category: STEM
How do those words game work???
Here I’ll show you the basic concepts of the most famous word games…and how they are actually coded. Obviously, I’m NOT going to show you advanced algorithms or any proprietary information here. Just the basics…you go party on with this information with your own creativity. There are numerous games out there based on this concept. […]
You Won’t Believe This! (Zen of Python)
If you just want to know what programming principles the founders of Python wanted you to stick with, there’s a simple code to expose them all! Add the following code to your python shell:
1 |
import this |
Yep. One line of code. What do we get? Beautiful is better than ugly. Explicit is better than implicit. Simple […]
Editing Registry using C/C++
WARNING: This is a real easy one, but can be dangerous! Do NOT use this for any malicious or system purposes unless you have been instructed to do so from a verified support professional! This is NOT intended to be anything other than for a test and education. I’ve written millions of lines of code […]
How to change keyboard strokes (C/C++) Part 2/2
This is part 2. Please refer to the part 1 for context. In the following simple C program, I’ll demonstrate how to capture keystrokes and turn them into something completely different…other than what the key labels read. This is the basic idea behind changing keyboards from English to another language; take the input from the […]
Digit To Word And Vice Versa (Python)
How can we convert in a program from words like “eight” to the number 8? How can we convert the number 10 to the letters “Ten”? Here, I show you multiple ways to do it bi-directionally…from letters to digits, and digit to letters. I’ve seen several implementations and many rely on ASCII ordinals. But I […]
Let’s Play Palindrome! (C/C++)
Did you know that the longest Palindromic word in the Oxford English Dictionary is “tattarrattat” coined by James Joyce in Ulysses (1922) meaning “a knock on the door”? What is a Palindrome, you ask? Well, you already know it or have seen it. According to Wikipedia: “A palindrome is a word, phrase, number, or other […]
Let’s Play Palindrome! (Python)
Did you know that the longest Palindromic word in the Oxford English Dictionary is “tattarrattat” coined by James Joyce in Ulysses (1922) meaning “a knock on the door”? What is a Palindrome, you ask? Well, you already know it or have seen it. According to Wikipedia: “A palindrome is a word, phrase, number, or other […]
How Similar are Two Words?
Ever wonder what similarity a pair of words have with each other? Quantifiably? As in percentage? As in 50% match or 100% match, etc.? (Whoa, wouldn’t that be great if that worked out in dating world, eh?). Anyway, it’s okay if you haven’t wondered about it, because I did and here I share a few […]
Letters to Patterns (what does your name look like?)
Letters, in whatever language/scripts are really glyphs aren’t they? They’re a visual representation of a letter that’s supposed to sound (or not sound) like something that we repeated until we memorized it since birth. All good 🙂 I was thinking of different ways to represent letters…you know, just for fun! Yes, I’m weird like that. […]