Monday, April 29, 2013

JavaScript Null Checking, Undefined and ! Unary Operator

Google searches of "JavaScript null check" and "How to check for null in JavaScript" were returning results that left something to be desired in my opinion, so I compiled this list.

See the code live here: JsFiddle: http://jsfiddle.net/aaronhoffman/DdRHB/5/
Code also available here: https://github.com/aaronhoffman/JavaScriptUtilities


Comparison Chart:



Hope this helps,
Aaron


p.s. I used a great tool Regex Pixie http://www.regexpixie.com/ by StoneFinch http://stonefinch.com/ to generate most of the code in this example (disclaimer, I currently work for them, however I would never promote a tool I don't use myself.)

Sunday, April 28, 2013

Microsoft Excel 2013 Sort Pivot Table By Calculated Field

Sorting a Calculated field (or Value field) in Excel 2013 Pivot Tables may not be very clear.  Unlike the Row fields there is no option button in the column header allowing you to easily sort the column, but it is possible.

In the example below, I have a Pivot Table with "ListItemAbv" as the Row and "Count of ListItemAbv" as a calculated field (there is also a filter on "RankOrder", but that is not relevant to the example)



Notice that, by default, the Pivot Table is sorted by "ListItemAbv."  There is also an option button visible in the header column (A:3).  You can use that option button to easily sort the Pivot Table by "ListItemAbv."

However, there is no option button available to sort the Pivot Table by the Calculated field "Count of ListItemAbv".  To sort by that calculated field, select the entire column and use the "Sort & Filter" section of the Data tab in the Ribbon menu.  The row labels will follow their associated calculated values even though they are not currently selected.



Hope this helps,
Aaron

Friday, March 15, 2013

How to Turn Off Microsoft Arc Touch Mouse Scroll Sound Vibration

I recently purchased a Microsoft Arc Touch Mouse and wanted to turn off the middle button wheel scroll sound vibration.

It is possible, however perhaps not obvious.  First you need to download the "Mouse and Keyboard Center" executable available on this page http://www.microsoft.com/hardware/en-us/p/arc-touch-mouse#support.

(direct link Win8 x64: http://download.microsoft.com/download/F/C/7/FC7DF6B2-F815-4004-9468-BE196233F562/MouseKeyboardCenter_64bit_ENG_2.1.177.exe )


Run the executable and install the software.  After the software is installed, turn off "Vibration." See image below:

























Hope this helps,
Aaron