So I just encountered a very interesting problem, and came up with a likewise very interesting solution. Recently, my family has made the switch from everyone getting gifts for everyone for Christmas to each person getting gifts for a single person assigned to them. I volunteered to make a JavaScript auto-assigner that will randomly assign one person to each of us and then privately email each of us with the person that we have been assigned.
(Finished in only 589 lines of code, not including another 420 lines of test code!)
*** View this blog with HTTP instead of HTTPS to see the code formatted nicely. ***
Showing posts with label script. Show all posts
Showing posts with label script. Show all posts
Monday, November 20, 2017
Christmas Assigner Problem
Labels:
algorithm,
array,
assigner,
calculator,
Christmas,
computation,
efficiency,
email,
exchange,
for,
gift,
HTML,
JavaScript,
loop,
object,
script,
SMTP,
SMTP2Go,
some
Tuesday, October 23, 2012
Flash of Unstyled Content (Annoying White Flash)
Yup, I'm about to cover one of the most prominent web page styling problems ever known to man: the Flash of Unstyled Content (FOUC)!
What is it? Well, there are two different ways of explaining it:
Let's fix it! :)
What is it? Well, there are two different ways of explaining it:
- To the viewer, it's that annoying white flash that you see every time you view a different page on a website when the website has a background image or background color that isn't white.
- To the web coder, it's that short moment of time during which the page is unstyled (defaulting to a blank white page) that annoys the viewers.
Let's fix it! :)
Friday, March 30, 2012
Using the PhotoSwipe Image Gallery Script
This tutorial is in response to a specific request by someone who wanted to know how to implement the PhotoSwipe Image Gallery script into a mobile JQuery website. Here's a link to PhotoSwipe for some context and a download link of the script for yourself:
http://www.photoswipe.com/
Here is a link to what our final product will be - you should test it out:
http://thecodingwebsite.com/tutorials/photoswipe/photoswipe.html
I basically just used their code examples and example images and removed all of the unnecessary code and such to determine the essential parts needed for a mobile JQuery website implementation. If you would like to just download my working example as a whole, I have placed it into a zip file for you:
http://thecodingwebsite.com/tutorials/photoswipe.zip
http://www.photoswipe.com/
Here is a link to what our final product will be - you should test it out:
http://thecodingwebsite.com/tutorials/photoswipe/photoswipe.html
I basically just used their code examples and example images and removed all of the unnecessary code and such to determine the essential parts needed for a mobile JQuery website implementation. If you would like to just download my working example as a whole, I have placed it into a zip file for you:
http://thecodingwebsite.com/tutorials/photoswipe.zip
Subscribe to:
Posts (Atom)