Thursday, May 11, 2006

So last night, seemed like any other, we watched Alias, and Lost. Played some XBox, etc. Standard same old same old. At about 11:45, my wife got up and said she was not feeling right. I was still up because I'm a night owl, and I can't seem to go to bed before midnight for some reason.

I went upstairs, and we tried to figure out what was up. She had serious abdominal and back pain. Since she is only 30 weeks into the pregnancy, we knew what was going to happen. We'd call the nurse line, and they'd send us to the hospital.

After the on-call Doctor called us back, we were getting dressed and headed to the hospital, I was pretty sure that it was overkill, every time I've called the nurse line they are convinced you're going to die. "Ummmm hi... yeah, I've had this headache for a day now, it's not bad, but should I just take some aspirin?" Nurse: "Ummmm no, you need to get to a hospital right away, this could be brain cancer!"

You get my sarcasm, I hope. So after calling a dear friend to be at our house from midnight (she had to get up at 5:30 AM to get to her job) to be there for Katherine, we were off to the hospital.

We went into the ER, and they sent us up to the Birthing Suites. They put Dawn on a monitor, did some tests, and after about an hour and forty-five minutes, they determined she was having small contractions! So I guess it was good we went in after all.

Well, it was too soon for Jake to join us, so they gave her a shot in the arm of (Phynetnyl?) to basically stop the contractions.

By the time we got home, it was almost 4 AM. I'm a tired one today. But, I'm very glad that we went in and that everyone is doing ok now.

Thursday, May 11, 2006 9:44:03 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, May 04, 2006

It's not enough. Go out TODAY, and buy a CROSSCUT shredder. Shred everything. Any mail you get, that's not filed, or retained, shred it. With the rate of identity theft on the rise, and the amount of people out to get you, it's just too easy for people to get info out of the trash.

We even keep our trash can inside our garage, and it goes out just before the garbage man comes. We don't even let it sit out all night.

Credit card companies even tell you just rip up the application, and you'll be safe. Check out this link from "cockeyed.com", Rob Cockerham, a guy that loves to pull pranks, build crazy things, and perform 'social engineering' projects via his website, decided to see how far a credit card company would go to issue a new card. He completely RIPPED up his application, re-assmebled it, changed the address, and phone even, and was issued a new card. It's down right scary.

CropperCapture[6432].Jpg

http://www.cockeyed.com/citizen/creditcard/application.shtml

Seriously shred it all.

Thursday, May 04, 2006 10:28:12 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Friday, April 28, 2006

Ok, I'm just not suprised any more, I'm excited, just not suprised. Google has release a new 3D modeling program callled Google Sketch Up, for a novice like me, I'll check it out, I can think of some good uses for it. The program claims to let you model anything (simple) even your house, and add it to google earth. Crazy, amazing.

http://sketchup.google.com/product_suf.html

 

 

Friday, April 28, 2006 1:48:31 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Tuesday, April 25, 2006

I usually don't post stuff like this, but a friend sent this link, and all I can say is man this gal gets clocked. I'm not sure what led up to this, but it looks like news footage from a court building. If you listen, the clockee mentions something about "THC in her system".

http://video.google.com/videoplay?docid=6640225987281635407&pl=true

Tuesday, April 25, 2006 11:33:05 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 
 Monday, April 24, 2006

So Friday night, I played poker with one of my best friends, in his monthly neighborhood game.

The chips were FLYING! I played pretty conservative (imagine that), and I made a couple of really good lay downs. (They showed me their cards, I love it when they do that - validate my play!) But the best hand of the night, didn't win me a ton, but it was so fun to play.

I started off w Ac.gif4c.gif, I think I was the big blind, everyone folded but one player. So in a spot like this you're really hoping you flop a flush, or at least 4 to the flush. The guy I was playing against was a decent player, but he plays really wild, he loses sometimes, but other times that wild image gets him a lot of chips. So I was cautious to say the least.

The flop came As.gif3s.gif6c.gif Cool, I had a pair, but what if he had an ace, he had to have a better kicker (higher card to break a tie). So I casually bet 2x the big blind. He called (initially he had checked). At least I wasn't check raised!

Fourth street produced Ad.gif Wow, now I had a set. It's pretty unlikely he had an ace now. It's possible, but highley unlikely. I made a really weak bet of just under 2x the big blind, to make it look like I was just trying to steal the pot, he raised me 2x the big blind. I just call, trying to act really weak.

The river put the best card in the deck out there for me Ah.gif Now I know for a fact he does not have another ace, unless these guys are using some sort of weird korean deck of cards or something (pause for laughter). So now he bets 2x the big blind, and I move in raising it 4x his raise. He had put so much money in at that point, and I could not figure out what he had, he called me with Js.gifQs.gif I was a tad puzzled, I figured he had to have a 3 or a six, but oh well. It was a nice pot to win, and I feel like I played it perfectly.

Had I bet any more, I'm sure he would have folded. I was able to get second place, I made a really bad 'all in' bluff at the end against Big Slick, and lost Big Time!

Monday, April 24, 2006 8:08:34 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 
 Tuesday, April 18, 2006

On larger projects, I've had this happen quite frequently. You open a lot of files, set break points, and sometime forget to clear them? Well apprently Visual Studio does not like this. I was debugging today and it was taking like 5 seconds to step through the code, line to line.

I had a hunch that maybe breakpoints were my issue, the file I was debugging, only had one breakpoint, but I went to the debug window, and clicked "Clear All Breakponints" the IDE instantly responded, and it was back to lightining quick again.

File under "stupid" or "obscure".

Tuesday, April 18, 2006 3:01:19 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

Just saw this little tidbit, and I plan to download, and add it to my VS2005 instance at home. A spellchecker for Visual Studio 2005! How freaking cool is that? It will check things like alt tags, html text, captions, etc; it even provides suggestions just like Word. You need to have Office and Visual Studio 2005.

Check it out here.

CropperCapture[5].Jpg

Tuesday, April 18, 2006 1:15:11 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, April 13, 2006

Monday nights, I play poker in a free poker league. We play for points, and most of the people playing in the league play almost every night (man I wish I could do that!). Anyways, here is a fun hand I had happen.

I was acting in late position, I looked at my cards to find 10s.gif, 10d.gif, everyone had folded to me, just the small and big blind to act. The guy in the big blind is an aggressive player, and I was sure if I went all in he'd call with a marginal hand. So I moved all in. The small blind folded, and big blind guy called.

He had As 8d. So I felt good about the hand, I mean it's really close to 50/50, at least he only had one over card. (Wow, I actually just put the odds into an odds calculator on www.cardplayer.com, and I was 71.97% to 27.68% -- the hands would tie less than 1% of the time.)

Anyhow, the flop came:

   10C.gif, 10h.gif, Ad.gif

I think my opponent just saw his ace at first, because he seemed happy until he realized I had flopped quads. Four of a kind! The turn (which was irrelevant, there was no way I could lose at this point) was an 8s.gif, and the river produced the Ac.gif.

So the quads saved me. He had lost his hand a FULL HOUSE, aces full of eights. He muttered to himself, and left the table, a little annoyed I think.

Anyhow, it was one of those really fun hands that will statistically almost never happen.

Thursday, April 13, 2006 1:33:12 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 

I'm digging .NET 2.0! I can say for sure, that it's going to seem like forever waitng to switch over to it at work, but that's ok. So one of the things in .NET 1.1 that was decent, but could use improvement was client uploaded files via the browser.

Enter .NET 2.0 FileUpload Control. Now this may seem geeky, well, I guess if you are reading this you're either a friend, or a geek, so.... The coolest thing about the new 2.0 control is that you don't have to mess around withe MultiPart encded forms. Yep, this baby sits inside a 'normal' <form> tag. Wooooo!

And since it's now a <asp:> control type, you can run validators against it. No more making the user upload a file to determine if it's the correct type, or having to write javascript to check the input box. The really cool thing is that it just works.

Just add the following .aspx code

<asp:FileUpLoad id="FileUpLoad1" runat="server" />
<asp:Button id="UploadBtn" Text="Upload File" OnClick="UploadBtn_Click" runat="server" Width="105px" />

Like I said you can even add Regex, Required Field, etc. validators and set the ControlToValidate argument to the name of your upload control.

Originally, in the codebehind I was doing this:

protected void UploadBtn_Click(object sender, EventArgs e)
{
   if
(FileUpLoad1.HasFile)
   {
      FileUpLoad1.SaveAs(FilePath
+ FileUpLoad1.FileName);
      //Then I was doing a bunch of GDI stuff to work on the image, sized it, and created a new image and saved it.
      //
The problem came when I wanted to delete the original as uploaded above.
      //snip
      
   }
}

Even after getting a handle to the file as an image, from the disk, AND calling the dispose method on the object when I was done with it, I'd still get an exception stating that the file was in use by another process when I was trying to delete the original.

So I talked w/ a guy at work here named Stuart (see blogroll on the right) and he mentioned that it would be good if I could work with it as a stream, instead of having to write it to the disk. So after some playing, I came up with this!

protected void UploadBtn_Click(object sender, EventArgs e)
{
   if
(FileUpLoad1.HasFile)
   {
      //Instead of saving the image, I just assign my variable to the Upload Control's instance of the file as a STREAM.
      System.Drawing.Image imgPhotoResize = System.Drawing.Image.FromStream(FileUploadControl.FileContent);
      
   }
}

Nice! Now there's no file to cleanup when I'm done, all I have to do is save the file from my Image object, and call Dispose() on my instance of that object:

   imgPhotoResize.Dispose();

Thursday, April 13, 2006 8:48:08 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, April 06, 2006

So in diagnosing the problem below, it would have maybe been helpful to see the IIS logs, At the time I was using the built in web server (for development) that ships with VS 2005. It requires that you address it via localhost, on a port other than what IIS uses. I tried to have a firend hit it using my Dynamic DNS service, and he could not. He could hit my IIS instance on port 80.

Later, I did find you could do this: Go to your web application properties, start options, choose use custom server, and then put the path to your web application in. You'll have to go into IIS and setup a site, or virtual directory for your app.

 

Thursday, April 06, 2006 7:33:05 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |