Archive for April, 2009

How to Stop a Bed with Wheels from Rolling on a Hard Wood or Laminate Floor

Friday, April 17th, 2009

You just buy these plastic things called caster cups. But not any kind, you want to buy the kind designed for your bed wheels with indentations in the shape of wheels.

I could never find them in hardware stores, so just buy them from Amazon here.

Update: This advice turned out to be so popular I made it into it’s own website.

How to get a Month Name in Python

Thursday, April 16th, 2009

Here’s the shortest method I could come up with:


>>> named_month = lambda month_num:datetime.date(1900,month_num,1).strftime('%B')
>>> print named_month(5)
'May'

How to Select from a Stored Procedure – SQL Server

Thursday, April 16th, 2009

How to treat a stored procedure that ends with a select as a select in another query:

You have to create a schema-compatible temp table, but then you can do filtering and grouping when you select out of the temp table at the end.


create table #sp_who (
spid smallint,
ecid smallint,
status nchar(30),
loginame nchar(128),
hostname nchar(128),
blk char(5),
dbname nchar(128),
cmd nchar(16))

insert into #sp_who execute sp_who
select * from #sp_who
drop table #sp_who

Mini Searches with Answers

Thursday, April 16th, 2009

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

How to use comments in preppy (a Python templating system)
Commenting your code: There is no specific Preppy form of comments. It allows you to use python comments
inside its directives, or you can use the style of comments in whatever language preppy is processing (eg in
HTML). Be careful about mixing the two. Preppy will always execute preppy directives, no matter what
surrounds them. So attempting to comment out Preppy directives with HTML comments will not work -
something that's easily done if you are not concentrating.

How to prevent text in a table cell from wrapping – Stack Overflow
My search terms: html how to make a table cell not wrap lines, or td prevent wrap

Answer is:
<td style="white-space:nowrap;">…</td>

How to disable Verizon DNS Assistance (websearch.verizon.net)
AKA hijacking my DNS, AKA betrayed by my own ISP!

Citrix Forums : Citrix Client Errors – Ubuntu AMD64 …
How to make the citrix client work on 64 bit Ubuntu

Accessing Stored Procedure Output In A SELECT Statement
SELECT *
FROM OPENROWSET ('SQLOLEDB','Server=(local);TRUSTED_CONNECTION=YES;','set fmtonly off exec master.dbo.sp_who')
AS tbl

Tags: , , , , , , , , , , , , , ,

Costco Does not Have a Free Trial or One Day Membership

Tuesday, April 14th, 2009

I went there today and asked. They claim that since they have 100% satisfaction guarantee they don’t need to offer a trial membership. They do offer a walk through pass so you can see what’s available in the store but you can’t buy anything.