Archive for the ‘utils’ Category

Posted by Matt at 20 January 2009

Category: utils, web

YouTubeLogo

Use this technique to easily "pop up" a YouTube video and keep it on top of other windows so you can watch it while you continue to browse . . . uh . . . work.

The first tool is a bookmarklet. In Firefox, for example, you can right-click on the Bookmarks toolbar and select "New Bookmark". Other browsers are similar.

image

For the location, use this bit of javascript. Make sure it’s all on one line!

javascript:e=document.forms.embedForm.embed_code.value;
w=window.open(’about:blank’,'_blank’,'height=360,width=450,menubar=no,
toolbar=no,location=no,status=no,resizable=yes,scrollbars=no’);
d=w.document;d.open();d.write(e);d.close();
 
Or, drag this like to your toolbar to do the same thing:
 
 
Now when you are viewing a video on YouTube, you can click the bookmark and it will pop up a window with just the video.
 
But how do you get the window to stay on top, so you can do other things while watching it?
 
Install PowerMenu. This program puts a few useful items in the context menu when you right-click on the title bar of a window or the item in the start bar. Just choose "Always On Top" and it will stay visible.

And there you go, a handy YouTube viewer that lets you continue working while you watch the latest viral video of the week!

Posted by Matt at 24 December 2008

Category: Programming, utils

I recently created a project on Google Code for PHP Excel Reader. This is a PHP library for reading MS Office Excel files that has existed on Sourceforge for quite a while but was no longer being maintained or enhanced. I needed to use it for a work project, so I put in some time to fix it and enhance it to make it more usable. I decided to put it up on Google Code in the hopes that others would find it useful.

[ PHP Excel Reader Project Home ]

Example

Microsoft Excel

<?php
require_once 'excel_reader2.php';
$xls = new Spreadsheet_Excel_Reader("example.xls");

echo '<table border="1">';
  for ($row=1;$row<=$xls->rowcount();$row++) {
  echo '<tr>';
  for ($col=1;$col<=$xls->colcount();$col++) {
    echo '<td>' . $xls->val($row,$col) . ' </td>';
  }
  echo '</tr>';
}
echo '</table>';
?>
HTML Output

Usage

$data = new Spreadsheet_Excel_Reader("test.xls"); 

Retrieve formatted value of cell (first or only sheet): 

  $data->val($row,$col) 

Or using column names: 

  $data->val(10,'AZ') 

From a sheet other than the first: 

  $data->val($row,$col,$sheet_index) 

Retrieve cell info: 

  $data->type($row,$col);
  $data->raw($row,$col);
  $data->format($row,$col);
  $data->formatIndex($row,$col); 

Get sheet size: 

  $data->rowcount();
  $data->colcount(); 

$data->sheets[0]['cells'][$i][$j] - data from $i-row $j-column 

$data->sheets[0]['numRows'] - count rows
$data->sheets[0]['numCols'] - count columns 

$data->sheets[0]['cellsInfo'][$i][$j] - extended info about cell
$data->sheets[0]['cellsInfo'][$i][$j]['type'] = "date" | "number" | "unknown"
$data->sheets[0]['cellsInfo'][$i][$j]['raw'] = value if cell without format
$data->sheets[0]['cellsInfo'][$i][$j]['format'] = Excel-style Format string of cell
$data->sheets[0]['cellsInfo'][$i][$j]['formatIndex'] = The internal Excel index of format 

$data->sheets[0]['cellsInfo'][$i][$j]['colspan']
$data->sheets[0]['cellsInfo'][$i][$j]['rowspan']

Posted by Matt at 18 November 2008

Category: utils

Tags: , , ,


Ever come across a song that has an especially long intro that annoys you? Or a “hidden track” at the end with a minute of silence between? Or a second half of the song that you don’t like as much as the first?

if it’s an mp3, you might think you need to convetr to wav, open a wav editor, trim the song, then re-convert to mp3 to get just the part of the track that you actually want to listen to. Not worth the effort!

But there is a better way: mpTrim

This Windows utility lets you trim an mp3 file directly, without an impact on its sound quality because it works directly on the mp3 contents rather than converting to wav first. You can fade in and out at the timings you pick to trim out the junk that you always skip over anyway. It’s free and very handy when you need it!

Posted by Matt at 18 November 2008

Category: utils

Tags: , , ,

I like to work as efficiently as possible, so I end up installing and trying lots of little utilities and programs that might make life easier. Most of them get uninstalled a short time later, but a few stick. Folder Guide is one of them.

The idea is simple: Anywhere you are browsing your Windows file system, you can right-clicking and jump to one of your preset directories. If any application opens up a Save or Open dialog, you can right-click in it to quickly go to your common place to put files. Rather than scrolling around in the tree view in Explorer, you can quickly jump to the directories you use most often.

I have already found it very useful after only 2 days of use. I recommend giving it a try.

Folder Guide web site