Paul's Programming Notes     Archive     Feed     Github

2nd Place - Ericsson & North Texas Food Bank Hackathon

The “Hackathon” was a programming competition sponsored by Ericsson to solve some of the North Texas Food Bank’s problems.

We made a scheduling system that allows people to see which days need more volunteers, then sign up to volunteer. The coolest part is that it would call people with a prerecorded message reminding them of their appointment.

Calculate Weeks In Sharepoint


This is a modified version of this formula which didn't give me the correct week number (maybe due to regional settings?): 

It matches the number of weeks calculated in excel and all the calculators I could find on the internet.

Update: I also needed to add a 0 before the "Week" if the number is less than 10, because it will cause an error in sorting otherwise.

Here's the formula to add a 0 if the number is less than 10:
=IF((INT((Date-DATE(YEAR(Date),1,6)+(TEXT(WEEKDAY(DATE(YEAR(Date),0,1)),"d")))/7)+1)<10,"0"&(INT((Date-DATE(YEAR(Date),1,6)+(TEXT(WEEKDAY(DATE(YEAR(Date),0,1)),"d")))/7)+1),(INT((Date-DATE(YEAR(Date),1,6)+(TEXT(WEEKDAY(DATE(YEAR(Date),0,1)),"d")))/7)+1))&" "

(Note: the &" " part forces it to be a string rather than a floating point value)

Impressive Javascript

"D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation."

Google Charts - GeoMap vs GeoChart

GeoMap - The map is rendered in the browser using an embedded Flash player.

GeoChart - Rendered using SVG

I noticed the GeoChart loads faster (at least in Chrome).

SQLSRV30.EXE is not a valid Win32 application

If you want to install the PDO drivers for PHP 5.4, you will need to extract SQLSRV30.EXE with Winrar.

Since I was using EasyPHP, I needed to extract the files into the following directory (there's also another php directory in EasyPHP, not sure why, but it's worth adding the files under "ext" there too): C:\Program Files\EasyPHP-12.1\php\php546x120827090829\ext

You will also need to add the following lines to your PHP.ini file under PHPExt: