星期四, 五月 10, 2007

The Gurus of YouTube


Let's say you're in your 20s and you start your first Internet company. Let's
say 21 months later you sell it for $1.65 billion. What happens next?

At first, not much. Some of the money is tied up in escrow, and the
traditions of modesty in Silicon Valley require a period of restraint before you
spend in the big, life-changing way that your wealth will permit.

Still, the world wants to talk to you. Japanese television, Argentine
newspapers, a bunch of French journalists and what seems like every news outlet
in the U.S. Friends you haven't heard from in a long time send e-mails. style="FONT-STYLE: italic">Hey, how's it going? Long time no see! BTW I have
this great business idea...

And so even though you've just left a photo shoot with an imperious,
name-dropping L.A. photographer and ride to the airport in a jet-black Escalade,
when you arrive at LAX, you have to stand in the United Economy line because
you're still flying coach. Having removed your shoes to get through security—an
indignity you'll never again endure if one day you spend an inconsequential few
million on a jet—you walk past a newsstand to see your company on the cover of
Wired and style="FONT-STYLE: italic">GQ.

"Oh, and have you seen Fortune?...
Yeah, we're in there too."

And there they are: Steve Chen, 28, and Chad Hurley, 29, two of the three
founders of YouTube (the other, Jawed Karim, went to grad school last year), a
couple of boy-men looking out from a magazine and up at themselves in real life.
Then they board the plane, Steve way in the back and Chad closer to the front
after paying an extra $24 for an "Economy Plus" seat.

Such is life these days for Chad and Steve—and because they are still young
enough to get the occasional pimple, I don't mind calling them Chad and Steve.
They are premoguls, near magnates. They foreshadow but don't quite yet embody
the wealth and power that accompany their role as the new demiurges of the
online world. At a GQ party in West
Hollywood, Calif., a few weeks ago, Al Gore tapped Steve on the shoulder outside
the bathroom to congratulate him on the success of YouTube. Chad chatted with
Leonardo DiCaprio, handsome and taller than you think and ashing his cigarette
on the floor. But at the end of the night, the YouTube boys were hanging with
the B crowd, Steve eating a burger (despite a disapproving glare from his
girlfriend Julie) and Chad drinking until 2:30 a.m. with a guy who was in the
Jackass movies—not even the main guy.
Guys, you gotta know when to leave the party. (style="FONT-STYLE: italic">When Leo does.)

But of course the party is just starting for Chad and Steve, whose
omnium-gatherum of online videos has captivated the Web for the past year, at
least since a Saturday Night Live
digital short called Lazy Sunday was
forwarded millions of times last December, increasing visits to style="FONT-STYLE: italic">youtube.com 83%. (If you don't know style="FONT-STYLE: italic">Lazy Sunday, don't tell anyone, particularly
anyone under 30. Just quietly YouTube it now.)

YouTube became a phenomenon in 2006 for many reasons, but one in particular:
it was both easy and edgy, a rare combination. You can watch videos on the site
without downloading any software or even registering. YouTube is to video
browsing what a Wal-Mart Supercenter is to shopping: everything is there, and
all you have to do is walk in the door. Want to see Mikhail Baryshnikov
performing in Giselle in 1977? A user
named "goldenidol" uploaded a clip in August. Want to see a
sure-to-make-you-queasy video of a girl snorting a strand of cooked spaghetti
and then choking it out her mouth? You're in luck: "asemoknyo" put that clip on
YouTube last month. All it costs is a few moments away from whatever you're
supposed to be doing on your computer—and who doesn't have 30 sec. to watch that
priceless clip of Faith Hill mouthing "WHAT?" when she lost a Country Music
Association Award this year? (That video has been viewed at least 6 million
times.)

YouTube is a new kind of medium, but it's still mass. Your grandmother could
use it (a search for "grandmother" on YouTube yields more than 1,800 videos).
But because the site doesn't prescreen uploads—which is a lot cheaper for Chad
and Steve than hiring a bunch of editors to police millions of users—it ends up
hosting a lot of out-there stuff as well: obscure bands, tear-jerking video
diaries, "dead dog tricks" (don't ask), a "German toilet" (style="FONT-STYLE: italic">please don't ask)... The unmediated
free-for-all encouraged the valuable notion that the site was grass-roots,
community-run and—to use an overworked term—"viral." These are partial fictions,
of course. YouTube controls the "Featured Videos" on its home page, which can
dramatically popularize a posting that otherwise might fade. Also, the video in
the top-right section of the home page is an advertisement, even though it
doesn't always look like one. There's no porn on the site—overtly sexual
material is flagged by users and removed by YouTube, usually very quickly. But
there is an endless supply of kinda weird, kinda cool, kinda inspiring stuff
there, which means you can waste hours on Chad and Steve's site.

That, in turn, means advertisers want to be on YouTube, which is why Google
paid so much for it. If even, say, 10% of the $54 billion spent on TV
advertising annually migrates to video sites like YouTube in the next few years,
we will pity Chad and Steve for selling for a mere $1.65 billion. But for now,
with YouTube still unproven—it has never made much money, and it could be
crushed by lawsuits from content creators whose material shows up on the site
without permission—the blockbuster acquisition price carries a whiff of the
late-'90s Silicon Valley gold rush. It now falls to Chad, the CEO, and Steve,
who runs the tech side, to prove that what they created with Karim will not
become the next broadcast.com, the video
provider Yahoo! bought for $5.7 billion in 1999—and which now doesn't exist.

Turning YouTube from a sensational rumpus to a profitable corporation will
require Chad and Steve to thread the company through legal disputes, hire at
least 100% more employees than they have now, negotiate with the biggest ad and
media companies in the world, maintain their unique identity without getting
swallowed up by Google, please shareholders, manage p.r. and flawlessly execute
a thousand other tasks that far more experienced executives have flubbed. All
while Chad has to make time for his wife and two small children, Steve needs to
buy a car to replace his crappy Jeep Wrangler, and the broadband in the YouTube
office is so slow, it takes forever to watch their own site. Can a couple of
kids who grew up nowhere near Silicon Valley handle all this?
CHAD MEREDITH HURLEY has
the lanky and languorous carriage of a teenager who just rolled out of bed. He
wears a stubble beard over a complexion that doesn't see enough sun, and he has
a habit of pushing his chin-length hair back from his forehead so that by the
end of the day it's a bit oily and Gordon Gekko-ish.

Raised in the southeastern Pennsylvania town of Birdsboro, Chad is the middle
child of Donald, a financial consultant, and JoAnn, a schoolteacher. He was an
arty kid, always watercoloring and sculpting, which is not to say he ran with
the artsy crowd. There is nothing affected or capering about Chad—his
temperature runs so low he comes off at first as a dullard—and it's easy to
imagine him as a slightly introverted, earnest boy trying to sell artwork (not
lemonade) from his front lawn, as he did in an unsuccessful venture that taught
him the difference between art and commerce.

Chad was unusual in that his artistic proclivities coincided with an interest
in business and technology. In ninth grade, he built an amplifier that won third
place in a national electronics competition. By the time he was in college, he
would hole up for hours online, doing those things boys do these days—studying
Web design, playing games, experimenting with animation. He did not come
equipped with a sense of entitlement or snobbery; his brother Brent, 27, told me
that to earn money during one summer in college, Chad joined a pyramid-marketing
scheme for knife sets. "He would come over to our friends' houses and cut
through a soda can or something," says Brent. "One of our family friends, they
joke now, 'Hey, you sold us these knives and look at you now.'"

If it's true that people make their own luck, Chad made a lot of it. In 1999,
he was finishing up at Indiana University of Pennsylvania, where he had majored
in computer science before switching to graphic design and printmaking.
("Computer science, that was too technical, too mechanical for Chad," says his
father Don. "He wanted to be on the creative side." Chad spent much of his time
running for the cross-country team, and he was in top shape at the time. The not
insubstantial paunch he has added since then is a source of some consternation.)
Around graduation, Chad read an article about a new company called PayPal, which
back then was trying to enable PDA users to beam money to each other. Chad sent
PayPal his resume, and on a Wednesday evening he came downstairs to announce he
had a job interview on Friday. The company flew him to California and asked him
to show his skills by designing a company logo (it's still the PayPal logo to
this day). That Sunday, PayPal's CEO offered Chad a job as the company's first
designer. He slept on a friend's floor for a few weeks, scrounging money for
pizza before he got his first paycheck.

It was a propitious move; Chad had joined a firm that would soon abandon the
handheld-payment concept in favor of something far more lucrative: securing
online transactions. In 2002 eBay bought PayPal for $1.54 billion, and as an
early employee, Chad walked away with enough to buy a few luxuries—including his
Tag Heuer watch—and plenty of seed money for a future venture. "Either he was
incredibly brilliant and he saw the opportunity, or he was really lucky—I don't
know," says Ryan Donahue, who was PayPal's second designer and roomed with Chad
for a time. "But to hit gold with your first job out of college is pretty rare.
And then for his first company to be YouTube, he's gotta be a smart guy."

Chad was also lucky to meet his future wife, Kathy Clark, at a party in 2000.
Clark shared his interest in technology and in starting a family. She also
turned out to be the daughter of James Clark, the legendary Silicon Valley
entrepreneur who founded or co-founded three billion-dollar-plus companies:
Silicon Graphics, Netscape and Healtheon. His daughter, 36, is an intensely
private person—she was reticent when I visited the Clark-Hurley home in Menlo
Park, Calif., for a brief meal of takeout burritos in their trophy kitchen (Wolf
range, lovely). She asked that I not reveal the names of the kids. Kathy and
Chad have never before publicly discussed her father's identity. Their
reluctance is understandable: Jim Clark is one of the valley's most revered
figures, and because he runs a media-sharing website—Shutterfly, founded in
1999—it would be tempting to think he was the real force behind the
video-sharing site his son-in-law was starting. But Chad says Clark has had only
a tiny role in YouTube, merely offering the boys advice in 2005, when the
start-up was seeking its initial round of funding. "Basically I have never
wanted to mix money and family, so we haven't talked much about it," Chad told
me.

Chad's greatest stroke of luck at PayPal was meeting Steve Chen and Jawed
Karim, two PayPal engineers with whom he would occasionally bat around ideas for
start-ups. Karim, 27, enrolled at Stanford last year to pursue a master's in
computer science, and today there's some tension between him and the other
founders, who have become famous while he toils in a small, modestly furnished
dorm room. Although Karim is named on YouTube's site as a co-founder, Chad and
Steve have promoted a highly simplified history of the company's founding that
largely excludes him. In the stripped-down version—repeated in dozens of news
accounts—Chad and Steve got the idea in the winter of 2005, after they had
trouble sharing videos online that had been shot at a dinner party at Steve's
San Francisco apartment. Karim says the dinner party never happened and that the
seed idea of video sharing was his—although he is quick to say its realization
in YouTube required "the equal efforts of all three of us."

Chad and Steve both say that the party did occur but that Karim wasn't there.
"Chad and I are pretty modest, and Jawed has tried to seize every opportunity to
take credit," Steve told me. But he also acknowledged that the notion that
YouTube was founded after a dinner "was probably very strengthened by marketing
ideas around creating a story that was very digestible."

No company, of course, is ever founded in a single moment, and YouTube
evolved over several months. Chad and Steve agree that Karim deserves credit for
the early idea that became, in Steve's words, "the original goal that we were
working toward in the very beginning": a video version of HOTorNOT.com.

HOTorNOT is a dating site that encourages you to rate, on a scale of 1 to 10,
the attractiveness of potential mates. It's a brutal, singles-bar version of
MySpace, but Karim says it was a pioneer: "I was incredibly impressed with
HOTorNOT, because it was the first time that someone had designed a website
where anyone could upload content that everyone else could view. That was a new
concept because up until that point, it was always the people who owned the
website who would provide the content."

The idea of a video version of HOTorNOT lasted only a couple of months. "It
was too narrow," says Chad. He notes that another early idea was to help people
share videos for online auctions. But as the site went live in the spring of
2005, the founders realized that people were posting whatever videos they
wanted. Many kids were linking to YouTube from their MySpace pages, and
YouTube's growth piggybacked on MySpace's. (MySpace remains YouTube's largest
single source of U.S. traffic, according to Hitwise.) "In the end, we just sat
back," says Chad—and the free-for-all began. Within months—even before style="FONT-STYLE: italic">Lazy Sunday—investors such as Time Warner and
Sequoia Capital, a Menlo Park investment firm, began to approach YouTube about
buying in. Big advertisers started paying attention in October 2005, when a cool
Nike ad-that-doesn't-look-like-an-ad of the Brazilian soccer player Ronaldinho
went viral in a big way on YouTube. Sequoia—which has helped finance Apple,
Google and other valley greats—ended up providing about $8.5 million in
2005—just in time for Steve to avoid having to increase his credit-card limit
yet again to pay for various tech expenses. style="FONT-WEIGHT: bold">STEVE SHIH CHEN has always been something of a
risk taker. He left the University of Illinois at Urbana-Champaign a semester
and a half early to work for PayPal. His family was wary: "We told him it was
risky; he just had a few months left" in college, says his brother Ricky, 26.
"But he was determined to give it a shot." Steve was drawn to PayPal partly
because several U. of I. alums worked there, including PayPal co-founder Max
Levchin, who in turn was eager to hire Steve because of his educational
background. Steve had attended not only U. of I.—which has a well-respected
computer-science program—but also the Illinois Mathematics and Science Academy
(IMSA), a state-funded boarding school. "IMSA plus U. of I. is generally a very
winning formula," says Levchin, who says the combination produces "hard-core
smart, hardworking, nonspoiled" young engineers who are perfect for start-ups.
"The kind of people that imsa attracts are the kind of people very prone to
choose their own path," he says. They also grow up quickly, since IMSA feels
more like a college than a high school. It's coed and highly competitive, the
schoolwork is college level, and kids spend every possible second on the
Internet.

Which isn't to say Steve is a geek—at least not an irretrievable geek. Chad
gets more attention for his laid-back cool look, but Steve is actually more fun
to hang out with, particularly since he started drinking a year and a half ago
(right around the time YouTube was founded; he jokingly wonders if there's a
connection). Steve seems to wear the responsibilities of the company more
lightly than Chad, and he has absorbed less of the heavy p.r. coaching. Steve,
for instance, is willing to speculate about what his wealth might mean for him:
"It's funny, you know, Chad and I will probably, are definitely at YouTube for
the next five years. But you do start wondering, What's next? Now that you have
some cash, and it's like, Well, if I could live in any city, where would I
live?"

And?

"New York, in spite of the weather, is a cool place." For now, Steve lives in
the San Francisco apartment he bought a bit rashly in 2005, when he had just
left PayPal and YouTube was in its infancy.

Steve was born in Taipei and has his own interesting relationship with luck.
When he was a little kid, maybe 6, his mother took him to see a fortune teller
who told him he would never be rich. "And that's kind of stayed with me ever
since," he told me. The experience left him with a sense of dread that he takes
half-seriously. "We haven't actually seen any of the money [from the Google
deal] yet," he says with a laugh, "and I keep thinking there will be some legal
complication, or it will fall through somehow."

But things always seem to work out for Steve, who carries an aura of mischief
with him like a cloud of cigarette smoke. He drinks cappuccino well into the
night and doesn't get to work until noon approaches. Levchin says that when
Steve was an engineer at PayPal, he quickly established himself as the guy who
could find the "shortest, cleverest path instead of hammering your head against
the wall... He'd be like, 'Yeah, I can get this feature done fast.' And the QA
[quality assurance] team would be like, 'Oh, man, Chen wrote this. style="FONT-STYLE: italic">Great. I'm going to be QAing this for a
while.' Because he would definitely take short cuts. But most people wouldn't
really notice, and the product would be out faster."

As YouTube developed, Chad and Steve's complementary skills began to mesh.
After Chad left PayPal in 2003, it seemed possible he would do something more
artistic than be a CEO; he designed messenger bags, and he did a bit of work on
a film Levchin helped fund, Thank You for
Smoking
. "He is sort of an anomaly," says Donahue, his former roommate
and the founder of HourTown.com. "Because if you look at the successful start-up
stories, the formulaic founders' team is usually an engineer and a business
person, or two engineers. It's rarely a designer or a truly creative person."
But YouTube's success owes partly to its retro name, simple logo and alternative
feel, all of which Chad contributed while Steve was making sure the videos
played quickly and easily.

A mentor had also arrived with the Sequoia financing: Pierre Lamond, 76. In
terms of Silicon Valley stature, Lamond approaches Chad's father-in-law Jim
Clark. A founder of National Semiconductor, Lamond started at Sequoia in 1981.
He monitors his investments closely, and he enjoyed receiving daily e-mails from
Chad and Steve (many sent late at night) on various site metrics. He was
pleasantly surprised to discover that Chad and Steve were great listeners—a rare
quality in the genius culture of the valley—and that they spent money very
carefully. Whenever site growth would plateau, Lamond would call them and say,
"'What happened?' And they would tell me, 'We're running out of storage
capacity.'" Lamond sometimes had to push them to buy more.

Early on, Chad and Steve made a crucial good decision: despite pressure from
advertisers, they would not force users to sit through ads before videos played.
Pre-roll ads would have helped their bottom line in the struggling months, but
the site would never have gained its mythological community-driven status. It
would have seemed simply like another Big Media site.

The question is, How do they preserve the site's underground image now that
YouTube is merely a bijou in the Google empire? As it happens, Google executives
are powerfully aware of this problem, and they are sending outward signals that
YouTube will remain independent. Google recently sent a team of facilities
people to the YouTube office outside San Francisco to ask how the YouTubers want
the place decorated (YouTube moved to the old Gap offices in San Bruno before
the acquisition, and they haven't had time to fix up the space). "The direction
we were given," Google's facilities manager, Ninette Wong, told Chad in a
meeting, "was to really get information from you, Chad—you, the man!—and to
understand how to integrate the YouTube brand into the work space... It's really
to kind of keep Google separate from YouTube." With the old start-up frugality
still in mind, Chad said that his coders don't need more space to work—"They
don't complain"—and that greenery is a low priority because "I hear it's
expensive to maintain the plants at Google."

Google will appreciate his thrifty approach, but it's unlikely that the
company knows the extent of YouTube's current independence. In a recent YouTube
management meeting I sat in on, Gideon Yu, late of Yahoo! and now cfo at
YouTube, told Chad and Steve, "The finance team [at Google] has been pushing me
really hard on budgeting, your favorite topic. So what I'm telling them and what
I'm telling us are"—he paused—"different."

A nervous laugh shot through the room, but Yu pressed on: "What I'm telling
them is that there's no way we're going to get them any budgetary numbers—that
it's just impossible because we have no idea what the integration looks like,
blah, blah, blah. And they're buying it, a little bit. But I still think that
the 'us' team, here, should put together some kind of rudimentary kind of
plan... even if we don't share that upward."

To be sure, Google will get some control for its $1.65 billion. YouTube's
managers must now report to Chad or Steve and a corresponding Google exec. That
prompted Suzie Reider, chief marketing officer, to ask the boys whether she now
has two bosses. Without skipping a beat, Steve replied, "You only have to listen
half the time." Playful as always, he added that he didn't think he was going to
use a Google-supplied BlackBerry that would be fitted with Google's mail and
calendar system.

The biggest threat to YouTube remains potential copyright lawsuits from
content providers who could claim that the site—like Napster before it—is
enabling thieves. In a recent report, Google acknowledged that "adverse results
in these lawsuits may include awards of substantial monetary damages." Mark
Cuban, the billionaire co-founder of Broadcast.com, has said publicly for months
that the potential for legal trouble makes YouTube a bad investment. YouTube has
responded by publicizing agreements it has made with media companies such as nbc
Universal Television to legally show video clips from, say, style="FONT-STYLE: italic">The Office. Still, YouTube says federal law
requires only that it remove videos when copyright holders complain—not to
pre-emptively monitor the site for infringements, which would destroy its
spontaneity. If kids can't play sad pop songs in the background of their video
blogs, why would they blog at all?

In an e-mail, Cuban pointed out a contradiction in YouTube's position: "They
are spending a ton of money to license content. Which makes me curious. Why
license if all that content is viable under [federal law]? And when does the
licensing ever end—won't everyone want [to get] paid? Even the personal videos
of cats?"

Eric Schmidt, Google's CEO, told me his company had hired an outside firm to
help it analyze YouTube's legal risks. "And we concluded that Mark Cuban's
arguments were false. We read them, by the way. We just think he's false.
Copyright law, the safe-harbor provisions—it works, as long as we do a good job
of takedown"—quickly removing videos whenever copyright holders ask.

It's hard to imagine Chad and Steve sitting through endless meetings on
safe-harbor laws. They're too young, too creative and—in Steve's case, at
least—too peripatetic. They usually demur on questions of what they will do
next, blandly stating their hopes to "improve the product," as Chad puts it. But
Levchin, their former boss at PayPal, says, "The essential crisis is coming.
They better get ready. And the essential crisis for an entrepreneur is, What is
this all about? Did I just make the most money in my life ever? For what
purpose? And... am I going to start setting up my family office and manage my
investments, or am I going to jump off another roof and hope there's a
parachute?"

Which is a very old question indeed, one all newly wealthy people face when
the market rewards them. Chad and Steve don't yet have an answer. They may have
built a website that changed the online world in 2006, but they are still
learning when to leave the party.

星期五, 四月 27, 2007

吃出五一七天好心情

   5月1日 咖啡牛肉片
  【菜名】咖啡牛肉片
  【所属菜系】全部
  【特点】此菜色泽金黄,味鲜美微辣,咖啡香气扑鼻。
  【原料】牛肉四两;咖啡粉五分;洋葱二两;鸡蛋清一个;精盐五分;湿淀粉三钱;白糖二分;食油一两;味精一分
  【制作过程】
  1.将牛肉洗净,剔除筋膜,顺着肌肉纹路横切成一寸二分长、五分宽、一分厚的薄片,放碗内,加精盐(二分)、鸡蛋清,并用手抓拌均匀。洋葱剥皮洗净,切成片。
  2.锅放炉火上,放入食油六钱烧热,下牛肉片煸炒至松散变色时,盛入碗内。原锅放油四钱烧热,下洋葱煸炒.
  5月2日 糖醋小排
  【所属菜系】浙江菜
  【特点】甜酸味型,可冷食也可热食。
  【原料】猪排骨500克。酱油、白糖、红醋、葱、姜、植物油。
  【制作过程】
  1.将排骨剁成段。
  2.葱、姜分别切段。
  3.锅置火上,放入油烧热,下入排骨炸至金黄色捞出,沥干油,锅内留少许油,下入葱、姜块、酱油、白糖,加入水,放入排骨,加盖烧至排骨熟烂汤汁快无时,加红醋,翻勺,即可出锅装盘上席。
  5月3日 炸烹虾段
  【原料】净虾500克,葱丝、姜丝各2克,蒜片2克,油750克(实耗约100克),料酒25克,醋20克,味精2克,蛋清适量,水电粉30克,面粉少许,香油10克,盐、高唐各适量。
  【制法】
  1.虾剪去须、爪,去净沙线后,改刀为虾段,加蛋清、水淀粉、面粉上浆挂糊。
  2.碗中放料酒、醋、盐、味精、葱、姜、酸、高汤兑成汁。
  3.锅放油烧六成热,下入虾段,炸至金黄色捞出。
  4.锅留底油,虾段入锅,烹入芡汁,颠炒,淋香油即可。特点:色泽金黄,鲜嫩味美。
  5月4日 糖醋里脊
  【菜名】糖醋里脊
  【所属菜系】鲁菜
  【特点】菜色金黄,甜酸可口,外焦脆,里嫩香。
  【原料】猪里脊肉250克,清油750克(实耗100克),料酒20克,醋50克,白糖60克,盐2克,葱末,姜末各2克,鸡蛋液35克,水淀粉70克,面粉适量,香油10克,高汤适量
  【制作过程】
  1.肉洗净切片,加入鸡蛋液,水淀粉,面粉抓匀。
  2.碗中放料酒,糖,醋,盐,葱,姜,水淀粉,少许汤对成汁。
  3.锅放油烧至五成热,下入肉片,炸至焦脆,捞出控油。
  4.锅留底油,烹入糖醋汁,倒入肉片,翻勺,淋香油出勺即可。
  5月5日 香茹炒青菜
  【菜名】香茹炒青菜
  【所属菜系】浙江菜
  【特点】咸香利口,香茹香味浓郁,是宴席佳品。
  【原料】青菜一捆,香茹10个调料:盐、味精、料酒、小磨香油、花生油
  【制作过程】锅内下入少许油,烧热下入青菜煸炒,然后下入香茹同炒,烹入料酒、盐、味精、小磨香油,旺火急炒,青菜塌架,填入少量水,即成。
  5月6日 八宝素菜
  【主料】白菜胆500克,肚肉250克,香菇25克,草菇15克,发菜5克,栗子75克,笋尖50克,腐竹30克,面筋30克,生油750克(耗100克),南乳汁、味精、精盐、芝麻油、淀粉水各适量。
  【作法】
  1.将白菜洗净切段,用温油溜炸捞起,沥去油后装入锅(锅里用竹篾垫底),香菇、草菇(去蒂)、发菜浸发冼净待用。
  2.将栗子、笋尖、腐竹、面筋放进油鼎炸后捞起,逐样排在锅里,再把香菇、草菇、发菜也逐样摆入锅里,加入二汤、精盐、南乳汁、肚肉(片开炒香)盖在上面,放进蒸笼炖约30分钟,取出去掉肚肉,然后将各种物料分开逐样摆在餐碗里(发菜放在中间),白菜放在上面,再入蒸笼蒸热。上菜时,倒翻过碗,原汁下鼎煮沸,,投入味精、芝麻油,用淀粉水勾薄糊淋上即成。酱碟:香醋2碟。
  【特点】嫩滑、爽口、浓郁。
  5月7日 八宝鸭
  【菜名】八宝鸭
  【所属菜系】沪菜
  【特点】成菜色泽红润,形状完整,鸭肉酥烂,腴香浓溢,汁浓味鲜。
  【原料】肥鸭,笋丁,肉丁,火腿丁,栗子丁,鸡肫丁,冬菇丁,莲子,虾米,糯米饭,绍酒,酱油,白糖,味精,虾仁,湿淀粉,熟青豆,猪油。
  【制作过程】将肥壮嫩鸭宰杀治净,劈开背脊,剪去鸭脚,入沸水锅焯水后捞出洗净,沥干,在鸭身上抹上酱油;将笋丁,肉丁,火腿丁,栗子丁,鸡肫丁,冬菇丁,莲子,虾米,糯米饭放入碗内,加绍酒,酱油,白糖,味精,拌和成馅放入鸭肚内,背朝上放入盛器,上笼蒸三四小时,至鸭肉酥烂时取出翻扣在盘中;炒锅烧热,下猪油,将虾仁滑熟取出,锅内留油少许,放笋片,冬菇片,加酱油少许,蒸鸭原汁适量,烧沸后放虾仁和熟青豆,下湿淀粉少许勾芡,淋上猪油,出锅浇在鸭身上即成。

欢度五一七天瘦身假期

  七天长假,胡吃海塞加上天天懒觉,很容易让身材再次走形,等工作日上班时,又要望镜兴叹了!可是如果好好利用假期,注意运动和饮食,168小时后,同事再见你,完全可能会惊艳加嫉妒!为了体谅诸位OL的辛苦,本期小编只是推荐给大家一些简单的家务活,以及正确的假日生活方式,你会发现,瘦下来并不困难。
  假日是消除平日运动不足、缓解压力,并且让身心充满活力的最好时机。如果天天只是懒洋洋地做个沙发土豆,那么身体会变得越来越懈怠,体脂肪率也会不断攀升。因此,保持和平常一样的时间起床,是保持身材的第一步。如果在假日睡懒觉,睡眠的节奏就会打乱。
  其次,做做平日里懒得认真打扫的家务,也是个不错的选择。别小看擦地板、洗衣服、收纳换季服饰这些小活,只要拿出干劲好好做,一样可以消耗体内脂肪。如果每天再辅以适当的伸展运动,上下楼梯、散步等比较轻松的运动,减肥效果也相当不错!
  还有,逛街购物、看电影、在公园野餐,除了让你心情愉快地度过假期外,也能帮你变苗条呢!
  瘦身假期秘诀一手脚麻利地做家务,体脂肪就会降低。
  同样是打扫卫生,清洗衣物,慢吞吞的动作和麻利的动作,所消耗的热量区别大大的!有节奏地使用吸尘器;或者一边晾衣服,顺便做做伸展运动;这样的动作都能帮你消除体内脂肪。
  计划好做家务的时间,也是个好办法。15分钟擦地,30分钟清除厨房的油烟。在目标时间里有效率地完成家务,除了有助于减肥,也能帮你腾出时间做想做的事。
  瘦身假期秘诀二熬夜晚起型体质,身体节奏会变乱。
  要锻炼出容易燃烧体脂肪的身体,就要从每天清爽地起床做起。天天为工作和家务忙得团团转,很容易在不知不觉中养成"熬夜晚起型体质"。如果一直持续这样的生活,身体节奏就会变乱。
  所以当务之急就是养成"早睡早起"的习惯,调整好身体节奏。如果想一早醒来就能神清气爽,就得从打开窗帘,在早晨的阳光下运动开始。身体受到光线的刺激,就能够活化大脑。
  瘦身假期秘诀三家居活动能量消耗表
  沐浴30分钟:消耗85千卡
  逛街购物60分钟:消耗85千卡
  下楼梯5分钟:消耗15千卡
  爬楼梯5分钟:消耗25千卡
  乘坐地铁或者公共汽车60分钟:消耗105千卡
  烫衣服20分钟:消耗40千卡
  晾衣服,收衣服10分钟:消耗25千卡
  骑自行车买东西20分钟:消耗60千卡
  用吸尘器打扫卫生15分钟:消耗35千卡
  用抹布擦桌子15分钟:消耗35千卡
  做饭菜和收拾碗筷:消耗65千卡
  跟孩子一起玩(站位)30分钟:消耗100千卡
  擦玻璃30分钟:消耗102千卡
  修剪花草、除草30分钟:消耗200千卡

星期二, 三月 20, 2007

JBOSS上部署JOSSO单点登录组件

本文主要阐述在编译,打包和在JBOSS上部署和运行JOSSO单点登陆程序的步骤,认证数据存放Mysql数据库

####################################
建立基础数据库

选择认证信息存放介质,本文考虑用mysql数据库


mysql 连接信息为:
"com.mysql.jdbc.Driver"
"jdbc:mysql://localhost/test"
下载mysql jdbc驱动
把驱动程序放到
$JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/ 目录下 或 josso src lib 目录下

建立数据库,执行下列SQL
-- Roles
CREATE TABLE JOSSO_ROLE (
NAME VARCHAR(16) NOT NULL,
DESCRIPTION VARCHAR(64) NULL
);
ALTER TABLE JOSSO_ROLE
ADD ( PRIMARY KEY (NAME) ) ;
-- Users
CREATE TABLE JOSSO_USER (
LOGIN VARCHAR(16) NOT NULL,
PASSWORD VARCHAR(20) NOT NULL,
NAME VARCHAR(64) NULL,
DESCRIPTION VARCHAR(64) NULL
);
ALTER TABLE JOSSO_USER
ADD ( PRIMARY KEY (LOGIN) ) ;
-- Users Properties
CREATE TABLE JOSSO_USER_PROPERTY (
LOGIN VARCHAR(16) NOT NULL,
NAME VARCHAR(255) NOT NULL,
VALUE VARCHAR(255) NOT NULL
);
ALTER TABLE JOSSO_USER_PROPERTY
ADD ( PRIMARY KEY (LOGIN, NAME) ) ;
ALTER TABLE JOSSO_USER_PROPERTY
ADD ( FOREIGN KEY (LOGIN)
REFERENCES JOSSO_USER ) ;
-- Roles by user
CREATE TABLE JOSSO_USER_ROLE (
LOGIN VARCHAR(16) NOT NULL,
NAME VARCHAR(255) NOT NULL
);
ALTER TABLE JOSSO_USER_ROLE
ADD ( PRIMARY KEY (LOGIN, NAME) ) ;
ALTER TABLE JOSSO_USER_ROLE
ADD ( FOREIGN KEY (NAME)
REFERENCES JOSSO_ROLE ) ;
ALTER TABLE JOSSO_USER_ROLE
ADD ( FOREIGN KEY (LOGIN)
REFERENCES JOSSO_USER ) ;
-- SSO Sessions
CREATE TABLE JOSSO_SESSION
(
SESSION_ID VARCHAR (64) NOT NULL
, USERNAME VARCHAR (128) NOT NULL
, CREATION_TIME INTEGER NOT NULL
, LAST_ACCESS_TIME INTEGER NOT NULL
, ACCESS_COUNT INTEGER NOT NULL
, MAX_INACTIVE_INTERVAL INTEGER NOT NULL
, VALID INTEGER NOT NULL
);
ALTER TABLE JOSSO_SESSION
ADD ( PRIMARY KEY (SESSION_ID) ) ;

INSERT INTO JOSSO_ROLE (NAME,DESCRIPTION) VALUES('role1','The Role1');
INSERT INTO JOSSO_ROLE (NAME,DESCRIPTION) VALUES('role2','The Role2');
INSERT INTO JOSSO_ROLE (NAME,DESCRIPTION) VALUES('role3','The Role3');
INSERT INTO JOSSO_USER (LOGIN,PASSWORD,DESCRIPTION)
VALUES('user1', 'user1pwd', 'The User1');
INSERT INTO JOSSO_USER_ROLE (LOGIN,NAME) VALUES('user1', 'role1');
INSERT INTO JOSSO_USER_ROLE (LOGIN,NAME) VALUES('user1', 'role2');
INSERT INTO JOSSO_USER (LOGIN,PASSWORD,DESCRIPTION)
VALUES('user2', 'user2pwd', 'The User2');
INSERT INTO JOSSO_USER_ROLE (LOGIN,NAME) VALUES('user2', 'role3');
INSERT INTO JOSSO_USER_PROPERTY(LOGIN,NAME,VALUE)
VALUES('user1', 'user.name', 'User1 Name');
INSERT INTO JOSSO_USER_PROPERTY(LOGIN,NAME,VALUE)
VALUES('user1', 'user.lastName', 'User1 Last Name');
INSERT INTO JOSSO_USER_PROPERTY(LOGIN,NAME,VALUE)
VALUES('user1', 'user.registrationDate', 'User1 Registration Date');
INSERT INTO JOSSO_USER_PROPERTY(LOGIN,NAME,VALUE)
VALUES('user2', 'user.name', 'User2 Name');
INSERT INTO JOSSO_USER_PROPERTY(LOGIN,NAME,VALUE)
VALUES('user2', 'user.lastName', 'User2 Last Name');
INSERT INTO JOSSO_USER_PROPERTY(LOGIN,NAME,VALUE)
VALUES('user2', 'user.registrationDate', 'User2 Registration Date');


----------------------------------------
设置好环境变量

set JAVA_HOME=c:jdk1.5.0_03
set JBOSS_HOME=c:jboss-4.0.3SP1 类似
----------------------------------------
#####################################
设置JOSSO配置文件信息 %JOSSO_HOME%srcresources
1.设置网关配置文件 【
Gateway Configuration】josso-gateway-config.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<domain>
<name>SampleDomain</name>
<type>web</type>
<authenticator>
<class>org.josso.auth.AuthenticatorImpl</class>
<authentication-schemes>
<!-- Basic Authentication Scheme -->
<authentication-scheme>
<name>basic-authentication</name>
<class>org.josso.auth.scheme.UsernamePasswordAuthScheme</class>
<!--JDBC Credential Store-->
<credential-store>
<class>org.josso.gateway.identity.service.store.db.JDBCIdentityStore </class>
<credentialsQueryString>SELECT login AS username , password AS password FROM josso_user
WHERE login = ?</credentialsQueryString>
<connectionName>cernet</connectionName>
<connectionPassword>password</connectionPassword>
<connectionURL>jdbc:mysql://localhost/cernet</connectionURL>
<driverName>com.mysql.jdbc.Driver</driverName>
</credential-store>
<credential-store-key-adapter>
<class>org.josso.gateway.identity.service.store.SimpleIdentityStoreKeyAdapter </class>
</credential-store-key-adapter>
</authentication-scheme>
</authentication-schemes>
</authenticator>
<sso-identity-manager>
<class>org.josso.gateway.identity.service.SSOIdentityManagerImpl</class>
<!-- JDBC Identity Store -->
<sso-identity-store>
<class>org.josso.gateway.identity.service.store.db.JDBCIdentityStore </class>
<userQueryString>SELECT login FROM josso_user WHERE login = ? </userQueryString>
<rolesQueryString>SELECT josso_role.name FROM josso_role , josso_user_role , josso_user
WHERE josso_user.login = ? AND josso_user.login = josso_user_role.login
AND josso_role.name = josso_user_role.name</rolesQueryString>
<connectionName>cernet</connectionName>
<connectionPassword>password</connectionPassword>
<connectionURL>jdbc:mysql://localhost/cernet</connectionURL>
<driverName>com.mysql.jdbc.Driver</driverName>
</sso-identity-store>
<sso-identity-store-key-adapter>
<class>org.josso.gateway.identity.service.store.SimpleIdentityStoreKeyAdapter</class>
</sso-identity-store-key-adapter>
</sso-identity-manager>
<sso-session-manager>
<class>org.josso.gateway.session.service.SSOSessionManagerImpl</class>
<!--
Set the maximum time interval, in minutes, between client requests
before the SSO Service will invalidate the session. A negative time
indicates that the session should never time out.
-->
<maxInactiveInterval>1</maxInactiveInterval>
<sso-session-store>
<class>
org.josso.gateway.session.service.store.MemorySessionStore
</class>
</sso-session-store>
<sso-session-id-generator>
<class>
org.josso.gateway.session.service.SessionIdGeneratorImpl
</class>
<!--
The message digest algorithm to be used when generating session
identifiers. This must be an algorithm supported by the
java.security.MessageDigest class on your platform.

In J2SE 1.4.2 you can check :
Java Cryptography Architecture API Specification & Reference -
Apendix A : Standard Names
Values are : MD2, MD5, SHA-1, SHA-256, SHA-384, SHA-512
-->
<algorithm>MD5</algorithm>
</sso-session-id-generator>
</sso-session-manager>
<sso-audit-manager>
<class>org.josso.gateway.audit.service.SSOAuditManagerImpl</class>
<handlers>
<!-- This handler logs all audit trails using Log4J, under the given category -->
<handler>
<class>org.josso.gateway.audit.service.handler.LoggerAuditTrailHandler</class>
<name>LoggerAuditTrailHandler</name>
<category>org.josso.gateway.audit.SSO_AUDIT</category>
</handler>
</handlers>
</sso-audit-manager>
<!-- SSO Event Manager component -->
<sso-event-manager>
<class>org.josso.gateway.event.security.JMXSSOEventManagerImpl</class>
<!--
JMX Name of the EventManager MBean that will send SSO Events as JMX Notifications
The MBean will be registered by the MBeanComponentKeeper.
-->
<oname>josso:type=SSOEventManager</oname>
</sso-event-manager>
</domain>

2.设置智能代理配置文件 【Agent Configuration】josso-agent-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<agent>

<!-- JOSSO Agent classes -->
<!--class>org.josso.tc50.agent.CatalinaSSOAgent</class-->
<!--class>org.josso.tc55.agent.CatalinaSSOAgent</class-->
<!--class>org.josso.jb32.agent.JBossCatalinaSSOAgent</class-->
<class>org.josso.jb4.agent.JBossCatalinaSSOAgent</class>

<!-- Login/Logout URLs -->
<gatewayLoginUrl>http://localhost:8080/josso/signon/login.do</gatewayLoginUrl>
<gatewayLogoutUrl>http://localhost:8080/josso/signon/logout.do</gatewayLogoutUrl>
<!--gatewayLoginErrorUrl>http://localhost:8080/josso/signon/login.do</gatewayLoginErrorUrl-->

<!--
Usefull when working in N-Tier modes behind a reverse proxy or load balancer
Here you should place the reverse proxy or load balancer base URL.

Note : When using this options, the gatewayLoginURL and gatewayLogoutURL should also point to this host.

<singlePointOfAccess>http://reverse-proxy-host:8080</singlePointOfAccess>

<gatewayLoginUrl>http://reverse-proxy-host:8080/josso/signon/login.do</gatewayLoginUrl>
<gatewayLogoutUrl>http://reverse-proxy-host:8080/josso/signon/logout.do</gatewayLogoutUrl>
-->

<!-- Mininum interval between sso session access , in milliseconds -->
<sessionAccessMinInterval>1000</sessionAccessMinInterval>

<!-- JOSSO Agent service locator configuration -->
<service-locator>
<class>org.josso.gateway.WebserviceGatewayServiceLocator</class>
<endpoint>localhost:8080</endpoint>

<!-- Associate an identity to SOAP messages
<username>wsclient</username>
<password>wsclientpwd</password>
-->

<!-- Enabled SSL on the SOAP circuit.
<transportSecurity>confidential</transportSecurity>
-->
</service-locator>

<!--
JOSSO Parnter application definicions :

Configure all web applications that should be a josso partner application within this server.
For each partner application you have to define the propper web-context.
-->
<partner-apps>

<partner-app>
<context>/partnerapp</context>
<!-- This is an optional feature :
You can reference any web resource collection that should not be subject to SSO protection.
The SSO agent will not provide identity nor demand authentication to requests matching the
security constraint associated to this web resource collections.
In order to work, the security constraint must not contain auth-constraints declarations.
See sample web.xml file from josso partnerapp.
<security-constraint>
<ignore-web-resource-collection>public-resources</ignore-web-resource-collection>
</security-constraint>
-->
</partner-app>

</partner-apps>

</agent>


3.设置 josso-reverseproxy-config.xml 配置文件

4.设置 josso配置文件 josso-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<configuration>
<hierarchicalXml fileName="josso-gateway-config.xml"/>
<hierarchicalXml fileName="josso-agent-config.xml"/>
<hierarchicalXml fileName="josso-reverseproxy-config.xml"/>
</configuration>

#####################################################

配置应用服务器文件

----------------------------------------

编辑server.xml $JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/server.xml

<Server>
...
<Service>
...
<Engine>
...
<Host name="localhost" ...>
...
<Valve className="org.josso.tc55.agent.SSOAgentValve" debug="1"/>
...
</Host>
</Engine>
</Service>
</Server>


<Server>
...
<Service>
...
<Engine name="Catalina" defaultHost="localhost" debug="0">
...
<Realm className="org.josso.jb4.agent.JBossCatalinaRealm"
appName="josso"
userClassNames="org.josso.gateway.identity.service.BaseUserImpl"
roleClassNames="org.josso.gateway.identity.service.BaseRoleImpl"
debug="1" />
...
</Engine>
</Service>
</Server>

----------------------------------------
编辑 login-config.xml $JBOSS_HOME/server/default/conf

<application-policy name = "josso">
<authentication>
<login-module code = "org.josso.jb4.agent.JBossSSOGatewayLoginModule"
flag = "required">
<module-option name="debug">true</module-option>
</login-module>
</authentication>
</application-policy>

拷贝文件到$JBOSS_HOME/server/default/conf
josso-config.xml
josso-gateway-config.xml
josso-agent-config.xml
josso-reverseproxy-config.xml

#########################################
执行 Ant Build 任务列表部署和启动JOSSO on JBOSS
----------------------------------------
//编译War包
build.bat war
----------------------------------------
//安装josso到jboss
build.bat install-jboss4

----------------------------------------
//部署 josso应用ear包
build.bat deploy-jboss4
----------------------------------------
//启动 Jboss 进程
cd $JBOSS_HOME/bin
cd %JBOSS_HOME%bin
run.bat
----------------------------------------
访问受保护地址验证SSO
http://localhost:8080/partnerapp/protected
user and password is : user1/user1pwd user2/user2pwd
----------------------------------------


########################################
错误诊断

15:30:15,922 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
错误,一般是因为 login-config.xml 没有设置

星期四, 三月 01, 2007

JSR

89/90/91/130/142/144/210/251/254/263/265/285

Download OSS Service Activation API (See also JSR-000089 Web Page)

Download OSS Quality of Service API (See also JSR-000090 Web Page)

Download OSS Trouble Ticket API (See also JSR-000091 Web Page)

Download OSS Billing Mediation API (See also JSR-000130 Web Page)

Download OSS Inventory API (See also JSR-000142 Web Page)

Download OSS Common API (See also JSR-000144 Web Page)

Download OSS Service Quality Management API (See also JSR-000210 Web Page)

Download Pricing API (See also JSR-000251 Web Page)

Download OSS Discovery API (See also JSR-000254 Web Page)

Download Fault Management API (See also JSR-000263 Web Page)

Download Order Management API (See also JSR-000264 Web Page)

Download Performance Management API (See also JSR-000285 Web Page)

星期一, 二月 26, 2007

NGOSS SID 发表 7.0版本

这次发布的版本,更新和细化了两个主要的业务模型:产品,收入保障

正在看产品模型,可以说完全引入了amdocs,siebel等大厂商的核心产品,商品,定购,类目管理,产品包,价格模型等概念,基本上能和传统的CRM产品模型吻合。

价格策略和产品订购的价格和优惠还得细细研读,这块不熟,可是计费模型的核心。