July 29, 2006

JavaScript, round decimal numbers

This is some good code to round a decimal number to however many places you need using javascript:

// Round a number (num) to however many decimal places (dec)
function roundNumber(num, dec) {
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
return result;

kick it on DotNetKicks.com

July 22, 2006


Oh man, what a boring weekend. Just as I suspected, a lame ass weekend. It started off by my friend calling me to come to his party on Friday ~ But I didn't get the message until Saturday (today) so what did I do Friday night? Nothing. Then today... BORING! I went out for some Starbucks just now... *sigh* nice night but not a night to spend alone :( I keep thinking about someone who's bothering the crap out of me... I was doing so well too.

Lets dive into some good news... Went over to my friend Danny's house and his aunt was there, hadn't seen her in forever - she was recently married - and she nearly brought the feeling of family to me again but reality quickly set in and I was back to normal... anyways she noticed that I had been working out... Hah cool! My workout has been paying off! I try to go every day after work, since the gym is just literally 2 blocks away from my building... Well it brought up my self-esteem and motivated me to continue my routine!

Work is good, I'm kicking ass and taking names. Signed up for some training, the .NET 2.0 MCST cert training and some T-SQL - I could use a refresher in T-SQL. Anyways enough about work. I went to Lake Gregory/Lake Arrowhead today and took my neices... they played in the water, I stayed on the sand. Didn't see anyone checking my hot sexyness out so I need to work out some more. Need more motivation!!

And here's a new poem...

Blinded by this fog
It leaves me thinking I've won
Until again the wind blows strong
And takes this fog from my song
No longer it hides and in roll the tides
Once again to bury my eyes
This supernova ready to go
openeing up a big black hole
The Heavens cant think
and the Earth goes away
Together again these feelings one day

kick it on DotNetKicks.com

July 09, 2006

The Flexible Office Space

Ok, I came across something pretty cool, I thought, earlier today. It's called the flexible office space. It's a great business idea and here's what they do: They help find mostly small, short-term, ready-to-use office space. Their emphasis is on helping make the leap from home office to "real" office. So why is this cool? Well if you've ever ran a home business, or if you currently do, then you'll know exactly why this seems so cool...

You remember right? You pick up the phone and the dog is barking, the baby is crying, the TV is up loud so you yell to turn it down... You begin referring to your pet gold fish as employees... yea you get the point. Thats why when I heard about this company I had to make a post! They also have a "Home Office from Hell" contest where you can submit your "war stories" and if you win they'll pay your office space (up to $12,000) for a year!!

I give http://www.offices2share.com two thumbs up for helping the home businesses of America and for such a great business idea!

kick it on DotNetKicks.com

July 08, 2006

Master Detail Update Issue, Resolved

For those of you who have had a problem in ASP.NET 2.0 using a Master Detail setup, (example: gridview as master and detailsview as details):

If you're having trouble getting the GridView to show changes after updating the Details then here's your solution. You're doing the DataBind() command on the GridView (which would rebind the data) in the wrong place. The correct area is: DetailsView1_ItemUpdated as shown below.

Protected Sub DetailsView1_ItemUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewUpdatedEventArgs) Handles DetailsView1.ItemUpdated


End Sub

The reason for this, I believe, is that the databind must be called prior to other page events. It makes sense because you should rebind the datasource when the details are updated. Enjoy!

kick it on DotNetKicks.com

July 05, 2006

Ok Spidey Fans

Ok so I'm sitting here working on Floobee (what is it you ask...? Wait...) And I decide to check up on my PPP... Not bad $15! Question is, can I still post about my daily junk and the ad itself? I'm going to find out right now!

This website is for all the Spiderman fan junkies out there... Hey I figure the more keywords I use the more these search engines will find me! Anywho... This website has like EVERY single spiderman comic on its front page that you can imagine! I still remember reading spiderman comics when I was younger, way younger. But this website has all the information you could ever dream about as far as spiderman goes. And check out their staff pics too, funny! The main point is if you love Spidey and you wanna chat about him and all his kick ass powers, especially since Spiderman 3 will be out soon... Then check it out http://www.spiderfan.org/

kick it on DotNetKicks.com