Category: Computers

  • Solr DataImportHandler preImportDeleteQuery gotcha

    One handy feature of the DataImportHandler in solr is that you can group documents by different entities. In the MKB we have a couple different kinds of entities we import – songs, albums, tvshows, etc. Sometimes we make a change or improvement to the underlying data of one type of entity, and want to test…


  • Pretty printing json

    Here is a really simple way to pretty print some unformatted json $ echo ‘{“foo”: “lorem”, “bar”: “ipsum”}’ | python -mjson.tool { “bar”: “ipsum”, “foo”: “lorem” }


  • Using awk to sum rows of numbers

    I have a script which takes a tab-delmited file for regression tests, and converts it xml. I want to do a sanity check, to make sure that the number of utterances in my xml files matches the number in the tab-delimited.txt file. I can do this in 2 lines in UNIX robert_felty$ wc -l samples2.txt…


  • Small fix for article class in plasTeX

    I recently found a small error in plasTeX, the program I like to use to convert latex to html. Unfortunately, it looks like it is not being actively developed anymore, but since it is open-source, and it is written in python, which I know, I was able to figure out the issue in not too…


  • Em dash in LaTeX

    My friend Daniel Reeves was recently discussing different ways to typeset em dashes. Here is the way I like to do it in LaTeX. \documentclass{minimal} %this sets up a new command \dash, which makes nice dashes \DeclareRobustCommand\dash{% \unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces} \begin{document} Let’s test out several different variants on making an em dash using the \LaTeX typesetting system…


Join 165 other subscribers

archives

  • 2025 (6)
  • 2024 (10)
  • 2023 (8)
  • 2022 (15)
  • 2021 (19)
  • 2020 (1)
  • 2019 (1)
  • 2018 (2)
  • 2017 (1)
  • 2016 (2)
  • 2015 (5)
  • 2014 (5)
  • 2013 (2)
  • 2011 (7)
  • 2010 (10)
  • 2009 (50)
  • 2008 (28)
  • 2007 (31)
  • 2006 (8)

Category