Wednesday, June 28, 2006

[sql] Converting money to text

Make a money column show up as $n.nn.

select '$'+convert(varchar(10),round([MoneyColumn], 2),0) from [YourTable]

- 0 in the convert call turns it into nnnn.nn
- 1 would turn it into n,nnn.nn
- 2 would turn it into nnnn.nnnn

Monday, June 26, 2006

[outing] Ryann's 6th Birthday Party

When: Saturday, 2006 Jun 24th. 10am-2pm
Where: Dockweiler Beach State Park

Ryann turns Six!

- Sandy's incredible 4-in-1 cake
- Kids are superhuman when it comes to playing in ice cold water
- Flying the dinky kite
- Sandy's gorgeous chocolate shells and lollipop
- Pierre and the Mermaid

Sunday, June 25, 2006

[trip] Indiannapolis, IN

Departed on: Monday, 2006 Apr 3rd
Returned on: Tuesday, 2006 Apr 4th
Accomodation: Hilton Indiannapolis

- A refreshing pint at 6:30am to start the trip
- Black out at the Atlanta airport
- A few friendly red bull and vodkas make a great arrival
- Go Bruins! (not so happy ending)
- National Champion UCLA shirt (we make our own happy ending)
- Giant Martini glass from some bar
- Takhomasak
- White Castle (didn't go. must next time)

[sql] Extract the string up to a delimiter

For example, if the string is '10009-abcde' and we need the characters up to the hyphen.

select substring('10009-abcde', 0, charindex('-', '10009-abcde'))

[trip] Ixtapa, Mexico

Departed: Thursday, 2006 May 25
Returned: Monday, 2006 May 29
Accomodation: Tesoro Ixtapa Resort

- Drinking tequila shots with AA
- Learning that our all-inclusive package includes refreshing adult beverages
- What were we thinking when we decided to walk to Las Brisas?
- Hot in-room jacuzzi with AC blasting
- Wilson the Coconut
- 2am tacos with AA
- Lengua, beef, and pork tacos from the pool
- Balloons at Senior Frog
- Tortilla soup with chicharrones at Las Brisas

Christine and George's day-before-wedding reception:
- Falling into the pool, looking like I was going to break my head
- Everyone jumping into the pool and having a grand old time
- Pierre singing with the band, and then having a tequila shot with the band
- Christine's absolutely fabulous presidential suite

Christine and George's wedding:
- "Win private massages"
- Toasting with Cazadore
- Ribs. Steak. Shrimp. Lobster. Repeat.
- Fireworks spectacular
- Christine and George!

Saturday, June 24, 2006

[buy] Samsung Digimax i6 Digital Camera

The trusty Minolta Xt decided to get lost in Vegas and the Rio player died a few days later. I love it when I have no choice but go shopping for consumer electronics. And -- my proud find:

Purchased from: Costco
Cost: $269

Why have two pieces of electronics when you can have one? This puppy is all kinds of fun:

- Takes picture (duh)
- Takes movie (who doesn't?)
- Records voice memo (must have for my class)
- Plays MP3 (ta da)
- Plays MP4 (nice demo Korean MTV clip)
- Lets you apply effects such as Sepia after you take the picture (why wasn't this obvious to everyone the first time around?)

I am really enjoying my new non-furry friend.

[find] Singing horsees

Vargo tuned me to this mesmerizing little flash app.

Thursday, June 22, 2006

[sql] Finding top 5 within group

Cool SQL trick from Todd. With mods for my own purpose.


SELECT A.dt, A.tokengroup, A.token, A.num
FROM #tmp1 AS A, #tmp1 AS B
WHERE A.dt = B.dt
AND A.tokengroup = B.tokengroup
AND A.token <> B.token and A.num <>
GROUP BY A.dt, A.tokengroup, A.token, A.num
HAVING COUNT(*) <= 5
ORDER BY A.dt, A.tokengroup, A.token, A.num desc

Tuesday, June 20, 2006

[eats] Paco's Tacos (Los Angeles, CA)

Wow. That was such a great dinner.

1. Start with a round margarita on the rocks. I rarely have margarita that goes down as easy as Pierre's-special. These are good.

2. Order any menu item, as long as it comes with flour tortilla. They make them right there in the restaurant. I did not know that hand made flour tortilla are such nice little gifts from god to humanity.

3. Order another round of margarita on the rocks.

4. Admire the salt water fish tanks. Find the cool giant hermit crab in there. Admire the Jerry McGuire reference on the wall.

5. Plan to come back again.

2007 Apr Update -- This time I tried the Cactus Salad. Loved it.

Paco's Tacos
4141 S. Centinela Ave
(Near Culver City, Centinela and Washington)
310.391.9616

Wednesday, June 14, 2006

[find] MAS964

Blast from the past: MAS 964 - Principles of Visual Interface Design

Problem Set 6. Part 2) Given two squares that are freely repositionable on the screen (rotate/translate/scale), apply some achromatic/non-gradated (i.e. no color, no grays) expressive device to the case when the two solids intersect, so that the union of the space is emphasized.

Monday, June 12, 2006

[eats] Nobu (Las Vegas, NV)

Nobu has a 9.7 rating on CitySearch and now I see why.

- Kobe beef sashimi in sesame dressing
- Squid sauteed with asparagus and shitake mushrooms
- Chilean sea bass with shredded turnip
- Lobster salad with miso dressing

And who can say no to the gratuitous chrome holder for our Fiji water?

And I am hungry again.

Nobu
Hard Rock Hotel and Casino
Las Vegas, CA
702.693.5090

Thursday, June 08, 2006

[sql] Select count(*) in SQLServer

A much faster way to do select count(*) in SQLServer:

SELECT rows FROM sysindexes WHERE id = OBJECT_ID('[TableName]') AND indid <>