Common List of Mac Keyboard Shortcuts

Learning keyboard shortcuts and getting familiar with your tools are great ways to be more productive. Keyboard shortcuts not only minimize the amount of time that you're navigating your cursor, but also become second nature to getting around your OS, documents, and applications. Here are a few shortcuts that I use on a regular basis. I'll ...

Arranging an array of flat paths into a JSON tree like structure

I recently worked on a project where I was required to take an array of flat paths separated by slashes and arrange them into a JSON object in order to display them in a tree from the front end. To be clear, the paths that I was provided looked something like this. /FolderA/FolderB/FolderC/Item1 /FolderA/FolderB/Item1 /FolderB/FolderD/FolderE/Item1 /FolderB/FolderD/FolderE/Item2 /FolderA/FolderF/Item1 /ItemInRoot Given this list of ...

How To: ASP.NET MVC HtmlHelper Extension Methods

0 No tags Permalink 1

Creating extension methods for our HtmlHelpers is a great way to minimize a lot of logic in our view. HtmlHelper extensions minimize unnecessary clutter and keep our view focused on how the page is displayed to our user rather than the logic behind it. Create a Helper Extension Method using System.Net; using System.Web.Mvc; namespace SomeProject.HtmlExtensions { public ...

Monty Hall Brainteaser Simulation

0 No tags Permalink 1

The Monty Hall problem is a brain teaser, in the form of a probability puzzle (Gruber, Krauss and others), loosely based on the American television game show Let's Make a Deal and named after its original host, Monty Hall. The problem was originally posed in a letter by Steve Selvin to the American Statistician in ...