Wednesday, January 10, 2007

Tuesday, January 9, 2007

Start of 3rd Trimester

So I am officially in the 3rd trimester no matter which way you count. Apparently doctors don't always do it mathmatically and divide 40 by 3. But no matter which reference you consult 28 weeks is always considered 3rd trimester.

For the last month I have been trying to switch from my doctor to a midwife. I really like Dr. Knowles from Sound Family Medicine, but after reading a bunch of books and birth stories online a frequent theme was that hospital policies can be frustrating and many of the standard interventions correlate with the fact that 1 out of every 3 or 4 births in the U.S. ends in a ceasarian. In my case I was concerned with the fact that Good Sam doesn't let you eat, it is standard to hook you up to an IV even if you don't need it, and they do continuous electronic fetal monitoring. Some of these things are negotiable but I was a little bit worried about getting bullied. The alternative is to go to a birth center and have a midwife deliver the baby. But, since most of these things were negotiable, I really liked my doctor, and I had already gone to her a few times I figured everything was good.

But then about a month ago I came to the realization that my insurance only covers 80% and it is expensive to give birth in a hospital. The very minimum is $7500, but that only includes delivery, not the other long list of other things they charge you for. The lady at the hospital said to assume 10-15,000. I think my insurance has a $3000 cap, so that was probably what it was going to cost me. So then I investigated what the birthing center would cost and they told me my 20% would be around $184. So I figured if they would take me I should switch because I don't want to pay thousands of dollars to give birth at a place that I didn't really want to anyways.

Well it took about a month, due to the holidays and power outages, to get all my records faxed to the midwives and have them review them and say that yes I am a low risk patient and can go to The Birthing Inn. In the mean time I had gone to my regular doctor, just in case it didn't all work out, and did the 1 hour glucose screening test for gestational diabetes, and I failed. So I was really annoyed by this because I didn't see how I could have gestational diabetes and the 1 hour test has a really high (around 50%) false positve rate so I had to go through the hassle of taking the 3 hour test with the likelihood I would pass it. Also this put a hold on my plans for the birth center because if I did have GD then I wouldn't be low risk. So I did the 3 hour glucose test and it was really annoying because I had to fast and I didn't get done till 1pm so I was really hungry, plus it wasted my Sat, plus my blood doesn't come out easy so they had to poke me a total of 8 times and my arms were all sore. But I passed the test, and the nurse was really great and called me basically right when the doctor had received the results, so I didn't have to harass anyone to get the results. Yeah! So I have an appointment scheduled to see the midwife and we can go and take a tour of the birth center on Monday. A lady at work gave birth at the Birthing Inn and said it was wonderful and she said all the midwives were great.

I am really excited, and relieved that I will be able to give birth in a way that feels most comfortable to me and I won't have to worry about hospital staff getting impatient and threatening ceasarians or trying to give me drugs I don't want or having to deal with anything like that. It could be that if I did give birth at Good Sam it would have been great, but it still had me worried that it was a possibility.

Friday, December 22, 2006

How slow can I go?

So at 26 weeks pregnant I hit 10:02 min/mile pace today on my 2.5 mile run. I don't even know if what I do is qualified as running anymore. I guess it was my 2.5 mile jog, almost a wog. However as slow as I was going, I still passed someone. :)

Its very odd, because my breathing isn't hard, and my legs don't feel tired, but I just can't run any faster. I think anything that used to resemble a fast twitch muscle has disappeared. Also my hip flexors don't seem to want to lift my legs any more. Is it hormones? Is it the extra 15lbs? Once the baby comes will I suddenly be able to run 8 min pace easily again? Or will it take a little while to get back into it? I guess I'll have to wait and see.

My friend Bethany who runs with me at work during lunch has found a new job. Since I have no confidence in being able to out run the boogie man, and there are lots of boogie men in parkland, plus boogie dogs, I guess I won't be able to run during lunch anymore. Dyna will be happy about that, but I'm bummed because it means shorter runs, in the dark and rain. Oh well.

Monday, December 18, 2006

How to analyze windows installer verbose logs

Problem:
How to analyze windows installer verbose logs

Solution:
Microsoft SDK has an executable called WiLogUtl.exe in C:\program files\microsoft sdk\bin
If you try to use this with a version of windows installer higher than 2 it won't work. But if you change the version number on the very top line to 2.0.blah blah then it should work.

Keywords:analyzer installer log windows

How to trace the sql server statements that get executed when you don't have sql tools installed, specifically Sql Profiler because you are running msde or sql express.

Problem:
How to trace the sql server statements that get executed when you don't have sql tools installed, specifically Sql Profiler because you are running msde or sql express.

Solution:

1. Create this stored procedure:
CREATE proc trace_build @traceini nvarchar (245) = N'C:\ActivityTrace.ini' as
declare @traceid int, @options int, @tracefile nvarchar (245), @maxfilesize bigint
, @stoptime datetime, @minMBfree bigint, @rc int, @on bit, @cmd1 nvarchar(512)
, @events varchar(512), @columns varchar(512), @event int, @column int, @estart int, @enext int
, @cstart int, @cnext int, @le int, @lc int, @filter nvarchar(245), @filter_num int
create table #t1 ([c1] nvarchar(512))
set @cmd1 = 'bulk insert #t1 FROM '''
select @cmd1 + @traceini
exec (@cmd1 + @traceini + '''')
select @tracefile = cast(rtrim(ltrim(substring(c1,charindex('=',c1,1)+1,len(c1)))) as nvarchar (245)) from #t1 where left(c1,3) = '@tr'
select @maxfilesize = cast(rtrim(ltrim(substring(c1,charindex('=',c1,1)+1,len(c1)))) as bigint) from #t1 where left(c1,3) = '@ma'
select @stoptime = cast(rtrim(ltrim(substring(c1,charindex('=',c1,1)+1,len(c1)))) as datetime) from #t1 where left(c1,3) = '@st'
select @options = cast(rtrim(ltrim(substring(c1,charindex('=',c1,1)+1,len(c1)))) as int) from #t1 where left(c1,3) = '@op'
select @events=cast(ltrim(rtrim(substring(c1,charindex('=',c1,1)+1,len(c1)))) as nvarchar (512)) from #t1 where left(c1,3) = N'@ev'
select @columns=cast(ltrim(rtrim(substring(c1,charindex('=',c1,1)+1,len(c1)))) as nvarchar (512)) from #t1 where left(c1,3) = N'@co'
set @on = 1
set @traceid = 0
select @tracefile
SELECT @traceid = traceid FROM :: fn_trace_getinfo(0) where property = 2 and value = @tracefile
if @traceid != 0 goto finish
set @cmd1 = 'if exist ' + @tracefile + '.trc ' + 'del ' + @tracefile + '*.trc'
exec @rc = master.dbo.xp_cmdshell @cmd1, no_output
exec @rc = sp_trace_create @traceid output, @options, @tracefile, @maxfilesize, @stoptime

select @estart = 1
select @enext = charindex(',',@events,@estart)
select @cstart = 1
select @cnext = charindex(',',@columns,@cstart)
set @le = len(@events)
set @lc = len(@columns)
while @enext > 0
begin
select @event = cast(substring(@events,@estart,@enext-@estart) as int)
while @cnext > 0
begin
select @column = cast(substring(@columns,@cstart,@cnext-@cstart) as int)
exec sp_trace_setevent @traceid, @event, @column, @on
select @cstart = @cnext + 1
select @cnext = charindex(',',@columns,@cstart)
if @cnext = 0 set @cnext = @lc + 1
if @cstart >@lc set @cnext = 0
end
select @cstart = 1
select @cnext = charindex(',',@columns,@cstart)
select @estart = @enext + 1
select @enext = charindex(',',@events,@estart)
if @enext = 0 set @enext = @le + 1
if @estart > @le set @enext = 0
end
set @cmd1 = 'exec sp_trace_setfilter '
set @filter = N'none'
select @filter = cast(ltrim(rtrim(substring(c1,charindex('=',c1,1)+1,len(c1)))) as nvarchar (245))
from #t1
where cast(ltrim(rtrim(substring(c1,1,charindex('=',c1,1)-1))) as nvarchar (245)) = N'@filter1'
set @filter_num = 1
while @filter != N'none'
begin
exec (@cmd1 + @traceid + ','+@filter)
set @filter_num = @filter_num + 1
set @filter = N'none'
select @filter = cast(ltrim(rtrim(substring(c1,charindex('=',c1,1)+1,len(c1)))) as nvarchar (245)) from #t1
where cast(ltrim(rtrim(substring(c1,1,charindex('=',c1,1)-1))) as nvarchar (245)) = N'@filter' + cast(@filter_num as nvarchar(3))
select @filter
end
finish:
drop table #t1
exec sp_trace_setstatus @traceid, 1

2. Create INI file
@tracefile = C:\ActivityTrace
@maxfilesize = 50
@stoptime = 2010-12-31 12:00:00.000
@options = 2
@events = 10,11,12,13,16,17,19,33,42,43,55
@columns = 1,2,3,6,9,10,11,12,13,14,15,16,17,18,25
@filter1 = 10, 0, 7, N'SQL Profiler'

*REMEMBER TO CHANGE THE @stoptime

2. Run the trace by running the following sql:
trace_build 'c:\Trace1.ini'

3. Look at the resulting .trc file by running the following sql

select * from ::fn_trace_gettable('C:\ActivityTrace.trc', default)

See these pages for more details:
http://support.microsoft.com/kb/283790

http://support.microsoft.com/kb/283786/EN-US/

http://www.dbazine.com/sql/sql-articles/larsen6

Keywords:express msde profiler server sql trace

How do you get mfc to let you display a 256 color toolbar.

Problem:
How do you get mfc to let you display a 256 color toolbar.

Solution:

HRESULT hr = S_OK;

if(SUCCEEDED(hr))

{

hr = m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD WS_VISIBLE CBRS_TOP CBRS_GRIPPER CBRS_TOOLTIPS CBRS_FLYBY CBRS_SIZE_DYNAMIC) m_wndToolBar.LoadToolBar(IDR_MAINFRAME) ? hr : E_FAIL;

}

if(SUCCEEDED(hr))

{

CImageList *pImgList = m_wndToolBar.GetToolBarCtrl().GetImageList();
pImgList->DeleteImageList();
pImgList->Create(16, 16, ILC_COLOR8 ILC_MASK, 0, 5);
m_wndToolBar.GetToolBarCtrl().SetImageList(pImgList);
m_wndToolBar.GetToolBarCtrl().AddBitmap(5, IDR_MAINFRAME)

}

I couldn't get either of these suggestions to work.
http://www.codeguru.com/cpp/controls/toolbar/miscellaneous/article.php/c2527/
http://tanvon.wordpress.com/2006/09/19/how-to-make-256-color-toolbar/


Keywords:16 256 colors mfc toolbar

Email keeps being sent over and over, but never leaves the outlook express outbox.

Problem:
Email keeps being sent over and over, but never leaves the outlook express outbox.

Solution:
Your sent mail file has reached the 2GB maximum size. Either delete it or rename it.

Keywords:email express outlook multiple sent times

How to view the records of a wmf / emf / metafile.

Problem:
How to view the records of a wmf / emf / metafile.

Solution:
There is a tool that was distributed with MSDN that was distributed with the Visual Studio 6.0 version. The path to the file on the CD is

\SAMPLES\MSDN\TECHART\1619\emfdecode.exe

Keywords:command emf record metafile view wmf

How do you open up an executable file with the binary editor or resource editor in visual studio versions higher than visual studio 6.0

Problem:
How do you open up an executable file with the binary editor or resource editor in visual studio versions higher than visual studio 6.0

Solution:
On the file-open dialog the Open button has a little down arrow on it. Click that arrow and it gives you the various options.

Keywords:binary open resource studio visual

Saturday, December 9, 2006

Dog Bite

So I got bit by a dog this week. A friend and I were running during lunch and a big black dog ran right past my friend, chomped my leg, and then ran back in the bushes. It was really quick and I didn't even realize it bit me until after it had run away. It just barely scratched the skin, so there was a little bit of blood but it wasn't bleeding. So we ran back to work.

I just figured that was that, but then people at work said I needed to go to the doctor, my mom said I had to call animal control. So I went to the dr and he gave me some antibiotics, but he didn't really want to treat me because I'm pregnant. I called animal control but haven't heard back from the sheriff. I have ugly bruising on my calf, but it doesn't hurt too much. Overall it was just a dumb.