Skip to main content

Blogs

Latent Semantic Analysis in Haskell

Last weekend I decided to learn Haskell with Francis Williams. It was an epic adventure. Last night I implemented LSA - Latent Semantic Analysis using Haskell.

For those of you who are not enlightened: LSA takes a list of documents, extracts terms from them, builds a tf-idf matrix, then compresses the matrix to build a lower dimensional approximation, to improve the speed and accuracy of measuring the similarity between documents.

Node Knockout: Node RPG

Node Knockout

Last weekend I participated in Node Knockout with Francis Williams.

WatTools and other news

I recently launched WatTools. This is a site for University of Waterloo students to find useful tools for school. Most of these tools are built by other students and provide functionality which is missing in Waterloo's web applications.

There are tools for selecting courses, being notified of interviews, putting together a list of citations, and more!

I used some fancy JavaScript to build a system for editing this data.

Ubuntu 11.04: Rotate only one of two monitors (nvidia, X11, xorg.conf)

Edit: This may not work any more. Last time I tried it I failed. If anyone knows how to do this let me know.

Background:
I got a new monitor stand and I wanted to rotate one of my monitors so I can see more code per page. This works easily in Windows, but apparently no one cares enough about Ubuntu. The information I found from a Google search was not very helpful and it took me over an hour to figure out how to do this, so I hope I can help someone with this post.

Disclaimer: There are probably other ways to do this, but this is just the first thing that worked for me.

IE Ate my <div>

Edit: Apparently this only happens in quirks mode. IE 9 can work in one of four modes: quirks mode, IE7, IE8, or IE9 mode. I didn't have a doctype declared, so that forced it to use quirks mode, which apparently is some 10 year old legacy thing.

When I was testing this, I noticed another bug in IE9.

IE7 Margin Bug

I found a bug in Internet Explorer 9 working in IE7 mode today which has to do with the inheritance of horizontal margins.

Update: It turns out that this is a problem only in quirks mode and in IE7 mode!

Description: A input inside a floated div inherits the horizontal margin from the div.

So if we have

<div style="float:left; margin:20px;">
    <input/>
</div>

then the margin-left and margin-right on the input are 20px.

I found something similar here but it doesn't seem to happen

The problem with CSS solved

CSS is not well suited for the purpose it serves. It is not flexible enough to meet the needs of web developers. The problem is that it represents a one-to-many mapping between selectors and styles. Ex:

<div class="navigation">The navigation goes here.</div>
<style type="text/css">
.navigation { color:#af0312; width:100px; }
</style>

In order for a set of different HTML elements to have the same set of styles, the trivial solution is to duplicate the CSS style value, but this is not recommended because if you change the color "red" you have to change it everywhere.

Open Sourced University of Waterloo Tools Drupal Module

Since I'm pretty busy these days with work and a girlfriend, I don't have much time left to start a large project like the Waterloo Tools online service, so I open sourced this Drupal module so that my little contribution to the school lives on. I may add features to this later, but I don't see a point because my interests have been leaning strongly away from Drupal and towards node.js.

Everyone is free to make improvements to this if they wish and I'm willing to continue hosting any new tools and accept improvements for the current ones.

University of Waterloo Tools Online Service

A while ago I had plans to make some tools for UWaterloo students, but I didn't end up doing anything because, well 1. I was busy and 2. Someone told me that he is already working on a similar project, which will be actually commercial. So I haven't done anything in a while.

Now, I'm considering, as soon as I get more free time, to continue with my plan and create a service for UWaterloo students to automate and improve their school related online tasks. After considering names like Bucketloo and WaterBawx, I've come up with a less cheesy title: WatTools.

Automating a PC to behave as a TV

  1. Background

Background


My Bulgarian grandparents had nothing to do all day after moving in with us, so my dad bought a subscription to watch Bulgarian TV over the internet. However, my grandparents are very old and can't use computers at all - you can't just say "oh just double click it" because they can't even move the mouse effectively.

Syndicate content