Posts

Showing posts from August, 2014

Window snap to quarter screen

The other day, I was playing with Linux Mint, and I realized that it would respond to Windows hotkey commands to "snap" windows to half of the monitor.  However, would also allow me to snap into a corner (a quarter of the screen) or to the top or bottom half of the screen - two things Windows does not do.  As a friend commented, "Linux does Windows better than Windows does Windows. I've wanted this funtionality before, but I had never gone looking for an add-on to do it.  Today I found an excellent solution - WindowPadX.  It is open source (free for personal & commercial) and very lightweight.  It allows you to use the Win key + a number on the number pad to perform all of the functions mentioned above. The documentation is non-existent, but I managed to get it running with relatively little trouble.  Here's what I did: Install AutoHotkey .  Yes, it requires a separate piece of software to run :(.  However, this is one that I've been wa...

SQL command works from Management Studio but not command line (SqlCmd)

SQL Server has a command line component which allows users to run SQL commands directly or in files from the command line.  The command is sqlcmd (or Invoke-SqlCmd for Powershell). I recently ran into a situation in which my commands would run just fine in SQL Server Management Studio, but failed from the command line.  Specifically, I was running a series of SQL commands stored in files.  I would run the files one after another. What I found is that some of the files were missing the "USE [DatabaseName]" directive.  So, when those files ran, they were not targeting the correct database.  These worked in Management Studio however, because the earlier scripts had the directive, and Management Studio holds onto that setting.  That is, once a script sets the target database, it will use that database until instructed otherwise.  The command line tools do not do this.

My short guide to basic job economics

The Problem Over the past few years I have been repeatedly surprised by comments from (usually) younger friends who complain that they should be paid more or should be able to get a better job but cannot.  They seem to think they should be able to show up at a job with few applicable skills, be trained in a new profession, and be paid well.  This is such a common train of thought, I've decided to briefly tackle the underlying issue: lack of understanding of basic job economics. Background So...When a company hires an employee, they don't do it out of the goodness of their heart.  They are hiring that person because the believe they can bring in more money than they are paid.  As an employee, your pay is calculated based on the increase in revenue that you will generate and the number of other people that could do your job.  It really has nothing to do with how much you think you should make or how much money it takes to support your family.  It's al...

NUnit & the dll.config problem

I've been trying to get some integration tests working in NUnit, and I ran into a problem which took quite a while to figure out.  When I ran my tests I would get an error to the effect that myAssembly.dll.config was missing.  The actual error message looked something like this: System.Exception : the binding "..." as not found.  Are you missing the configuration file: "C:\Users\JSCHRAG\AppData\Local\Temp\nunit20\ShadowCopyCache\13740_324684314354321453\Tests_239482734597|assembly\d13\blah\blah\myAssembly.dll.config" Essentially, I believe that NUnit is trying to run the tests in its own app domain, and it can't find the config file in its temp folder.  Every blog, forum posting, etc. that I could find said to simply put the config file in the same folder with the dll (in my case, the bin folder).  I tried every combination of this I could think of with no luck. The thing that finally worked was running the tests in the primary domain.  Details here:...