Save $160 by Purchasing the Office 2007 Upgrade
This came as a surprise to me; you do not need a previous version of Microsoft Office to use the "upgrade" version of Office! I stumbled upon this the other day while helping an old freelance client set up a new computer in their business. In fine print along the side of the Office 2007 Upgrade box it says, "Qualifying Products for Upgrade - Microsoft Works 6.0–10; Microsoft Works suite 2000–2006 or later..."
Those of you who have a Dell system (MS Works comes standard), feel free to save $160 when purchasing the Microsoft Office Upgrade version!
Percentage Comparison of 2 Strings
A recent project had me trying to determine a way to compare two strings and calculate their percentage difference. I was using Java and honestly figured there would be a built in function that would do just that. Unfortunately that was not the case.
After doing a good deal of research I discovered the Levenshtein Distance. Using the psuedocode on Wikipedia (and bits of code elsewhere) I was able to create a function that returns the percentage difference between the strings. I cannot take 100% credit for the script, but feel free to use it in any way you see fit.
public static int getLevenshteinDistance (String s, String t) {
if (s == null || t == null) {
throw new IllegalArgumentException("Strings must not be null");
}int n = s.length();
int m = t.length();if (n == 0) {
return m;
}else if (m == 0) {
return n;
}int p[] = new int[n+1];
int d[] = new int[n+1];
int _d[];
int i;
int j;char t_j;
int cost;
for (i = 0; i<=n; i++) {
p[i] = i;
}for (j = 1; j<=m; j++) {
t_j = t.charAt(j-1);
d[0] = j;for (i=1; i<=n; i++) {
cost = s.charAt(i-1)==t_j ? 0 : 1;d[i] = Math.min(Math.min(d[i-1]+1, p[i]+1), p[i-1]+cost);
}
_d = p;
p = d;
d = _d;
}//Determine percentage difference
double levNum = (double)p[n];
double percent = (levNum/Math.max(s.length(),t.length()))*100;
int percentDiff = (int)percent;return percentDiff;
}
Guake for Windows
If you ask me, Guake is the next best thing since sliced bread for GUI-based Linux users. It allows you to open a persistent, transparent terminal window by pressing F12 while in Gnome. Did I mention it's toggle-activated. Meaning when you don't need it in front of you, you press F12 again and it slips into your top bar. The transparency is great for when you are reading an article and want to see the commands you need to run through the terminal window.
So on to my dilemma. My work machines are all Windows-based and I found myself doing more and more remote Linux management using them. Now if only I could find a Guake alternative for Windows... I spent the good part of a weekend trying to do just that. I finally stumbled upon a few great articles that helped me piece it all together...
Combine PuttyTray, Launchy, and putty-launchy-plugin and you've got yourself a darn close match to Guake.
I've used Launchy before, so I had that installed. PuttyTray was new to me, but came up when searching for transparent putty. After installing and launching PuttyTray, click the Window option on the left.
You'll notice the Window transparency option at the bottom. I find setting it between 175 and 185 works best for me, but try it out on your own setup to fine tune.
If you're also looking to have the putty terminal be a certain size or fill up the entire screen, you can adjust this by playing with the Columns & Rows settings within PuttyTray.
The last piece is the putty-launchy-plugin. Install it, and open the Launchy options (Alt+Space and press the little gear in the top right). Click Plugins and you'll notice a new plugin called Putty. Specify the path to your PuttyTray executable and adjust the remaining settings as needed.
Now, to launch a persistent, transparent terminal window, simply press Alt+Space and type in "ssh". If you get further into it you'll notice that your saved sessions can be executed from Launchy as well. Enjoy!
