Paul's Programming Notes PostsRSSGithub

Dynamically Import Data From Other Workbooks - Google Spreadsheet

I made a google spreadsheet which pulls data from two other workbooks using “importRange” and QUERY function. You can use either one if you just want to pull a few columns from another spreadsheet. QUERY provides more flexibility by allowing you to use a SQL statement. Here is an example of a query which pulls 2 columns from another workbook and filters out the blank rows in column 41:

=QUERY(importRange("yourSpreadsheetKeyHere", "Donations!A3:BB200000"), "select Col41, Col2 WHERE Col41!='' ", 1)

One of the biggest pains during the entire process was google spreadsheet’s vlookup. I learned the vlookup function only searches for a value in the first column in the Array. It’s also helpful if you format the results of your vlookup as “Plain Text” under the numbers format drop-down. Of course, something formatted as a number won’t match something formatted as plain text.

You could use this technique if you have a list of customer id’s with names, and a separate spreadsheet with more customer information. With this, you could combine that information.

Don't Use == null - Python

http://stackoverflow.com/questions/3289601/null-object-in-python

It says not to use == to check for “none-ness”. It’s better to use:

if variable is none:
    <your code>

Why? “And the reason for choosing egg is None over egg == None: The latter can be overloaded, and is likely to break when comparing valid object with None (depends on how it’s implemented, but you don’t expect everyone to take comparisons with None into account, do you?), while is always works the same.”

King Of Button Generators

buttonoptimizer.com is a CSS button generator. You style a button in the browser and it gives you the CSS to paste into a stylesheet. Handy when I want a decent-looking button without pulling in a whole framework for one element.

Prezi Video With No Audio

I converted a wmv video to a few different formats (mp4 and flv) and still couldn’t get the audio to play in Prezi. However, videos with the following codec settings will work:

codec info

Solution: Open your video with Handbrake and convert it to H264 with AAC as the selected audio codec and it will play just fine.

Useful Bootstrap Links

The Big Badass List of Bootstrap Resources

Also, an user named Billy Cravens on Meetup.com left a ton of good bootstrap links (bootsnip looks especially awesome) in this post: http://www.meetup.com/HoustonCFUG/events/79862792/

Twitter Bootstrap:
https://getbootstrap.com/

Bootswatch: (free Bootstrap themes)
http://www.bootswatch.com

Wrap Bootstrap (premium Bootstrap themes)
http://www.wrapbootstrap.com

Common Bootstrap Snippets
http://www.bootsnipp.com

Some nice date plugins for Bootstrap
http://www.eyecon.ro/bootstrap-datepicker/ https://github.com/dangrossman/bootstrap-daterangepicker

Bootstrap WYSIWYG editor plugin
https://github.com/jhollingworth/bootstrap-wysihtml5

Integrating Bootstrap with jQueryValidate
jQuery form validation with Bootstrap styles

Nice data grids:
http://www.datatables.net

Integrate Bootstrap with Data Tables:
http://datatables.net/blog/Twitter_Bootstrap_2

HTML5 In < IE9

html5shiv

I saw this javascript library in the code for the Mozilla Support page (really well done). It looks like it adds HTML5 functionality to older versions of IE. Looks like it should be really useful in the future.