LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Backup file contents with SSIS – Defining the Design

This four part series of articles will go over using SQL Server Integration Services (SSIS) to show how to perform the process of backing up critical files such as config, ini, xml and txt extensions. While we design and discuss the objects that are utilized, the concept of automating heavy administrative tasks will be defined. To perform the tasks of backing up critical files, the Foreach Container, Script Task, Execute SQL Task, Data Flow with the use of Lookup, Conditional Splits and the OLEDB Command will be shown as useful tasks and components to achieving that automation.

Read More...

Encoding to UTF-8 in php

Introduction This week we saw some strange symbols on our launchpad in one of the excerpts of a post. We did however not see this on the blog part of our site. So there must be a difference between the two. The solution We had several ideas but most of them had to do with encoding. This is what it looked like. The first thing I tried after some google was the utf8 encode command.

Read More...

How to Delete Large amounts of data in a Batch.

Recently I had a request to DELETE all the data except the last 30 days of data from a log table that is 80 GB in size. It sounded like a simple request on the surface. However, I couldn’t shut down the web service that logs to that table every 5 minutes. So I had to get the delete done between inserts. So, my only choice was to run the delete in small batches.

Read More...

Better Late Than Never, My 2011 Goals

Baby Ian Another year done and another year to look forward to. Last year I focused on the long term, refining an amorphous long term picture into something with a bit more substance. Along the way I began some good habits and succeeded in a number of near term goals. This year the theme is continued development and new beginnings. With the birth of my son on January 14th, my focus will be less on big achievements and more on items I can work on in small chunks of time (possibly at 4AM with one arm otherwise occupied by baby).

Read More...

Writing Perl Tests with Test::More

Writing tests for code is just as important as writing the code itself. Time spent writing tests is less time spent tracking down and fixing bugs, making it a great investment. Despite knowing this it can sometimes be hard to force yourself to stop coding and write tests. Fortunately, Perl has some modules to make it pretty simple. Here’s the module we’re going to be testing: #!/usr/bin/perl package MyMaths; use strict; sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; bless($self, $class); return $self; } sub add { my $self = shift; my $total = 0; foreach my $factor (@_) { $total += $factor; } return $total; } 1; As you can see, we have a simple class with one method, add, which adds together all the arguments passed to it.

Read More...

Forking nuget to solve the proxy problem

Introduction At work we have a squid proxy and nuget couldn’t connect to the internet because of it. That was a major bummer. The problem was not very new but hard to solve for someone who does not have a proxy to hide behind. There was already a discussion going on. So I set about creating a fork. On my way First thing to do was to create a fork.

Read More...

Setting up a home mediaserver

A few weeks back I bought a Western Digital TV Live it’s an amazing little machine. I connected it to my home network via a wire. A week after that I bought a second one to put in my bedroom and I connected that one wireless. But I’m not going to write a review of that little machine. I have a QNAP TS-210 NAS with 2 terabytes to put all my movies on.

Read More...

Craftsmanship

When I think of craftsmanship I think of Tom Builder. Tom Builder is a character in the novel Pillars of the earth by Ken Follett. Tom is a master mason who gets the honor to build a cathedral. A cathedral is nothing but a big church, a church that should be an example to the community not only of the craftsmanship of the builder but most importantly it should reflect the wishes of the people that wanted it built.

Read More...

24 Hours of PASS - WIT Edition – Awesome Women I'd Love to Hear Talk SQL

On March 15 & 16, 2011, PASS will be presenting another round of 24 Hours of PASS – 24 one-hour presentations given by SQL People. The March event is centered around Women In Technology (WIT), as it is Women’s History Month. PASS put out a call for SQL women speakers to submit abstracts. There was no way I was going to do it. Me, present, when there are speakers like Gail Shaw and Stacia Misner, Kendra Little and Jessica Moss?

Read More...

Improving the code for determining the average color of a fiber

Introduction In my last blog I was playing with the AForge.Net framework and trying to get it to work. This resulted in less than optimal code and no tests what so ever. I find it is nearly impossible to write tests for something you don’t even know what you want it to do. So today I sat behind my PC and improved the code a bit. So that my colleagues can now test this and see if they like it or have any comments on it.

Read More...