-
Recursion and How to Get All the records from a paginated API

I was recently working with an API that limited the max number of items it let you call at once. This was frustrating, because I needed everything. The solution, thankfully was recursion. Recursion is really fun when you get to use it. I needed to use this solution in both JavaScript and Python, so I…
-
How to see if a class was added to an element using JavaScript

If you need to see if a class has been added to an element the easiest way is to trigger a new event when you add the class. The problem with this solution is what happens if you do not have control over the function where this happens. Like if it happens in the WordPress…
-
How to recursively make a directory (folder) with PHP

When I need to generate or save files in a web application it’s important that I keep all the files in an orderly fashion. Sometimes I think that there’s a fine line between impressionistic and messy. – Lady Gaga Here’s the go-to code I use to generate the directory structure. You can find more solution…