ag-Grid String Comparator

I’ve been using ag-Grid and it’s pretty great for representing tabular data. The goal of the ag-Grid team is to create “The Best HTML5 Grid in the World”, and I think they’ve done that. Anyways, just by setting an option in the the grid’s configuration (i.e. gridOptions.enableSorting = true) you can make a grid (a.k.a. table) sorted by a column’s value. But the default sorting on strings is not quite what one would want – at least in many cases. For example, when there’s a space between words in a string or the capitalization is mixed the sorting doesn’t appear to be lexicographical.
Continue reading

Git Ignore Current Changes in a File

Recently, I was working on a Web project where the HTML page referenced external JavaScript files – a quite common scenario. The development/testing and the live version of the project were on the same server and used the same socket for hosting. This was on an enterprise platform where these constrains were operationally fixed. So, the HTML page where I was doing the development work pointed to different JavaScript files (development JS files) than did the HTML file located in live repo (the live JS files). This difference – the location of the external JS files (development vs. live) – would always exist between the two repos, and I wanted to ignore this difference so I can use the two git repos to work on and maintain the project.
Continue reading

Pandas Basics I: Series and DataFrames

What is Pandas?

Pandas is a free software (software libre) data analysis library for the Python programming language. The library provides analysts and programmers data structures optimized for working with large data sets, and methods for examining and manipulating that data. It uses another free software library, NumPy, for underlying data structures, and Pyplot to generate plots – graphs, histograms, etc.
Continue reading