Friday, September 22, 2006

Bikram Philadelphia Studio

I had a great session this morning. The instructor this morning was Alex, who is currently my favorite instructor-- she seems to get me to do things today that I thought were weeks or months away. I worked a lot on my focus today. I had some difficulty because my left knee has really started to bother me. I think this is because I really upped my running schedule a few weeks back. But the advice I've gotten from Bikram's book is to go ahead and try to continue, but cautiously.

Wednesday, September 20, 2006

Bikram with a Polar Heart Rate Monitor

I run with a Polar Heart Rate Monitor sometimes. I have been curious for some time about what happens to my hear rate during Bikram, so I wore one during this morning's session. I told my instructor, Alex, what I was doing, and she suggested that I check my hear rate prior to and after the Camel Pose (Ustrasana). She predicted that my heart rate would go up a lot. She was right. Prior to the posture, my heart rate was 122 bpm. After it was 164. Anyway, here were my numbers for the session: Total time: 1:26 Average: 134 KCal: 818 Fat %: 40% I generally get numbers like this when I run about an hour and a half.

Tuesday, September 19, 2006

Perl script to split MP3 files

This is a simple script I used recently to split a large (50 minute) MP3 file into a series of smaller files. I used the MP3::Splitter module. MP3::Splitter is very versatile, so what I am doing does not use all of its functionality. But this does a good quick and dirty job of chopping up a file into bits. This comes in handy so you don't have a huge file to fast forward through on your iPod or other MP3 player.

The first two parameters of mp3split are the name of the file and a hash with options-- the only one I use is to set "verbose" to true. After that are a series of array references that describe each bit I want written out to a file.

The first parameter is the start time. I start the very first piece at 0 minutes. After that, each bit starts relative to the end of the last bit-- this is marked by the > symbol.

The next parameter shows how long the bit should be in seconds-- I chose to make each one two minutes long.

Since my MP3 file was about 50 minutes long, I just made 25 two minute bits. The last bit has a special marker as the finish: =INF. This means to use all of the rest of the file.




use MP3::Splitter;
mp3split('01-italian.mp3', {verbose => 1},
["0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "120"],
[">0", "=INF"]
);

Monday, September 18, 2006

Session at Bikram Philadelphia

After swearing I'd get in to the studio (http://www.bikramphiladelphia.com) for a session all last week, I finally made it in today. Except for the half session in my office, it's been two weeks since my last session. Forgive me, Bikram, for I have sinned.... The session was good-- I actually get a little stronger when I take a break. Except this break was too long, so I'm actually a lot weaker. My one insight recently has been that you really have to relax between postures. My instructor, Joel, always says that Hatha Yoga is different partially because we relax completely between postures. But I really had not done it before. It just made me think about how Earl Campbell used to stay completely still until the entire pileup was finished when he got tackled. At first people would think he was hurt, but after he did it a zillion times everyone realized he was just having a rest. Part of the reason for relaxing completely between postures is to allow the effects of the postures to happen, as well. A lot of postures restrict part of the body on purpose-- then when you relax afterwards, that part is unrestricted. Kind of like wringing out a rag. And I was pretty wrung out after this morning's session.

Thursday, September 14, 2006

Half session in the office

I've been having some trouble getting into the yoga studio, but I want my practice to go forward, so I tried doing something I've done a couple of times before: a half session on my own. Basically I did one set of each pose as opposed to two. It took me about 40 minutes. I felt great when I was done.

It was lacking some, though. There was no heat (which actually was not all that great of a problem!). And no one was egging me along, so I had to concentrate harder on not giving up a pose when it got difficult.

But I think this may be a good way to keep things going when I can't get to the studio.

By the way, I found this amazing video of Kristina Kireeva that made me realize that I could go a lot further in the Cobra Pose (Bhujangasana).

How to copy a SQL Server database to a different database

It is useful to be able to restore a database to a different database.
For example, you may want to create a development database with the
same structures and data as the production database.

Here are the steps:

1. Find out the file names of the database you are copying.




restore filelistonly
from disk='C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\my_prod.bak'


This will list the names of the database files.

2. Restore the database to the new database, moving the datafiles




restore database my_test
from disk='C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\my_prod.bak'
with move 'my_data' to
'c:\Program Files\Microsoft SQL Server\MSSQL\Data\my_test.mdf',
move 'my_log' to
'c:\Program Files\Microsoft SQL Server\MSSQL\Data\my_test.ldf',
stats=5


This will do the restore and move the data and log files to new locations.
If you don't include the "move" parameters, it will try to restore over the
existing files and you will get an error like this:




Msg 1834, Level 16, State 1, Server TRF-SQL01, Line 1
The file 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\my_data.MDF'
cannot be overwritten.
It is being used by database 'my_prod'.

Msg 3156, Level 16, State 1, Server TRF-SQL01, Line 1
File 'my_Data' cannot be restored to
'c:\Program Files\Microsoft SQL Server\MSSQL\Data\my_data.MDF'.
Use WITH MOVE to identify a valid location for the file.