Have fun with Particles.js

I have been working on creating an online portfolio to use as my main site. While taking a look at others’, I came across a lot of creative ideas an implementations. One of my favorites so far was particles.js by Vincent Garreau

particles-js-screenshot

It a particle visualizer that you can add to page backgrounds and div layers. There is some interactivity with mouse hover and mouse clicks as well, like creating new particles and pushing them away. If you check out the demo site here you will find different particle configurations like snow and stars:

particles-js-nasa

particles-js-snow

New Blog Theme

screenshot of SEB wordpress theme

I ended up creating a new my blog theme. I wanted something a more minimal. Took about a day to construct, but the code is a lot more cleaner and organized than the previous theme (you can view older posts for images of it). Again this one is responsive and mobile friendly. Its currently active on the blog.

I also uploaded the theme files onto GitHub if anyone wants to check them out (click here). I will try to make changes and updates as I see fit with new features I come across.

Bonfire Exact Change Solution

I started off trying to implement a recursive function for this solution. That proved to be way too complex due to some of the validation that needed to be done. I ended up looking and the typical work flows of calculating correct change so that I could implement it in javascript. The main issue I saw was that none of those solutions accounted for max denomination of currency.

Bonfire Exact Change

Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument. cid is a 2d array listing available currency. Return the string “Insufficient Funds” if cash-in-drawer is less than the change due. Return the string “Closed” if cash-in-drawer is equal to the change due. Otherwise, return change in coin and bills, sorted in highest to lowest order.

First, I did some simple setups for the project. I calculated the change due and created an array of denominations and their values:

Next, I calculate the total amount of cash in the drawer and test for are the base cases:

Read on…

Todo List Made with AngularJS

After going through some tutorials on AngularJS, I did an easy enough project. Its a Todo list. One module and one controller so its very simple and functional. List items are added and delete from an array in the controller.

Todo List AngularJS

You can demo it and find the code on the codepen.