Back at Friendly’s again Tonight is the start of a new order. Meg didn’t get peanutbutter cups the other day and wound up with pieces instead. So, she asked for that tonigt. One thing that does is reduce the number of substitutions from 5 to 1. I’m looking forward to a correct order!

I’m at Friendlys and it is quite the trip. For example, the girl who 3 weeks ago couldn’t use the cash register, still can’t. On the bright side, Larry the manager made our sundaes so there’s a far better chance of them being right. Oh, and by the way, why is the price different everytime I come here?

Guess what? I now own a BlackBerry and can blog from the road. This may not mean much, but for someone like me, I can blog from in front of the TV or a boring meeting.
I’m using a MIDLET called MIDlog. It’s written by Daniel Rocha. I appologize for not linking everything, but there’s only so much you can do on a BlackBerry.

Never ever discount the idea of marriage. Sure, someone might tell you that marriage is just a piece of paper. Well, so is money, and what’s more life-affirming than cold, hard cash?

Dennis Miller

Dewey Vozel says:
i hate javascript i think
Dewey Vozel says:
whoever designed the javascript Date object was a doofus
Dave Bitton says:
whomever designed javascript was a doofus
Dave Bitton says:
oh wait
Dave Bitton says:
his name was Mark Andreson
Dewey Vozel says:
is he still alive?
Dave Bitton says:
of course he is
Dewey Vozel says:
let’s fix that

I added WAP support to AnalogousMember today. I followed a tutorial at Building a Better Wap Diary with the following exceptions:

  • I edited the link in the index template to the archive files to point to archives/wap/ folder. The link is now:

    <a href="<$MTBlogArchiveURL$>wap/<$MTEntryID pad="1"$>.wml">Read This Entry...</a>
  • The individual archive files are being saved to a wap/ folder which requires you to enter

    "wap/<$MTEntryID pad="1"$>.wml"

    for the archive filename
  • I added the following to my .htaccess file so WAP browsers will automatically be served the proper content:

    RewriteCond %{HTTP_ACCEPT} text/vnd.wap.wml
    RewriteRule ^$ /index.wml
  • Removed the hardcoded link to symbiandiares.com from the archive template and replaced it with <$MTBlogURL$>.

If you want to see this in action without using your phone, goto WapTiger WAP Emulator for a conventional browser based WAP emulator. Just enter http://www.analogousmember.com/ for the URL.

• . ´¯` . • Brany • . ´¯` . • says:

okay. what’s ^ in new york?

• . ´¯` . • Brany • . ´¯` . • says:

er, i think that’s where you’re from…

Dave Bitton (Gold Medal Coder) says:

ever listen to Black Eyed Peas?

Dave Bitton (Gold Medal Coder) says:

actually Jersey

Dave Bitton (Gold Medal Coder) says:

the biggest is the republican convention nxt wk

• . ´¯` . • Brany • . ´¯` . • says:

ah

• . ´¯` . • Brany • . ´¯` . • says:

bloggers are buzzing about the RNC

Dave Bitton (Gold Medal Coder) says:

NS

• . ´¯` . • Brany • . ´¯` . • says:

i saw pics of naked protestors

• . ´¯` . • Brany • . ´¯` . • says:

heh

Dave Bitton (Gold Medal Coder) says:

gotta love naked protest

• . ´¯` . • Brany • . ´¯` . • says:

lol

• . ´¯` . • Brany • . ´¯` . • says:

do you read gothamist?

Dave Bitton (Gold Medal Coder) says:

so long as they’re not fugly

• . ´¯` . • Brany • . ´¯` . • says:

best.blog.ever.

• . ´¯` . • Brany • . ´¯` . • says:

lol, true..

Dave Bitton (Gold Medal Coder) says:

that;s quite a stmt

Dave Bitton (Gold Medal Coder) says:

link?

• . ´¯` . • Brany • . ´¯` . • says:

www.gothamist.com

• . ´¯` . • Brany • . ´¯` . • says:

it’s all about new york

• . ´¯` . • Brany • . ´¯` . • says:

but so well written

Dave Bitton (Gold Medal Coder) says:

you do know i used to work a 1/2 block from the garden

Dave Bitton (Gold Medal Coder) says:

i would have taken nxt wk off

Dave Bitton (Gold Medal Coder) says:

i wouldn’t be suprised if the oiffice is closed

• . ´¯` . • Brany • . ´¯` . • says:

oh, omg i lived 2 blocks from the garden!!

• . ´¯` . • Brany • . ´¯` . • says:

wierd

Dave Bitton (Gold Medal Coder) says:

i worked on 32 btw 6 and 7

• . ´¯` . • Brany • . ´¯` . • says:

ah

Dave Bitton (Gold Medal Coder) says:

“This is New York. Of course, we had seven naked people on Eighth Ave. What’s the question?”

• . ´¯` . • Brany • . ´¯` . • says:

well it’s more than 2 blocks… 33rd and ave of americas

• . ´¯` . • Brany • . ´¯` . • says:

hehehehe

• . ´¯` . • Brany • . ´¯` . • says:

did you see the fugly pedrestrian bridge they built for the rnc

Dave Bitton (Gold Medal Coder) says:

there’s residential adjacent to herald sqr?

• . ´¯` . • Brany • . ´¯` . • says:

it’s an eyesore

Dave Bitton (Gold Medal Coder) says:

i see

• . ´¯` . • Brany • . ´¯` . • says:

yep

Dave Bitton (Gold Medal Coder) says:

what st is that?

• . ´¯` . • Brany • . ´¯` . • says:

above stores…

• . ´¯` . • Brany • . ´¯` . • says:

know what I mean?

Dave Bitton (Gold Medal Coder) says:

yes

• . ´¯` . • Brany • . ´¯` . • says:

yeah.

• . ´¯` . • Brany • . ´¯` . • says:

it was a crappy place actually

Dave Bitton (Gold Medal Coder) says:

http://www.nytimes.com/2004/08/27/politics/campaign/27protest.html?ex=1251345600&en=43f41670382a6a35&ei=5090&partner=rssuserland

Dave Bitton (Gold Medal Coder) says:

even w./ that pic i still can;t firgure the st

Dave Bitton (Gold Medal Coder) says:

duh

Dave Bitton (Gold Medal Coder) says:

says 8th

Dave Bitton (Gold Medal Coder) says:

oh, and btw

Dave Bitton (Gold Medal Coder) says:

bush can’t stop aids

Dave Bitton (Gold Medal Coder) says:

3rd world developing nations with more than 50% of their population infected need to stop aids

• . ´¯` . • Brany • . ´¯` . • says:

yes!

• . ´¯` . • Brany • . ´¯` . • says:

i agree

• . ´¯` . • Brany • . ´¯` . • says:

and aids infected ppl need to stop f*cking

• . ´¯` . • Brany • . ´¯` . • says:

(excuse the blunt language)

Dave Bitton (Gold Medal Coder) says:

and ya know what? i don;t the usa should do a damn thing about problems in any other nation besides our own

• . ´¯` . • Brany • . ´¯` . • says:

that’s so true

• . ´¯` . • Brany • . ´¯` . • says:

we have poor ppl here…

• . ´¯` . • Brany • . ´¯` . • says:

sick ppl

• . ´¯` . • Brany • . ´¯` . • says:

mental ppl

• . ´¯` . • Brany • . ´¯` . • says:

everything everyone else has

Dave Bitton (Gold Medal Coder) says:

i’m sorry, but it;s USA 1st, the world 2nd

• . ´¯` . • Brany • . ´¯` . • says:

yeah

• . ´¯` . • Brany • . ´¯` . • says:

are you a dem or rep?

Dave Bitton (Gold Medal Coder) says:

here;s something that needs to happen _before_ any group gets help, their needs to be an economic insentive to helping them

• . ´¯` . • Brany • . ´¯` . • says:

true…

Dave Bitton (Gold Medal Coder) says:

what economix incentive does a corporation have to help tjhe poor? none.

• . ´¯` . • Brany • . ´¯` . • says:

then again,. some countries have nothign to give

Dave Bitton (Gold Medal Coder) says:

and in case you haven’t taken a business class, but the number 1 objective of any employee is to increase shareholder equity

Dave Bitton (Gold Medal Coder) says:

and you don;t increase share holder equity by giving shit away for free

• . ´¯` . • Brany • . ´¯` . • says:

true.

Dave Bitton (Gold Medal Coder) says:

and until such time as there is a return on investment for helping the disadvantaged, it’ll have to accomplished by the fed, and that is as good as nill.

Dave Bitton (Gold Medal Coder) says:

i’ll give you a great exampole

• . ´¯` . • Brany • . ´¯` . • says:

are you a big economics guy?

Dave Bitton (Gold Medal Coder) says:

ever look at your phone bill?

• . ´¯` . • Brany • . ´¯` . • says:

you really seem to know your stuff.

• . ´¯` . • Brany • . ´¯` . • says:

umm… kinda. i don’t pay for it so…

Dave Bitton (Gold Medal Coder) says:

there’s something called a Universal Service Fee

• . ´¯` . • Brany • . ´¯` . • says:

okay, i’ve seen it

Dave Bitton (Gold Medal Coder) says:

that;s was a tax imposed by the fed to help pay for telecommunications for poor and remote regions of the country

• . ´¯` . • Brany • . ´¯` . • says:

oohh….

• . ´¯` . • Brany • . ´¯` . • says:

so some poor ppl don’t pay to have a phone?

Dave Bitton (Gold Medal Coder) says:

why you ask? because there is no economic incentive for telecom providers to do it themselves, and therefore the fed had to step in

Dave Bitton (Gold Medal Coder) says:

it’s more has to do w/ infrastructure

• . ´¯` . • Brany • . ´¯` . • says:

oh i see

Dave Bitton (Gold Medal Coder) says:

the fed gives that money back to the telecoms to aid in the build-out of infrastructure that they otherwise would not have implemented because it doesn;t make economic sense. the ROI would be negative, and that is a no-no

• . ´¯` . • Brany • . ´¯` . • says:

right

• . ´¯` . • Brany • . ´¯` . • says:

they won’t sacrifice anything

Dave Bitton (Gold Medal Coder) says:

yeah, sure, there’s _some_ economic incentive to finding an HIV vacine, someone gets to sell it

Dave Bitton (Gold Medal Coder) says:

why would/should they?

• . ´¯` . • Brany • . ´¯` . • says:

but the research, i think would cost oodles more than the money they’ll make of the meds

Dave Bitton (Gold Medal Coder) says:

your absolutely right, and that is why it’s taking the time that it is

Dave Bitton (Gold Medal Coder) says:

the fed doesn;t have the $, and therefore hiv research is beholdent upon private donations and some pharama $

Dave Bitton (Gold Medal Coder) says:

pharma

• . ´¯` . • Brany • . ´¯` . • says:

yes…

Dave Bitton (Gold Medal Coder) says:

i should blog this conversation verbatim

• . ´¯` . • Brany • . ´¯` . • says:

heheh

datetime comparisons in T-SQL aren’t always a walk in the park. One of the most annoying things that someone would need to overcoming is filtering solely on the year, month, and day component of a datetime field. This is further complicated by how .NET initializes a DateTime object.

When a DateTime object is instantiated without secifying the time, it is set to 12:00AM (midnight). When you pass the DateTime object to an SqlParameter, the following is sent over the wire:


     exec GetContracts @CreationDate = 'Aug 13 2004 12:00:00:000AM'

A further complication is that even if you pass creationDate.ToShortDateString() (assuming of course that your DateTime object in code is ‘creationDate’) to the Value of your SqlParameter, the afortementioned value is still passed to the stored procedure. This is because the stored procedure parameter is typed as datetime. Now, how do you overcome this?

With values in the table such as ‘2004-08-13 13:02:44.767’, you’ll never be able to match ‘Aug 13 2004 12:00:00:000AM’, and therefore no rows will be returned. The way I have overcome this problem is to make use of DATEDIFF and the dayofyear DATEPART. By using the following in your WHERE clause:


     DATEDIFF(dayofyear, @CreationDate, Contracts.CreationDate) = 0

This will return 0 whenever the day of the year is the same in both the table, and the stored procedure parameter. Any other day will either cause DATEDIFF to return a non-zero value. You can also use this if you want everything from this date and on (or before) by changing the comparitor to > or < as appropriate. Sproc on!