id
stringlengths
50
55
text
stringlengths
54
694k
global_05_local_5_shard_00000035_processed.jsonl/31762
 Cinnamon Bark Information | Evidenced-Based Supplement Guide on MedicineNet.com - How does Cinnamon Bark work? Cinnamon Bark How does Cinnamon Bark work? Are there safety concerns? Consuming cinnamon bark in food amounts is safe. Cinnamon bark seems to be safe for most people, in amounts slightly higher than those found in foods. It is unsafe when taken in large amounts. Ingesting cinnamon oil might not be safe. The oil can be irritating to the skin and mucous membranes, including the stomach, intestine, and urinary tract. It can cause side effects such as diarrhea, vomiting, dizziness, sedation, and others. Do not use cinnamon in amounts greater than those found in food if: • You are pregnant or breast-feeding. • You have diabetes. Cinnamon might lower blood sugar. • You are scheduled for surgery in the next two weeks. Therapeutic Research Faculty copyright Report Problems to the Food and Drug Administration
global_05_local_5_shard_00000035_processed.jsonl/31765
Patrice A. Washington, DC Member since: July 4, 2012 Vegetarian for past 14 years....wanted to save animals:+) What kind of meetups are you interested in? Going to restaurants, picnics, cooking classes! Bonjour everyone, I am excited to join other vegetable lovers exploring the cuisines in Paris! People in this Meetup are also in: Sign up Meetup members, Log in
global_05_local_5_shard_00000035_processed.jsonl/31769
Philadelphia, PA Hometown: Philadelphia Member since: June 4, 2013 I'm from HK but go to school in the States. I only do art in during my free time as a hobby. People in this Meetup are also in: Sign up Meetup members, Log in
global_05_local_5_shard_00000035_processed.jsonl/31784
Marooned in Iraq Image Universal acclaim - based on 14 Critics User Score Generally favorable reviews- based on 7 Ratings Summary: Set on the Iran-Iraq border in the early 1990s, this film dramatizes the plight of the Kurdish people. Production: Mij Film Co. Genre: Drama Country: Iran Languages: Persian, Kurdish Home Release Date: Oct 7, 2003 Movie title data, credits, and poster art provided by:
global_05_local_5_shard_00000035_processed.jsonl/31785
Jared Padalecki Biography: Jared attended Madison High School in San Antonio, Texas. He was a Presidential Scholars Program candidate in 2000, his senior year. Padalecki began taking acting classes in Texas when he was twelve. He was one of two 1999 "Claim to Fame" contest winners at the Teen Choice Awards on FOX. At the awards show he met his current manager, who is also Freddie Prinze Jr.'s manager. Before joining Gilmore Girls, Padalecki filmed a pilot for NBC that was never picked up. He planned to attend the University of Texas but changed his mind when he won the role of Sam. Most recently, Jared was awarded his own show, Supernatural, in which he co-stars with Jensen Ackles. Jared Padalecki's Scores • Movies • TV Average career score: 38 Highest Metascore: 47 Flight of the Phoenix Lowest Metascore: 33 New York Minute Score distribution: 1. Positive: 0 out of 5 2. Negative: 3 out of 5 5 movie reviews Title: Year: Credit: User score: 34 Friday the 13th Feb 13, 2009 Clay Miller 6.3 39 Cry_Wolf Sep 16, 2005 Tom 8.3 41 House of Wax May 6, 2005 Wade 4.0 47 Flight of the Phoenix Dec 17, 2004 John Davis 7.5 33 New York Minute May 7, 2004 Trey Lipton 5.5
global_05_local_5_shard_00000035_processed.jsonl/31813
Universal Audio 2-1176 Dual Limiting Amplifier The 2-1176 Dual Limiting Amplifier is a 2-channel version of Universal Audio's '60s-era 1176 and uses the same FETs (for gain control elements) and output transformers. The new unit employs metal-film resistors, which produce a lower noise floor than the carbon-film resistors used in the vintage 1176. The 2-1176 also uses rotary switches for ratio and meter functions in lieu of the familiar pushbutton switches for these functions, which appeared on all models of the 1176 (including the reissue in 2000). Each of the 2-1176's two channels sports continuously variable attack, release, input level and output level controls. Up to 40 dB of total gain is available from the level controls. Attack times range from a blazing fast 20 µs to 800 µs. Release times can be adjusted from 50 ms to 1.1 seconds. A 6-position rotary switch for each channel gives compression ratios of 1:1 (useful when you don't want compression but would like to use the 2-1176 as a tone device to color a track's sound), 4:1, 8:1, 12:1, 20:1 and All. The All setting duplicates the compression curve and added distortion produced on a vintage 1176 by pushing in all four ratio pushbuttons simultaneously. Each channel also provides a backlit VU meter and two-position meter function switch; the latter toggles the meter between readouts of gain reduction and output level. In the latter mode, the meters are calibrated to show 0 VU at +4dBm output level. All rotary controls sport highly visible white hash marks on contrasting black plastic knobs. Values for settings of the attack, release, input level and output level controls are regrettably all represented by arbitrary numbers (vs. µs, ms and decibel values), although extreme settings for time constants are also marked “slow” and “fast,” respectively. UA Hot Topic icon A single bypass switch deactivates compression on both channels simultaneously. Another switch toggles between dual-mono and stereo-linked operation modes. When stereo-linked, the left channel's attack and release time settings are also applied to the right channel, but the channel producing the most gain reduction at any given moment also determines the amount of gain reduction for the other channel. On the 2-1176's rear panel are balanced XLR I/Os for each channel. These can accommodate unbalanced lines by shunting the pin 3 (cold) signal to pin 1 (ground) on your cable's connectors. Each channel also sports a rear panel input-impedance switch that offers alternate 600-ohm and 15k-ohm settings; the latter setting produces a sound with more highs and greater depth. The 2-1176's AC power cord is detachable, and the unit's internal self-sensing power supply will automatically operate at any voltage ranging from 100 to 240 VAC and at 50 to 60 Hz. The 2-1176 excelled at most applications I threw at it. I routed mults of kick and snare drum tracks to the unit, sharpened their attacks and tightened their decays using the All ratio setting, and then combined the processed outputs with the original tracks to get positively slammin' drum tracks. The All setting also sounded incredible on drum mic overheads (using the 2-1176's stereo-link function), producing hyperventilating Led Zeppelin — style tracks. Set to a 20:1 ratio and fast attack and release settings, the 2-1176 was an outstanding limiter for male vocals, providing a really firm lid without squashing the track's timbre or pumping. I used the same settings on a rock tune to record electric rhythm guitar played through a Roland Micro Cube amp and using a Royer R-121 ribbon mic and Universal Audio 2-610 tube preamp. The 2-1176 brought intentionally muted bass strings up in level and put a lid on the fully voiced and brighter upper strings, creating a wonderfully chunky, in-your-face — sounding track. On DI'd electric bass played through a Millennia TD-1, the 2-1176 made the track sound a little choked, even using a 4:1 ratio setting and the slowest possible attack time and with the VU meter showing less than 1dB gain reduction on peaks. You might like the 2-1176 on bass if you're shooting for a lean sound. Using the stereo-linked 2-1176 as a stereo bus compressor (with a 4:1 ratio and fast attack) on a rock mix, the image was consistently stable. The trap drum's attack sounded gloriously slappy and the drum's decay envelopes were tightened up beautifully. Hard-panned, double-tracked power chords were firmly controlled in the compressed mix, creating a steady level wall of sound. However, I felt that the bass guitar lost a bit of body and sounded somewhat squashed. I could have brought it back to life by backing off on the 2-1176's attack time, but the drums lost their “spanked” sound. For the best results, I liked compressing stereo subgroups of drums and/or guitars with the 2-1176 and combining the processed output with other elements of the mix at the stereo bus. The 2-1176 is one of the best-sounding compressors available. And now that a close reproduction of the venerable 1176 is available in a true stereo/dual-mono configuration, processing stereo subgroups and drum overheads with classic FET compression is easier than ever. Selling for $2,795 list, the 2-1176 gets my highest recommendation. Universal Audio, 831/466-3737, www.uaudio.com. Mix contributing editor Michael Cooper is the owner of Michael Cooper Recording, located in beautiful Sisters, Ore. Cooper's studio offers recording, mixing and mastering services. InfoComm 2015 Orange County Convention Center , Orlando, FL, U.S.
global_05_local_5_shard_00000035_processed.jsonl/31821
Page 2 of 2 FirstFirst 1. #21 Dreadlord BigGann's Avatar Join Date Nov 2008 Oklahoma, USA Re: A priest in trouble Quote Originally Posted by Relina Grid + Clique Grid, yaaaaaayyyyyy. Clique, boooooooo. 2. #22 Re: A priest in trouble Grid all the way. But when you add Clique it takes the skill away from healing (Imo). I stopped using grid however, and i just use blizz raid frames and bind my heals, makes it more fun (maybe less effective though) 3. #23 Re: A priest in trouble Quote Originally Posted by sciarc Forget the whole Healbot vs. Grid debate and just use VuhDo. I went to check this one out, I must say I'm impressed by this addon. Gotta spend some time getting accustomed to it, it's really an awesome one :> Bye bye xperl and grid 4. #24 Re: A priest in trouble 5. #25 Re: A priest in trouble i used nothing but healbot in BC when i was holy.. and use it in BG's for my pvp spec and im quite happy w/ how it works 6. #26 Re: A priest in trouble I wouldn't dream of playing without some sort of click-cast feature, so make sure you at least try running Clique as well (if you run grid). Personally, I found it easier to configure both my clicking and my UI in one addon, and generally found the healbot UI (the addon's UI itself for editing options) to be far more accessible than Grid's. In general: Healbot if you want it to be easy to pick up and use. Grid+Clique if you want to tilt your nose up at healbot users. The only benefit I've seen is that it doesn't break as badly if people leave group during combat. 7. #27 Re: A priest in trouble Grid and Clique, live by it, die by it. 8. #28 Re: A priest in trouble Quote Originally Posted by Relina Grid + Clique This. Grid on it's own is like a PB&J sandwich without the bread... Edit: Not that I recommend setting everything by modified clicks... Keybindings are still the way to go for most things, imo. I have clique configured for dispel magic, abolish disease, and PW:S (really nice to just right-click a target to bubble them). The rest are keybound. You can only program in a few until the complexity of applying the command is greater than just selecting the frame and using a keybinding. Bigslick of Lethal, Thunderhorn-US HM: 7/7 M | BRF 9/10M Tues/Thurs 7-11pm CT 9. #29 Re: A priest in trouble Thanks alot guys again 10. #30 Re: A priest in trouble Grid + Clique. Can't spam enough to promote these addons they truly rock :-* 11. #31 Re: A priest in trouble I prefer Grid because of the customization of it and I prefer the setup of it, Healbots UI is...bleh in comparison, imo anyways, but they both accomplish the same thing. 12. #32 Re: A priest in trouble you guys need to use vuhdo and feel the mojo. vuhdo rocks! once you have it set up the way you want to it is imho the most informative and powerful healing addon out there. The World of Warcraft is a game of much complexity, sometimes there's fire, and you have to not stand in it xheouls guide to wow. 13. #33 Re: A priest in trouble Grid is the most simplistic while still showing exactly the mount of information I need, no more no less. Can't beat that. 14. #34 Scarab Lord Izenhart's Avatar Join Date Jul 2008 There is only one Legion. Re: A priest in trouble Vuhdo has really a lot of useless informations, and the graphic is really crowded unless you filter 90% of the things on the player panel Quote Originally Posted by 309blank Grid 1MB size >>>> Vuhdo 6MB size kkthxbye Posting Permissions • You may not post new threads • You may not post replies • You may not post attachments • You may not edit your posts
global_05_local_5_shard_00000035_processed.jsonl/31826
Kingmaker (Atari ST) Kingmaker Atari ST Title screen Published by Developed by Also For Critic Score 100 point score based on reviews from various critics. User Score 5 point score based on user ratings. Atari ST There is no technical information on file for the Atari ST release of this game. If you have the tech specs for this game, you can contribute them.
global_05_local_5_shard_00000035_processed.jsonl/31827
B.C. II: Grog's Revenge Critic Score User Score Commodore 64 Not an American user? Thor has completed his Quest for Tires. Now he must discover the Meaning of Life. But it won't be easy. The Meaning of Life is hidden away; somewhere in a long maze of mountains. Each mountain is covered with clams and Thor needs to gather 100 clams in order to pay the tolls and advance through each mountain. The only way to Peter and the toll bridge is through the "real scary caves". There are lots of clams in the caves but watch out for stalagmites. Keep Thor's headlight sweeping back and forth for maximum clams. Out of the cave, watch out for Grog, who saves clams from Thor. Thor also has contend with rocks, potholes and pterodactyls (they'll eat his wheel) in his Quest for Clams and the Meaning of Life. B.C. II: Grog's Revenge Coleco Adam Collecting clams B.C. II: Grog's Revenge Commodore 64 Title screen B.C. II: Grog's Revenge Coleco Adam Credits B.C. II: Grog's Revenge Coleco Adam In a tunnel Alternate Titles • "Grog's Revenge" -- In-game title Part of the Following Groups User Reviews The meaning of life is unpleasant Commodore 64 *Katakis* (37871) Critic Reviews Tilt Commodore 64 Jul, 1985 5 Stars5 Stars5 Stars5 Stars5 Stars5 Stars 83 Computer and Video Games (CVG) Commodore 64 Jul, 1985 8 out of 10 80 Zzap! Commodore 64 Jun, 1985 75 out of 100 75 Commodore Format Commodore 64 Mar, 1994 70 out of 100 70 The Video Game Critic ColecoVision Jul 06, 2002 F 0 There are currently no topics for this game. Cancelled Spectrum version Dougie Burns spent some time working on a Spectrum version for US Gold, but he was switched onto other projects. As he related years later, “I’ll always regret not finishing Grog’s Revenge for US Gold, because it was looking good.” Contributed to by shifter (52), ed1475 (232) and Martin Smith (63069)
global_05_local_5_shard_00000035_processed.jsonl/31828
Super B-Daman: Battle Phoenix 64 (Nintendo 64) missing cover art Critic Score 100 point score based on reviews from various critics. User Score 5 point score based on user ratings. Super B-Daman: Battle Phoenix 64 Credits Super B-Daman: Battle Phoenix 64 Staff Introduction Game DesignTsutomu Komiyama, Rie Fujita ProgramKazuyuki Kimura, Shunsuke Tanaka, Hiroshi Ishimaru (Nyaon) Graphic DesignMika Kakutani, Maki Nagayama, Takuya Aoyama, Tomomi Tada, Manabu Yanagisawa, Yūji Yano, Reona Sezaki Technical SupportKazuhiro Matsushita, Takahiro Haga, Hideki Sahashi, Stuart Rankin, Shinji Shibasaki NarrationAtsushi Kisaichi, Hōko Kuwashima Music ComposerKenyū Nukita Sound DirectorAkihiro Satō Sound OperatorsHironao Yamamoto, Masato Aihara, Hiroyuki Tsuboguchi Sound SystemKatsunori Takahashi, Takayuki Iwabuchi, Keita Hoshi, Hideki Oka Sound ProducerKeisuke Mitsui Sound Technical SupportMasaaki Inoue MasteringHiroyuki Ōta, Shōta Takahashi Special ThanksHitoshi Okuno, Kenji Kikuchi, Tsuguyuki Yamamoto, Yasuhiro Ichizawa, Yōichi Nakazawa, Haruki Mitani, Ayako Sanabe SupportAoni Production, Studio Tavac DirectorTsutomu Komiyama SupervisorTEAM PACHI2 Product ManagerYoshinori Inoue ProducerShinichi Nakamoto Other Games Hitoshi Okuno, 76 other games Keita Hoshi, 45 other games Keisuke Mitsui, 38 other games Masaaki Inoue, 36 other games Shinichi Nakamoto, 31 other games Kenji Kikuchi, 30 other games Takayuki Iwabuchi, 30 other games Hideki Sahashi, 26 other games Katsunori Takahashi, 25 other games Tsuguyuki Yamamoto, 21 other games Yasuhiro Ichizawa, 21 other games Takahiro Haga, 19 other games Haruki Mitani, 18 other games Hōko Kuwashima, 17 other games Hironao Yamamoto, 17 other games Shōta Takahashi, 16 other games Hiroyuki Tsuboguchi, 16 other games Hideki Oka, 14 other games Masato Aihara, 13 other games Kazuhiro Matsushita, 13 other games Akihiro Satō, 12 other games Tomomi Tada, 11 other games Takuya Aoyama, 11 other games Hiroyuki Ōta, 10 other games Yoshinori Inoue, 9 other games Tengai Makyō Zero, a group of 21 people Tengai Makyō III: Namida, a group of 17 people Mario Party 2, a group of 17 people Tengai Makyō: Daiyon no Mokushiroku - The Apocalypse IV, a group of 15 people Mario Party, a group of 13 people Mario Party 3, a group of 12 people Mario Party 6, a group of 10 people Super Bomberman 5, a group of 10 people Weltorv Estleia, a group of 10 people Bomberman 64, a group of 9 people Mario Party 4, a group of 9 people Star Soldier: Vanishing Earth, a group of 9 people Sonic Shuffle, a group of 8 people Team Innocent: The Point of No Return, a group of 8 people Tengai Makyō: Fūun Kabuki Den, a group of 8 people Mario Party 7, a group of 7 people Pokémon Trading Card Game, a group of 7 people Oriental Blue: Ao no Tengai, a group of 7 people Kūsō Kagaku Sekai Gulliver Boy, a group of 7 people Ys IV: The Dawn of Ys, a group of 7 people Mario Party 8, a group of 7 people Tengai Makyō: Ziria, a group of 6 people Do Re Mi Fantasy: Milon no DokiDoki Daibōken, a group of 6 people Shin Momotarō Densetsu, a group of 6 people Dragon Slayer: The Legend of Heroes II, a group of 6 people Credits for this game were contributed by 雷堂嬢太朗 -raido.jotaro- (58447)
global_05_local_5_shard_00000035_processed.jsonl/31851
Fever Soothing Tea Mint-herb teaThis tea can help ease a low-grade fever of under 102 degrees F (39 C). If you have access to any of these herbs fresh, double the amounts. 2 teaspoons peppermint leaves (antiviral, helps break fevers) 2 teaspoons elder flowers (antiviral, helps break fevers) 2 teaspoons yarrow flowers (antibacterial, helps break fevers) 2 teaspoons boneset flowers and leaves (helps break fevers) 4 cups hot water Honey or maple syrup to sweeten Combine the herbs. Use 1 teaspoon of the dried blend or 2 teaspoons of fresh blended herbs per cup of boiling water. Steep for five minutes and strain. Sweeten a cup to taste for your child to drink; pour the rest in the bath. To induce sweating, serve this tea as hot as your child can comfortably drink it. We recommend serving it in a plastic mug while your sick child sits in a comfortably warm bathtub in a warm bathroom. After you child spends ten minutes soaking and sipping, gently and slowly help him out of the tub. Watch for signs of dizziness; if they occur, allow your child to cool off a bit while still in the bathroom. Offer a glass of cool, not cold, water. Dry your child and dress him in warm clothes, warm socks, and a hat. Tuck him into bed and cover him with lots of blankets; offer another cup of hot tea. CAUTION: Not recommended for children with seizure disorders or a history of febrile seizures.
global_05_local_5_shard_00000035_processed.jsonl/31858
Skip to main content Hands On A Hardbody PG| 1 hr. 35 min. Plot Summary Filmmaker S.R. Bindler profiles Texas contestants trying to win a truck by keeping one hand on it longer than everyone else. Cast: Sid Allen , Greg Cox , J.C. Crum , Janis Curtis , J.D. Drew , Tom Felker , Blake Long , Kelli Mangrum Director: S.R. Bindler Genres: Documentary Distributor: Providence Entertainment Hands On A Hardbody (1997) Release Date: July 10th, 1998|1 hr. 35 min. similar movies • Mad Hot Ballroom (2005) • What Would Jesus Buy? (2007) • Harlan County, U.S.A. (1976) • Muscle Shoals (2013) • Fast, Cheap & Out of Control (1997) How do you watch stuff? How else do you watch? Select your online providers My Settings You are currently subscribed as: {email} Weekly Newsletter Daily alerts You're not following any movies. These are the movies you’re currently following. Update settings
global_05_local_5_shard_00000035_processed.jsonl/31860
Skip to main content Based on 4 Critics critic reviews ( 3 ) fan reviews ( ) • Not much action or excitement here. show more • You will die at the hands of Zed's unborn son. Shucks, those wicked witches sure had a way of taking the fun out of life. Luckily for scheming kings, sadly for blameless movie-goers, such party-pooping prophecies are now mainly confined to formulaic flicks like The Beastmaster. [23 Aug 1982] show more • It's meant as a tiny bit of praise to say that the movie, which was made in southern California, looks as if it had been shot in Spain or Yugoslavia. It looks both big and cheap. show more See all critic reviews on similar movies • BeastMaster III: The Eye of Braxus (1996) • When Marnie Was There (2014) • Cinderella (2015) • Conan the Destroyer (1984) • Masters of the Universe (1987) My Settings You are currently subscribed as: {email} Weekly Newsletter Daily alerts You're not following any movies. These are the movies you’re currently following. Update settings
global_05_local_5_shard_00000035_processed.jsonl/31861
Skip to main content The Tracey Fragments R| 1 hr. 17 min. Plot Summary Tracey (Ellen Page) sits traumatized on a bus, scanning the streets for her lost younger brother, Sonny (Zie Souwand). Impressionistic flashbacks reveal the events that brought her to this point: Her severely dysfunctional parents barely register her existence except with hostility, while her psychiatrist is more a hindrance to her mental health than a source of support. Her only source of comfort is her classmate Billy Zero (Slim Twig). Unfortunately, their relationship is pure fantasy. Cast: Ellen Page , Max McCabe-Lokos , Ari Cohen , Erin McMurty , Slim Twig , Zie Souwand , Julian Richings , Director: Bruce McDonald Genres: Drama Distributor: ThinkFilm The Tracey Fragments (2007) Release Date: May 9th, 2008|1 hr. 17 min. critic reviews ( 3 ) fan reviews ( ) • The Tracey Fragments is a grating stunt that plays like a film-school project, cutting a bland story into a million tiny irritating pieces. show more • A failed cinematic experiment mainly notable for its fine starring performance by a pre-"Juno" Ellen Page, The Tracey Fragments provides more evidence (not that any was needed) that an extensive use of split-screen visuals is far more irritating than arresting. show more • I have a feeling that this is the last time we'll see a down-and-dirty Ellen Page. Her handlers have too much wrapped up in her mainstream persona to ever again allow her to do anything as daring and out of the loop as The Tracey Fragments. And that's a shame. show more See all critic reviews on featured news view all news There's Snow Place Like Home: White Winters in Canadian Film Posted by Monika Bartyzel on January 19, 2011 They might fuel stereotypes (like certain ones involving igloos and hockey), but snowy winters are also a ubiquitous part of the Canadian experience. There are no southern provinces that stretch c... similar movies • Wendy and Lucy (2008) • Thirteen (2003) • Prozac Nation (2001) • Lost in Translation (2003) • Into the Wild (2007) How do you watch stuff? How else do you watch? Select your online providers My Settings You are currently subscribed as: {email} Weekly Newsletter Daily alerts You're not following any movies. These are the movies you’re currently following. Update settings
global_05_local_5_shard_00000035_processed.jsonl/31862
Skip to main content Trust the Man R| 1 hr. 43 min. Plot Summary Two New York couples try to navigate through the ever-present pitfalls of love and marriage. A successful actress (Julianne Moore), her househusband (David Duchovny), her ne-er-do-well brother (Billy Crudup) and his girlfriend (Maggie Gyllenhaal) cope with work demands and infidelity as they search for real love and easy parking. Cast: David Duchovny , Julianne Moore , Billy Crudup , Maggie Gyllenhaal , Eva Mendes , Ellen Barkin , Garry Shandling , James LeGros Director: Bart Freundlich Genres: Romantic comedy Distributor: Fox Trust the Man (2005) Release Date: August 18th, 2006|1 hr. 43 min. watch now critic reviews ( 3 ) fan reviews ( ) See all critic reviews on similar movies • Definitely, Maybe (2008) • The Ugly Truth (2009) • Flirting With Disaster (1996) • The Answer Man (2009) • Celeste and Jesse Forever (2012) How do you watch stuff? How else do you watch? Select your online providers My Settings You are currently subscribed as: {email} Weekly Newsletter Daily alerts You're not following any movies. These are the movies you’re currently following. Update settings
global_05_local_5_shard_00000035_processed.jsonl/31863
Skip to main content Starplex Mesquite Cinema 10 Showtimes 12:10pm 3:05pm 7:00pm 10:00pm R | 2 hr. min. | Text Showtimes 1:30pm 4:10pm 7:05pm 9:45pm 12:20pm 2:40pm 5:00pm 7:25pm 9:55pm R | 1 hr. 32 min. | Text Showtimes 12:25pm 2:45pm 5:05pm 7:30pm 10:10pm 12:05pm 3:10pm 6:00pm 9:00pm 12:15pm 3:15pm 7:10pm 10:05pm 1 hr. 55 min. | Text Showtimes 4:40pm 9:25pm 12:30pm 2:35pm 7:15pm 1:10pm 4:00pm 6:50pm 9:40pm 12:00pm 2:25pm 4:50pm 7:20pm 9:50pm 1:00pm 3:25pm 5:50pm 8:15pm 10:40pm My Settings You are currently subscribed as: {email} Weekly Newsletter Daily alerts You're not following any movies. These are the movies you’re currently following. Update settings
global_05_local_5_shard_00000035_processed.jsonl/31878
Helping DGS to learn to read (1 Post) Mustdo2 Fri 26-Oct-12 19:38:19 Can anyone recommend a reading test/assessment to help me to find out what to focus on when teaching my DGS to read. He is 6 and is struggling, even though he has been taught phonics at school. Is there anything available that can be done on the computer? Join the discussion Join the discussion Register now
global_05_local_5_shard_00000035_processed.jsonl/31908
Source 1a Jamaican village scene with women carrying produce on their heads c1950 (INF 10/153) « Return to Bound for Britain 1. Look at Source 1 a, b and c. These photographs were all taken in Jamaica around 1950. They show the way people on the islands were used to living. Look at the photographs carefully and answer the following questions: • What animals can you see? What do you think they might be used for? • What different forms of transport can you see? • Look at the houses in the photographs. What are they made from? • Do you think it would be comfortable to live in these houses? Give your reasons • Compare where you live to the city shown in photograph 1c. Is it similar or different? • Look at the way the people in the photographs are dressed. Why do you think they dressed this way?
global_05_local_5_shard_00000035_processed.jsonl/31925
TY - JOUR AU - Kydland,Finn E. AU - Rupert,Peter AU - Sustek,Roman TI - Housing Dynamics over the Business Cycle JF - National Bureau of Economic Research Working Paper Series VL - No. 18432 PY - 2012 Y2 - October 2012 DO - 10.3386/w18432 UR - http://www.nber.org/papers/w18432 L1 - http://www.nber.org/papers/w18432.pdf N1 - Author contact info: Finn Kydland Department of Economics University of California, Santa Barbara Santa Barbara, CA 93106-9210 Tel: 805/893-5464 Fax: 805/893-8830 E-Mail: [email protected] Peter Rupert Dept. of Economics University of California Santa Barbara, CA 93106 E-Mail: [email protected] Roman Sustek Social Sciences, Economics University of Southampton Murray Building (Bld. 58) Southampton, SO17 1BJ United Kingdom E-Mail: [email protected] AB - Over the U.S. business cycle, fluctuations in residential investment are well known to systematically lead GDP. These dynamics are documented here to be specific to the U.S. and Canada. In other developed economies residential investment is broadly coincident with GDP. Nonresidential investment has the opposite dynamics, being coincident with or lagging GDP. These observations are in sharp contrast with the properties of nearly all business cycle models with disaggregated investment. Including mortgages and interest rate dynamics aligns the theory more closely with U.S. observations. Longer time to build in housing construction makes residential investment coincident with output. ER -
global_05_local_5_shard_00000035_processed.jsonl/31943
Das Kapital Money Bank Das Kapital Money Bank - $19.95 + s/h This one will make Karl Marx spin in his grave (you may be surprised to find where the father of communism was buried. No, not the Soviet Union. Karl Marx was buried in London.) Behold the Das Kapital Money Bank - a secret storage case shaped like his Das Kapital manifesto. And at $19.95 over at the Neatorama Shop, you don't have to be the bourgeoisie to buy one: Link See also: Good Marx, Bad Marx T-Shirt Newest 5 Newest 5 Comments I don't see how it's going to help. If a burglar finds it, what's to keep him or her from breaking the lock later. You could hollow out any book from a thrift shop for 50 cents. Abusive comment hidden. (Show it anyway.) Commenting is closed. Email This Post to a Friend "Das Kapital Money Bank" Separate multiple emails with a comma. Limit 5. Success! Your email has been sent! close window
global_05_local_5_shard_00000035_processed.jsonl/31955
Forum Thread: Apple revamps iPod music player for Windows use - page 1 reprinted from original thread: Author:   Davester Date:   Apr 28, 06 at 2:20am (PST) Subject:   Apple revamps iPod music player for Windows use Courtesy of Apple Computer for the first time is offering a product for Windows instead of Macintosh, and it's a stunner: the iPod portable music player. The size of a pack of playing cards and weighing only seven ounces, the iPod is built around an internal hard drive holding 5, 10 or 20 gigabytes of music files for $299, $399 or $499. Introduced in November 2001 to rave reviews, the iPod initially worked only with the Mac. A revamped product line offering higher capacity and improved design, as well as models that work with Windows, shipped in early September. The all-white face and polished-aluminum back are elegant. The controls are so well designed the iPod can be operated with one hand. The rechargeable battery lives up to Apple's 10-hour claim. The capacity of iPod, and other hard-disk music players, is awesome. The 20-gigabyte iPod will store about 4,000 songs, or about 400 albums. You literally hold a music library in your hand. But the iPod's elegant design is no guarantee of success in the competitive world of Windows hardware. There are at least a half-dozen other firms offering portable hard-disk music players for Windows PCs, some at half the iPod's price. What's more, there are several technical obstacles that will block many Windows PC owners from considering an iPod. Portable hard-disk players will become more and more popular in the years ahead. With music moving into computers as users "rip" their own CDs into MP3 form or download songs from the Internet, we'll want to carry lots of music on the road. Hard-disk players are the best way to do this. Apple didn't invent the concept. Several small Asian electronics manufacturers introduced hard-disk players in 1999, and the first product from a big-name firm was the Nomad Jukebox, shipped by Creative Labs in September 2000. But Apple moved hard-disk players to a new level. First, the iPod is smaller and lighter than competing hard-disk players -- about half the size and weight of most competitors. This makes iPod the first hard-disk player I've seen that can stay with you all day in a purse, briefcase, backpack or pocket. Second, the iPod uses a fast FireWire connection for transferring files from a computer. Most other hard-disk players use the much slower USB. Moving 20 gigabytes of music to the iPod through its FireWire cable takes 30 minutes compared with USB's 13 hours. Third, the iPod has simple controls that are easy to understand. A touch-sensitive scroll wheel is surrounded by four buttons for navigating, with a single "enter" button in the scroll wheel's center. This makes iPod the only hard-disk player that can be controlled with one hand -- a requirement for a truly portable device. Fourth, Apple has automated the process of getting tunes into the iPod. Using the MusicMatch Jukebox software media player on a Windows PC or Apple's own iTunes on a Mac, the iPod can be set to automatically download any new music in the owner's MusicMatch or iTunes library whenever the iPod is connected to the computer. Author:   Bri Date:   Apr 28, 06 at 2:49am (PST) Subject:   re: Apple revamps iPod music player for Windows use And I may agree, one of the best things that Apple has ever done. It's saved my musical appetite from total starvation. It's old news, though, the iPod has been Windows compatible as long as I can remember. Copyright Neo Era Media, Inc. 1999-2015. All Rights Reserved.
global_05_local_5_shard_00000035_processed.jsonl/31957
Return to The Sin Bin   I'm no expert on surfer-culture... January 21 2005 at 7:44 PM Octopus  (no login) from IP address Response to Obviouly you've never been to Southern California... ...but I've been to Hawaii, on my honeymoon, where I learned the "hang loose" sign, which is the thumb and pinkie, wagged out to the side. As opposed to the index and pinkie, thrust up in the air, toward The Lord Of Darkness. Same as the "hook 'em, 'Horns" thingie. As opposed to the Johnny Cash one-finger salute...  Respond to this message    Find more forums on HockeyCreate your own forum at Network54
global_05_local_5_shard_00000035_processed.jsonl/31986
(skip this header) Wednesday, June 03, 2015 newstimes.com Businesses « Back to Article Respect should be shown during national anthem Published 6:33 pm, Wednesday, February 5, 2014 Larger | Smaller Email This Page 1 of 1 It was there for all of us to see. During the Super Bowl pre-game ceremonies, while they played our national anthem, TV cameras scanned the crowd, security personnel, the players and a brief shot of what appeared to be a platoon of American soldiers, dressed in desert fatigues. They stood in formation with their caps on and their hands at their sides. With their caps on, they should have saluted. If they removed their caps, they should have placed their caps over their hearts. Instead, they just stood there. If wearing a uniform, you should salute. Now, why is it that so many Americans don't know what to do at a parade when Old Glory passes by or when our national anthem is played. As of late, "God Bless America" is accorded equal respect. The simple answer is that our schools don't teach it. Apparently, our military doesn't either. Why not? Richard Zeitler Brookfield Center GOP rhetoric full of hypocrisy The last time U.S. Rep. Paul Ryan presented a budget proposal, the Catholic nuns descended on Washington in protest. This man who reveled in support of tax cuts for the rich had the cold-hearted, mean-spirited gall to cut food stamps. This man's Republican Party is the same one that refused to extend unemployment benefits unless the tax cuts for the rich were maintained. These right-wingers talk about compassion, but dish out hate. They have no -- zero -- empathy for people who have had sickness, accident, unemployment or other bad luck. Some of them even believe that most are deadbeats who refuse to get a job. They haven't the common sense to know that no one wants to be a loser, that a man defines himself largely by his work. There are Republicans who subscribe to Judeo-Christian values, but they have seen the party lose control to those Sen. John McCain describes as "wackos." Whereas the pope praises Obamacare, they demean it. Whereas the Bible repeatedly calls for aiding the sick and disabled, the GOP resents them. I'm now reading about Neitche, Hegel and their protege, Hitler. They, of course, cursed the weak and sought policies that would create a master race of supermen. There's no doubt in my mind that these hypocrites would repent and change their mindsets if someone they loved became disadvantaged. They would be screaming for a stronger and wider safety net. And another foolish talking point in their playbook is that Obama has one out of five people on some kind of government relief. He inherited the near economic depression from eight years of Republican negligence. Joseph A. Piera
global_05_local_5_shard_00000035_processed.jsonl/32002
Sign up Login Home Forums Articles Galleries News Workshops Shop Recommended Imaging the Enigmatic Mercury 10916 posts nrothschild Neil is an expert in several areas, including camera support Registered since 25th Jul 2004 Thu 23-May-13 01:36 PM | edited Sun 26-May-13 07:14 AM by nrothschild Of all five naked eye planets, I find Mercury the most interesting. Compared to Mercury the other planets are quite staid and predictable. They just go on doing what they do, and don't appear to vary much as they follow their respective orbits. Mercury is different, and why I find it so interesting. While it is predictable if you understand the mechanics, it can be very confusing to those that do not understand those details. I'm going to provide a long story and a short story The Short Story If all you want to know is how to best image Mercury, just do the following 1. Determine the date of Greatest Elongation (greatest distance from the sun) in the current or future appearance of Mercury. Try to shoot it as close to that date as possible. Within about a week each side is best, and the week leading up to Greatest Elongation is superior to the week after. The next several Greatest Elongations: 6/12/2013 Evening 7/30/2013 Morning 10/9/2013 Evening 11/18/2013 Morning 1/31/2014 Evening 3/14/2014 Morning 5/25/2014 Evening 7/12/2014 Morning 9/21/2014 Evening 11/1/2014 Morning 2. In the Northern Hemisphere, favor January through March for evening appearances and July-September for morning appearances. In the Southern Hemisphere, reverse that- July-September for evening appearances and January-March for morning appearances. But don't be too picky or you may never find the perfect date, weather and location opportunity. Use favorable apparitions to prioritize things. 3. Favor longish focal lengths. On FX, 70mm and up, 200mm is very good. If you ignore this, and you can see Mercury but not find it in your final output size image, go longer next time. But be quick- it's called Mercury for a reason! If your primary objective is to image Mercury then I think a longer focal length composition is almost always better anyway, in order to better highlight the planet. Otherwise you end up with a tiny faint dot near the horizon. The Long Story Mercury orbits the sun in 88 days. That is the length of a year for an observer positioned on Mercury. Edit: the length of a day on Mercury is equal to two orbits around the sun. Just defining precisely what a year is, or what a year means on Mercury is an interesting discussion . Of more concern to us is the Synodic Period. For the two inner planets, that is the length of time required for Mercury (or Venus) to go from Greatest Elongation (separation from the sun) at evening dusk to the successive Greatest Elongation at evening dusk. Or morning dawn Greatest Elongation to the successive morning dawn Greatest Elongation. Mercury's Synodic Period is 116 days. If you miss this upcoming Greatest Elongation on June 11, 2013, you must wait 116 days for it to happen again. The Synodic Period is essentially one orbit, from our Earth based perspective, relative to its position to the sun. Greatest Elongation This is the angular distance between the object and the sun, measured in degrees. For the outer planets, they all reach opposition once each Synodic Period and they are, by definition, separated from the sun by almost exactly 180°. The two inner planets (Mercury and Venus) are different. They travel away from the sun for a certain angular distance and then turn around and head back into the sun, where they repeat the process on the other side - giving us alternating dawn and dusk appearances. Mercury never gets very far from the sun. Due to its highly eccentric elliptical orbit, its Greatest Elongation varies considerably, from about 18° to 27°. The greater the elongation the further the planet is from the glare of the sun (the dusk or dawn glow). That dawn/dusk sky glow is both your friend, as a landscape photographer, and your enemy as an astrophotographer. Each time you shoot Mercury you will get a unique image, balancing those opposing interests in different ways. When everything works, cherish the image(s). It may be years before you equal or better it. That is the magic of Mercury. All else equal (it never is!) greater Greatest Elongations are better than shorter/lesser elongations. Seasonal Factors If you've read my posts about chasing new moons then you know that there are, on average, better and worse annual seasons for shooting them. The typical 24 hour moon has an elongation of about 11°. A 48 hour moon, about 22°. We can see from the above that a poor Greatest Elongation of 18° will put Mercury, on the best day, slightly closer to the sun than a two day crescent moon. And if you are clouded out or have a Hot Date, and have to shoot it many days later or earlier, it only goes downhill from there. On a good apparition the elongation will get to 24-27°. In that case it is similar to a full 2 day moon or a bit better. Both the Moon and Mercury roughly follow the Ecliptic, the imaginary line in the sky of our sun's path. That line of the ecliptic is tilted relative to the horizon. For observers near the equator it always rises nearly straight up and they are blessed with a very favorable ecliptic in all seasons. As you move up in latitude to the mid latitudes of 40-50° where people tend to congregate, the ecliptic takes on a generally southern tilt in the Northern Hemisphere and a northern tilt in the Southern Hemisphere. That tilt varies by season. In the northern mid-latitudes, at evening dusk, the tilt is most favorable in January-February when it is near vertical. In the following months the tilt rolls back over and becomes poor again. December, March and April, or so, is also reasonably decent. It is poorest in and around August when it may be impossible to get a usable shot or even a decent visual observation. In the north(ern hemisphere), at dawn, that time of favorable ecliptic tilt is 6 months later/earlier, around July-August. Even though you might have a 20° elongation on a given day, in the worst season (August at evening dusk) you may have Mercury only 10° or less in altitude, at sundown. In this case Mercury is likely never seen during the entire apparition because it always sets before it is dark enough to stand out from the dawn/dusk sky glow near the sun. As a very general rule you will not see Mercury until the sun is 6-10° below the horizon. It is actually possible to observe Mercury in full daylight with a high powered telescope. So the idea of when you can first see Mercury at dawn/dusk is a murky one, depending on the optical aid. Here my context is naked eye viewing, and imaging with short to moderate focal lengths (roughly 200-300mm and wider). In the Southern Hemisphere mid-latitudes, such as Sydney, Australia, those dates are "reversed" by 6 months. August is the most favorable time for evening dusk and January-February most favorable for morning dawn. Orbital Tilt Although only half as tilted as the Moon, Mercury wanders about 2.3° to each side of the ecliptic. In the Northern Hemisphere, with a usually tilted ecliptic, that can cost a couple of degrees of altitude (or provide a 2° bonus when it is north of the ecliptic). Edit: I'm having trouble getting a number that makes sense. In looking at some time series models, I see deviations from the ecliptic of up to 5°, and it could go as high as 7°?. As I have discussed in my new moon posts, the orbital tilt can be even more important that the seasonal tilt of the ecliptic. This is why I depend on astronomical mapping programs to help sort things out. Magnitude (brightness) As Mercury leaves the morning dawn sky and passes the sun, it is on the far side of the sun. The distance to Mercury is then equal to the distance from Earth to sun plus the distance from the sun to Mercury. You would think that Mercury would then be relatively dim, but it is not. As it passes the sun it is as bright as it will get. Both inner planets display phases to us, similar to the moon. When Mercury passes the sun on the way up into the evening sky it shows us a full phase and is technically brightest. Except we cannot see it because it is in the glare of the sun. When Mercury reaches Greatest Elongation on the far side of the sun it has a gibbous phase, making it still fairly bright. After Mercury then passes the evening dusk Greatest Elongation and starts its slow decent to the sun it is increasingly closer to us than the sun. As a result we see a mostly "back lit" view, and a surprisingly thin crescent in a high powered telescope. That thin crescent is relatively dimmer than the gibbous phases, similar to the crescent moon within a few days past new. For that reason Mercury is best viewed before and during the evening Greatest Elongation, not on the way back to the sun and then the morning dawn sky. For dawn apparitions, the situation is reversed. Mercury is dimmest as it first rises toward dawn Greatest Elongation (again on the near side of the sun and a back lit crescent), and then brightens as it approaches greatest elongation. It continues to brighten after the dawn Greatest Elongation but it is sinking further into the dawn glare. As an example, consider the current May-June evening apparition of Mercury: On May 12 Mercury passed behind the sun and achieved magnitude -2.3. On June 5, a week before maximum elongation, Mercury will be Magnitude 0. On June 12, at maximum elongation, magnitude 0.5 On June 19, a week after maximum elongation, magnitude 1.1 In the two weeks straddling Greatest Elongation Mercury will drop 1.1 magnitudes in brightness, or about 1 2/3 stops. Considering all the difficulties of observing and imaging Mercury in the dusk glow, that 1 2/3 stops can be the difference between success and failure. And of course, Mercury is incredibly bright when we cannot see it . Using a sky mapping program All the above may or may not make much sense, but it should impress upon you that a good sky mapping program is essential for planning Mercury observations and imaging. A good app like Sky Map Pro or the freeware Cartes Du Ciel will show you how high Mercury will be at any time, including the critical window after sunset or before sunrise, the slope of the ecliptic, and most importantly the altitude and magnitude. If you know altitude and magnitude and can relate to those numbers then you have a good idea of your probability of success. My Experience To date I have imaged Mercury 7 times, during 4 different apparitions. On 6 of 7 occasions I imaged it within a few days of Greatest Elongation (19-20° elongation) and in at least one case on the very day. None of those apparitions were particularly favorable, with Greatest Elongation between 19.3° and 21.5° of a possible 27° or so. In each case I was successful imaging it, with an easily visible "star" even on a web size final output, usually around 70mm (earlier on DX, later on FX). On April 26, 2009 I imaged it at 50mm DX (20° elongation) with reasonably good success. It recorded as what I consider the minimum useful brightness for an uncropped web output size image. My least successful shoot was on March 27, 2010, 12 days prior to Greatest Elongation, at 13.4° elongation. I was with about 10 other people and they were more interested in going to dinner than imaging Mercury. I shot one frame at 70mm FX but it was not enough. Mercury is there, but not apparent in an uncropped web size image without moderate contrast stretching. I distinctly recall at the time regretting my use of the 24-70/2.8. If I had had the time I would have retrieved my 70-200 and shot it as close to 200mm as possible. I shot that apparition again on April 6, this time by myself . Two days before Greatest Elongation, the elongation was 19.1°. I got a fairly decent image at 44mm FX. I was trying out a new site, convenient to my home. The image would have been improved if shot around 100mm or more but I needed about 44mm for the composition I wanted. Based on careful study of hundreds of images shot on those 7 occasions, I arrived at a rule of thumb that I want 20° elongation and at least 70mm FX. I can violate that, but with much lesser success. High Power Telecopic Imaging Outside the scope of this post, which deals mainly with "landscape" type short focal length imaging. I will only say that the severe issues of poor seeing when imaging at great magnification near the horizon dictates that it be shot within only a few days of Greatest Elongation, and on a favorable opposition more in the range of 24° elongation or more if possible. That might be a once in a decade opportunity, or so. The few visual observations I have done at high power resulted in such a wavering, quivering mess that I did not even consider shooting it. I should, though, just to do it . An interesting pair of upcoming Greatest Elongations. September 4, 2015 This, despite being a most favorable possible 27° elongation, happens at the wrong time of the year for the Northern Hemisphere mid latitudes. If it can be observed or imaged at all, it will be within a few degrees of the horizon. It is also several degrees south of the ecliptic, losing another couple of degrees altitude. It will be very favorable in the Southern Hemisphere, though. Click on image to view larger version January 31, 2014 Here is a contrary example of a very poor Greatest Elongation of only 18° but at the most favorable time of year. Mercury will be about 10° altitude when likely to be visible. And note that one day moon! Mark your calendars for this one. Click on image to view larger version Attachment #1, (jpg file) Attachment #2, (jpg file) my Nikonians gallery.
global_05_local_5_shard_00000035_processed.jsonl/32003
Marvel has been rated the fourth most effective licensor of 2004, but on the back of a limited range of properties. The company's next target, says Paul O'Brien, is to find a way to market the Marvel brand. 25 April 2005 If the 1990s were about selling variant covers to teenage magpies, the 2000s are all about licensing. Licensing is fun. Licensing is sexy. Licensing lets you sit back and watch the money roll in, as long as you negotiated the contract properly in the first place. (This is the bit where Marvel screwed up in the 1990s. They're better at it now.) In fact, the world of licensing is so sexy and exciting that it has its very own magazine, License! Yes, that's License!, with an exclamation mark. It needs the exclamation mark lest there be any doubt as to just how sexy and exciting licensing is. It lets you know that the staff arrive each morning with beaming faces, thrilled by the possibilities inherent in another day covering the wonderful world of licensing. Marvel will have been particularly delighted by their performance in License!'s list of 2004's leading licensors (link is to a .pdf file), where they ranked at number four, up from number 69 in 2003. That's a pretty impressive climb. It's even more impressive when you see that their worldwide retail sales of licensed merchandise leapt up from $189 million the previous year to a mighty $4 billion. And the list is taking a pretty expansive definition of "licensed", with the list including people like Cherokee and Ford. Strictly speaking, Marvel actually seem to be joint fourth, but License! think ties aren't sexy and exciting enough. So they've used alphabetical order as a rather arbitrary tiebreaker. In a more rational world, Marvel would actually be listed as tying with Sanrio, the people who bring you Hello Kitty. Apparently there's a range of licensed upscale Hello Kitty jewellery due in 2006, which must be thrilling news for extremely rich children and the mentally ill. But I digress. 'In License!'s list of leading licensors, Marvel were ranked at number four.' The three companies which beat Marvel, in case you're wondering, were Disney, Warner Brothers and Nickelodeon. Of course, Warners includes DC Comics, but it includes a whole slew of other characters as well. Their total takings were $6 billion dollars, so DC would have to account for two thirds of Warner Brothers' licensing income in order to have beaten Marvel. Which would seem unlikely. So how did Marvel achieve this remarkable growth? Well, er, they had a Spider-Man movie. And boy, it did well. And that's a really big part of it. This has to be the concern for Marvel - they're only as big as their last film, and the number of major properties is limited. None of them is likely to spawn an unlimited ongoing series of films, so the question is how you sustain this momentum. Well, according to License!, Marvel has a plan. They're "focussed on continuing to leverage [their] classic character licensing business and supporting multi-character sub-brands it has developed, including Marvel Heroes, the preschool-targeted SPIDER-MAN AND FRIENDS, and the infant-geared Marvel Babies". And that's not all. "A core overall strategy will be to continue to consolidate license subcategories with category leaders that can help maximise awareness, distribution and retail support for the Marvel brand." Oh, and they're going to try and flog some superhero comics to Latin America, India and south-east Asia. Which means... what, exactly? Well, I suppose it's open to debate whether "continue to consolidate licence subcategories with category leaders" really means anything, but the general thrust suggests that Marvel have recognised the basic problem they have. They have some hugely popular brands. But those brands aren't particularly associated with Marvel in the public mind; Spider-Man, the Hulk and the X-Men are primary brands in their own right, and the average punter doesn't really care who makes them. 'Marvel are only as big as their last film, and the number of major properties is limited.' (Comics fans often find it baffling to think that the man on the street doesn't know which company publishes Spider-Man and which one publishes Superman. They don't know because the information is useless to them and they don't care. Go and do a straw poll of people who don't read comics, if you don't believe me.) In fact, Marvel's most famous characters aren't even particularly associated with the underlying product. The general public is aware of them, but for reasons completely unrelated to anything that appears in the comics. They know about Marvel's top characters from the films and TV shows. They know about Spider-Man and the Hulk because they're pop culture juggernauts, and everyone knows who they are. The commercial value in these characters stems from the public awareness of them, which, perversely, is completely unrelated to the actual comics. The Hulk TV show probably played more of a part in shaping public perception of that character than anything Marvel have actually published in the last quarter century. Why does this matter? It matters because Marvel want to establish Marvel itself as a brand name. They need to find a way of positioning these characters so that they lead readers in to the wonderful world of Marvel where (hopefully) they can be persuaded to take an interest in other Marvel characters. This has worked wonderfully for the publishing division in the past, back in the days when readers were carefully trained to be fans of Marvel itself and not just fans of a particular character or creators. It meant that Marvel could launch any old title and be reasonably confident that an army of Marvel zombies would be prepared to at least give it a shot. 'Marvel want to establish Marvel itself as a brand name.' Of course, Marvel have rather lost the knack in that regard. Their publishing division, thanks to a hefty degree of money-chasing, has found itself in the same position as their general public awareness. Readers are interested in a certain number of key flagship characters (up to a point), and virtually everything else is released to apathy. Careful marketing succeeded in getting people to buy X-23, but there isn't really a loyal Marvel audience any more, waiting to buy any old comic just because it's from Marvel. This is why Marvel have so much trouble launching new titles these days, at least without putting heavy publicity behind them. It's also, like it or not, a strong commercial argument for trying to restore the Marvel Universe itself as a selling point. Which is perhaps another reason why we're getting books like HOUSE OF M, and the whole concept of inter-title continuity, making a comeback after a few years in the wasteland. Well, that's fine for the comics reader, but what about the general public? How do you market Marvel itself to them as a brand name? We've yet to see much in the way of a coherent strategy there. License! mentions "Marvel Babies". No, I've never heard of them either. Google reveals that Marvel sold some poor sucker the licence to make Marvel Babies clothes last year, but if there's an actual underlying product somewhere, I'm damned if I can find it. Except for this thread from the CBR message board last May, which appears to show concept art for something that looks alarmingly like the Muppet Babies. The mind boggles. It's mildly reassuring to see that nothing seems to have come of it. Ridiculous as it looks, though, it's not a completely absurd way for the company to go. They need to convert their existing momentum into a strong Marvel brand name, because that's the way to promote newer and second-tier characters more effectively. And if the general public won't read the comics - and most of the movie audience won't, no matter how well promoted they are - then they'll just have to try something a little more unusual. They've identified the right problem. The question is whether they've got a workable solution. All contents
global_05_local_5_shard_00000035_processed.jsonl/32007
The Nizkor Project: Remembering the Holocaust (Shoah) Shofar FTP Archive File: people/g/goldhagen.daniel.jonah/lands-bathed-in-blood Lands Bathed in Blood Bosnia shows we haven't learned the Holocaust's lessons about genocide The soil of Europe heaves again with the bodies of massacred dead. By Walter Reich Only five decades after the Germans expunged from the continent's face 6 million Jews, and in the process killed millions of others whose only crime was who they were or what they believed, warring parties in the former Yugoslavia have slaughtered, on a far smaller scale but with focused brutality, civilians whose mere ethnicity marked them as suitable subjects for hatred and extinction. The soil of Srebrenica yields, to the shovels of probing investigators, and to the expectant horror of already-grieving loved ones, the remains of human beings whose killers thought their crimes would lie forever hidden. The continent weeps, the world weeps, as we all expect, some day, in some corner of the planet, new ethnic massacres, new cadres of hating killers, and new zones of heaving soil. . How can this still be? What brings us to this, whether in Europe, Africa, Asia, the Americas, or anywhere else? How do we, as individuals and societies, regularly justify, and regularly carry out, such barbarities? In the past few years, and especially in the past few months, the Holocaust itself, the most horrendous genocide of all, carried out by a society proud of its civilization and culture, has been studied with particular scrutiny in the struggle to answer these questions. The answers most frequently offered, never fully satisfying, have been of a psychological sort. They have focused on the ways in which human beings who live ordinary lives during ordinary, times find ways to justify killing other human beings during extraordinary times. Most of these explanations have focused on what have been called "mechanisms of moral disengagement" -- the ways people who do evil can disengage their murderous actions from their usual personal rules of morality and convince themselves that what they are doing is not evil, and may even be good. Social psychologists call one of the simplest such mechanisms "euphemistic labeling" -- the use of language to suggest that what a person is doing isn't quite as bad as it really is. In the Holocaust, people who were sent to extermination centers were described as being "deported"; when they were gassed, they were being subjected to "special treatment." Using these terms made it easier for functionaries and soldiers to go about their grisly business. And, more recently in the former Yugoslavia, as during the Second World War in that area, "ethnic cleansing" was a term that sounded as if people were engaged in an act of public health. Another psychological mechanism that helps individuals harm others and still feel that the harm is justified is to believe that the persons authorizing it are right due to their elevated knowledge, wisdom and status. If the state says that it's good to kill Jews -- or if warring military officials say it's good to kill Boshinn Muslims or Croats or Serbs -- then it must be good. After all, don't such authorities have more knowledge than we do? And haven't they accepted ultimate responsibility for our acts if we follow their orders? Yet another psychological mechanism that makes it easier to harm others is to feel that you are only a cog in a large machine. That large machine may, in the end, spew out mounds of human carcasses. But no one involved does it all; everyone plays only a partial role, whether it's confining Jews into ghettos so that they're ready for "deportation" or loading cattle cars full of Jews to transport them "to the east." Even in the former Yugoslavia, where the carnage has been much less than in the Holocaust, some killers were truck drivers transporting innocent victims, and others were the rapists and trigger men. And it's easier to harm others, of course, if we feel that they're less human than we are -- if they're "subhuman," as Germans termed Jews, or "useless eaters," as they termed the physically and mentally handicapped persons they killed. After the Srebrenica massacre of Muslims in Bosnia, according to news reports, one of the Bosnian Serb killers noted with satisfaction, "That was a good hunt. There were a lot of rabbits here." To that soldier, the victims were living creatures, to be sure, but not quite as human as he, and suitable subjects for killing. In sweeping through parts of Croatia long populated by Serbs, Croatian forces, in a massive "ethnic cleansing" operation, methodically shot elderly Serbs in the back of the neck or slit their throats, also seeing them as less human than they, and as less worthy of life. And even Muslim forces at times engaged in atrocities against civilians of other ethnic backgrounds. The brutal killing, although not equal among the warring parties in magnitude, was shared, often carried out with energy and Not all killers during ethnic wars or state-sponsored mass murder operations find the enterprise satisfying or even easy. The architects of the Holocaust understood that some Germans might find killing Jews day after day distasteful even if they did it and, after trying various methods of killing, these architects organized the murder operations so that the process would run efficiently, smoothly and quietly, and be as untaxing psychologically as possible on the killers themselves -- at least on the killers who, in fact, found it taxing. Interestingly, in a book that has received considerable notice in recent weeks -- Hitler's Willing Executioners: Ordinary Germans and the Holocaust -- the author, Daniel Jonah Goldhagen, argues that, in general, Germans didn't find killing Jews to be as taxing as most have assumed. He also argues that far more Germans participated in the killing operations than most have believed, and that many of these Germans didn't have to be coerced, psychologically or socially, to do it. Dr. Goldhagen paints a picture of a German society so distorted by a murderous, virulent, eliminationist and ultimately exterminationist anti-Semitism -- developed over many years from the traditional roots of anti-Semitism, but accentuated and rendered official by the Nazi state -- that killing Jews was seen not only as something that was not evil but even as something that was good and necessary. And this permission to kill was accepted so broadly, he argues, that many Germans ultimately killed Jews with pride and pleasure, and even killed when they didn't have to do so -- not only SS. officers but also ordinary soldiers and police, and with the widespread knowledge of the German population as a whole. Germany became, he suggests, an assenting genocidal community during the Nazi era. For presenting this scathing and unrelenting thesis, Dr. Goldhagen, an assistant professor at Harvard, has been widely hailed and widely criticized. His scholarship is being subjected to considerable scrutiny, and ultimately the bar of scholarly opinion will pass judgment on his work. But even if one is discomfited by Dr. Goldhagen's explosive and unremitting indictment of German society during and before the Nazi era, he stresses a dimension of explanation that is often left out by theorists who try to account for the Holocaust in purely psychological terms. None of the psychological mechanisms that have been described would make people into killers unless these mechanisms were used to make it possible to carry out acts that were justified on ideological grounds. For one group to kill another, the killers must feel that their victims deserve death, that their victims are evil and dangerous, and that if those victims are not killed then they, in turn, will harm the killers, the families of the killers and the societies of the killers. Leaders of various warring factions in the former Yugoslavia have stressed to their populations the dangers posed by their ethnic enemies and so did tribal leaders in Rwanda, who incited widespread ethnic massacres two years ago by using the argument that the other tribe had harmful designs on These are the kinds of beliefs that are fostered by prejudice, most stunningly, hatefully and murderously by the kind of anti-Semitism that was promoted in Germany. And these are the kinds of beliefs that are promoted by various national groups that carry out forms of "ethnic cleansing" to rid their areas of "foreign elements" that might harm the interests of the killing group. Once this ideology of hatred and irrational fear takes hold in a country such as Bosnia or Rwanda, the psychological mechanisms previously described make it easier to do the killing, to feel that one has not done something evil, and even to feel that one has done something All this is strange, and all too human. Although the Holocaust remains unique in its supposedly scientifically sanctioned racial focus, its mechanized ferocity, and the degree to which a culturally advanced civilization sank to the most profound depths of human depravity, it teaches resonant lessons about the ways that ideological hatred and psychological mechanisms, given free rein by the systematic dismantling of democratic freedoms, can result in mass death. It is for this reason that the United States Holocaust Memorial Museum in Washington explores deeply the roots of prejudice, shows how democratic institutions and practices can be taken apart and explains how leaders bent on anti-human practices can bring them to murderous reality. The genocides in the former Yugoslavia were very different from the Holocaust in scale, method, ideology and organization, but we can learn a great deal about them by learning about the Holocaust. This is why the Holocaust Museum seeks to understand the genocidal process. And this is why it pays close attention to signs of burgeoning genocide around the world and has just established the Committee on Conscience to alert the world to possible genocides and crimes against humanity. And this is why it seeks to help Americans as well as others appreciate the value of democracy, which, in the end, is the political system that most stoutly protects our lives and our society from the development of ideologies of prejudice that can turn vibrant civilizations into societies of hatred and machines of automated murder. It's impossible to guarantee that the earth's soil will never again heave with massacred bodies. But it's unacceptable not to try. Walter Reich, a psychiatrist, is the director of the United States Holocaust Memorial Museum in Washington This article was originally published in the Dallas Morning News on 28 April 1996. Home ·  Site Map ·  What's New? ·  Search Nizkor © The Nizkor Project, 1991-2012
global_05_local_5_shard_00000035_processed.jsonl/32008
The Nizkor Project: Remembering the Holocaust (Shoah) Shofar FTP Archive File: people/h/hitler.adolf/oss-papers/text/oss-profile-05-10 The greater the demands of his perversion became, the more he hated the Jews and the more he talked against them. Everything which was bad was attributed to them. Here was his political career in an embryo state. He now spent most of his time reading books, attending political talks and reading newspapers in cafe houses. He himself tells us in so many words that he skipped through this material and only took out those parts which were useful to him. In other words, he was not reading and listening in order to become educated sufficiently to form a rational judgment of the problem. This would have been a violation of his earlier inhibition on thinking. He read only in order to find additional justification for his own inner feelings and convictions and to rationalize his projections. He has continued this technique up to the present time. He does a great deal of reading on many diverse subjects but he never forms a rational opinion in the light of the information but only pays attention to those parts which convince him that he was right to begin with. [00010217.GIF Page 210] In the evening he would return to his flophouse and harangue his associates with political and anti-Semitic speeches until he became a joke. This, however, did not disturb him too much. On the contrary, it seemed to act as a stimulant for further reading and the gathering of more arguments to prove his point of view. It was as though in trying to convince others of the dangers of Jewish domination, he was really trying to convince himself of the dangers of being dominated by his perversion. Perhaps Hitler is really referring to his perversion when he writes: "During the long pro-war years of peace certain pathological features had certainly appeared. . .There were many signs of decay which ought to have stimulated serious reflection." (MK, 315) The same may also be true when he says: "How could the German people's political instincts become so morbid? The question involved here was not that of a single symptom, but instances of decay which flared up now in legion...which like poisonous ulcers ate into the nation now here, now there. It seemed as though a continuous flow of poison was driven into the farthest blood vessels of this one-time heroic body by a mysterious power, so as to lead to ever more severe paralysis of sound reason and of the simple instinct of self-preservation." (MK, 2O1) As time went on the sexual stimulation o. the Viennese environment seemed to aggravate the demands of his perversion. He suddenly became overwhelmed by the role that sex plays in the life of the lower classes and the Jews. Vienna became [00010218.GIF Page 212] for him "the symbol of incest" and he suddenly left it to seek refuge with his ideal mother, Germany. But his pre-war days in Munich were not different from those he left behind in Vienna. His life was still one of extreme passivity and although we know little about them we can surmise that his days were filled with inner troubles. The first World War. Under these circumstances, we can understand why he thanked God for the first World War. For him it represented an opportunity of giving up his individual war against himself in exchange for a national war in which he would have the help of others. It also represented to him, on an unconscious level, an opportunity of redeeming his mother and assuming a masculine role for himself. Even at that time we may suppose he had inklings that he would be the Great Redeemer. It was not only his mother he was going to redeem, but also himself. His advent in the German Army was really his first step in attempting to redeem himself as a social human being. No longer was he to be the underdog for he was joining forces with those who were determined to conquer and become great. Activity, replaced his earlier passivity to a large degree. Dirt, filth, and poverty were left behind and he could m.ingle with the chosen people on an equal footing. But for him this was not enough. As we. have pointed out in an earlier section, he was not content to be as clean as the average [00010219.GIF Page 213] soldier. He had to go to the other extreme and become exceedingly clean. Whenever he returned from the front he immediately sat down and scrupulously removed every speck of mud from his person, much to the amusement of his comrades. Mend, his comrade during this time relates an experience at the front when Hitler upbraided one of the other men for not keeping himself clean and called him a "manure pile", which sounds very much like a memory of himself in Vienna. During this period, as previously mentioned, his passive feminine tendencies were finding an outlet in his abasive conduct towards his officers. It looks as though he had not progressed sufficiently far in his conquest of himself to maintain a wholly masculine role. But with the help of others and the guidance of his respected officers he was making some progress toward what appeared to be a social adjustment. The final defeat of Germany, however, upset his well-laid plans and shattered his hopes and ambitions. The defeat of Germany. Nevertheless, it was this event which proved to be the turning-point in his life and determined that he would be an outstanding success rather than a total failure. UNconscious forces, some of which had been dormant for years, were now reawakened and upset his whole psychological equilibrium. His reaction to this event was an hysterical attack which manifested itself in blindness and mutism. Although the hysterical blindness [00010220.GIF Page 214] saved him from witnessing what he regarded as an intolerable spectacle, it did not save him from the violent emotional reactions it aroused. These emotions, we may assume, were similar to those which he had experienced as a child when he discovered his aprents in intercourse. It seems logical to suppose that at that time he felt his mother was being defiled before his eyes but in view of his father's power and brutality he felt himself utterly helpless to redeem her honor or to save her from future assaults. If this is true, we would expect that he swore secret vengance against his father and, as has been shown, there is evidence to this effect. Now the same thing was happening again but instead of his real mother it was his ideal mother, Germany, who was being betrayed, corrupted and humiliated and again he was unable to come to her rescue. A deep depression set in of which he writes: "What now followed were terrible days and even worse nights. Now I knew that everything was lost....In those nights my hatred arose, the hatred against the originators of this deed." But again he was weak and helpless - a blind cripple lying in hospital. He struggled with the problem: "How shall our nation be freed from the chains of this poisonous embrace?" It would seem that the more he thought about it, the more his [unreadable] him that all was lost. He probably despised and [00010221.GIF Page 215] condemned himself for his weakness and as his hatred continued to rise in the face of this frustrating experience he vowed ten and there: "To know neither rest nor peace until the November Criminals had been overthrown..." Undoubtedly his emotions were, extremely violent and would serve as a powerful motive for much of the retaliation which becomes so prominent in his later behavior. There are, however, many ways of retaliating which do not involve a complete upheaval and transformation of character such as we find in Hitler at this time. From our experience with patients we know that complete transformations of this kind usually take place only under circumstances of extreme duress which demonstrate to the individual that his present character structure is no longer tenable. Naturally we do not know exactly what went on in Hitler's mind during this period or how he regarded his own position. We do how, however, that under such circumstances very strange thoughts and fantasies pass through the minds of relatively normal people and that in the case of neurotics, particularly when they have strong masochistic tendencies, these fantasies can become extremely absurd. Whatever the nature of these fantasies might have been, we may be reasonably sure that they involved his own safety or well-being. Only a danger of this magnitude would ordinarily cause an individual to abandon or revolutionize his character structure. [00010222.GIF Page 216] It may be that his nightmares will yield a clue. These, it may be remembered, center on the theme of his being attacked or subjected to indignities by another man. It is not his mother who is being attacked, but himself. When he wakes from these nightmares he acts as though he were choking. He gasps for breath and breaks out in a cold sweat. It is only with great difficulty that he can be quieted again because frequently there is a hallucinatory after-effect and he believes he sees the man in his bedroom. Under ordinary circumstances, we would be inclined to interpret this as the result of an unconscious wish for homosexual relations together with an ego revulsion against the latent tendency. This interpretation might apply to too, for to some extent it seems as though he reacted to the defeat of Germany as a rape of himself as weel as of his symbolic mother. Furthermore, while he was lying helpless in the hospital, unable to see or to speak, he could well have considered himself an easy object for homosexual attack. When we remember, however, that for years he chose to live in a Vienna flophouse which was known to be inhabited by many homosexuals and later on associated with several notorious homosexuals, sych as Hess and Roehm, we cannot feel that this form of attack, alone, would be sufficient to threaten his integrity to such an extent that he would repudiate his former self. [00010223.GIF Page 217] A furtherer clue to his thoughts during this period may be found in his great preoccupation with propaganda which, in his imagery is almost synonomous with poison. "Slogan after slogan rained down on our people." "...the front was flooded with this poison." "...for the effect of its language on me was like that of spiritual vitrtol... I sometimes had to fight down the rage rising in me because of this concentrated solution of lies." This type of imagery probably has a double significance. There is considerable evidence to show that as a child he believed that the man, during intercourse, injected poison into the woman which gradually destroyed her from within and finally brought about her death. Ths is not an uncommon belief in childhood and in view of the fact that his mother died from a cancer of the breast, after a long illness, the belief may have been more vivid and persisted longer in Hitler than in most children. On the other hand, the importance of poison in connection with his perversion has already been considered. We know about his inhibitions against taking certain substances into his mouth. These were not present during the early days of his career but developed much later in connection with his transformed character. In view of all this it may not be too far-fetched to suppose that while he was fantasying [sic] about what the victors might do to the vanquished when they arrived, his masochistic [00010224.GIF Page 218] and perverse tendencies conjured up the thought that they might attack him and force him to eat dung and drink urine (a practice which, it is alleged, is fairly common in Nazi concentration camps). Interestingly enough, this idea is incorporated in the colloquial expression "to eat the dirt of the victors." And in his weakened and helpless condition he would be unable to ward off such an attack. Such an hypothesis gains credence when we review the behavior of Nazi troops in the role of conquerors. Home ·  Site Map ·  What's New? ·  Search Nizkor © The Nizkor Project, 1991-2012
global_05_local_5_shard_00000035_processed.jsonl/32080
If you were to touch the plinth upon which the equestrian statue of King Charles I is placed, at Charing Cross, your fingers might rest upon the projecting fossils of sea lilies, starfish or sea urchins. There is a photograph of that statue taken in 1839; with its images of hackney cabs and small boys in stove-pipe hats the scene already seems remote, and yet how unimaginably distant lies the life of those tiny marine creatures. In the beginning was the sea. There was once a music-hall song entitled "Why Can't We Have the Sea in London?," but the question is redundant; the site of the capital, fifty million years before, was covered by great waters. The waters have not wholly departed, even yet, and there is evidence of their life in the weathered stones of London. The Portland stone of the Customs House and St. Pancras Old Church has a diagonal bedding which reflects the currents of the ocean; there are ancient oyster shells within the texture of Mansion House and the British Museum. Seaweed can still be seen in the greyish marble of Waterloo Station, and the force of hurricanes may be detected in the "chatter-marked" stone of pedestrian subways. In the fabric of Waterloo Bridge, the bed of the Upper Jurassic Sea can also be observed. The tides and storms are still all around us, therefore, and as Shelley wrote of London "that great sea . . . still howls on for more." London has always been a vast ocean in which survival is not certain. The dome of St. Paul's has been seen trembling upon a "vague troubled sea" of fog, while dark streams of people flow over London Bridge, or Waterloo Bridge, and emerge as torrents in the narrow thoroughfares of London. The social workers of the mid-nineteenth century spoke of rescuing "drowning" people in Whitechapel or Shoreditch and Arthur Morrison, a novelist of the same period, invokes a "howling sea of human wreckage" crying out to be saved. Henry Peacham, the seventeenth-century author of The Art of Living in London, considered the city as "a vast sea, full of gusts, fearful-dangerous shelves and rocks," while in 1810 Louis Simond was content to "listen to the roar of its waves, breaking around us in measured time."
global_05_local_5_shard_00000035_processed.jsonl/32082
The foreign ministry said that it was examining ''all the agreements with the United States'' and would no longer be bound by them if reports of a Pentagon proposal to develop new nuclear weapons intended to deter North Korea and other countries from attacking the United States were true. The implication was that the North might resume work on nuclear warheads, which it promised to stop trying to produce after signing an agreement with the United States in 1994. Don Kirk (NYT)
global_05_local_5_shard_00000035_processed.jsonl/32083
Icame to the Swift River Valley as most everyone else was leaving. In this I was not at all like that favorite poet of mine, Emily Dickinson, who had written, "I do not cross my father's ground to any house or town." Indeed, though I was but seventeen years old in 1938, and liked nothing better than to be alone with a book of poems within the chaste clasp of my childhood bedroom, I had crossed my father's ground as often as necessary. We lived on Dickinson Street in Springfield, Massachusetts. I discovered Emily while attending Forest Park Junior High School, where I was a most serious student and preferred to commune with the gifted dead than with my mundane and predictable contemporaries. I convinced myself, against such evidence as only mere truth could provide, that the street on which we lived had been named for Emily Dickinson. (And that I might gain entry to the house in downtown Springfield, on the corner of Water and Bliss, in which on two occasions she had as a young woman visited and slept-the present owners repeatedly closed the door against my entreaties.) This pretense alone made me happy to live on that wide, heavily trafficked, unattractive thoroughfare, pinioned mostly by two-family, double-decker homes, though ours was ours alone, detached and grimly middle-class and sniffish. I disregarded the fact that mine was a happiness obtained under the kind of self-delusion that all my life I have prided myself I have never practiced. For example, I am willing to admit that I don't know whether I was attracted first to Emily's life or her poetry. I discovered some few but pertinent facts about the former from the essay Thomas Higginson had published in the Atlantic Monthly in 1891, five years after her death. She and Higginson had exchanged correspondence for eight years before they finally met, on August 16, 1870. She told him about her domination by her father. Higginson characterized Edward Dickinson as "a man of the old type, la vielle roche of Puritanism." He was in fact an orthodox Calvinist. So frightened was she of his judgment that she didn't learn to tell time until she was nearly as old as I when I went off to college. When she was little, he had tried to teach her to tell time. She couldn't comprehend his explanation. She was afraid to tell him so and afraid to tell anyone else in case word got back to him. So she lived without knowledge of time. Outside of time. Or so deeply within it that she was blind to it the way those in love cannot see how love, like time, may waste us. In my freshman literature class at Mount Holyoke, in which I was the youngest student, I offered up the preposterous theory that Emily's inability to tell time was a source of the fractured rhythms of her verse. That I was taken seriously was only one of the reasons I left college to live in the doomed Swift River Valley. My father was also named Edward. He too read "lonely and rigorous books" and he too was a lawyer. He traced his ancestry back nearly three hundred years to a Chase who had landed a Pilgrim upon a shifting, granulated Massachusetts dune. That was on his father's side. Somewhere down that pedigreed line a Chase woman allowed herself to be not only ravished by but married to a French Canadian, who sought the greater heat of both a southern clime and a Protestant woman's blond and milky loin. Thus was my father born Renouer. Alas, he listened to the names people called him as well as to pronunciation of his actual name and had it legally changed to Renway. Thus did he name me Sarianna Chase Renway. But like Emily Dickinson, who sometimes spelled herself Emilie, as in "your bad, sad Emilie," I sometimes grasped the dying breath of h and called myself Sariannah. (My mother was a Darling. In name only. So dominated was she by my father that I have almost no memory of her. Like many people lost to time, she loved antiques-I do remember that. She collected things wholly out of keeping with a newish house on Dickinson Street: bung starters and Silenius jugs supported by lascivious little cambered figures and salamander irons she would keep in the kitchen for decoration but never use to stimulate the browning of her pallid meats or her runny pies.) My father was a man who imposed upon those around him both his pleasures and his disinclinations. You must love what he loved and hate what he hated. When I was six, he allowed me my first taste of soda pop to celebrate the execution of Nicola Sacco and Bartolomeo Vanzetti and later that year added a splash of rye whiskey to my pop on the night Ruth Snyder was electrocuted for the murder of her husband. When I was eleven, and unknown to my parents had begun to bleed, he attempted one last time to take his belt to my bottom (through my clothing-he had never shown interest in my nakedness) in the impotence of his rage over the discovery of the body of little Charles Lindbergh Jr. That was the first time I crossed my father's ground. I lit out into the night and walked down Sumner Avenue to where it met Long Hill Street, at that very spot where local legend placed the village of the Agawam Indians, who attacked Springfield during King Philip's War 250 years earlier and over by Pecousic Brook in Forest Park killed their children hostages, a sacrifice to desperation and revenge our teachers loved to taunt us with but which thrilled us instead. I snuck behind the mansions there upon the palisades and slid on my backside to the bank of the Connecticut River. I found the usual hoboes curled up there under their Hoover blankets and on that chilly May night folded my arms over my girlish bosom and warmed myself at their fire until I realized that my bosom was of subordinate appeal and warmed myself even more by running back up the hill.
global_05_local_5_shard_00000035_processed.jsonl/32090
Use of the Death Penalty Is Rare and Decreasing Richard C. Dieter Updated April 6, 2014, 7:02 PM When the U.S. Supreme Court considers whether a punishment is cruel and unusual, they examine it in terms of current standards of decency. The Court looks to the number of states using the punishment, and whether its use is frequent or declining. In 2005, for example, the court struck down the death penalty for juvenile offenders because most states did not allow it, and its use was rare and decreasing even where it was allowed. The rarity of the death penalty’s use belies its alleged purposes of deterrence and retribution. The court is likely to apply the same analysis to the death penalty itself. Eighteen states have already ended capital punishment and the governors of three other states have halted executions. New Hampshire and Delaware may soon be added to the list of abolition states. Moreover, the use of the death penalty in states that retain it is decreasing. If the death penalty is being used by only a small number of states, and if there is a clear national trend away from capital punishment, the Supreme Court could find that it has become a cruel and unusual punishment under the Eighth Amendment. Only nine states carried out executions in 2013, with most occurring in just two states: Texas and Florida. Death sentences have declined by 75 percent since their peak in 1996. Public support for the death penalty is at a 40-year low, with risk of executing the innocent as a primary concern. The death penalty is rarely applied. When it is, irrelevant factors such as race, geography and the quality of legal representation play a larger role than the severity of the crime. Is Texas — the leading death penalty state in America — an exception to this trend? Not really. Death sentences in Texas have dropped over 80 percent since their peak in the late 1990s. The executions occurring in Texas today are cases from that earlier era. Soon even Texas will only have a handful of executions each year. The rarity of the death penalty’s use belies its alleged purposes of deterrence and retribution. It is becoming largely irrelevant in American society and may not last another 10 years. Join Opinion on Facebook and follow updates on Topics: Law, Supreme Court, prison and prisoners, race What It Means if the Death Penalty Is Dying
global_05_local_5_shard_00000035_processed.jsonl/32115
User:Sridharan Srinath From OpenWetWare Revision as of 04:06, 11 March 2008 by Sridharan Srinath (Talk | contribs) Jump to: navigation, search Sridharan Srinath Sridharan Srinath I am a new member of OpenWetWare! Contact Info • Sridharan Srinath Department of Chemical and Biomolecular Engineering 4 Engineering Drive 4 Block E5 #B-05 National University of Singapore Singapore 117576 • Pursuing, PhD, National University of Singapore (NUS) • 2007, M.Tech, Indian Institute of Technology, Roorkee Research interests 1. Constrained-based modeliing Useful links Personal tools
global_05_local_5_shard_00000035_processed.jsonl/32116
The Super Shampoos Smoothing (Straightening) What It Does: Coats each strand with detanglers and moisturizers, making hair more resistant to humidity and easier to straighten with products and a blow-dryer. Deposits reflective particles to increase shine. "We also load these formulas with fatty alcohols," says Dianna Kenneally, senior scientist at Physique, "so they detangle as you rinse." What It Doesn't Do: Actually straighten hair. "Only heat-styling does that," Kenneally says. What to Look For: Shine-enhancing dimethicone for luminous results, and humidity-resistant smoothers like cetyl and stearyl alcohols for frizz prevention.
global_05_local_5_shard_00000035_processed.jsonl/32130
Accelerating Science Discovery - Join the Discussion A Big Year for by Valerie Allen on Tue, 9 Oct, 2012, multimedia content, updated interface, enhanced navigation, Spanish • Multimedia sources are now available and automatically searched  • A Spanish version,, is linked from • New databases and websites have been added • Upgraded software enhances the results page Look for an updated mobile version coming out soon! is a collaboration of 17 organizations within 13 federal agencies, operated by DOE’s Office of Scientific and Technical Information and supported by CENDI, an interagency working group of senior scientific and technical information (STI) managers. Valerie Allen Operations Manager Related OSTI Products: Other Related Topics: CENDI,, sti About the Author Valerie Allen's picture Valerie Allen Technical Information Specialist Technical Information Specialist at US DOE OSTI since 1995. Master of Science in Library and Information Science (MSLIS) from UT Knoxville.
global_05_local_5_shard_00000035_processed.jsonl/32150
Baby Symptoms Not to Worry About Anything out of the ordinary can be alarming when it shows up in a newborn, but it's often nothing to worry about. We'll fill you in on what warrants a call to the pediatrician. • Alexandra Grablewski Baby Symptoms: When to Call the Pediatrician Where your own health is concerned, you rarely let a cold put a crimp in your schedule and you probably trudge to the doc's office only if you're suffering. So why has parenting an infant turned you into a raging hypochondriac? Suddenly every weird poop requires you to anxiously inquire with the doctor, and each sniffle seems like an early sign of bubonic plague. If you're scared stiff that your tot will get sick, you're not a wuss -- and you're definitely not alone. "With the first baby, every bump or rash is a mini crisis," says Victoria Rogers McEvoy, M.D., author of The 24/7 Baby Doctor. "Once you gain perspective and realize that most things pass, you can relax and stop obsessing." Of course, perspective is hard to come by when you're caring for a fragile peanut, so remember this: Most of the time, the conditions you're panicking about (those police-siren cries! that eye goop!) are completely normal. Keep calm with our expert advice on what you can ignore -- and when to dial the doc. • Alexandra Grablewski Your sweetie's been screaming for hours, and you're starting to fear it's colic. WHY IT'S OKAY If this is only the first or second night she's been fussy, the more likely culprit is gas, which stretches out your baby's Lilliputian GI tract as it wends its way through her intestines. If, however, your infant turns out to be super-agitated every late afternoon and evening, colic is certainly a possibility. It's not as dire as you may think, though: Colicky babies seem uncomfortable, but they aren't typically in significant pain, and they can be soothed, at least for a while, with a calming technique such as swaddling, swinging, rocking, or heading out for a drive, says Katy Cahill, M.D., a pediatrician with University of Wisconsin Health, in Madison. WHEN TO SEE THE DOCTOR If you've got a howler on your hands, check in with your pediatrician to rule out physical causes that are sometimes overlooked, such as an ear infection or a corneal abrasion. And if you can't soothe your infant for even a short spell, her cries could indicate a problem in the intestinal tract, an infection, or an injury. "It's usually possible to briefly console a colicky baby," Dr. Cahill says. "It's the inconsolable babies that worry me." • How to Relieve Colic How to Relieve Colic • Alexandra Grablewski Baby just upchucked her entire feeding, Exorcist-style. WHY IT'S OKAY Spit-up is unnerving (and icky), but more than half of all babies have reflux in the first three months, and it usually bothers their parents much more than it does them. Part of the problem: The esophageal sphincter, a flap that closes over the top of the stomach, is still developing, so a little backflow is almost inevitable. Plus, babies "suck like maniacs, and milk is flying down into their stomach faster than they're really built for," says Ken Haller, M.D., an associate professor of pediatrics at St. Louis University School of Medicine, in Missouri. "It's very easy for newborns in particular to overfeed -- then they spit up." You can slow things down with a burping session every 2 ounces; the pause gives your baby a moment to realize, "I'm full now." WHEN TO SEE THE DOCTOR If the reflux is so severe that your baby doesn't appear to be gaining weight, your doctor might prescribe an infant-friendly antacid such as Zantac or Prilosec. If your tot seems to be projectile vomiting or throwing up virtually everything at every feeding, pyloric stenosis, a blockage that prevents the stomach contents from emptying into the intestine, could be to blame. The condition is rare (it occurs in only 3 out of 1,000 babies), but it may be worth a look. • Alexandra Grablewski There's a green poop explosion in her diaper. WHY IT'S OKAY Weird colors and consistencies as well as fast and frequent poos are par for the course. "Babies have an active gastro-colic reflex, so it's normal for them to make a bowel movement every time you feed them in the first weeks," Dr. Haller says. "The consistency can be soft clay to scrambled eggs, and the color yellow, green, or brown." WHEN TO SEE THE DOCTOR Diarrhea, which indicates sickness, can be hard to distinguish from normal poop, so watch for other symptoms of a bug: fever, unusual fussiness, vomiting, dehydration, and poor eating. If eight to ten hours pass without a wet diaper, she might be dehydrated -- a serious side effect of diarrhea. As for colors, "white, red, and black are the shades of poop we most worry about," says American Baby advisor Laura Jana, M.D., coauthor of Heading Home With Your Newborn. (White poop can indicate a digestive problem; red or black suggests blood in your baby's stool, a potential sign of an allergy or other issue.) • How to Give Your Baby Medication How to Give Your Baby Medication • When to Worry: Constipation When to Worry: Constipation • Alexandra Grablewski Your baby's nose is streaming like the Colorado River. WHY IT'S OKAY It's called a common cold for a reason. With more than 200 cold-causing viruses out there, your baby will likely encounter between eight and ten of them before his second birthday. The symptoms (cough, runny nose, sore throat, mild fever) can drag on for ten days. He may look and sound worse than he feels, however; babies breathe mostly through their nose until about 6 months, which means that when those teeny nasal passages get congested, your infant will sound terrible (and may refuse to eat). Forget over-the-counter cold medications -- they can be dangerous for babies. Instead, to help him feel better, spritz one or two drops of saline solution in each nostril and use a bulb syringe to suck out the loosened mucus. (Squeeze the bulb, insert the tip gently in baby's nose, then let go.) WHEN TO SEE THE DOCTOR On rare occasions, what looks like a cold is actually respiratory syncytial virus (RSV), which can lead to serious problems such as pneumonia. If you notice flared nostrils, deep chest inhalations, or rapid breathing that doesn't let up -- signs your baby is struggling for air -- call your pediatrician ASAP. • Alexandra Grablewski That nasty rash on your infant's neck and scalp is earning you the stink-eye at mommy group. WHY IT'S OKAY "Babies get rashes all the time -- many different ones," explains Dr. McEvoy. "Initially you can handle most of them at home." To treat cradle cap, massage warm baby oil into your infant's scalp, then brush away the flakes. Most other rashes, like baby acne and heat rash, will wane on their own without assistance from you; use mild soap at bathtime and keep his skin cool and dry. WHEN TO SEE THE DOCTOR If a rash lingers, looks like purplish pinpoints, has blisters, or makes your baby miserable, talk to your doc. "Call for help when what you're doing is not working or is getting worse," Dr. McEvoy says. A diaper rash that doesn't improve may be a yeast infection requiring an antifungal cream. OTC lotions can sometimes treat eczema, a chronic condition marked by red patches of scaly, itchy skin, but you'll first want your doctor to diagnose the problem. If your tot has blisters that are tiny and yellowish, or white and fluid-filled, it's often erythema toxicum, a harmless rash that usually disappears by the time baby is a week old. Sometimes, though, blisters can indicate something more serious, like herpes. • Alexandra Grablewski Heat Advisory A fever is a red flag in the first few months because it can indicate serious problems, anything from an infection to pneumonia. Until your baby is 12 weeks, call the pediatrician if he spikes a temperature above 100.4 degrees F; once he's 3 to 6 months, a fever of 101 degrees F or higher deserves a call to the doc; with older babies, 103 degrees F or above causes concern. To find out if your little one is feverish, take his temp with a digital rectal thermometer, which provides the most accurate reading. It's scary, yes, but doable. Ask your M.D. or nurse for a tutorial at your baby's first checkup, but here's a quick how-to: -- Apply Vaseline or lubricant (like K-Y Jelly) to the end of the thermometer. -- Insert the tip 1/2 to 1 inch (at least the length of a pencil eraser) into your baby's anus, and hold until the thermometer beeps. -- Watch out! "Taking a baby's temperature often causes him to poop," warns Katy Cahill, M.D. Originally published in American Baby magazine.
global_05_local_5_shard_00000035_processed.jsonl/32158
Wayne Grudem Explains Why It’s Theologically OK to Support Mitt Romney I just came across this 2007 endorsement of Gov. Romney by Wayne Grudem, an evangelical professor of Bible and theology and a rock star in reformed circles.  I don’t know if Professor Grudem still endorses Gov. Romney for 2012, but I found his article interesting.  First, he explained that he didn’t agree with Gov. Romney’s theological beliefs: Romney is a Mormon, and I strongly disagree with a significant number of Mormon theological beliefs, which I find to be inconsistent with the Bible and with historic Christian teachings. But many Mormon teachings on ethics and values are similar to those in the Bible, and those teachings support Romney’s conservative political values. Then, he talked about Biblical Examples of Leadership: This is just something to consider as we talk to other evangelicals who struggle with the whole religion issue. Watch Mitt Romney Dance Gangnam Style Mitt the Movie: Is it Too Late to Rewrite History? What MSNBC's Mockery of Romney's Black Grandson Means Mitt Romney, an Appreciation About Nancy French
global_05_local_5_shard_00000035_processed.jsonl/32179
Video content is everywhere on the Web: You can get movies as illegal BitTorrent downloads before they're even released into theaters; watch the latest viral videos via stream on sites like YouTube, iFilm, and; and legally buy content like TV shows and sporting events. Two services have the market cornered on such licensed content, and it's no surprise that the services come from Apple and Google. The heavyweights' video offerings are quite different, however, and picking one over the other will come down to what content you're looking for and how you plan to use it. Which brings us to the first main difference: content. While Google has an exclusive on NBA games, a couple of high-profile shows like CSI, and some classics like The Brady Bunch and I Love Lucy, iTunes has a boatload of hit TV shows like Desperate Housewives, Lost, The Office, and SpongeBob SquarePants. The same is true of music videos—Google Video has a smattering of videos by Sony BMG artists, but iTunes has most of those and many more besides. iTunes also clearly owns the portable video space. Though some of the content on Google Video is available in optimized versions for PSP or iPod, that feature is only utilized for free content and not the licensed TV shows, music videos, or basketball games. iTunes' isn't without its problems, though. The main hang up is simply the navigation of the video store, which is downright torturous. The user interface and categorization are far from intuitive, and the rocky search functionality certainly doesn't help things. Naturally, search and UI are the areas where Google Video shines. Both Google Video and iTunes have a burgeoning catalog of quirky video podcasts, but only Google makes it easy to find the ones that might interest you. Want to find out more? Click on the links below to go to our full reviews, where you'll find a lot more info, as well as slideshows. In this roundup: Apple iTunes Music Store iTunes has the more impressive video catalog, but poor navigation, UI, and search can make browsing the catalog difficult. Google Video (beta) Google Video is lacking in the high-profile hit-TV-show department, but there's plenty of entertaining content available, and Google's simple search functionality makes it easy to find what you're looking for.
global_05_local_5_shard_00000035_processed.jsonl/32185
Definition of:SONET ring SONET ring The architecture used in SONET technology. SONET rings, known as "self-healing rings," use two or more transmission paths between network nodes, which are typically digital cross-connects (DCSs) or add/drop multiplexers (ADMs). If there is a break in one line, the other may still be available, providing the second is not in close proximity to the first and also damaged. For the best security against failure, when possible, different physical routes are used for the two lines. The most fault-tolerant architecture is the four-fiber bi-directional ring. See SONET. Two Fiber Unidirectional This is the simplest SONET ring topology. All data are transmitted on the working or active path, while the standby path (protection path) lies in waiting. When a failure in the active path occurs, the two network nodes affected immediately switch to the standby line. Four fibers may used in a unidirectional system, but it is not usually done. Two Fiber Bidirectional In this architecture, traffic flows in both directions, but half the capacity of the line is used as a data channel and the other half for protection. In the event of failure, the alternate line takes up the slack. Four Fiber Bidirectional This is the most robust architecture which can withstand multiple failures providing the lines are routed in different locations. Both active and standby paths are duplicated in this topology, which is common in large carrier networks that cannot afford a breakdown.
global_05_local_5_shard_00000035_processed.jsonl/32186
Google Gmail Google Gmail (2011) : Chat You can chat on the page with Google Chat, but the windows aren't tabbed as they are in Windows Live Hotmail. A plugin lets you conduct voice and video chats, too. 20 / 23 Bottom Line Gmail is fast, clean, and the recent redesign improves on its appearance. But it still lacks some useful tools found in competitors, has no preview pane, and privacy is an issue, so it won't appeal to everyone. 12 issues for $19.99 ONLY $1.67 an issue! 24 issues for $29.99 ONLY $1.25 an issue! Lock in Your Savings! Powered by Zinio
global_05_local_5_shard_00000035_processed.jsonl/32191
Manufacturer’s Description The replacement foam kits for the Protector cases consist of a layer of convoluted foam for the lid, a 1-inch layer to pad the bottom and between one and four layers of Pick N Pluck in between. The Specs Additional Specifications Parent Retsku B0000DYVBS Quick Glance Related Accessories
global_05_local_5_shard_00000035_processed.jsonl/32221
note tokpela <p> There are a couple of options. </p> <p> One option is to create a thread for each file you want to monitor. If you go this route, check out the <a href="" target="_new">Thread::Queue</a> module. You should run a search on this site for many good starting points. <a href="">BrowserUK</a> has given lots of advise and examples. </p> <p> A second option is to monitor a directory and then make a copy if you receive an modification event. There is a module <a href="">Win32::ReadDirectoryChangesW</a> which will tell you which file was modified and allow you to respond. It is a wrapper around the Win32 API ReadDirectoryChangesW. It is not on CPAN but can be found on this site - so you will need to copy and paste the module into your personal library directory. </p> <p> An short example, pieced from how I have used this module (untested). </p> <p> <code> use strict; use warnings; use Win32::ReadDirectoryChangesW; my $path = 'c:/directory'; my $subtree = 1; my $filter = FILE_ACTION_ADDED | FILE_ACTION_MODIFIED; my $rdc = Win32::ReadDirectoryChangesW->new(path => $path, subtree => 1, filter => $filter); my @results = $rdc->read_changes; while (scalar @results) { my ($action, $filename) = splice(@results, 0, 2); if ($action == FILE_ACTION_ADDED || $action == FILE_ACTION_MODIFIED) { # perform your backup here } } </code> </p> <p> There is also a third option if you have more than one directory which would be to use both methods 1 and 2. </p> 872039 872039
global_05_local_5_shard_00000035_processed.jsonl/32222
Beefy Boxes and Bandwidth Generously Provided by pair Networks Syntactic Confectionery Delight Site Suggestion - Newest Nodes Order by Adam (Vicar) on Sep 21, 2000 at 22:08 UTC ( #33531=monkdiscuss: print w/ replies, xml ) Need Help?? I was just reading a recent post by Tye, and I was thinking that as long as we were making suggestions for what may well be major changes to the site, that I would add my own: I have come to find the Newest Nodes page a very useful method for seeing what's going on in the Monastery. Recently the order that the different sections appear on the page was changed. I would like to be able to specify the order of these sections in my User Settings. Well, you might say, Why don't you just click the "I've read these" button? So I'll tell you. I don't like that button. We get so many posts that inevitably when I click that button there is some post that I have not read. Worse, once I click that button, subsequent visits to the Newest Nodes page go back to the last time I clicked the button, which makes sense in the short term, but if I don't visit for a couple days... that thing becomes a mess. So perhaps a timeout feature should be added... show me nodes after the time I clicked 'read these' for 24 hours, and then revert to the normal mode. Of course, these are just ideas. I'm throwing them out there for you to discuss. As always, the powers that be have final say in all this... Comment on Site Suggestion - Newest Nodes Order RE: Site Suggestion - Newest Nodes Order by swiftone (Curate) on Sep 21, 2000 at 22:57 UTC Just hit the little button at the top that says 'Clear my last checked flag', and you'll have access to the 'show new nodes since' selector. It's not terribly intuitive, but it's already there. RE: Site Suggestion - Newest Nodes Order by ZZamboni (Curate) on Sep 21, 2000 at 23:09 UTC Log In? What's my password? Create A New User Node Status? node history Node Type: monkdiscuss [id://33531] Approved by root and the web crawler heard nothing... How do I use this? | Other CB clients Other Users? Others drinking their drinks and smoking their pipes about the Monastery: (24) As of 2015-06-03 22:12 GMT Find Nodes? Voting Booth? What kind of chocolate gives you the most pleasure? Results (139 votes), past polls
global_05_local_5_shard_00000035_processed.jsonl/32223
Beefy Boxes and Bandwidth Generously Provided by pair Networks XP is just a number Re: recursive anonymous subroutines by runrig (Abbot) on Apr 06, 2006 at 21:19 UTC ( #541742=note: print w/ replies, xml ) Need Help?? in reply to recursive anonymous subroutines Unless it's been fixed recently, declaring anonymous recursive subs (without using Devel::Caller or the like) is leaky, so if you're declaring a lot of them (and hoping they get destroyed when they go out of scope) you can fix that with Scalar::Util::weaken: use Scalar::Util qw(weaken); { my ($sub, $sub1); $sub1 = $sub = sub { my $num = shift; return $num + $sub->($num-1) if $num >0; return 0; } weaken($sub); my $num = $sub->(5); print "$num\n"; } Comment on Re: recursive anonymous subroutines Download Code Log In? What's my password? Create A New User Node Status? node history Node Type: note [id://541742] and the web crawler heard nothing... How do I use this? | Other CB clients Other Users? Others chilling in the Monastery: (16) As of 2015-06-03 22:08 GMT Find Nodes? Voting Booth? What kind of chocolate gives you the most pleasure? Results (139 votes), past polls
global_05_local_5_shard_00000035_processed.jsonl/32224
Beefy Boxes and Bandwidth Generously Provided by pair Networks more useful options Re: The App:: namespace? Sharing a webapp on CPAN by b10m (Vicar) on May 09, 2008 at 12:41 UTC ( #685655=note: print w/ replies, xml ) Need Help?? I'm not sure what you want to point out with that link. I know there are scripts there, but that doesn't change my opinion that it's not the best space for scripts to begin with. HTML::Template can also be found on freshmeat. Not the best place IMHO. Comment on Re: The App:: namespace? Sharing a webapp on CPAN by Anonymous Monk on May 12, 2008 at 14:28 UTC Where do you think is a good place for fairly short scripts (as opposed to large "apps" that might merit their own google-code/freshmeat/whatever)? Most scripts can benefit from putting the functionality within a module. In that case, you're distributing the module and the script comes along with it. cpan, pod2html, and many others most people take for granted fall into this category. Benefits include: • Easier to test because you're testing a module • Easier to reuse in many scripts • Easier to subclass for other people My criteria for good software: 1. Does it work? If scripts are too small for sourceforge, it's probably a quick hack to perform task X. Cool Uses For Perl looks like a good place, or Snippets. Log In? What's my password? Create A New User Node Status? node history Node Type: note [id://685655] and the web crawler heard nothing... How do I use this? | Other CB clients Other Users? As of 2015-06-03 22:12 GMT Find Nodes? Voting Booth? What kind of chocolate gives you the most pleasure? Results (139 votes), past polls
global_05_local_5_shard_00000035_processed.jsonl/32225
Beefy Boxes and Bandwidth Generously Provided by pair Networks Pathologically Eclectic Rubbish Lister Comment on Good node. If it typos matter here, then: $last_line = 'Enjoy your say at the Monastery, and if you bump into No +deReaper, don\'t forget to say "Hello."'. $last_line = s/say/stay/; ...otherwise ignore :) perl -e 'print "-- \n Leonid Mamtchenkov\n"' In reply to Re: Welcome to the Monastery! Make yourself at home. by TVSET and:  <code> code here </code> • Please read these before you post! —         For:     Use: & &amp; < &lt; > &gt; [ &#91; ] &#93; • Log In? What's my password? Create A New User and the web crawler heard nothing... How do I use this? | Other CB clients Other Users? Others meditating upon the Monastery: (21) As of 2015-06-03 22:18 GMT Find Nodes? Voting Booth? What kind of chocolate gives you the most pleasure? Results (139 votes), past polls
global_05_local_5_shard_00000035_processed.jsonl/32226
Beefy Boxes and Bandwidth Generously Provided by pair Networks Pathologically Eclectic Rubbish Lister Comment on Would you mind if I ask my question? I don't understand "$ option" and saw perlre's Extended Patterns, but I could not figure out what is this. "(?=" is zero width look ahead assertion and I wonder what is "$|" ? Usually I will do this with character class @lines = $RefLine =~ /(\([a-z]*\)[^\(]*)/g; This will fail if $RefLine includes another (). my $RefLine = "(a) This is first line(once all 4 lines were one line). + (b) This is second line; ( c) This is different line 32. (d) Here is the last line."; But your's works fine. More robust. I am glad with some pointer or clue for me. regards. In reply to Re^2: RegEx related line split by remiah in thread RegEx related line split by dominic01 and:  <code> code here </code> • Please read these before you post! —         For:     Use: & &amp; < &lt; > &gt; [ &#91; ] &#93; • Log In? What's my password? Create A New User and the web crawler heard nothing... How do I use this? | Other CB clients Other Users? Others taking refuge in the Monastery: (21) As of 2015-06-03 21:59 GMT Find Nodes? Voting Booth? What kind of chocolate gives you the most pleasure? Results (139 votes), past polls
global_05_local_5_shard_00000035_processed.jsonl/32227
note Kenosis <p><em>Gotta validate the inputted word by checking that it indeed consists of the chars in $random_string.</em></p> <p>Perhaps I'm misunderstanding you, but this sounds like you want to validate that the two sets of string characters are equal (the 'compare uniquely')--not that the two strings are equal. If this is the case, the following is an option:</p> <c> use strict; use warnings; my $word = 'FHDJSKAL'; my $random_string = 'ALSKDJFH'; if ([sort ("\U$word" =~ /./g)] ~~ [sort ("\U$random_string" =~ /./g)]) { print "Good word.\n"; } else { print "Try again.\n"; print "\n"; } </c> <p>Hope this helps!</p> <p><strong>Update</strong>: Replaced the hash solution with one using the smart operator (<c>~~</c>), as the former didn't match properly. 1005402 1005402
global_05_local_5_shard_00000035_processed.jsonl/32228
Beefy Boxes and Bandwidth Generously Provided by pair Networks good chemistry is complicated, and a little bit messy -LW Comment on Hello Guys, Relativity new to Perl so i will go ahead and try to explain what i am trying to do etc! I am trying to configure the input to only accept DD-MM-YYYY Format, but i also need to have the day, month and year as variables allowing me to use those variables in a mysql command. At the moment i have this, it most likely is completely wrong, but if you could give guide me that would be great; (<STDIN> =~$day/(\d{2})-$month(\d{2})-$year(\d{4})/) { $date = <STDIN>; } else { print "Invalid date, not in DD-MM-YYYY Format\n"; } My main worry of the above is that the variables are not in the correct place ? Heres an example of the mysql command ( just to let you know where the variables will be used ) $sql = "UPDATE table SET day='$day' month='$month' year='$year' WHERE field='$variable' AND field='$variable'\G" I Have changed the names of the fields/table/variables in the mysql to just a generic example. i am just looking for assistance in regards to the 3 fields below; The three fields in the mysql table i would like to update are as follows; Any help would be great, Thanks in advance! In reply to Formatting STDIN for date format by Ashley Jordan and:  <code> code here </code> • Please read these before you post! —         For:     Use: & &amp; < &lt; > &gt; [ &#91; ] &#93; • Log In? What's my password? Create A New User and the web crawler heard nothing... How do I use this? | Other CB clients Other Users? As of 2015-06-03 22:43 GMT Find Nodes? Voting Booth? What kind of chocolate gives you the most pleasure? Results (140 votes), past polls
global_05_local_5_shard_00000035_processed.jsonl/32229
Beefy Boxes and Bandwidth Generously Provided by pair Networks Syntactic Confectionery Delight Comment on Yeah well every case is different IMHO. This test code is for a specific component a relatively complex Catalyst Model (that is modeled as an aggregate), so I wanted to test very specific classes that receive complex objects and Catalyst Model instances as well. Creating the actual objects would have been a real pain and I wanted to write unit tests for every single component. I looked into Test::MockObject::Extends but it was more than I needed (and virtually impossible and useless to instantiate the whole model to test such a small class), so I settled for the solution above. Do you think it's worth a tutorial? Is the title appropriate? I could start the article with your caveat above ;-) ("If you have to mock an accessor, you're probably mocking too much.") In reply to Re^2: RFC Mocking an Accessor with Test::MockObject by ait in thread RFC Mocking an Accessor with Test::MockObject by ait and:  <code> code here </code> • Please read these before you post! —         For:     Use: & &amp; < &lt; > &gt; [ &#91; ] &#93; • Log In? What's my password? Create A New User and the web crawler heard nothing... How do I use this? | Other CB clients Other Users? Others imbibing at the Monastery: (19) As of 2015-06-03 22:37 GMT Find Nodes? Voting Booth? What kind of chocolate gives you the most pleasure? Results (140 votes), past polls
global_05_local_5_shard_00000035_processed.jsonl/32260
View Full Version : Boys like me are a dime a dozen February 22nd, 2011, 10:07 PM Hellooooo. I am sea. That's lowercase 's' to you, good sir! I'm pretty typical. I used to be obsessed with anime, but grew out of it. I listen to a lot of music and I am hoping to have a career in some field of Psychology in the future. I love working with Photoshop. I've played around in it for a number of years now. I also do a bit of spriting (not so much now as I did when I was younger, but I still make a sprite or two every now and then). Since this is a generic introduction thread, I'll add to the fire by listing my favorites~ Pokemon: Caterpie Pokemon Game: Crystal Anime: Neon Genesis Evangelion Anime Character: Asuka Langley Soryu<3 Movie: Good Will Hunting Band: Marianas Trench I like to battle over Wifi, though I only battle casually. I don't play competitively, so if you're interested in battling a stranger/weirdo like me, don't expect too much of a challenge. February 22nd, 2011, 10:53 PM Yello, sea! Just remember to look at the board rules and everything, since these days barely anyone reads them. So you do Photoshop, huh? Well you're one step above me, I usually use Photobucket XD. You can sprite too?! If you're really good at it, you can check the Game Development or Hacking boards and earn a reputation or even possibly get even better! Now, in terms of your list, since I've never heard of all most of the stuff on it, but I'll check it out sooner to get a better understanding of you, I mean it. Obsessed over anime is always a good thing (b'-')b Pffft, some people on this forum are like that too, they just battle their favorites which is quite admirable if I do say so myself. Alright, hope to see you around, sea! Few people actually stay nowadays, but I'm guessing since B/W is coming out, more people are joining up as usual. February 22nd, 2011, 11:05 PM Yay a haruhi fan.. I'm assuming that you've read the light novels, the manga, the short oneshots, watched the 2 seasons, the movie, played the 5 games out currently and listened to all the CD drama's February 23rd, 2011, 12:34 AM Hey sea. I'm new too. Make sure to read the rules so you dont get into any trouble. Add me as a friend if you want. Ill see you around (: February 23rd, 2011, 03:12 AM This is why I hate being an English student- I can't stand bad grammar! Ah, the pain of your username, it burns my eyeballs! Nevertheless, I would love to battle you sometime, and you sound like an interesting person, although I don't even know what most of your favourite things are :S Anyhow, welcome, I hope to see you around the forums! If you need anything, then I'll be somewhere or another, so just give me a shout. Miss Doronjo February 23rd, 2011, 08:33 AM Guys like you are indeed a dime a dozen! [suprisingly, I haven't heard that phrase in a while. @-@; And my mom says that...ALOT. O-O'] So yeah hey sea! Do you know who lives under a pinapple under the sea? :3 SPONGE-BOB SQUARE-PANTS! But, I'm just being silly~ I'm kind of a anime junkie myself, but, haven't seen one in a while. I dunno, I'm prefering manga now. You know; I'm majoring in Psychology right now! I may say, its quite interesting. <3 I'm also doing other things; like, maybe trying forensics, or just go into social work, eaither or. Maybe if you're interested, you can check out the Pixel Art (http://www.pokecommunity.com/forumdisplay.php?f=55) board? Since you're into spriting, maybe you'll just want to show off the sprites you made! You just have to have 15 non-spam posts to posts links, but, it shouldn't be a problem; you can join art disscussions, pokemon discussions, or maybe just the general discussions. <3 Caterpie is definately an interesting pokemon. @-@; It looks...weird at first, but, its actually pretty cute. <3 I kind of like bug pokemon. <3 Though my favourite bug pokemon would have to be Heracross. <3 I love Crystal; its a game I used to play all the time until the new pokemon games came out. <3 Especially pokemon HeartGold, which I enjoy as well. <3 Hm, I never watched Neon Genesis Evangelion; its pretty good right? Maybe I'll look into it and watch it sometime. <3 Or better yet, if its a manga, I'll read it on the go. <3 My favourite anime is SOul Eater; because its pretty funny and has lots of dark action. ^^ My favourite anime character...I guess its Black Star, Soul, Tsubaki, and Maka [the main characters from Soul Eater of course. <3] Eh, I kind of play more casually nowadays too. I'm trying to get back into competitive, a little boring with 4th gen, I'll just see until 5th gen. <3 There's a thread called the Quick battle thread, just in case you want to have a quick battle with someone via wifi. Its right here: [ http://www.pokecommunity.com/showthread.php?t=191202&page=165 ] Well anyway, I hope you'll stick around! There are plenty of members under this sea~ [okay I'll stop with the sea puns. =P] You can meet them, be pals of them, be evil brothers with them, plot a world domination plan with them, etc. And yeah! Enjoy yourself. <3 February 23rd, 2011, 01:56 PM Oh gosh, I didn't expect so many replies, heh. Anyway, quoting everyone's posts and then replying to them would be too much, so I'll just reply directly~ @インフェルノの津波: Heh, yeah. This account was actually registered in April 2010. I'm just now using it because I've been getting back into Pokemon lately. @NurseBarbra: I'm not THAT big of a fan, haha :3. I've read some of the light novels, watched the two seasons, and the movie. That's it though! @Venomire: I'm really tempted to start using bad grammar on purpose just to mess with you. ;o @Miss Doronjo: I counted, and there were 11 <3's in that post! Pfft. That aside, Evangelion is a mecha/psychologic anime. If you aren't really into mecha, I wouldn't really suggest it ;o And speaking of Soul Eater, I've been meaning to watch it forever, but I haven't really had the motivation to watch any anime as of late. February 25th, 2011, 03:30 AM Welcome to the forums sea :) If you need to talk, drop me a PM or a VM, if not have a great time :) And I'm being pedantic in saying boys like you aren't a dime a dozen because everyone is unique :D But I'm annoying like that xD February 25th, 2011, 05:27 AM Wow, this is going to be hard, me being a grammar nazi and all. I'm not used to calling people like that, so in your case, "sea". I'm more of a type names with a capital letter kind of guy, but I guess I could adapt to it for you, if I start talking to you lots and lots. XD; Welcome to the big sea (pun intended) which is PokeCommunity! I bet you didn't know this, but I actually own a Neon Genesis Evangelion DVD, and have never watched it. I have no idea what it's about or anything, but I'll assume it's about robots or something. XD; Yeah I'm not really that great with anime, considering the only ones I really watch is probably Naruto and Pokemon, and it makes me mad that they haven't subbed last week's episode yet. I WANT TO SEE IT! D: Enough of me venting, but I heard you like battling casually. Me too, but I do like the competitive side as well. I mean I have good Pokemon to use, with all the fancy schmancy movesets and whatnot, but if you ever want to battle me you'll probably see me running like, a Parasect and some other stuff which isn't that great. That comes to remind me, I should breed myself a Vileplume or something. :D So yeah, also you might want to check out the Battle Stadium (http://www.pokecommunity.com/forumdisplay.php?f=160). Funny story about a Caterpie I once met, and I shall tell you, in the form of a song. Okay not really, but there is an interesting story. XD; Once upon a time, I had a friend over and we thought we'd rock out the old Pokemon Stadium, and that we would try out the gym leader castle, because now they share a castle. :D Anyway, first up was Brock, whose underlings are of the lines of Bug Catchers. One particular Bug Catcher named Joey or something idk (They didn't have names back then) sent out his Caterpie, against our Hitmonchan. The funny part was we were struggling to defeat this little Caterpie. Now that goes to show you that a little Caterpie has the potential to be as powerful as a Hitmonchan. :D Anyway, it was nice meeting you sea. Take a peek at the Rules (http://www.pokecommunity.com/showthread.php?p=6446812) while you can, so you can get a jist of what to do around here, and you can always ask anyone around here if you need help with anything. :)
global_05_local_5_shard_00000035_processed.jsonl/32292
Articles tagged laura harris 18 May 2007 // 1:00 AM Severance (2006) READ more 20 Jul 2005 // 12:00 AM Dead Like Me: Second Season Roxy, bless her, is acutely practical: 'Everybody can't get a monument, otherwise the world'd be one big-ass graveyard.' READ more 9 Sep 2003 // 12:00 AM 24: Season 2 'This is a red meat show. People kill people and go eat a sandwich right after.' READ more //Mixed media // Re:Print READ the article
global_05_local_5_shard_00000035_processed.jsonl/32293
Chris Wilson Reviews // 1 Articles Chris Wilson: It's Flamin' Groovy! 5 Mar 2014 // 4:30 AM It’s just a shame that the vocals don’t always quite match the effort of the musicianship. //Mixed media // Re:Print READ the article
global_05_local_5_shard_00000035_processed.jsonl/32311
About the Author Eva Lloyd is a reader in early childhood at the University of East London and codirector of the International Centre for the Study of Mixed Economy of Childcare (ICMEC). She is the author or editor of, or contributor to, several books, including Poverty and social exclusion in Britain, also published by the Policy Press.
global_05_local_5_shard_00000035_processed.jsonl/32314
Why Sugar is Not the Problem Rob Thompson, MD March 20, 2012 Sugar may not be the biggest offender in your diet When I tell people that sugar is not their problem, they often protest. They know that the cakes, pies, brownies, and cookies they've been eating contributed to their expanding waistlines. And they're right. These foods are a major contributor to America's growing weight problem, but it's not so much because of the sugar in them as it is the combination of sugar and starch. [sidebar]Starch is tasteless. If you don't believe that, try eating a spoonful of flour. You can hardly taste anything. It just feels as if you have a bunch of paste in your mouth. Sugar, on the other hand, is sickeningly sweet. Try eating a spoonful of that; it's nauseating. However, if you mix the two—if you put sugar in baked goods, such as cookies, cakes, and pies—you give the flour some flavor and you hide much of the sweetness of the sugar. The sugar makes you consume more starch, and the starch makes you consume more sugar. You end up eating a lot more starch and sugar than you would normally have the desire to eat. And as good as it might taste, it all turns to sugar in your gut. So cookies, cakes, and doughnuts are out if you're trying to reduce your glycemic load, but here's the good news. The glycemic loads of sweets that do not contain starch are not particularly high—much lower, in fact, than the glycemic loads of starches, such as bread, potatoes, and rice. The table below lists the glycemic loads of some popular foods. As you can see, the glycemic loads of dark chocolate, peanut M&M's, and even pure table sugar aren't too bad. Life Saver, 1 piece 20 Sugar, 1 rounded teaspoon28 Peanut M&M's, 1 snack-size bag43 Dark chocolate, two 1" squares44 Licorice, 1 twist 45 White chocolate, two 1" squares 49 Milk chocolate, two 1" squares 68 White bread, 1 slice100 Doughnut, 1 medium-size205 Cupcake, 2 1/2" diameter213 Brown rice, 1 cup222 Baked potato, 1 potato246 Notice that the glycemic loads of the candies are lower than those of the bread, potatoes, and rice. How could that be? It's not that they don't contain high concentrations of easily digestible sugar. It's because the typical serving sizes are smaller. Certainly, if you ate a pile of candy the size of a baked potato or a plateful of rice, you would raise your blood sugar as much as you would if you ate a baked potato or a plateful of rice. However, most of us don't need that much candy to satisfy the urge for something sweet. A handful will usually do. Adapted from The Sugar Blockers Diet: Eat Great, Lose Weight--A Doctor's 3-Step Plan to Lose Weight, Lower Blood Sugar, and Beat Diabetes--While Eating the Carbs You Love, by Rob Thompson, MD, with the editors of Prevention (Rodale, 2012). [header=Candy vs. Starch] Why don't we eat as large portions of candy as we do bread, potatoes, or rice? Because most of us have a limited tolerance for sweetness. Although starch is pure sugar, the molecules are bonded together, so you can't taste the sweetness—only about 2 percent of it breaks down to sugar in your mouth. However, you can taste all of the sugar in candy, so you need less of it to satisfy your sweet tooth. Indeed, despite skyrocketing obesity and diabetes rates, Americans aren't eating any more candy than they did 50 years ago. According to USDA statistics, average candy consumption hasn't changed since the 1960s. Because diabetics have problems with high blood levels of glucose, which, of course, is a type of sugar, doctors used to think that the worst thing a diabetic could do was consume sugar—the kind we use to sweeten things. However, the glycemic load measurements cast sugar in a different light. The glycemic load of a teaspoon of sugar is only 28 percent of that of a slice of white bread. If you want to put a teaspoon of sugar in your coffee or tea or sprinkle it on some berries, it's not going to raise your daily glycemic load much at all. In fact, if you're trying to reduce your glycemic load, sugar can actually help. It's natural to crave a hint of sweetness. We have tastebuds devoted specifically to detecting sugar. To prehistoric hunter-gatherers, the taste of sugar meant that a plant part was edible and a source of calories. It is not surprising that for many of us, a meal isn't complete without something sweet for dessert. The fact that many sweets have reasonably low glycemic loads is good news for those of us with a sweet tooth. A few bites of candy after a meal will have little effect on your blood sugar or on your body's demand for insulin, and can be quite satisfying. Indeed, it's a lot easier to pass up the potatoes and rice if you can look forward to something sweet for dessert. And, honestly, did you really think you could live without sweets? It's true that for some people, sugar has an addictive quality. It can trigger bingelike behavior. They intend to eat one piece of chocolate and end up consuming the whole box. If that's true for you, you should avoid sweets altogether. However, most of us can satisfy the urge for something sweet with just a few bites. So it's okay to keep some candy around; just make sure it doesn't contain starch—no cookies, cakes, pie, or pastries. Use sweets to satisfy your sweet tooth, not to fill up on. If you're still hungry, have more meat and vegetables. Here are two rules of thumb for eating sweets: Eat them for dessert only, and don't eat more than you can hold in the cup of your hand. Diabetes-Friendly Snacks and Appetizers [header=Sugar Substitutes] Sugar Substitutes [header=High-Fructose Corn Syrup] In the past 40 years, as we have become more overweight and diabetic, we have been consuming less old-fashioned cane sugar and more high-fructose corn syrup (HFCS). Is there anything about this sweetener that could be contributing to these problems? Actually, HFCS contains the same sugars that are in cane sugar: glucose and fructose. The only difference is that cane sugar is 50 percent fructose and HFCS is 55 percent fructose. There really isn't much difference, but even if there were, there's nothing unnatural about fructose. It's the main sugar in fruit. In fact, your body turns all sugar to fructose before metabolizing it. The problem is mainly an economic one: High-fructose corn syrup is much cheaper than cane sugar. It slashes the cost of manufacturing sweets, which makes them much cheaper for consumers. This is especially true of soda. Now kids can afford to buy pop in 32-ounce Big Gulp containers instead of 7-ounce bottles, which were typical in the 1950s and '60s. Drinking so much soda in one sitting would have been inconceivable in the past. Sodas are now the largest single source of calories for children and teenagers. They account for most of the increased sweetener consumption that has occurred in the past 40 years and are a major contributor to America's epidemic of childhood obesity.
global_05_local_5_shard_00000035_processed.jsonl/32322
Boston Scientific To Participate In Goldman Sachs 35th Annual Global Healthcare Conference NATICK, Mass., June 3, 2014 /PRNewswire/ -- Boston Scientific Corporation (NYSE: BSX) is scheduled to participate in the Goldman Sachs 35th Annual Global Healthcare Conference on June 10 in Rancho Palos Verdes, CA. David Pierce, senior vice president and president, Endoscopy, and Susan Lisa, vice president, Investor Relations, will participate in a 35-minute question and answer session regarding the company beginning at approximately 9:20 a.m. PT. This webcast is being hosted by Goldman Sachs.  A replay will be archived and available at beginning approximately one hour following the completion of the question and answer session. About Boston Scientific Denise Kaigler   508-650-8330 (office)  Corporate Affairs & Communications     Boston Scientific Corporation   Susie Lisa, CFA 508- 652-5345 (office) Investor Relations Boston Scientific Corporation SOURCE Boston Scientific Corporation More by this Source Custom Packages Start today. PR Newswire Membership Learn about PR Newswire services
global_05_local_5_shard_00000035_processed.jsonl/32333
Wink App API Wink is an app that syncs with home automation devices to adjust lighting, window shades, climate, key locks, and more. Wink sells a Wink HUB hardware component that accepts communications from devices in the following protocols: Bluetooth LE, Wi-Fi, ZigBee, Z-Wave, Lutron ClearConnect, and Kidde. The RESTful Wink API is hosted through Apiary and allows Wink devices to communicate with users, other apps, and the web in general. Wink API Home Automation Internet of Things OAuth 2 Followers (17) Developers (0) Sorry, no developers found for this API. API Mashups (0) Sorry, no mashups for this API. Source Code Sorry, no source code for this API. Sorry, no resources found for this API. Developers (0) Comments (0) Sorry, no mashups for this API.
global_05_local_5_shard_00000035_processed.jsonl/32335
TiKL Announces Talkray API to Enable In-App Collaboration and Communication Eric Carter, Contributing Writer, Dartsand Apr. 01 2013, 09:58AM EDT TiKL, maker of mobile apps Talkray and Touch to Talk, has announced the Talkray API that allows developers to integrate Talkray functionality with third party apps and platforms. The Talkray API enables one on one or group chat, group calls, push notifications, file transfer, and more in a cloud based platform. Although the API can integrate with a wide variety of apps, TiKL expects the largest group of adopters to come from the gaming industry. Accordingly, the API was announced at this year's Game Developers Conference. TiKL has done little to promote itself since inception; however, users have downloaded its apps over 28 million times. The Talkray API brings communications and collaborative functionality to existing apps. Accordingly, TiKL's user base should only increase with the release. Some of the most prominent venture capital names agree, as a new series of funding coincides with the API announcement. Currently, the Talkray API remains in private beta with no public documentation available. Those interested in signing up for the beta should visit the Talkray developer site. TiKL has announced that most of Talray's features are available via the API and common use case scenarios surround collaboration, leaderboards, group chats/calls, and real-time streams. Consumers expect more and more collaborative functionality within app experiences. Whether business users are updating CRM profiles, or gamers are attacking new missions; the expectation to connect to third parties and third party information have become commonplace. The Talkray API allows such functionality and could be utilized far and wide by developers around the globe.
global_05_local_5_shard_00000035_processed.jsonl/32353
| Give a Gift | • Digital Edition Literary MagNet Who can resist a good gimmick? When it comes to creative marketing on a tight budget, the editors of literary magazines and small presses are constantly coming up with new tchotchkes to promote their work—and not just the typical lapel pins, stickers, temporary tattoos, and bookmarks. The Gettysburg Review (www.gettysburg.edu/academics/gettysburg_review), the quarterly edited by Peter Stitt, has handed out free travel clocks and calculators at book fairs—no doubt so writers can keep track of the time and money spent submitting their work. The University of Nebraska Press, the distributor of Prairie Schooner (prairieschooner.unl.edu), promoted their new Flyover Fiction series with balsa-wood airplanes—and, as expected, the wings snapped in half almost immediately after assembly. Rebecca Wolff, the publisher of Fence (www.fencemag.com) and Fence Books, has customized wooden rulers with the Fence logo—to measure her magazine against the competition, perhaps? Heck, some folks have even been known to slap a Literary MagNet magnet or two on their fridges. But the promotional product dreamed up by J. D. Schraffenberger, the editor of Harpur Palate (harpurpalate.binghamton.edu), takes the cake. The Spring 2007 "Food, Hunger, and Appetite” issue of his semiannual journal will feature an edible poem written by Cole Swensen. "Though many might construe the edible poem as little more than a marketing gimmick,” Schraffenberger wrote in a letter explaining his plans, "I believe there are important critical questions that will be asked about such an object.” The first being, "What does an edible poem taste like, anyway?” An independent taste test of a sample edible poem, by Thom Ward, reprinted from Volume Five, Issue Two, of Harpur Palate on a two-and-a-half-by-four-inch piece of edible paper using edible ink, yielded the following gustatory comparisons: vanilla, egg whites, communion wafer, edamame pod…and regular paper. The first rule of performing is knowing when to leave the stage. Put another way: Always leave them wanting more. That old saw can be applied to literature, too, and serial novels in particular. Charles Dickens left the readers of his first novel wanting more—a lot more—for over a year and a half. The Pickwick Papers was released in monthly installments by the British publishing firm Chapman and Hall beginning in March 1836 and ending in October 1837, and it sparked enthusiasm for serialization that lasted through the Victorian era. (Only a thousand copies of the first installment were printed, but the print run for the last installment was forty times that number.) Since then, serial novels have gone the way of the corset, but there are signs of a comeback. The online magazine Slate (www.slate.com) published Walter Kirn’s serial novel The Unbinding in twice-weekly installments from March to June, and Unbridled Books, the independent press in Denver, is publishing a chapter of Marc Estrin’s novel Golem Song on its Web site, www.unbridledbooks.com, each week through October. H. Perry Horton, the editor of Ellipsis (www.waywardcouch.com/ellipsis/currentissue.html), the new monthly literary magazine published in Portland, Oregon, believes the return of the literary serial is key to reinvigorating popular interest in literature. "The trick, as we see it,” he wrote in the January issue, "is to provide readers with a dose of literature requiring a commitment similar to that of a television show or movie, something brief and digestible that still leaves you hungry for more.” (Perhaps Horton and Harpur Palate’s Schraffenberger should team up on a cross-promotional recipe.) In its first few issues, Ellipsis has featured serialized fiction by Steve Almond, Tara Blaine, Laird Hunt, Daniel Wallace, and others. It’s also published a six-part serial poem, an elongated form whose time may—or may not—have come. For slightly less patient readers, Ellipsis also publishes single-serving poetry and prose in each issue. Kevin Larimer is the senior editor of Poets & Writers Magazine. Reader Comments Article Permissions Literary MagNet (July/August 2006) © Copyright Poets & Writers 2015. All Rights Reserved
global_05_local_5_shard_00000035_processed.jsonl/32357
Beating Women, or Beating around the Bush, or ..... By : Edip Yuksel 4:34 of the Quran orders believers to beat their wives; so, Islam is a male dominant religion." Many of us have heard this criticism from Christians, atheists, agnostics, etc. Personally, every time I read 4:34, I felt that something was wrong. How does God, the Most Wise order us to beat our women? What kind of solution is that? It is in contrast to the verses in which God describes marriage: "Among His signs is that He created for you spouses from among yourselves, in order to have tranquillity and contentment with each other. He places in your heart love and care towards your spouses. In this, there are signs for people who think." Obviously, this mixed messages have bothered many contemporary translators of the Quran. To avoid the moral and intellectual problems, they tried to soften the word "beat" when they translate the verse 4:34. For instance, Yusuf Ali uses a merciful parentheses after "beat" to save women: Many tried to 'beat' around the bush to 'beat' the problem generated by the 'beat' of When I finished the Turkish translation (1991), this verse was on the top of my orange list to study carefully. Whenever I encounter a problem regarding the understanding of a Quranic verse, I remember 20:114 and pray accordingly: "Most Exalted is God, the only true King. Do not rush into (understanding) the Quran before it is revealed to you, and say, "My Lord, increase my knowledge" Almost all of the translations have mistranslated the four key words or terms of this particular verse. These are: "Qawwamune," "Faddallallahu ba"dahum ala ba"d," "Nushuzehunne," and "Fadribuhunne." In our late book, "Errors in Turkish Translations" ( Istanbul, 1992) we have discussed the real meaning of these words and the motivation and reasons for mistranslating them. Here, we will focus on the last word, "Fadribuhunne." A Famous Multi-Meaning Word The problem comes from the word "Idribuhunne" which we used to translate as "beat them". The root of this word is "DaRaBa". If you look at any Arabic dictionary you will find a long list of meanings ascribed to this word. That list is one of the longest lists in all the Arabic dictionary. It can be said that "DaRaBa" is the number-one multi-meaning word in Arabic. It has so many different meanings, we can find numerous different meanings ascribed to it in the Quran. • To travel, to get out: 3:156; 4:101; 38:44; 73:20; 2:273 • To beat: 8:50; 47:27 • To set up: 43:58; 57:13 • To take away, to ignore: 43:5 • To condemn: 2:61 • To seal, to draw over: 18:11 • To cover: 24:31 • To explain: 13:17 As you see, in the Quran alone we can witness the verb "DaRaBa" having at least ten different meanings. "DaRaBa" has also other meanings which are not mentioned in the Quran. For example, in the Arabic language, you do not print money--you "DaRaBa" money, you do not multiply numbers--you "DaRaBa" numbers, you do not cease the work--you "DaRaBa" the work. In Turkish we have many verbs similar to DaRaBa, such as "tutmak", "calmak", "vurmak" etc. In English we have two verbs which are almost equivalent to "DaRaBa". These are "strike" and "beat". Webster"s Dictionary gives fourteen meanings to the verb "strike": hit (against); ignite; (of snake) bite; (of plants) (cause to) take root; attack; hook (fish); sound (time) as bell in clock etc.; affect; arrive at, come upon; enter mind of; discover (gold, oil etc.); dismantle, remove; make (coin); cease work as protest or to make demands. The same dictionary gives eight meanings to the verb "beat": strike repeatedly; overcome; surpass; stir vigorously with striking action; flap (wings); make, wear (path); throb; sail against wind. In the beginning of this article (underlined) I deliberately used "beat" in three different meanings in a single statement just to show the variety of meanings in a single word. In English, when we order someone to "beat it" we mean "get out". Similarly in Arabic, when we order someone with the commend form of "DaRaBa", that is "iDRiB", we mean "get out". How Can We Find The Appropriate Meaning When we encounter a multi-meaning word, we select the proper meaning according to the context, forms, and common sense. For instance, if we had have translated "DaRaBa" in 13:17 as "beat" instead of "explain", the meaning would be ridiculous: ". . . God thus beats the truth and falsehood" Another example of mistranslation of 'DaRaBa' can be found in the translation of 38:44. All the translations (except Dr. Khalifa"s translation) inject a male-made story to justify their silly translation. Here is how Yusuf Ali translates the verse about Job: "And take in the hand a little grass, and strike therewith: and break not (the oath)." Yusuf Ali, in the footnote narrates the traditional story: "He (Job) must have said in his haste to the woman that he would beat her: he is asked now to correct her with only a wisp of grass, to show that he was gentle and humble as well as patient and constant." However, without injecting this story, we can translate it as the following: "Now, you shall travel the land to fulfil your pledge (that is to deliver the message). We found him steadfast. What a good servant! He was a submitter" Let's turn back to Additionally, the word "Nushuz" which is generally translated as "opposition" has another meaning which can be translated as degrees of disloyalty ranging from flirtation to sexual liaison. If we study 4:34 carefully we will find a clue that leads us to translate that word as "flirting or cheating" or "extramarital affair" (Any word or words that reflect the range of disloyalty in marriage). The clue is the phrase before "Nushuz" as reads: ". . . and observe God's commandments, even when alone in their privacy." This phrase emphasises the importance of loyalty in marriage life. Furthermore, the same word "Nushuz" is used in 4:128, but it is used to describe the misbehaviour of husbands not wives as was in 4:34. So, the traditional translation of "Nushuz", that is, "opposition" will not fit here. In vertical relations, "opposition" cannot be a double-edged behaviour. So, translators try to avoid this contradiction by ascribing just the opposite meaning of "opposition", i.e., "oppression" in verse 4:128. However, the meaning of "Nushuz" as "disloyalty" is appropriate for both cases described in 4:34 and 4:128. A Coherent Understanding When we read 4:34 we should not understand "idribuhunne" as "beat those women". We must remember that this word has many meanings. God gives us three ways of dealing with extra-marital-affair. In the beginning stage of such misbehavior husband should start from giving advice. If it does not work and she goes further and commit a proven adultery, that time husband has the right to strike them out (4:34 & 65:1). Let's present our suggestion for the translation of verse 4:34 "Men traditionally take care of women, since God has endowed each of them with certain qualities and men spend from their financial resources. The righteous women are obedient (to God) and during the absence (of their husband) they honour them according to God's commandment. As for those women whom you are experiencing a fear of disloyalty from, you shall first advice them, then (if they continue) you may desert them in bed, then you may strike them out. If they obey you then don't transgress against them. God is Most High, Supreme" Beating women who are cheating is not an ultimate solution; but 'striking them out' from your house is the best solution. And it is fair too. Editor’s Note: In addition to all the well written information from Mr. Yuksel (above), it must also be added that those who interpret the word “iddribuhhunna” in 4:34 to mean "physically beat" are in fact violating three Quranic principles, and they are: 1- God prohibits all aggression. To physically beat another person is an act of aggression no matter what justification anyone may have: “do not transgress, God does not like the aggressors” 2:190 2- God commands husbands and wives to treat each other with love and mercy, once again beating up the wife is not a merciful act: 3- In Sura 4 which is given the title "Women" and in verse 19 men are told specifically to treat their wives "bil-ma'ruf" which means with kindness. Needless to say, physically beating women does not exactly qualify for anyone's definition of kindness. 4- To soften the issue, some scholars have claimed that a husband may only beat his wife if she commits adultery. But when we examine this interpretation, once again we find that it contradicts Quranic law. In the case of adultery, God has already prescribed a fixed punishment of 100 lashes (24:2). The important issue here is that the same crime or sin should not entitle two separate punishments. If a wife commits adultery and is given 100 lashes, then her husband beats her as well, she would have received two separate punishments for the same sin.
global_05_local_5_shard_00000035_processed.jsonl/32378
[dm-devel] A step behind? Ok guys, please answer me to this doubt question, or i'll wast all my remaining time While multipath tools gives me random problems I *suppose* i could be a dm multipath target kernel problem. I'm doing some testing now using only the dmsetup tool in order to check at low level the multipath target. I recall my configuration: hp pc server dl380 qlogic 2312 kernel builtin driver single path (qlport_down_retry 1) hsg80 dual controller in multibus failover the fabric connected to both controllers slackware 10.0 kernel 2.6.10rc-2 udm-2 devmapper 1.00.19 i configured a unit on the hsg80 and it appears to the system as an active path /dev/sdb and a ghost path /dev/sda. so this is my table disk1: 0 71114623 multipath 1 queue_if_no_path 0 2 2 round-robin 0 1 1 8:0 1000 round-robin 0 1 1 8:16 1000 i begin some write operation on the disk (i have a task syncing every 1 seconds in order to stress the disk). When i fail manually the active path (for example restart the controller having it online) dmsetup status reports flag "F" for every path. I think it is normal, becouse hsg80 is not so fast in order to pass the unit online to the remaining controller. So when kernel try the alternate path it founds it is down (and fails it). Because the presence of queue_if_no_path the ouput will be queued and my process is not distrupted. I can see the growing queue whit dmsetup status disk1, but after some seconds the sync/writing process goes in D status, so is it normal or is simple a limit to the queuing? I begin to do a dmsetup message disk1 0 reinstate_path 8:0, and 8:16 alternatively and randomly (yes i think i can also reinstate a failed path and i'm aspecting the target retries and refails again, if it is not correct i think no multipath tools will be useful better then my manual commands) After some seconds i can see the queue shrinking, when it reaches 0, the sync/writing process wake up and all continue normally. This howewer is NOT the normal behaviour, and after some testing (randomly but never more then 10/20) i got the process distruption. I want to know if is it correct for me (or am i mad) assuming queue_if_no_path will never disrupt a process! If it is so, (and i think really it is), is unuseful for me passing nights stracing multipath tools and reading a lot of sources! In this scenario i'd like to have a good interpretation of kernel messages too: *) scsi error *) lost page error *) incorrect number of segments and so on Please help me! Nicola Ranaldo
global_05_local_5_shard_00000035_processed.jsonl/32379
Re: [linux-lvm] Disk Died - Ideas? Andreas Dilger wrote: > On Sep 25, 2001 11:02 -0400, Jeff Layton wrote: > > Well, of course, the last disk gave up the ghost (lots of SCSI > > errors, machine will not boot without unplugging drives from > > machine). I'm pretty sure you can guess what I'm going to ask :) > > Can I just unplug the last drive, bring the system up, don't run > > fsck on lvol1, mount lvol1, and try to pull as much data as I can > > off what's left of the filesystem? If this works, then I can just > > redo the PVs, the VGs, and the LVOLs and recreate the filesystem > > and move over what data I can recover. > Two ways to do it. I _think_ the latest release of EVMS will allow you > to have partial LVs like this. Are you sure that the LV was using space > on the last PV? If so it is less likely to work. > The other alternative is to take the output from "pvdata -avP <dev>" on > each remaining disk, and manually "dd" out the data from each disk. If > the LV was mostly consecutive PEs, then it will be easy, otherwise a lot > of work (you may want to write a tool if so). > PE 0 data starts at (pe_on_disk.start + pe_on_disk.size), and is in chunks > of PE size. The pvdata output will tell you which PE numbers belonged to > your LV, so let's say on the first PV this LV starts at PE 10, you want: > (pe_on_disk.start + pe_on_disk.size) + 10 * pe_size = byte offset of LV > This will probably be at least a multiple of 1024, but maybe 4096 (larger > will make for faster dd). Then, for the number of consecutive PEs on disk: > count=<number of consecutive IN ORDER PEs> * pe_size / 1024 = consecutive kB > dd if=/dev/pv1 of=<backup> bs=1024 skip=<offset #1 in kB> count=<count #1> > Do the same thing for the next set of consecutive PEs, with: > dd if=/dev/pv1 of=<backup> bs=1024 skip=<offset #2 in kB> \ > seek=<count #1> count=<count #2> > dd if=/dev/pv1 of=<backup> bs=1024 skip=<offset #3 in kB> \ > seek=<count #1 + count #2> count=<count #3> Sorry the late follow-up. I follow you so far (I think). The next step after copy these "blocks" using dd to some backup device is to rebuild the filesystem on the disks and then copy back the data from the backup device using dd (just reverse the procedure). Is this correct? (Sorry the novice question but I want to be sure I have the correct steps before trying this). Thanks very much for your help! > > Oh, by the way, this filesystem had no backups. The powers > > to be claimed they were working on a backup solution for us, > > but they didn't get one in place by the time this drive died. I know, > > I know. I screamed very loudly, made lots of enemies internally, > > but still no backups were ever done. > Never trust anyone w.r.t backups. I got burned this way as well. Also > make sure they have a RESTORE system, and not just a BACKUP system (i.e. > make sure they can get your data back from tape). > Cheers, Andreas > -- > _______________________________________________ > linux-lvm mailing list > linux-lvm sistina com
global_05_local_5_shard_00000035_processed.jsonl/32468
Holy Trinity Lavra, Sergiyev Posad The Holy Trinity Lavra or Troitse-Sergiyeva Lavra (Trinity-Sergius Monastery) is the most important monastery in Russia and the spiritual center of Russian Orthodox Christianity. Founded in 1345 by St. Sergius of Radonezh and containing his relics, Holy Trinity is located in the city of Sergiyev Posad (formerly known by the Soviet name Zagorsk) about 45 miles northeast of Moscow. According to Lonely Planet Russia & Belarus, "If you have time for just one day trip out of Moscow, this is the obvious choice." UNESCO declared it a World Heritage Site in 1993, calling it "a fine example of a working Orthodox monastery, with military features that are typical of the 15th to the 18th century." History of Holy Trinity Lavra The Holy Trinity Monastery was founded in 1345 by St. Sergius of Radonezh (1322-92), a highly revered monk and the patron saint of Russia. The monastery started as a simple wooden church in an isolated area, but soon grew much larger. Originally a hermit, Sergius soon attracted many followers and granted their request to become their father superior. In 1355, Sergius introduced a charter for the monastic community, which led to the expansion of the monastery with buildings like a refectory and bakery. Sergius' charter was used as a model for more than 400 monasteries founded by his followers throughout Russia, including the celebrated Solovetsky, Kirilov, and Simonov monasteries. St. Sergius was an important figure in secular Russian history as well. He blessed Dmitri Donskoi before the important Battle of Kulikovo (1380) against the Tatars, and even sent two of his monks to help. The battle was a success, but the monastery was devastated by fire in 1408 when a Tatar unit raided the area. St. Sergius was declared patron saint of the Russian state in 1422. The same year, his relics were interred in the monastery's first stone cathedral (Cathedral of the Holy Trinity), built by a team of Serbian monks who had found refuge in the monastery after the Battle of Kosovo. The greatest icon painters of medieval Russia, Andrei Rublev and Daniil Chyorny, were summoned to decorate the cathedral with frescoes. It soon became traditional for Muscovite royals to be baptized in this cathedral and to hold thanksgiving services here. In 1476, Ivan III invited several Pskovian masters to build the Church of the Holy Ghost. This graceful structure is one of the few remaining examples of a Russian church topped with belltower. The interior contains the earliest specimens of the use of glazed tiles for decoration. In the early 16th century, Vasily III added the Nikon annex and the Serapion tent, where several of Sergius' disciples were interred. As the monastery grew into one of the wealthiest landowners in Russia, a village (posad) sprang up near the monastery walls. It gradually developed into the modern town of Sergiyev Posad ("Settlement of Sergius"), which was known as Zagorsk in the Soviet era. In 1550s, a wooden palisade surrounding the cloister was replaced with 1.5 km-long stone walls, featuring 12 towers, which helped the monastery to withstand a 16-month Polish siege in 1608–1610. A shell-hole in the cathedral gates is preserved as a reminder of Wladyslaw IV's abortive siege in 1618. Numerous structures were added to the Holy Trinity Monastery in the 17th century, including a small baroque palace of the patriarchs, noted for its luxurious interiors, and a royal palace, with its facades painted in checkboard design. The Refectory of St. Sergius, covering 510 square meters and also painted in dazzling checkboard design, used to be the largest hall in Russia. The five-domed Church of John the Baptist's Nativity (1693–1699) was commissioned by the Stroganovs and built over one of the gates. Other 17th-century structures include the monks' cells, a hospital topped with a tented church, and a chapel built over a holy well discovered in 1644. In 1744, Empress Elizabeth conferred on Holy Trinity the dignity of a lavra, making the metropolitan of Moscow also the Archimandrite of the Lavra. Elizabeth particularly favoured the Trinity and annually proceeded on foot from Moscow to the monastery. Her secret spouse Alexey Razumovsky accompanied her on such journeys and commissioned a baroque church to the Virgin of Smolensk, the last major shrine to be erected in the lavra. Another pledge of Elizabeth's affection for the monastery is a white-and-blue baroque belltower, which, at 88 meters, was the tallest structure built in Russia up to that date. Its architects were Ivan Michurin and Dmitry Ukhtomsky. Throughout the 19th century, the lavra maintained its status as the richest monastery in Russia. A seminary founded in 1742 was replaced by an ecclesiastical academy in 1814. The monastery boasted a supreme collection of manuscripts and books. The medieval collections of the lavra sacristy attracted thousands of visitors. The monastery maintained several sketes in Sergiyev Posad, one of which is a place of burial for the conservative philosophers Konstantin Leontiev and Vasily Rozanov. After the Russian Revolution (1917), the Soviet government closed the lavra and assigned its buildings to civic institutions or declared museums. In 1930, monastery bells, including the Tsar-Bell of 65 tons, were destroyed. During this period many valuables were stolen and sold, lost, or transferred to other collections. Following Joseph Stalin's controversial conversion during World War II, the Holy Trinity Lavra was returned to the Russian Orthodox Church in 1945. On April 16, 1946 divine service was renewed at the Assumption Cathedral. The lavra remained the seat of the Patriarch of Moscow until 1983, when he settled in the Danilov Monastery in Moscow. Since then, the monastery has continued as a prime center of religious education. Important restoration works were conducted at Holy Trinity in the 1960s and 1970s, and the monastery was added to UNESCO's World Heritage List in 1993. What to See at Holy Trinity Lavra The heart of Holy Trinity Lavra is the Holy Trinity Cathedral (Troitsky sobor), built in the 1420s and distinguished by its gleaming-white exterior topped with gold domes. It contains the revered holy relics of St. Sergius in its southeast corner. A memorial service for the saint is conducted in the cathedral all day, every day. The interior, lit by oil lamps, is covered in icons that are largely the work of the great medieval painter Andrei Rublev. Behind the Trinity Cathedral is the Vestry (Ritznitsa), which contains the monastery's rich treasury. On display are 600 years worth of donations from the rich and powerful — jewel-encrusted vestments, fine tapestries, solid-gold chalices, etc. Admission is R150; open Tues-Sun 10-5:30. Another important church is the Cathedral of the Assumption (Uspensky sobor), modeled on the church of the same name in Moscow. It was finished in 1585, with money donated by Ivan the Terrible as penance for killing his son. Services are held here in the summer, but it is often closed at other times of the year. Outside the west door is the grave of Tsar Boris Godunov, the only tsar not buried in Moscow's Kremlin or the Peter and Paul Cathedral in St. Petersburg. Nearby is the Chapel-at-the-Well (Nadkladeznaya chasoynya), built over a miraculous spring that is said to have appeared during the Polish seige. It is topped by a five-tier baroque bell tower, which took 30 years to build. It once had 42 bells, the largest of which weighed 65 tons. Taking over the hosting of services from the Assumption Cathedral in the winter is the Refectory Church of St. Sergius (Trapeznaya tserkoy Sy Sergia). A huge block-shaped structure with wallpaper-like paint and a lavish interior, this was once a dining hall for pilgrims. The green building next door is the metropolitan's residence. The Church of the Descent of the Holy Spirit is a little 15th-century church with a bell tower under its dome. A graceful imitation of Trinity Cathedral, it is used only a special occasions. Among its interior features is the grave of the first Bishop of Alaska. Getting There Trains run to Sergiev Posad about every half-hour from Moscow's Yaroslvl Station. The journey takes about an hour and costs R30. Look for any train bound for Sergiev Posad or Alexandrov. The fastest option is the daily express train to Yaroslavl (R90 for 1st class; R60 for 2nd class), which takes 55 minutes. Quick Facts on Holy Trinity Lavra Site Information Names:Holy Trinity Lavra Categories:monasteries; World Heritage Sites Dedication: Holy Trinity and St. Sergius Status: active Visitor and Contact Information Coordinates:56.310278° N, 38.129444° E Address:Sergiyev Posad, Russia Lodging:View hotels near Holy Trinity Lavra 1. Lonely Planet Russia & Belarus (2003 ed.), 222-24. 2. Holy Trinity-St. Sergius Lavra - official website 3. Architectural Ensemble of the Trinity Sergius Lavra in Sergiev Posad - UNESCO World Heritage List 4. Troitse-Sergiyeva Lavra - Wikipedia 5. Sergius of Radonezh - Wikipedia More Information © Alexis Moussine-Pouchkine © Holly Hayes © Holly Hayes © Marcella © Alexis Moussine-Pouchkine © Father Ilya Gotlinsky © Eliza Cole © Martin Gray © Holy Trinity Lavra © Marcella © Marcella © Marcella © Alexis Moussine-Pouchkine © Alexis Moussine-Pouchkine © Alexis Moussine-Pouchkine Map of Holy Trinity Lavra, Sergiyev Posad Below is a location map and aerial view of Holy Trinity Lavra. Using the buttons on the left (or the wheel on your mouse), you can zoom in for a closer look, or zoom out to get your bearings. To move around, click and drag the map with your mouse.
global_05_local_5_shard_00000035_processed.jsonl/32471
SailNet Community - Search Results Advanced Search Showing results 1 to 1 of 1 Search took 0.00 seconds. Search: Posts Made By: TomandKaren Forum: Living Aboard   01-10-2004 Replies: 11 Views: 3,392 Posted By TomandKaren Washing clothes Can anyone tell me what is the best method/unit of washing clothes and towels on board? The local laundry is not where we want to spend our time, other than occasionally for sheets etc. Showing results 1 to 1 of 1 For the best viewing experience please update your browser to Google Chrome
global_05_local_5_shard_00000035_processed.jsonl/32499
This has boy/boy and boy/girl. If you don't like one of them, don't flame me. Just don't read this. I've changed a couple of names, but as nearly as I can remember, this is how it actually happened: Davis and I became best friends in elementary school. He had been held back a year (back when they still did that sort of thing), and I was one of the youngest in our grade, so he was a year and a half older than me. He definitely hit puberty first, showing me when he got his first pubes. Soon, he had a little patch of them. The summer after he showed me his first pubes, when I got my new swim briefs for the summer swim team, I was pleasantly surprised by how much my own dick had grown. The size had sort of snuck up on me. When I tried on my new team briefs and saw how I filled them, I got a boner; and I got the boner, I was really impressed -- it pointed so far off to the side it almost reached my hipbone. Mom hadn't bought me new underwear in ages and I guess I had slowly stretched my old ones so that I hadn't noticed. But I had sure noticed my new equipment now. I started getting boners all the time. I got them wearing my speedos at home in front of the mirror. I played with my dick almost every time I went into the bathroom, and was in the bathroom more often. I tried masturbating, determined to have my first orgasm, but when I did "get the feelings", nothing came out. That didn't stop me from playing with my dick or from daydreaming girls, all the time. My family would be watching TV, and I'd be pretending to sleep on the couch, on my stomach to hide my erection because I was dreaming about girls. My daydreams were pretty tame -- I didn't know enough for them to be otherwise. They were usually about running into a girl on vacation or at the beach and her coming to me in the night, naked after all the parents were asleep. I didn't daydream much about the girls I knew because they were too young and, well, I didn't think any of them would "do it." I had two younger sisters. The oldest was a pain in the butt and I'd sooner daydream about strangling her than doing anything sexual. However, my youngest sister was impish and cute. I tried to "accidently" walk in on her taking a bath, but she always locked the door. I did daydream about Lisa, Davis' little sister. She was a year and a half younger than me and had thick, curly brown hair. Her swimteam suit -- she and Davis were on the summer swim team, too -- revealed breasts which were hardly more than pointy nipples, but she had long legs and arms for her age; and truth was, I hung out at Davis' house at the start of that summer, partly because of her. I daydreamed about other girls, though. Girls with breasts. I daydreamed about them so much that it was driving me crazy. That changed one afternoon when Davis and I were watching a Cubs game on TV at his house. They had a daybed kind of couch in their den, and I was on my stomach with my head toward the TV. Davis was on the daybed behind me. Lisa was sitting crosslegged in a chair a few feet away, facing the TV. Okay, at this point, I should tell you that Lisa was really, really quiet. She just didn't talk much, at least around me. She didn't have a lot of friends and none lived close by, so she tended to hang around with Davis and I when Davis let her. He generally let her, I think because their father had died several years before and he sort of looked after her. Anyway, that afternoon his mom had gone somewhere. Davis rolled on me, cocking a leg over my butt. I didn't think much about it. Guys that age, at least back then, sort of lay all over each other when they were just lying around. But then I noticed a hardness against my butt. Davis had a hard on. We were in loose shorts and I felt it clearly. He rubbed it on me. That annoyed me, sort of, the way I'd get annoyed with a dog trying to hump my leg. I glanced at Lisa. She was watching from the corner of her eye. I sorta rolled my eyes, like, "really!" and she looked away. I had been about to shrug Davis off and suggest we go outside when Davis literally moved on top of me and the hardness of his boner settled in my butt crack. I got a surprising little jolt of sensation out of that. That, and from his breath on the back of my neck. Davis was a bit of a stud at his age, and the weight of his body actually felt pretty good. The rubbing in my buttcrack certainly did. He tried to move without it being obvious what he was doing. But soon I felt his dick throbbing between my butt cheeks and a moment later, he hurridly left the room with his hands over his crotch, saying that he had to hit the john. I felt my butt with my hand because it felt damp, and sure enough, there was a wet spot. I think Lisa saw it. She flushed a little and looked away again. That night, for the first time, I daydreamed about guys instead of girls. I daydreamed about Davis, actually. I daydreamed about lying on top of him like he had on me and rubbing my dick in his buttcrack. I stuffed my pillow under me and humped it, imagining it was Davis' butt. When I came, it was like I'd never come before. I shot. Reaching down between me and my pillow, I felt my first viscous boy juice. I rolled to my back and turned on the light. It was clear on my fingers. I smelled it, and liked how it smelled. I tasted it, and I thought it tasted okay. My pillow was a mess, though. I cleaned it and me as well as I could with some tissues, rolled the pillow over to sleep on, and then went to sleep thinking I was going to try that again. But maybe with a towel on the pillow. I started daydreaming about Davis, and another friend, Jeremy, and other friends. I daydreamed about us in our Speedos rubbing against each other.I started noticing boys' butts at swim practice; and not just their butts, but their bodies and faces as well. Changing with everybody for practice one morning, it finally dawned on me that we could even rub on each otheer naked. I kept waiting for Davis to rub on me the way he had before, because I figured I could roll over under him and we could rub together. But Davis didn't try. I even lay on the daybed exactly like before. Nothing. So finally, after waiting for what seemed like a week, I decided to take the initiative. I got the opportunity one afternoon when he and I were alone at his house. He was on his stomach on the floor, watching some rerun on TV -- I wasn't paying attention to the TV because I was looking at his butt and growing hard as a rock, and building up my courage. Finally, I got off the couch and knelt astride his butt. And then I lay down onto him, pressing my upturned cock down into his crack. Davis tensed under me. My cheek was against the back of his hair -- he had long, sandy-blonde hair -- and I remember thinking he smelled good. Very slowly, I rubbed my hardon in his crack. His butt cheeks clenched. I rubbed more firmly. He sort of rubbed his butt up against me. "You wanna get naked?" I asked in a whisper? behind his ear. He nodded, silently. Davis wasn't as quiet as his sister Lisa, but he didn't always say much. I climbed off and stood up. He rolled onto his butt and his eyes locked onto the tent in my shorts. He had a boner, too. It pointed up his belly to the waistband of his shorts. On impulse, I placed my bare foot on it. Davis' eyelids drooped and his head fell back. I kept my foot there, rubbing the underside of his cock, and pulled my shirt off. "Wait," he said. "Let's go to my room." I stepped back to let him get to his feet. He tented even more than I did. I followed him with my shirt in my hand, watching his butt flex under his shorts as he walked. We got into his room, and he locked the door behind us. He leaned back against it, and his eyes dropped to my tent again. So I shoved my shorts and underwear off my hips and let them drop to the floor. Davis swallowed hard and licked his lips dryly. He pushed down his shorts and underwear, stepping out of them. Then he stepped up to me in just his shirt, his dick wagging. He had a good one, too. Thicker and longer than mine -- mine was, even back then, only on the long side of average. Of course, at that age, being on the edge of purberty and all, our dicks seemed huge on our bodies compared to what they had been only a year or two before. So anyway, I thought his dick looked awesome, literally. He started stroking it. I started stroking mine. He stepped even closer. "I'll do yours if you do mine," he said in a thick voice. I took my hand from my dick, and he closed his around it. My breath caught and my jaw dropped. "Shit!" he murmured. I was speechless. His hand felt incredible. "Your skin his hot," he said in a whisper. He slid my skin up and down my shaft and my knees almost buckled. "Shit, you're hard!" he said. I put my hand on his strong shoulder to steady myself. "Put your hand on mine," he told me. So I did. I lifted it on my palm and closed my fingers around it. Now my dick has always been pretty straight. His had an upward curve, and it was thick. I immediately noticed the same things about his that he had notcied about mine -- the heat, the surprising hardness -- but also the thickness. Hold his dick made mine grow even harder. At least it felt like it. We stroked one another, a little awkwardly at first. We're both right handed, so Davis moved around to my right. His left shoulder went behind my right shoulder. I felt his chest through his shirt against the back of my shoulder; he was a little taller than me. I felt his left hand slide onto my butt. He had a big hand. I liked the feel of it on my butt. The sides of our heads were almost touching. "Mikey," he asked in a whisper. "Can we try some other things?" "Lay down on my bed." I was reluctant to let go of his cock, but he let go of mine, so I sat on the edge of the bed. Davis pulled off his shirt and stepped up to me so that his dick wagged at my chest. "Get up on the bed, on your back," he told me. I backed onto the bed and lay back. Davis pulled my legs apart, and then climbed onto the bed to kneel between them. "You can't tell anybody about this," he said, looking down at me. MY eyes were on that thick cock of his. I shook my head. "No, dude. I'm not gonna tell anybody." "I'm serious," he said. "Yeah. Me, too." He nodded. His eyes dropped to my cock, which was pointing up my belly, and he bent down over it. I heard him sniff. His lips touched the underside of my dick and my dick jumped. He lifted my dick and stuck his tongue out, touching my glans. I felt the wetness of his tongue. He bent lower and I felt his mouth close around my dick. I grabbed handfuls of bedspread. Davis sucked, and it felt good. But neither of us knew what we were up to. As he sucked, though, his tongue rubbed under my dick. That felt real good. I moaned. Davis stopped, and holding my wet dick in his hand, he looked up at me. He wiped his mouth with the back of his other hand. "How is it?" I asked. He grinned. "Awesome." Releasing my cock, he moved up over me, supporting his weight on his hands like he was doing a push up. His cock laid onto mine. He rubbed it there. Supporting his weight on his left hand, he closed his right around both of our cocks. He tried stroking them together. It didn't do much for me and I don't think it did for him either. He went back onto both hands over me and rubbed my cock and balls with his. His legs were between mine so all our contact was right there at our equipment. He pumped his hips and our cocks wobbled. He lowered himself down onto me. As his face came close, his eyes dropped to my lips. It was like something off TV; I knew he was going to kiss me. I'd never even kissed a girl, much less a boy. When his lips touched mine, I closed my eyes. Our lips pressed. My lips responded. Soon we were really kissing. He grabbed my shoulders and I wrapped my arms over his back. Our dicks pressed between us. I felt his balls drape mine. Davis pressed his cheek to mine and his breath rasped in my ear. I was rasping a bit myself, The two of us started making the soft grunts of kids being pleasured. He ground his pelvis on mine and my hands drifted down his back to grab onto his butt. I could feel his muscles moving, but his skin there was baby-soft. I know that starting out it's supposed to feel better on top, but honestly, Davis on top of me was incredible. The weight of his firm naked body on mine, his hips grinding between my legs, the feel of his butt flexing in my hands, the press of his balls on mine, our dicks rubbing between our bellies, his breath on my neck... I completely zoned out. Davis humped and grunted, and I think I actually started gurgling. My hands roamed his back, feeling his muscles. My hips ground, too, but Davis was driving, and he drove me into an orgasm; the very first orgasm that someone else had given me. He gave it to me good. I pressed my face hard against his and clutched the back of his shoulders. I started whimpering and Davis grunted harder, almost growling. Things got wet between our bellies. He slowed. He stopped. The skin of our wet bellies slid with our rapid breathing. Davis pushed up and rolled off me onto his back. "I can't believe we did that," he murmured. "Yeah," I agreed. He sat up and got the box of tissues from his bedside. He pulled out several for himself and handed the box to me. I pulled out several. We cleaned ourselves silently. I was embarrased by what had happened and the intensity of it. I felt guilty because it was, well, gay. Davis got up and tossed his tissues in his trash, I did the same. We dressed without saying a word. We went out to their den. I thought about going home. But then I thought that if I did, I might not be able to face Davis again. It seemed better to stick around for some normal time. It was hot outside and the den was the coolest room in their house because of a window air conditioning unit. The TV was showing old movie. I lay down on the day bed. Davis lay down on the floor. I fell asleep. We woke when his mom came home. She walked through the den and said, "Hi!" I realized it was late. "I should go," I said, getting up from the couch. Davis got to his feet, too, and nodded. He glanced toward the kitchen where his mom had gone, then came close to me. Real close. My dick started getting hard, instantly. "Mikey," he whispered. "How about sleeping over here tonight?" My dick got harder. The regrets I felt earlier after we did what we did quickly faded from my memory. "We can sleep naked," he whispered. "If you want to." I nodded. Davis grinned, glanced toward the kitchen, then gave me a quick peck on the lips. Our faces lingered close together, and I got really hard. But his mom was like, right there in the kitchen. So I gave him a parting smile, and when I did, I realized that I felt sort of happy. I went out the front door just as Lisa came up the steps. Her eyes locked on the bulge in my pants. I turned away, too late. "Hi, Lisa!" I called, jumping off the side of the steps. "Bye, Lisa!" I was back before supper, and as we set the table for supper, Davis kept grinning. I finally whispered to him, "Quit smiling or your mom will know we're up to something." He laughed and motioned for me to follow him. I did to his room, and he locked the door behind us. Then he pulled down the front of his shorts, and his erection popped out. "Look! I've been hard ever since you left!" Staring at it, I began to get hard, too. I pulled down the front of my shorts like he had done. Davis stepped up to me and grabbed my growing boner. I grabbed his. We stroked. His dick was just as warm as earlier, maybe warmer -- it felt really hot. "I've been thinking," he whispered in my ear. "Let's try a sixty-nine." "What's that?" He nodded toward the bed. "You lay one way and I lay the other and we suck each other's dicks at the same time. Want to try it?" I was ready to try anything by that point. "Do we have time?" "Maybe. We can leave our shirts and shoes on. Just pull down your pants." He knelt up on the bed and pulled his shorts and underwear down to his knees. His butt was as hairless as mine, but lean and muscled. I had more of a bubble butt. Davis lay down on his side and waved his dick at me as he scooted back on the bed to make room for me. "You lay the opposite direction so your dick is in my face and mine's in yours." So I did like Davis had done. I knelt up on the bed, pushed my shorts and underwear down to my knees, and then lay down facing him, scooting so that his dick was like he said, in my face; and my dick was in his. He grabbed mine before I had even settled. I got my first close-up look at his big, fat, upward curving dick. Davis had pale skin, but his dick and balls were deeply pink. It made them look bigger. The pubes in tight little patch had some red highlights. His scent hit me -- mild and slightly tangy like boys in early adolesence sometimes get. I liked it. I took a deep breath close to his scrotum. I hadn't touched his balls yet, so I did. The skin of his scrotum was soft and moist. I lifted an egg-shaped testicle on my fingers. It struck me that Davis with his smooth ivory legs and ruddy balls and dick was actually sort of pretty down there in an exciting sort of way. Davis mouth closed around my dick. His mouth was warm, like his dick. That's what I'll always remember about Davis -- how warm his body always was. He sucked me into his mouth, and I closed my eyes and my head rolled, face first into his balls with a "Mumph!" He pulled off long enough to say, "Suck mine, too." It was difficult to concentrate with him sucking my dick like that, but I closed my hand around the base of his warm dick and sucked up his like he had mine. He tasted slightly salty, but mainly I remember how surprisngly little taste there was and how rubbery his dick felt in my mouth. And he was a pleasant mouthful. I got into it pretty quickly. He must have leaked some precum because I soon got that salty, astringent taste going on the back of my tongue. I liked it. Davis sucked and I sucked and I got happy as a kid on a tit -- well happier, actually. I was happy at both ends. I liked sucking Davis. I really did. And I sure as hell liked him sucking me. It's funny how contented I felt. Maybe it has something to do with the sucking reflex. My dick felt like it was getting harder and harder because of Davis' sloppy sucking, At the same time, I was sucking him deeper and deeper into my mouth. Neither of us really knew much about what we were doing, of course. For example, we didn't know to bob our heads. But we did learn what magic a tongue could do; we learned that right away. I came first, but hadn't finished before Davis started shooting into my mouth. I swallowed naturally enough, and Davis' stuff didn't taste bad. His semen was pretty clear back then like mine was. We continued sucking, gently. naturally, until we relaxed pretty completely. I almost dozed off with his dick in my mouth, but then Davis rolled away onto his back. "We should get back out there," he said. "Mom's gonna be looking for us." So I got to my feet and pulled my shorts up. Davis did the same. He nudged me. "You've got a great dick," he said. "So do you," I told him. He grinned. "Really?" He touched my chest lightly, almost like a girl might. "I'd been thinking about us doing stuff like this for a long time, Mikey," he told me. "I can't believe we're actually doing it. Do you like it?" "Well, yeah!" He looked into my eyes with this sort of earnest look, and leaned in to give me a soft kiss on the lips. I had this feeling that Davis was getting a crush on me. I wasn't entirely ready to be gay, though. Lisa wore an old t-shirt to supper. It was a little tight on her, and I kept checking out the small mounds on her chest. They drew my eyes. I didn't really look much at Davis' mom, though. She was pretty hot for her age, but I wasn't really into MILFs. Never have been. Lisa snuck peaks at me, and I wondered if she'd caught me checking out her rack-to-be. Or, did I have cum on my face or something. I felt over my face but everything felt normal. One of the things I had liked about sleeping over at Davis' house was that his mom and sister liked to stay up late, and I liked to stay up late. Davis, though, liked sleeping. That night, he didn't wait for even his normal bedtime, but instead, dragged me off to his bedroom really early. "We're tired, Mom," he told her when he gaver her a good night kiss. "Did a lot today and got a big workout in the morning." Lisa glanced in my direction because she knew I liked to stay up late and that swim practice wasn't going to be anything special. I shrugged. Her eyes went to Davis' shorts. He had a boner. I just hoped his mom didn't notice. We brushed teeth, and took a bedtime whiz -- Davis had trouble because of his hard on. I had one, too, by the time we got to his room and he locked the door behind us. We stripped in a flash. Davis pulled back the covers on his bed and motioned me to get in. "I'll get the light," he said. So I crawled into the bed and Davis turned out the light. The hall light was on, brightly, and light from under the door glimmered off Davis' hairless body as he padded to the bed and crawled in beside me. He pulled the covers over us and pressed his naked body to mine. He kissed me, and I kissed back. Davis crawled on top of me and pushed his tongue into my mouth. My boner got even harder. Davis liked kissing, and he was damn good at it for a kid. Like we had done that afternoon, I opened my legs to him and he settled between them, pressing our dicks between us, pressing his balls down on mine. I ran my hands up and down his back to feel his muscles as he ground his dick beside mine. Our tongues went back and forth between mouths. We ground. We kissed. I came. Davis came. But he stayed on top of me. We talked in whispers about how good it felt and whether Jeremy Barnes might do stuff like this with us because he was hot (Davis' words), and things like that. I never got completely soft and neither did Davis. There was something magical about how our naked bodies fitted together with him on top of me. We were soon kissing and grinding again. I came a second time, but not Davis. He kept going and I stayed hard and actually came again, right before he finally did. I had to work to come that time; it felt like my balls were coming up through my dick. Davis relaxed on me and I stroked his back and we fell asleep with him still on top of me. I woke in the night with Davis spooning me from behind and there was something comfortable about us sleeping that way. I woke again later laying half-on Davis, my leg over his, my arm across his chest, and my face nuzzled in to the side of his neck. His arm was behind me and his hand rested on my hip. I woke in the morning just after sunrise because Davis was kissing me. He rolled me onto my back and we went again. We came after a while, but our hardons didn't go down because we needed to piss. I wasn't much more than a kid, actually. I barely had any pubic hair. But it was honestly one of the most pleasant nights of sex in my life. It was definitely a good way to start my sex life. It gave me good expectations as to how exciting, and yet comfortable and intimate, sex with a friend can be. I think if it had been any different, then the regrets I had earlier the day before might have come back. As it turned out, I had no regrets that morning. I did, however, have a sticky body. So did Davis. His mom never said anything about the sheets, probably because teenage boys have wet dreams anyway. We tried to remember to keep a washrag or two handy after that. Davis' mom was a teacher, and though she stayed home that summer, she was often away. When Lisa was around, Davis basically ignored her. It's not like he kissed me in front of her or anything like that, but we did do some pretty sexy wrestling. I think I would have been happy just frotting (that is, grinding cocks together) with Davis on top of me forever, with maybe an occassional sixty-nine for variety, but Davis wanted to try something else. He mentioned it once when we were humping away on each other, but I was too busy to think about it. He brought it up again a few days later on an afternoon when his mom and Lisa were out. We had just stripped naked in his room, stroking and looking each other over. "Want to try buttfucking?" he asked. My eyes dropped to that big cock of his. "I don't know," I said doubtfully. "You can do me first," he offered. "And if you don't like it, we don't have to do it." Well, I had been looking at his butt a lot more lately. So I bit my lip and nodded. "Great! We'll need some Vaseline." I never did ask how he knew that. It wasn't from trying it with anybody before because I was his first just like he was mine. He disappeared down the hall to his mom's bathroom and came back with his boner wagging and a small container of Vaseline in his hand. "Here," he said, pulling off the lid. "Put some on your dick." Hesitantly, I swiped a small amount onto my fingers. "Rub it over the end and down the sides," he told me. I did. He took some and rubbed it into his bottom. Then he set down the Vaseline and dropped down to all-fours on the floor. If I hadn't been hard before, I would have gotten instantly hard looking at Davis' waiting, naked, butt. His deep pink balls hung down between his white legs, and the cheeks of that smooth, white, muscled butt were slightly apart. I almost dove onto him. Dropping to my knees, I placed the end of my dick on his pucker. Holding it firmly in place, I pushed my hips forward. My glans or dickhead is bigger than my shaft. It popped inside and the tight ring of Davis' sphincter closed behind it. "Oh," he murmured. "Is it okay?" "Yeah. Just feels weird." "Looks weird," I told him. Actually, it looked hot. I eased my hips forward and watched as my shaft disappeared inside him. At the same time, I felt his tightness ease down it. He was hot inside. "Oh," I murmured. "Is it okay?" he asked. I pulled my hips back and pushed them forward, feeling his tightness pass up and down. "Yeah," I told him. "It feels good." I pushed all the way in until just a little spot of my dick showed between his butt cheeks. It felt so good, I ground in and his tightness squeezed the base of my shaft. "Oh, shit!" I murmured. I made a tentative pump or two, and then instinct took over, and I began to thrust. Fucking is different from frotting and it's different from sucking, too. Fucking, going balls deep, was awesome. It was amazing to watch my dick while at the same time experiencing the sensations. But as the sensations grew, I quit watching and bent over Davis. I wrapped my arms under him, hugging on. I started humping in earnest, driving in each little thrust. Soon my lap was making slapping sounds against Davis' butt. My thrusting drove Davis down onto his stomach, taking me with him. When my legs fell outside his, his butt fit under my loins perfectly. I slid my arms up under his shoulders, grabbed on, and fucked. I know I grunted. Davis was grunting, too. It felt unbelievable. When I came, the sensation of pumping my cum deep inside him was like the perfect ending. When I was done, I collapsed onto him. "That," I murmured, "was fucking awesome." "I want to try," Davis said. Reluctantly, mostly because I felt so mellow, I pushed up off him and onto my knees. Davis got to his feet, and his dick was still rock hard. It wagged over to where he had set down the Vaseline, and back. He knelt beside me and held out the jar for me to take some and rub it into my butt while he rubbed some on that fat dick of his. "Mikey," he said quietly. "I want to try it different? I mean, when I lay on top of you and we rub our dicks together, I wonder what it would be like if I were inside you." "You want me to lay on my back?" "Yeah. You can get on the bed if you want, but don't get Vaseline on the bedspread." "Get the washrag," I told him. "We can put it under my butt." We got to our feet. I lay down on his bed onto my side, then pulled my legs up so I could roll to my back without getting my butt on the bed. I held my knees to my chest and waited for Davis. He grinned. "Hold on," he said. He grabbed one of his pillows, covered the middle with the washrag, and shoved it under my butt. I set my feet down on the bed. "Not yet," Davis said. "Keep your legs up until I put my dick in." I pulled my legs back up and Davis scooted his dick up to my butt. What makes a dick hard to take is the width more than the length. I was young and limber, and usually young guys can take each other pretty well, but I was a virgin and that cock of Davis' was thick for our ages. "Shit! Shit!" I said when he started to push in. "Take it out!" Davis pulled out. "Did it hurt?" he asked in surprise. "Yeah it hurt!" I said, catching my breath. "I'll go slower," Davis promised. "I'm not so sure," I told him, reaching down to feel my butt. I touched myself tenderly. My sphincter was so slippery that my finger slipped in. I rubbed it around inside. I'd never done that before. "Yeah," Davis encouraged. "Get your bottom all relaxed." He must have seen that I wasn't exactly relaxing. "Here," he said. "I'll do it." I pulled my finger out and let Davis slip his in."Relax," he told me. I closed my eyes and laid my forearm across them. I did my best to relax my stomach and insides. Thinking back on it, Davis was surprisingly gentle and patient for a guy his age. He moved his finger in and out with one hand and gently rubbed on my balls and dick with his other. Not only did I relax, but I began to get hard again. I felt his breath on my balls. He licked them. But he didn't suck me. I didn't blame him; my dick had been up his butt. He rubbed his finger in my butt and licked my balls and stroked my dick until it was hard. He nuzzled under my balls, rubbing his chin and nose on my perineum. I started feeling a lot better. I think having a hardon helped because Davis begin touching something inside me that really felt good to have touched. "Umm," I murmured. He pulled out and then put his finger back in. It felt thicker. I peeked from under my arm. "I'm using two fingers," he told me. I nodded and closed my eyes again. I moaned softly when it felt good. When Davis pulled his fingers out again, I guessed he was about to try his dick again, and I purposely kept my insides relaxed. Davis rested his hand from my balls and dick as I felt the dull thickness of his cockhead press at my opening. He pushed in and I gritted my teach but kept my bottom relaxed. After what felt like minutes, I finally felt Davis' lap against my bottom. "It's all the way in," he said. "Oh, yeah. I can tell." "You okay." "Might be. Take it easy." Davis held me steady with a hand on the underside of my left thigh, and I felt his dick slide in and out. He rubbed my dick and stroked it as he ground his lap against my bottom. I could feel him moving around inside. He hit that spot again. "It's feeling better," I told him. Davis made longer strokes and picked up speed. "That actually feels okay." I told him. He pulled my arm from across my eyes, and I looked up at him. "You feel really good inside, Mikey." "So did you." I dropped my feet out to the sides. "It's starting to feel good, sort of. Did it feel good inside when I did it to you?" "It was okay." Davis leaned forward over me. I looked down between us and could see his belly muscles working. He bent down onto me, slipping his palms under my back. We made adjustments. He ground into me, and we made more adjustments. He wrapped his arms under me, and I wrapped my arms over him. I hooked my heels over the backs of his legs, and the magic fit was back. Our embrace became a writhing ball. Davis thrust and ground into my butt and his pubic bone rubbed on my sensitive perineum. I rubbed my dick up against his taut belly and our tongues probed one another's mouth. He felt better and better inside me. He drove in some thrusts and I arched back under him. Davis held my chest up to his as his hips pumped. He sucked on my neck, my jawline, my lips. We were young, but we had instincts and we followed them. Damn, it was good! Davis pumped. We rolled this way and that with me in his embrace. He made me come before he did, shooting up between our bellies, and when he came, and I got all slippery inside, he pulled me upright in his lap and we kissed until his softening dick slipped out of me. He laid me down again, and bent over me. I had made him a man, I guess. He had certainly fucked like one. He kissed over my body while my insides relaxed and my breathing returned to normal. He rested on top of me the way I liked for a while, and then we dressed because his mom was due home. These days, when I'm with another guy, I like to top. That is unless the fit is like it was with Davis and me. Davis could top me all he wanted, and over the next few days, he did. My butt got used to it, and I loved it. For years afterward, the smell of Vaseline gave me a hardon. It was a good summer. After those first few days of sexing one way or another every chance we could get, we eased back into our regular friendship, more or less. We were had swim team and had other buddies on the team we also hung with. Don't get me wrong, though -- we still had sex. A lot. I slept over at his house at least a time or two a week. Davis would drag me off to bed early so we could have sex. I had a neighbor with a great swiming pool and no dogs, so twice We "camped out" in a tent in my back yard and stole into the neighbors swimming pool to skinny dip well after midnight. We played with each other underwater. We also butt-fucked each other underwater, and that's how we discovered you could do it standing up. One evening, in the public pool, away from some of the lights, we backed to a corner and I pulled down the back of Davis' swimsuit and the front of mine and slid my dick up in him, right there in the public pool. It was full of kids and I didn't think anyone was paying attention. With my dick up his but, I just sort of hung onto Davis' back. I noticed one of the lifeguards, and older boy I recognized from church, keeplooking at us, and once when his eyes met mine, he grinned at me. Davis' little sister Lisa was there that night, and I caught her watching us from the opposite side of the pool. I pulled out of Davis and pulled up our suits. Trying sex in different places like pools, and once in a john, was sort of exciting, but the best times were still when it was just Davis and me alone in his room, naked, and fitting our bodies together. Davis liked doing it different ways, but I still preferred being on my back with Davis on top of me, either frotting with me or with his dick working inside my rectum. I felt like I was becoming gay. There were times I felt like a girl and Davis was the boy, and it bothered me that I liked that feeling in a way. But I did like it, and when it was just him and me, we moaned and groaned and made slapping noises and slurped noisily because the sounds somehow made it seem more like real sex and us like real lovers. However, we weren't always alone when we thought we were. Once or twice, I thought I heard someonoe on the other side of the bathroom door, which could only have been Lisa. Once, I got up from butt fucking Davis and opened his bathroom door just as the door to the den closed. I suppose I should describe that part of house a little more at this point. Like I said, Davis' mom was a high school teacher, and single parent, so she wasn't rich. Their house was small. Their mom had her own bathroom off from her bedroom. The other bathroom opened off the den for guests, but had a second door that opened to Davis' room. People were supposed to keep the doors closed and knock before entering, but you always had to be prepared for one or other of the doors to be left open. From the den, a little hallway also led back around to Davis' other door, as well as to Lisa's bedroom, and to their Mom's bedroom. I wasn't used to knocking on the bathroom door when going from Davis' bedroom because you could usually hear if someone was in there. A couple of times the door was locked and I knew Lisa was using it. In mid August, my parents decided to visit my grandparents in Nebraska. I totally did not want to go, partly because my grandfather always seemed to think I was there to do chores, and partly because the last swim meet of the season was going to be on the day my parent were to leave, and mainly because of Davis. I talked them into letting me stay with Davis' mom for the week. It was one of the few times they let me talk them into something like that, but I think they knew I was having a terrific summer; though, of course, they didn't know all the reasons why it was so terrific. Anyway they let me stay. The meet went well. Lisa was on the swim team, too, and as she and a couple other girls from her age group went up for medals, the guys and I discussed how their chests seemed a little flatter at the beginning of the summer from how they looked now. They were getting mounds. And curves. Like I indicated earlier, Lisa was one of those girls who was all legs and arms when she was a kid, and her swimsuit had those high leg holes on the sides so her legs looked even longer. She had nice legs. What I also noticed was that her hips had rounded a little. That night, Davis didn't drag me off to bed early for a change, and Lisa had a friend of her own sleeping over. So we stayed up late playing games and watching movies. For once, Lisa talked more than normal. She was really happy for how she did at the swim meet. When I sat next to her on the couch, our legs rested against each other, and she didn't pull her leg away. It was maybe two afternoons later, if I remember correctly. that Davis and I were helping his mom with some things she wanted to do in the back yard. Some friends of Lisa's were over earlier, but they had left, and I thought Lisa had left with them. I needed to pee, so I went inside. I went through the back door, and I was shirtless and barefoot, so I guess I was quiet. I wasn't trying to be; I just wasn't thinking about it. I pulled open the door from the den to the bathroom, and there was Lisa, sitting naked on the john. She stiffened with her hands between her legs. I had the distinct impression that she had been rubbing herself. She froze. I froze... well except for my jaw hitting the floor. "Oh, sorry," I stammered, backing out. "Wait." I came back in and closed the door behind me. "Can I see," I said. I'm not sure what came over me because I wasn't that bold a kid. Maybe it was because Lisa was always around. I told her, "I haven't seen a girl naked since my little sisters were babies." Lisa stared. One finger moved in her hand, and it looked like she pulled it out from inside her pussy. I forgot to breathe. "I'll show you mine," I offered, trying to think. Lisa's mouth, which had been hanging slightly open, closed; and she swallowed. I took it for a yes, and pushed down my pants and underwear to the tops of my thighs. Holding them there, I stepped up to where Lisa was sitting. My dick began to rise. Lisa stared at it. Then, tentatively, she pulled a hand from between her legs and cupped it under my dick. Her eyes widened. She closed her hand around my thickening tube and it just plain hardened up. It pointed right between her eyes. "It's bigger than it looks in your swimsuit," she whispered. "I hide it when it gets hard." Lisa shook her head. "I've seen it like this under water. Your speedos have gotten real see-through." "Oh?" I was blown away. This was almost more than she had said to me at one time, ever, and it was to let me know she oggled me underwater? She lifted my dick higher, looking under it at my balls. She pulled her other hand from between her legs and felt my scrotum between her thumb and forefinger with growing confidence. "Your skin is soft," she whispered. "So is mine." She stood, and because of me standing so close, she pulled my dick up between us. She had less pubes than I did -- like none at all. There was just a slight mound over her pubic bone and a slit beneath. She pushed her hips back and pulled my dick down to rub my dickhead against her pussy. "See?" she said, "I'm soft there, too." "Oh!" I murmured, my knees growing weak. Her hand tightened on my dick she she rubbed my glans against her labia. She rocked slightly on her feet. Her labia were damp, probably from what she had been doing. "You're warm," I whispered. "You, too." Her hips came forward and my dick slipped between her legs. She held the top of my dick up under her pussy. Her fingers pushing up on the underside of my dick made my knees weak. Our bodies almost came together. Our faces were close. I kissed her lips. Just then, we heard Davis and his mom talking. It sounded as if they were coming in from the backyard. "Oh," I grunted, pulling back and scrambling to get my shorts up. Lisa's shorts and shirt lay on the sink counter. She grabbed them up as I got ready to leave by the door to the den. "Lisa," I whispered. "After Davis goes to sleep tonight, I'll come to your room." I didn't wait for an answer. I left, closing the door behind me and hurried to the kitchen. Davis and his mom were getting ice water. I quickly took a seat at the kitchen table to hide my erection. At supper that evening, I kept sneaking glances at Lisa, but she wouldn't look at me. It looked like she blushed a time or two. Had I lost my chance with her? Had the moment passed? I was worried that Davis would want to stay up late I didn't need to worry. We hadn't had sex since the night before, and he was horny. We had taken turns showering earlier (we didn't try showering together when his mom was home). As soon as we brushed teeth, he shoved me into his room, closing the bathroom door behind us. Laughing, he wrestled me onto his bed, pulled my shorts and underwear off, and dove onto my cock with his mouth. He managed to keep a mouthlock on it while he got me hard and pulled off his own shorts and underwear. I pulled off my shirt. He rose up on his knees and pulled off his, and then fell onto me. We got quiet when his mouth covered mine and we began to grind. We came that way, and I thought we might be done, at least for a while, but Davis was in an affectionate mood. He nuzzled my neck and face and continued to grind our dicks between us, slowly, casually. He kept both of us hard. I didn't know what to expect with Lisa, or whether she would even let me in her room later, but I didn't want to come again. I wanted to wait. Davis had other ideas. He retrieved the small medicine bottle he kept a private stash of Vaseline in and smeared some into my butt. As he did so, he played with my butt and with my perineum in ways he knew I liked. He spread a little more Vaseline on his dick -- it didn't take nearly as much these days -- and positioned himself at my bottom. He drove in. I arched back like I usually did. It was a reflex, but he liked when I arched back. It turned him on. So I did it. He wrapped his arms under the small of my back, and pulled me upright into his lap. My legs went out along his sides and my cock rested on the smooth skin of his belly. My face was slightly higher than his, so I covered his mouth with mine and wrapped my arms around his head. I rubbed my dick on his belly and that rode me on his dick. We tongue wrestled and I bounced until he rose on his knees, carrying me with him, and fell forward onto me. We made our usual tight ball, but this time, Davis went slower than normal. He didn't just pound away, but ground into me, and I moved with him. I didn't intend to come; I just couldn't help it. Davis came not long after. He stayed on me and snuggled dozily, obviously intending to go to sleep that way. In fact, I think he fell asleep before his dick slipped out of me. I was ready to fall asleep myself. I was pretty well spent by then. I struggled to stay awake, but it was awfully comfortable with Davis on top of me like that because We often fell asleep that way. I think I might have dozed a little when I heard Lisa in the bathroom. It sounded like she was brushing her teeth. The time actually seemed a little early for her. I hoped that was a good sign. I heard her mom go down the hall and go into her room. Her door closed. She always closed it to change for bed, but she didn't always sleep with it closed. I would need to wait to be sure she had either left it closed, or had gone to sleep. Eventually, the light went out in the bathroom and I heard Lisa go out the other door and come back through the hall to her room. Her door closed. I shifted like I normally did when we changed positions and Davis rolled to one side, keeping an arm over my chest. I waited. The memory of that afternoon and the feel of Lisa's fingers on my dick and the softness of her pussy on my glans started to revive me. My hand went to my dick and balls. I played with them and imagined that Lisa might even let me put my dick inside her. The house grew still. Davis was a hard sleeper and by then, he was dead to the world. I slipped out from under his arm, picked up my shorts, but not my underwear, and slipped into the bathroom -- if Davis woke, which he wasn't going to do, I could say I was just going to use the bathroom. He didn't even stir. Once in the bathroom, I pulled on my shorts and carefully opened the door to the den. I left the door open behind me and tiptoed to the hall. It was fairly dark, but I could see that their mom's door was closed. I listened. I thought I heard soft snoring from that direction. I went to Lisa's door, opened it as quietly as I could, and slipped inside. There was more light in her room. It came in through the open drapes of her window from a backyard light next door. There was a bush in the way, so there wasn't too much light, but I could see Lisa in her bed. She had her bedcovers up, but I could see the outline of her body. It looked to me like her hands were between her legs again. Her eyes were open. I went to her bed, lifted the covers and crawled in beside her. I had already thought of the first words I wanted to say. "Let's get naked like this afternoon," I whispered. Lisa pushed the covers down to her legs. She was already naked. "Wow!" I mouthed wordlessly. I slid closer to her and she rolled up on her side to face me. Those small mounds of hers mounded a little more between her arms. I shimmied out of my shorts, kicking them on down past my feet and moved closer so that my dick almost touched her. Her eyes were on mine, and I swear she had a hungry look. I didn't realize that girls could want sex, and least not like guys, and certainly not a girl Lisa's age. But she had already gotten herself worked up before I got there, and she looked, well, needy. We gazed into one another's eyes. I grabbed the base of my cock and scooted closer, intending to rub my glans on her pussy like earlier. I looked down between us just long enought to aim, and when my dick pressed at the top of her slit, I looked up at her again. Her eyes drooped and I rubbed around with my dickhead, trying to work into her slit. Lisa opened her legs, cocking her top one over my hip. That gave me a better angle to rub the length of her slit with my dick. I kept my eyes on hers as I moved my glans up and down her labia. She moved her hips, rubbing her labia on my glans. Sliding my dickhead up and down between the lips of her pussy, I found her opening. It took me a moment because it was lower down than I expected. When I did find it, I eased my dickhead in. She was damp down there, but not very damp, and my dick didn't go in very far. I didn't know about hymens, so I thought maybe she was tight like my butt was the first time Davis tried to put his dick into me. I wasn't about to go get the jar of Vaseline, but I remembered that Davis had used some on my butt earlier (that wasn't difficult to remember because I was still slippery between my butt cheeks.) I reached behind me and drew my fingers up my butt crack. I probably got as much persperation as leftover Vaseline, but my fingers were wet. I quickly rubbed them over my glans and down my shaft. Then I repositioned. Lisa didn't have much of a hymen. She might have lost some of it playing with herself. Anyway, with my dickhead wet, I worked it in. Her breath caught and I stopped. But then she wiggled her hips. I pushed in as far as I could, and the tight, soft sheath of her vagina opened and slid down over my glans and down my shaft. I rocked my hips and moved inside her. She grabbed my shoulder, moaned softly, and her eyes closed. I pumped. But we were on our sides, and I couldn't go as deep as I wanted. So staying inside her, I rolled on top of her, rolling her to her back. Her eyes opened and met mine again. Her mouth dropped as I made it almost all the way insideand my balls rested on the top of her leg. I wiggled my hips and she spread her legs out. My hips settled between her thighs, and I went balls deep into bliss on a dick. If I hadn't come twice already that night, I would have come for sure. Buried in her, I lowered my lips to hers. I was going to make her feel like Davis made me feel. I probed into her mouth with my tongue. Lisa groaned. She closed her eyes and ran her tongue over mine. I began to thrust with my hips. She wrapped her arms around me, pressing her palms flat on my lower back. I wrapped my arms under her and kissed her as I pumped. Her bed was quieter than Davis' and I realized I had gotten used to the sexiness of Davis' bed squeaking, but it was good hers didn't; not with her mother down the hall. That didn't mean that Lisa remained quiet. She gasped and whimpered softly. I had barely gotten going when she grabbed me by the butt with both hands and tensed up under me. Her insides pulsed, squeezing my dick. That was something else I didn't know -- that girls could come. It was like a premature ejaculation. I know that at that age, guys often fire off too fast, but that night, it was Lisa. She had absolutely gotten worked up before I ever got there. Lisa arched back under me and I understood why Davis thought it was hot when I did that under him. Her fingers dug into my butt. Her legs squeezed me between them, and her insides milked my dick; or would have if I had been coming yet. I stopped thrusting when her hands pressed down on my butt hard to stop me. So I did, but I stayed inside her. I did like Davis did me when he stayed inside. I kissed her face and her neck. I also did something that Davis did not do to me. I felt over the small mounds of her breasts with my hand. Her skin was soft. Her small breasts fitted my palm and I cupped one as I kept her mouth covered with mine until slowly, I began to move my hips again. Lisa responded, kissing back and sliding her hands up my back and down to my butt. I ground down into her and she ground back. Her vagina was very wet now and the slide of it over my glans and up and down my shaft felt like nothing I did with Davis. She planted her heels on the bed and rocket her pelvis to meet me. Just as much as Davis and I had used our instincts, Lisa used hers, and a young girl like that can have pretty hot instincts. It wasn't long before she begain gasping and whimpering again. She squirmed. Her hands went to my butt. I kept going because I felt my balls drawing up and churning, and I was ready to come. She tensed up again and I felt her insides tighten around my dick. That was all I needed. I thrust fast and hard, and For the first time in my life, I pumped my cum into a girl. There's no feeling like that. I pumped dry and then stayed inside her. I rested on her again, kissing her softly until my dick softened and slipped out. I rolled off onto my side, propping my head on my elbow to watch her. Her head rolled my way and she smiled dreamily. Her breasts rose and fell with her breath. I extended a finger and felt over them and around her nipples. They were puckered and pointing. I bent to kiss one. Lisa moaned softly and wrapped an arm behind my head to hold me to her chest. So I brushed her nipple with my lips and licked over it with my tongue. She squirmed quietly. I lifted my head, gazing down at her, I wrapped a leg over her and pressed my soft cock and balls to comfortably against her hip. I rested a hand in the middle of her chest. "I wish you could spend the night with me like you do with Davis," she whispered. "I can stay here a little while," I told her. "I hear you two," she said. "At night." I shrugged. I wasn't surprised. "I think you've listened during the day." She nodded. She lifted a finger and ran it over my lips as if to see how they felt. "I tried watching through his window, but I can't ever see anything through the curtains. I opened the bathroom door once, but I was afraid Davis saw me so I closed it and ran." "What were we doing?" "Davis was on his tummy and you were on top of him." Her eyes met mine. "I watched before I thought Davis saw me. I wondered what it would be like if you were on top of me." "Now you know," I told her. "I want to do it with you during the day," she said. "When everybody is gone." "Yeah," I agreed. She pouted slightly. "Do you like me better or Davis?" "You," I said, then reconsidered. "I like Davis, though. I mean, what we do. He's my best friend, and, Well, I like him." I shrugged. "He's good at sex." I touched her nipple. "I'll teach you some things." "Like what?" "Like how to sixty-nine." "I know what that is." "We can try it." I thought about it. She had Vaseline on her pussy. "Maybe next time." She smiled and then yawned. "Maybe I better go before we fall asleep," I said. Lisa reached down along her side. "Let me feel it one more time." I lifted my leg and let her clasp my dick. "I like how it feels," she said. I reached between her legs and for the first time, simply felt her with my fingers. Her labia were indeed soft, like she said. Soft as my scrotum maybe. Maybe softer. I probed a finger down into her slit. My dick began to return to life in her hand. Her hips moved. "I'm a little sore," she said. "Sorry." I started to pull my hand back but she covered my hand with her free hand. "It's okay. I like it. Try rubbing like this." She put my fingers on her labia and rubbed them up and down. I rubbed and dipped with a fingertip into her hole. I grew hard again, but hey, I was young and it was my first time with a girl. Her pelvis rocked her pussy under my fingers. She rolled up to me and cocked a leg over mine like she had when we started. Only this time, she held my cock in her hand and she was the one who worked it into her opening. I kissed her and our hips rocked. I was going to roll on top again so I could go deep, but she rolled on top of me first, and I did go deep. She pushed up on her arms over me, grinding her pussy down into my lap. That left my hands free for her breasts and I used them that way. She made it feel good for her, and in the process, made it feel damn good for me. She came differently this time, sort of long and never quite peaking. when I and that seemed to do it for her. She collapsed onto me. "Your brother falls asleep on top of me like this," I whispered. Lisa murmured softly and relaxed. She fell asleep on me the way Davis liked to do, I liked it, too.I was inside her, instead of Davis being inside of me of course, but I got her legs between mine and I fell asleep, too. I only woke when I heard their mom pass Lisa's door in the morning. Lisa was spooning me from behind; another thing like her brother. She woke when I jumped from the bed. "I'll come again tonight," I promsed in a whisper as I pulled my pants on. I listened at the door. It sounded like their mom was in the kitchen. Quickly, I slipped through the door, hurried through the den when their mom was looking the other way in the kitchen, and into their bathroom. I took a piss and then went into Davis' room. He woke and stretched when he heard me come back in. "I have to take a whiz, too," he said, getting up. "Why did you put your shorts on?" I shrugged. "In case someone left the other door open." "Well take 'em back off," Davis said with a grin as he threw back the covers. "I got morning wood and I'll be right back. My parents came home Sunday night. By then, I had the beginning of a sore throat. It was very sore the next day and my mom took me to the doctor. "I think that it's simply exhaustion," he told my mom. "You say he was with a friend all week? You know how kids are; you have to slow them down sometimes. Make him rest for for a day or two. Keep him on the couch or in bed." "If he'll let me," Mom said. "I will," I promised her. 2015-05-04 20:43:24 Great story, anyone want to trade? Anonymous readerReport 2015-03-30 22:14:51 Hahahahahahah ths shit was fucking awesome i cummed five times reading ths gay story. Anonymous readerReport 2015-03-30 07:34:49 That was a perfect story fulfilling all my fantasies! Thanks!! Anonymous readerReport 2015-03-10 08:03:20 That last message has the wrong sc account name don't sc it :-). Anonymous readerReport 2015-03-06 05:10:35 Hot! I loved the part about cumming first and the wet slick feeling you get when your Buddy cums inside you. I love the feeling of my ring clamping down in orgasmic spasms on a my Buddy's hard cock while it's deep in my butt and then having him shoot his load deep inside me! Sometimes I put a butt plug in to keep his cum inside me for later. I love the way it feels when he gets hard again and slips it back in while I still have his first load inside me! You are not logged in. Characters count:
global_05_local_5_shard_00000035_processed.jsonl/32517
Hi all. I was wondering if there was anyone out there who could assist me with a slight issue I'm having? After much testing and searching we managed to find a menu that was quite fast in loading the data. Basically we are using a menu adapted from http://www.seoconsultants.com/css/menus/tutorial/ Now this works fine in all browsers, however after applying our code it doesn't seem to work in any browser other than IE. What we really need is for it to work in all browsers, which the original does! Here is link to the menu http://demo.glensoft.net/index.html. I just can't seem to see what exactly is going wrong...please can anyone help? Many thanks in advance!
global_05_local_5_shard_00000035_processed.jsonl/32520
The Sleepy Eye Herald Dispatch • Beware of the full moon • The legend of the full moon’s effect on human behavior has existed for centuries. • email print While many people believe the full moon influences behavior, scientific studies have found very little evidence supporting the “Lunar Effect.”  A host of studies over the years have aimed at teasing out a statistical connection between the full moon and human biology or behavior. The majority of sound studies have found no connections. The words “lunacy” and “lunatic” are derived from the same Latin root that gives us the word “lunar” as people often attributed intermittent insanity to the phase of the moon. “It must be a full moon” is a phrase heard whenever crazy things happen. People who believe that moon phases affect human behavior point out that the human body is over 60 percent water. If the phase of the moon can affect ocean tides, and even cause a bulge in the Earth’s crust, surely it would exert an effect on human beings, they reason. And, of course, one of the most popular features in the Farmers’ Almanac is the Best Days calendar, which recommends specific days to do everything from plant root crops to cut hair for increased growth, based on the phases of the moon and other factors. Readers swear that they see better results in their endeavors when they follow these recommendations. All my life, as far back as I can remember, I have always had difficulties being emotionally stable during the full moon. No, I don’t grow hair and teeth and howl at the moon, or fly on a broom or bite the necks of others (contrary to what Hubby may think.) Instead I tend to feel somewhat restless and unruly during the full-moon phase. As an example, on Saturday I found myself having a pity party. Without anyone to whine to, I spent most of the day sulking. By mid-afternoon when I could no longer stand myself, I attempted to take a nap. Shortly after falling asleep in my chair a knock at the door jarred me awake. I questioned whether or not to ignore it, but my front door was open and there was only a screen door standing between me and the unwelcome visitor. Since I couldn’t see anyone standing directly in front of the screen door, I considered slithering off the chair onto the floor and lying there until visitor left. Without knowing who it was, I feared that it would be someone who knew me and would let themselves in and call for me. How silly would that look if I had to drag myself off my living room floor to talk to them? Page 2 of 2 -   It turned out it was a Mediacom salesman asking me if I was interested in switching my current cable service over to his company. The poor fellow didn’t realized he picked the wrong day to come calling at my door. To spare him, I explained to him that several years back I had received the service from his company and I wasn’t happy with it so I switched. Apparently he thought I was bluffing because he asked what about the service made me unhappy, not fully intending, I’m sure, to hear me rattle off the lists of things I did not like. Ten minutes later he had taken two steps off my front steps and looked like he wanted to run. He threw me a flyer of their newest promotions and asked if he could call us in a couple weeks to see if we would consider switching after reading over the literature. I thought he had audacity to ask me for my number after I just spent 10 minutes telling him I didn’t like his service. For petty revenge I gave him Hubby’s name and number for not being home to answer the door. On Sunday my pity party was gone, but so was my patience. At 11 a.m. I asked Hubby what he was still doing home. “Don’t you have a date with the other cavemen at the local establishment to beat your chests and drink beer over the ridiculous game you call entertainment?” I snarled. “I was staying home a little longer to spend more time with you,” he explained timidly. While we may never know whether the explanation that the full moon changes behavior is correct, Hubby can attest that occasionally I’ll get a bee in my bonnet for no apparent reason usually around the time of the full-moon. Coincidence? Quite possibly. But in today’s world at least, the lunar lunacy effect appears to be no better supported than is the idea that the moon is made of cheese.
global_05_local_5_shard_00000035_processed.jsonl/32521
Your SlideShare is downloading. × Python cookbook 2nd edition v413 hav Published on • Be the first to comment No Downloads Total Views On Slideshare From Embeds Number of Embeds Embeds 0 No embeds Report content Flagged as inappropriate Flag as inappropriate Flag as inappropriate Select your reason for flagging this presentation as inappropriate. No notes for slide • 1. Python Cookbook™ • 2. Other resources from O’Reilly Related titles Python in a Nutshell Python Pocket Reference Learning Python Programming Python Python Standard Library is more than a complete catalog of O’Reilly books. You’ll also find links to news, events, articles, weblogs, sample chapters, and code examples. is the essential portal for developers interested in open and emerging technologies, including new platforms, pro- gramming languages, and operating systems. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit con- for our upcoming events. Safari Bookshelf ( is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today with a free trial. • 3. Python Cookbook ™ SECOND EDITION Edited by Alex Martelli, Anna Martelli Ravenscroft, and David Ascher Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo • 4. Python Cookbook™, Second Edition Edited by Alex Martelli, Anna Martelli Ravenscroft, and David Ascher Compilation copyright © 2005, 2002 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Copyright of original recipes is retained by the individual authors. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles ( For more information, contact our corporate/insti- tutional sales department: (800) 998-9938 or Editor: Jonathan Gennick Production Editor: Darren Kelly Cover Designer: Emma Colby Interior Designer: David Futato Production Services: Nancy Crumpton Printing History: July 2002: First Edition. March 2005: Second Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Cookbook series designations, Python Cookbook, the image of a springhaas, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. This book uses RepKover™ , a durable and flexible lay-flat binding. ISBN-10: 0-596-00797-3 ISBN-13: 978-0-596-00797-3 [M] [11/07] • 5. v Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii 1. Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Processing a String One Character at a Time 7 1.2 Converting Between Characters and Numeric Codes 8 1.3 Testing Whether an Object Is String-like 9 1.4 Aligning Strings 11 1.5 Trimming Space from the Ends of a String 12 1.6 Combining Strings 12 1.7 Reversing a String by Words or Characters 15 1.8 Checking Whether a String Contains a Set of Characters 16 1.9 Simplifying Usage of Strings’ translate Method 20 1.10 Filtering a String for a Set of Characters 22 1.11 Checking Whether a String Is Text or Binary 25 1.12 Controlling Case 26 1.13 Accessing Substrings 28 1.14 Changing the Indentation of a Multiline String 31 1.15 Expanding and Compressing Tabs 32 1.16 Interpolating Variables in a String 35 1.17 Interpolating Variables in a String in Python 2.4 36 1.18 Replacing Multiple Patterns in a Single Pass 38 1.19 Checking a String for Any of Multiple Endings 41 1.20 Handling International Text with Unicode 43 1.21 Converting Between Unicode and Plain Strings 45 1.22 Printing Unicode Characters to Standard Output 48 1.23 Encoding Unicode Data for XML and HTML 49 1.24 Making Some Strings Case-Insensitive 52 1.25 Converting HTML Documents to Text on a Unix Terminal 55 • 6. vi | Table of Contents 2. Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.1 Reading from a File 62 2.2 Writing to a File 66 2.3 Searching and Replacing Text in a File 67 2.4 Reading a Specific Line from a File 68 2.5 Counting Lines in a File 69 2.6 Processing Every Word in a File 72 2.7 Using Random-Access Input/Output 74 2.8 Updating a Random-Access File 75 2.9 Reading Data from zip Files 77 2.10 Handling a zip File Inside a String 79 2.11 Archiving a Tree of Files into a Compressed tar File 80 2.12 Sending Binary Data to Standard Output Under Windows 82 2.13 Using a C++-like iostream Syntax 83 2.14 Rewinding an Input File to the Beginning 84 2.15 Adapting a File-like Object to a True File Object 87 2.16 Walking Directory Trees 88 2.17 Swapping One File Extension for Another Throughout a Directory Tree 90 2.18 Finding a File Given a Search Path 91 2.19 Finding Files Given a Search Path and a Pattern 92 2.20 Finding a File on the Python Search Path 93 2.21 Dynamically Changing the Python Search Path 94 2.22 Computing the Relative Path from One Directory to Another 96 2.23 Reading an Unbuffered Character in a Cross-Platform Way 98 2.24 Counting Pages of PDF Documents on Mac OS X 99 2.25 Changing File Attributes on Windows 100 2.26 Extracting Text from Documents 101 2.27 Extracting Text from Microsoft Word Documents 102 2.28 File Locking Using a Cross-Platform API 103 2.29 Versioning Filenames 105 2.30 Calculating CRC-64 Cyclic Redundancy Checks 107 3. Time and Money . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 3.1 Calculating Yesterday and Tomorrow 116 3.2 Finding Last Friday 118 3.3 Calculating Time Periods in a Date Range 120 3.4 Summing Durations of Songs 121 • 7. Table of Contents | vii 3.5 Calculating the Number of Weekdays Between Two Dates 122 3.6 Looking up Holidays Automatically 124 3.7 Fuzzy Parsing of Dates 127 3.8 Checking Whether Daylight Saving Time Is Currently in Effect 129 3.9 Converting Time Zones 130 3.10 Running a Command Repeatedly 131 3.11 Scheduling Commands 133 3.12 Doing Decimal Arithmetic 135 3.13 Formatting Decimals as Currency 137 3.14 Using Python as a Simple Adding Machine 140 3.15 Checking a Credit Card Checksum 143 3.16 Watching Foreign Exchange Rates 144 4. Python Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 4.1 Copying an Object 148 4.2 Constructing Lists with List Comprehensions 151 4.3 Returning an Element of a List If It Exists 153 4.4 Looping over Items and Their Indices in a Sequence 154 4.5 Creating Lists of Lists Without Sharing References 155 4.6 Flattening a Nested Sequence 157 4.7 Removing or Reordering Columns in a List of Rows 160 4.8 Transposing Two-Dimensional Arrays 161 4.9 Getting a Value from a Dictionary 163 4.10 Adding an Entry to a Dictionary 165 4.11 Building a Dictionary Without Excessive Quoting 166 4.12 Building a Dict from a List of Alternating Keys and Values 168 4.13 Extracting a Subset of a Dictionary 170 4.14 Inverting a Dictionary 171 4.15 Associating Multiple Values with Each Key in a Dictionary 173 4.16 Using a Dictionary to Dispatch Methods or Functions 175 4.17 Finding Unions and Intersections of Dictionaries 176 4.18 Collecting a Bunch of Named Items 178 4.19 Assigning and Testing with One Statement 180 4.20 Using printf in Python 183 4.21 Randomly Picking Items with Given Probabilities 184 4.22 Handling Exceptions Within an Expression 185 4.23 Ensuring a Name Is Defined in a Given Module 187 • 8. viii | Table of Contents 5. Searching and Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 5.1 Sorting a Dictionary 195 5.2 Sorting a List of Strings Case-Insensitively 196 5.3 Sorting a List of Objects by an Attribute of the Objects 198 5.4 Sorting Keys or Indices Based on the Corresponding Values 200 5.5 Sorting Strings with Embedded Numbers 203 5.6 Processing All of a List’s Items in Random Order 204 5.7 Keeping a Sequence Ordered as Items Are Added 206 5.8 Getting the First Few Smallest Items of a Sequence 208 5.9 Looking for Items in a Sorted Sequence 210 5.10 Selecting the nth Smallest Element of a Sequence 212 5.11 Showing off quicksort in Three Lines 215 5.12 Performing Frequent Membership Tests on a Sequence 217 5.13 Finding Subsequences 220 5.14 Enriching the Dictionary Type with Ratings Functionality 222 5.15 Sorting Names and Separating Them by Initials 226 6. Object-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 6.1 Converting Among Temperature Scales 235 6.2 Defining Constants 238 6.3 Restricting Attribute Setting 240 6.4 Chaining Dictionary Lookups 242 6.5 Delegating Automatically as an Alternative to Inheritance 244 6.6 Delegating Special Methods in Proxies 247 6.7 Implementing Tuples with Named Items 250 6.8 Avoiding Boilerplate Accessors for Properties 252 6.9 Making a Fast Copy of an Object 254 6.10 Keeping References to Bound Methods Without Inhibiting Garbage Collection 256 6.11 Implementing a Ring Buffer 259 6.12 Checking an Instance for Any State Changes 262 6.13 Checking Whether an Object Has Necessary Attributes 266 6.14 Implementing the State Design Pattern 269 6.15 Implementing the “Singleton” Design Pattern 271 6.16 Avoiding the “Singleton” Design Pattern with the Borg Idiom 273 6.17 Implementing the Null Object Design Pattern 277 6.18 Automatically Initializing Instance Variables from __init__ Arguments 280 • 9. Table of Contents | ix 6.19 Calling a Superclass __init__ Method If It Exists 282 6.20 Using Cooperative Supercalls Concisely and Safely 285 7. Persistence and Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 7.1 Serializing Data Using the marshal Module 291 7.2 Serializing Data Using the pickle and cPickle Modules 293 7.3 Using Compression with Pickling 296 7.4 Using the cPickle Module on Classes and Instances 297 7.5 Holding Bound Methods in a Picklable Way 300 7.6 Pickling Code Objects 302 7.7 Mutating Objects with shelve 305 7.8 Using the Berkeley DB Database 307 7.9 Accesssing a MySQL Database 310 7.10 Storing a BLOB in a MySQL Database 312 7.11 Storing a BLOB in a PostgreSQL Database 313 7.12 Storing a BLOB in a SQLite Database 315 7.13 Generating a Dictionary Mapping Field Names to Column Numbers 316 7.14 Using dtuple for Flexible Access to Query Results 318 7.15 Pretty-Printing the Contents of Database Cursors 320 7.16 Using a Single Parameter-Passing Style Across Various DB API Modules 323 7.17 Using Microsoft Jet via ADO 325 7.18 Accessing a JDBC Database from a Jython Servlet 327 7.19 Using ODBC to Get Excel Data with Jython 330 8. Debugging and Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 8.1 Disabling Execution of Some Conditionals and Loops 333 8.2 Measuring Memory Usage on Linux 334 8.3 Debugging the Garbage-Collection Process 336 8.4 Trapping and Recording Exceptions 337 8.5 Tracing Expressions and Comments in Debug Mode 339 8.6 Getting More Information from Tracebacks 342 8.7 Starting the Debugger Automatically After an Uncaught Exception 345 8.8 Running Unit Tests Most Simply 346 8.9 Running Unit Tests Automatically 348 8.10 Using doctest with unittest in Python 2.4 350 8.11 Checking Values Against Intervals in Unit Testing 352 • 10. x | Table of Contents 9. Processes, Threads, and Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 9.1 Synchronizing All Methods in an Object 359 9.2 Terminating a Thread 362 9.3 Using a Queue.Queue as a Priority Queue 364 9.4 Working with a Thread Pool 366 9.5 Executing a Function in Parallel on Multiple Argument Sets 369 9.6 Coordinating Threads by Simple Message Passing 372 9.7 Storing Per-Thread Information 374 9.8 Multitasking Cooperatively Without Threads 378 9.9 Determining Whether Another Instance of a Script Is Already Running in Windows 380 9.10 Processing Windows Messages Using MsgWaitForMultipleObjects 381 9.11 Driving an External Process with popen 384 9.12 Capturing the Output and Error Streams from a Unix Shell Command 386 9.13 Forking a Daemon Process on Unix 388 10. System Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 10.1 Generating Random Passwords 393 10.2 Generating Easily Remembered Somewhat-Random Passwords 394 10.3 Authenticating Users by Means of a POP Server 397 10.4 Calculating Apache Hits per IP Address 398 10.5 Calculating the Rate of Client Cache Hits on Apache 400 10.6 Spawning an Editor from a Script 401 10.7 Backing Up Files 403 10.8 Selectively Copying a Mailbox File 405 10.9 Building a Whitelist of Email Addresses From a Mailbox 406 10.10 Blocking Duplicate Mails 408 10.11 Checking Your Windows Sound System 410 10.12 Registering or Unregistering a DLL on Windows 411 10.13 Checking and Modifying the Set of Tasks Windows Automatically Runs at Login 412 10.14 Creating a Share on Windows 414 10.15 Connecting to an Already Running Instance of Internet Explorer 415 10.16 Reading Microsoft Outlook Contacts 416 10.17 Gathering Detailed System Information on Mac OS X 418 • 11. Table of Contents | xi 11. User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 11.1 Showing a Progress Indicator on a Text Console 424 11.2 Avoiding lambda in Writing Callback Functions 426 11.3 Using Default Values and Bounds with tkSimpleDialog Functions 427 11.4 Adding Drag and Drop Reordering to a Tkinter Listbox 428 11.5 Entering Accented Characters in Tkinter Widgets 430 11.6 Embedding Inline GIFs Using Tkinter 432 11.7 Converting Among Image Formats 434 11.8 Implementing a Stopwatch in Tkinter 437 11.9 Combining GUIs and Asynchronous I/O with Threads 439 11.10 Using IDLE’s Tree Widget in Tkinter 443 11.11 Supporting Multiple Values per Row in a Tkinter Listbox 445 11.12 Copying Geometry Methods and Options Between Tkinter Widgets 448 11.13 Implementing a Tabbed Notebook for Tkinter 451 11.14 Using a wxPython Notebook with Panels 453 11.15 Implementing an ImageJ Plug-in in Jython 455 11.16 Viewing an Image from a URL with Swing and Jython 456 11.17 Getting User Input on Mac OS 456 11.18 Building a Python Cocoa GUI Programmatically 459 11.19 Implementing Fade-in Windows with IronPython 461 12. Processing XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 12.1 Checking XML Well-Formedness 465 12.2 Counting Tags in a Document 467 12.3 Extracting Text from an XML Document 468 12.4 Autodetecting XML Encoding 469 12.5 Converting an XML Document into a Tree of Python Objects 471 12.6 Removing Whitespace-only Text Nodes from an XML DOM Node’s Subtree 474 12.7 Parsing Microsoft Excel’s XML 475 12.8 Validating XML Documents 477 12.9 Filtering Elements and Attributes Belonging to a Given Namespace 478 12.10 Merging Continuous Text Events with a SAX Filter 480 12.11 Using MSHTML to Parse XML or HTML 483 13. Network Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 13.1 Passing Messages with Socket Datagrams 487 13.2 Grabbing a Document from the Web 489 13.3 Filtering a List of FTP Sites 490 • 12. xii | Table of Contents 13.4 Getting Time from a Server via the SNTP Protocol 491 13.5 Sending HTML Mail 492 13.6 Bundling Files in a MIME Message 495 13.7 Unpacking a Multipart MIME Message 497 13.8 Removing Attachments from an Email Message 499 13.9 Fixing Messages Parsed by Python 2.4 email.FeedParser 501 13.10 Inspecting a POP3 Mailbox Interactively 503 13.11 Detecting Inactive Computers 506 13.12 Monitoring a Network with HTTP 511 13.13 Forwarding and Redirecting Network Ports 513 13.14 Tunneling SSL Through a Proxy 516 13.15 Implementing the Dynamic IP Protocol 519 13.16 Connecting to IRC and Logging Messages to Disk 522 13.17 Accessing LDAP Servers 524 14. Web Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 14.1 Testing Whether CGI Is Working 527 14.2 Handling URLs Within a CGI Script 530 14.3 Uploading Files with CGI 532 14.4 Checking for a Web Page’s Existence 533 14.5 Checking Content Type via HTTP 535 14.6 Resuming the HTTP Download of a File 536 14.7 Handling Cookies While Fetching Web Pages 538 14.8 Authenticating with a Proxy for HTTPS Navigation 541 14.9 Running a Servlet with Jython 542 14.10 Finding an Internet Explorer Cookie 543 14.11 Generating OPML Files 545 14.12 Aggregating RSS Feeds 548 14.13 Turning Data into Web Pages Through Templates 552 14.14 Rendering Arbitrary Objects with Nevow 554 15. Distributed Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 15.1 Making an XML-RPC Method Call 561 15.2 Serving XML-RPC Requests 562 15.3 Using XML-RPC with Medusa 564 15.4 Enabling an XML-RPC Server to Be Terminated Remotely 566 15.5 Implementing SimpleXMLRPCServer Niceties 567 15.6 Giving an XML-RPC Server a wxPython GUI 569 15.7 Using Twisted Perspective Broker 571 • 13. Table of Contents | xiii 15.8 Implementing a CORBA Server and Client 574 15.9 Performing Remote Logins Using telnetlib 576 15.10 Performing Remote Logins with SSH 579 15.11 Authenticating an SSL Client over HTTPS 582 16. Programs About Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 16.1 Verifying Whether a String Represents a Valid Number 590 16.2 Importing a Dynamically Generated Module 591 16.3 Importing from a Module Whose Name Is Determined at Runtime 592 16.4 Associating Parameters with a Function (Currying) 594 16.5 Composing Functions 597 16.6 Colorizing Python Source Using the Built-in Tokenizer 598 16.7 Merging and Splitting Tokens 602 16.8 Checking Whether a String Has Balanced Parentheses 604 16.9 Simulating Enumerations in Python 606 16.10 Referring to a List Comprehension While Building It 609 16.11 Automating the py2exe Compilation of Scripts into Windows Executables 611 16.12 Binding Main Script and Modules into One Executable on Unix 613 17. Extending and Embedding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 17.1 Implementing a Simple Extension Type 619 17.2 Implementing a Simple Extension Type with Pyrex 623 17.3 Exposing a C++ Library to Python 625 17.4 Calling Functions from a Windows DLL 627 17.5 Using SWIG-Generated Modules in a Multithreaded Environment 630 17.6 Translating a Python Sequence into a C Array with the PySequence_Fast Protocol 631 17.7 Accessing a Python Sequence Item-by-Item with the Iterator Protocol 635 17.8 Returning None from a Python-Callable C Function 638 17.9 Debugging Dynamically Loaded C Extensions with gdb 639 17.10 Debugging Memory Problems 641 18. Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 18.1 Removing Duplicates from a Sequence 647 18.2 Removing Duplicates from a Sequence While Maintaining Sequence Order 649 18.3 Generating Random Samples with Replacement 653 18.4 Generating Random Samples Without Replacement 654 • 14. xiv | Table of Contents 18.5 Memoizing (Caching) the Return Values of Functions 656 18.6 Implementing a FIFO Container 658 18.7 Caching Objects with a FIFO Pruning Strategy 660 18.8 Implementing a Bag (Multiset) Collection Type 662 18.9 Simulating the Ternary Operator in Python 666 18.10 Computing Prime Numbers 669 18.11 Formatting Integers as Binary Strings 671 18.12 Formatting Integers as Strings in Arbitrary Bases 673 18.13 Converting Numbers to Rationals via Farey Fractions 675 18.14 Doing Arithmetic with Error Propagation 677 18.15 Summing Numbers with Maximal Accuracy 680 18.16 Simulating Floating Point 682 18.17 Computing the Convex Hulls and Diameters of 2D Point Sets 685 19. Iterators and Generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 19.1 Writing a range-like Function with Float Increments 693 19.2 Building a List from Any Iterable 695 19.3 Generating the Fibonacci Sequence 697 19.4 Unpacking a Few Items in a Multiple Assignment 698 19.5 Automatically Unpacking the Needed Number of Items 700 19.6 Dividing an Iterable into n Slices of Stride n 702 19.7 Looping on a Sequence by Overlapping Windows 704 19.8 Looping Through Multiple Iterables in Parallel 708 19.9 Looping Through the Cross-Product of Multiple Iterables 710 19.10 Reading a Text File by Paragraphs 713 19.11 Reading Lines with Continuation Characters 715 19.12 Iterating on a Stream of Data Blocks as a Stream of Lines 717 19.13 Fetching Large Record Sets from a Database with a Generator 719 19.14 Merging Sorted Sequences 721 19.15 Generating Permutations, Combinations, and Selections 724 19.16 Generating the Partitions of an Integer 726 19.17 Duplicating an Iterator 728 19.18 Looking Ahead into an Iterator 731 19.19 Simplifying Queue-Consumer Threads 734 19.20 Running an Iterator in Another Thread 735 19.21 Computing a Summary Report with itertools.groupby 737 • 15. Table of Contents | xv 20. Descriptors, Decorators, and Metaclasses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 20.1 Getting Fresh Default Values at Each Function Call 742 20.2 Coding Properties as Nested Functions 744 20.3 Aliasing Attribute Values 747 20.4 Caching Attribute Values 750 20.5 Using One Method as Accessor for Multiple Attributes 752 20.6 Adding Functionality to a Class by Wrapping a Method 754 20.7 Adding Functionality to a Class by Enriching All Methods 757 20.8 Adding a Method to a Class Instance at Runtime 759 20.9 Checking Whether Interfaces Are Implemented 761 20.10 Using __new__ and __init__ Appropriately in Custom Metaclasses 763 20.11 Allowing Chaining of Mutating List Methods 765 20.12 Using Cooperative Supercalls with Terser Syntax 767 20.13 Initializing Instance Attributes Without Using __init__ 769 20.14 Automatic Initialization of Instance Attributes 771 20.15 Upgrading Class Instances Automatically on reload 774 20.16 Binding Constants at Compile Time 778 20.17 Solving Metaclass Conflicts 783 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 • 16. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xvii Preface This book is not a typical O’Reilly book, written as a cohesive manuscript by one or two authors. Instead, it is a new kind of book—a bold attempt at applying some principles of open source development to book authoring. Over 300 members of the Python community contributed materials to this book. In this Preface, we, the edi- tors, want to give you, the reader, some background regarding how this book came about and the processes and people involved, and some thoughts about the implica- tions of this new form. The Design of the Book In early 2000, Frank Willison, then Editor-in-Chief of O’Reilly & Associates, con- tacted me (David Ascher) to find out if I wanted to write a book. Frank had been the editor for Learning Python, which I cowrote with Mark Lutz. Since I had just taken a job at what was then considered a Perl shop (ActiveState), I didn’t have the band- width necessary to write another book, and plans for the project were gently shelved. Periodically, however, Frank would send me an email or chat with me at a confer- ence regarding some of the book topics we had discussed. One of Frank’s ideas was to create a Python Cookbook, based on the concept first used by Tom Christiansen and Nathan Torkington with the Perl Cookbook. Frank wanted to replicate the suc- cess of the Perl Cookbook, but he wanted a broader set of people to provide input. He thought that, much as in a real cookbook, a larger set of authors would provide for a greater range of tastes. The quality, in his vision, would be ensured by the over- sight of a technical editor, combined with O’Reilly’s editorial review process. Frank and Dick Hardt, ActiveState’s CEO, realized that Frank’s goal could be com- bined with ActiveState’s goal of creating a community site for open source program- mers, called the ActiveState Programmer’s Network (ASPN). ActiveState had a popular web site, with the infrastructure required to host a wide variety of content, but it wasn’t in the business of creating original content. ActiveState always felt that • 17. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xviii | Preface the open source communities were the best sources of accurate and up-to-date con- tent, even if sometimes that content was hard to find. The O’Reilly and ActiveState teams quickly realized that the two goals were aligned and that a joint venture would be the best way to achieve the following key objec- tives: • Creating an online repository of Python recipes by Python programmers for Python programmers • Publishing a book containing the best of those recipes, accompanied by over- views and background material written by key Python figures • Learning what it would take to create a book with a different authoring model At the same time, two other activities were happening. First, those of us at ActiveState, including Paul Prescod, were actively looking for “stars” to join ActiveState’s development team. One of the candidates being recruited was the famous (but unknown to us, at the time) Alex Martelli. Alex was famous because of his numerous and exhaustive postings on the Python mailing list, where he exhib- ited an unending patience for explaining Python’s subtleties and joys to the increas- ing audience of Python programmers. He was unknown because he lived in Italy and, since he was a relative newcomer to the Python community, none of the old Python hands had ever met him—their paths had not happened to cross back in the 1980s when Alex lived in the United States, working for IBM Research and enthusi- astically using and promoting other high-level languages (at the time, mostly IBM’s Rexx). ActiveState wooed Alex, trying to convince him to move to Vancouver. We came quite close, but his employer put some golden handcuffs on him, and somehow Van- couver’s weather couldn’t compete with Italy’s. Alex stayed in Italy, much to my dis- appointment. As it happened, Alex was also at that time negotiating with O’Reilly about writing a book. Alex wanted to write a cookbook, but O’Reilly explained that the cookbook was already signed. Later, Alex and O’Reilly signed a contract for Python in Nutshell. The second ongoing activity was the creation of the Python Software Foundation. For a variety of reasons, best left to discussion over beers at a conference, everyone in the Python community wanted to create a non-profit organization that would be the holder of Python’s intellectual property, to ensure that Python would be on a legally strong footing. However, such an organization needed both financial support and buy-in from the Python community to be successful. Given all these parameters, the various parties agreed to the following plan: • ActiveState would build an online cookbook, a mechanism by which anyone could submit a recipe (i.e., a snippet of Python code addressing a particular problem, accompanied by a discussion of the recipe, much like a description of why one should use cream of tartar when whipping egg whites). To foster a • 18. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Preface | xix community of authors and encourage peer review, the web site would also let readers of the recipes suggest changes, ask questions, and so on. • As part of my ActiveState job, I would edit and ensure the quality of the recipes. Alex Martelli joined the project as a co-editor when the material was being pre- pared for publication, and, with Anna Martelli Ravenscroft, took over as pri- mary editor for the second edition. • O’Reilly would publish the best recipes as the Python Cookbook. • In lieu of author royalties for the recipes, a portion of the proceeds from the book sales would be donated to the Python Software Foundation. The Implementation of the Book The online cookbook (at was the entry point for the recipes. Users got free accounts, filled in a form, and presto, their recipes became part of the cookbook. Thousands of people read the recipes, and some added comments, and so, in the publishing equivalent of peer review, the recipes matured and grew. While it was predictable that the chance of getting your name in print would get people attracted to the online cookbook, the ongoing suc- cess of the cookbook, with dozens of recipes added monthly and more and more ref- erences to it on the newsgroups, is a testament to the value it brings to the readers— value which is provided by the recipe authors. Starting from the materials available on the site, the implementation of the book was mostly a question of selecting, merging, ordering, and editing the materials. A few more details about this part of the work are in the “Organization” section of this Preface. Using the Code from This Book This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of code taken from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of code from this book into your product’s documentation does require permission. We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Python Cookbook, 2d ed., by Alex Martelli, Anna Martelli Ravenscroft, and David Ascher (O’Reilly Media, 2005) 0- 596-00797-3.” If you feel your use of code from this book falls outside fair use or the permission given above, feel free to contact us at • 19. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xx | Preface Audience We expect that you know at least some Python. This book does not attempt to teach Python as a whole; rather, it presents some specific techniques and concepts (and occasionally tricks) for dealing with particular tasks. If you are looking for an intro- duction to Python, consider some of the books described in the “Further Reading” section of this Preface. However, you don’t need to know a lot of Python to find this book helpful. Chapters include recipes demonstrating the best techniques for accom- plishing some elementary and general tasks, as well as more complex or specialized ones. We have also added sidebars, here and there, to clarify certain concepts which are used in the book and which you may have heard of, but which might still be unclear to you. However, this is definitely not a book just for beginners. The main target audience is the whole Python community, mostly made up of pretty good pro- grammers, neither newbies nor wizards. And if you do already know a lot about Python, you may be in for a pleasant surprise! We’ve included recipes that explore some the newest and least well-known areas of Python. You might very well learn a few things—we did! Regardless of where you fall along the spectrum of Python expertise, and more generally of programming skill, we believe you will get some- thing valuable from this book. If you already own the first edition, you may be wondering whether you need this second edition, too. We think the answer is “yes.” The first edition had 245 recipes; we kept 146 of those (with lots of editing in almost all cases), and added 192 new ones, for a total of 338 recipes in this second edition. So, over half of the recipes in this edition are completely new, and all the recipes are updated to apply to today’s Python—releases 2.3 and 2.4. Indeed, this update is the main factor which lets us have almost 100 more recipes in a book of about the same size. The first edition cov- ered all versions from 1.5.2 (and sometimes earlier) to 2.2; this one focuses firmly on 2.3 and 2.4. Thanks to the greater power of today’s Python, and, even more, thanks to the fact that this edition avoids the “historical” treatises about how you had to do things in Python versions released 5 or more years ago, we were able to provide sub- stantially more currently relevant recipes and information in roughly the same amount of space. Organization This book has 20 chapters. Each chapter is devoted to a particular kind of recipe, such as algorithms, text processing, databases, and so on. The 1st edition had 17 chapters. There have been improvements to Python, both language and library, and to the corpus of recipes the Python community has posted to the cookbook site, that convinced us to add three entirely new chapters: on the iterators and generators introduced in Python 2.3; on Python’s support for time and money operations, both old and new; and on new, advanced tools introduced in Python 2.2 and following • 20. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Preface | xxi releases (custom descriptors, decorators, metaclasses). Each chapter contains an introduction, written by an expert in the field, followed by recipes selected from the online cookbook (in some cases—about 5% of this book’s recipes—a few new reci- pes were specially written for this volume) and edited to fit the book’s formatting and style requirements. Alex (with some help from Anna) did the vast majority of the selection—determining which recipes from the first edition to keep and update, and selecting new recipes to add, or merge with others, from the nearly 1,000 available on the site (so, if a recipe you posted to the cookbook site didn’t get into this printed edition, it’s his fault!). He also decided which subjects just had to be covered and thus might need specially written recipes—although he couldn’t manage to get quite all of the specially written recipes he wanted, so anything that’s missing, and wasn’t on the cookbook site, might not be entirely his fault. Once the selection was complete, the work turned to editing the recipes, and to merging multiple recipes, as well as incorporating important contents from many sig- nificant comments posted about the recipes. This proved to be quite a challenge, just as it had been for the first edition, but even more so. The recipes varied widely in their organization, level of completeness, and sophistication. With over 300 authors involved, over 300 different “voices” were included in the text. We have striven to maintain a variety of styles to reflect the true nature of this book, the book written by the entire Python community. However, we edited each recipe, sometimes quite con- siderably, to make it as accessible and useful as possible, ensuring enough unifor- mity in structure and presentation to maximize the usability of the book as a whole. Most recipes, both from the first edition and from the online site, had to be updated, sometimes heavily, to take advantage of new tools and better approaches developed since those recipes were originally posted. We also carefully reconsidered (and slightly altered) the ordering of chapters, and the placement and ordering of recipes within chapters; our goal in this reordering was to maximize the book’s usefulness for both newcomers to Python and seasoned veterans, and, also, for both readers tackling the book sequentially, cover to cover, and ones just dipping in, in “random access” fashion, to look for help on some specific area. While the book should thus definitely be accessible “by hops and jumps,” we never- theless believe a first sequential skim will amply repay the modest time you, the reader, invest in it. On such a skim, skip every recipe that you have trouble follow- ing or that is of no current interest to you. Despite the skipping, you’ll still get a sense of how the whole book hangs together and of where certain subjects are cov- ered, which will stand you in good stead both for later in-depth sequential reading, if that’s your choice, and for “random access” reading. To further help you get a sense of what’s where in the book, here’s a capsule summary of each chapter’s contents, and equally capsule bios of the Python experts who were so kind as to take on the task of writing the chapters’ “Introduction” sections. • 21. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xxii | Preface Chapter 1, Text, introduction by Fred L. Drake, Jr. This chapter contains recipes for manipulating text in a variety of ways, includ- ing combining, filtering, and formatting strings, substituting variables through- out a text document, and dealing with Unicode. Fred Drake is a member of the PythonLabs group, working on Python develop- ment. A father of three, Fred is best known in the Python community for single- handedly maintaining the official documentation. Fred is a co-author of Python & XML (O’Reilly). Chapter 2, Files, introduction by Mark Lutz This chapter presents techniques for working with data in files and for manipu- lating files and directories within the filesystem, including specific file formats and archive formats such as tar and zip. Mark Lutz is well known to most Python users as the most prolific author of Python books, including Programming Python, Python Pocket Reference, and Learning Python (all from O’Reilly), which he co-authored with David Ascher. Mark is also a leading Python trainer, spreading the Python gospel throughout the world. Chapter 3, Time and Money, introduction by Gustavo Niemeyer and Facundo Batista This chapter (new in this edition) presents tools and techniques for working with dates, times, decimal numbers, and some other money-related issues. Gustavo Niemeyer is the author of the third-party dateutil module, as well as a variety of other Python extensions and projects. Gustavo lives in Brazil. Facundo Batista is the author of the Decimal PEP 327, and of the standard library module decimal, which brought floating-point decimal support to Python 2.4. He lives in Argentina. The editors were delighted to bring them together for this introduc- tion. Chapter 4, Python Shortcuts, introduction by David Ascher This chapter includes recipes for many common techniques that can be used anywhere, or that don’t really fit into any of the other, more specific recipe cate- gories. David Ascher is a co-editor of this volume. David’s background spans physics, vision research, scientific visualization, computer graphics, a variety of program- ming languages, co-authoring Learning Python (O’Reilly), teaching Python, and these days, a slew of technical and nontechnical tasks such as managing the ActiveState team. David also gets roped into organizing Python conferences on a regular basis. Chapter 5, Searching and Sorting, introduction by Tim Peters This chapter covers techniques for searching and sorting in Python. Many of the recipes explore creative uses of the stable and fast list.sort in conjunction with the decorate-sort-undecorate (DSU) idiom (newly built in with Python 2.4), • 22. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Preface | xxiii while others demonstrate the power of heapq, bisect, and other Python search- ing and sorting tools. Tim Peters, also known as the tim-bot, is one of the mythological figures of the Python world. He is the oracle, channeling Guido van Rossum when Guido is busy, channeling the IEEE-754 floating-point committee when anyone asks any- thing remotely relevant, and appearing conservative while pushing for a con- stant evolution in the language. Tim is a member of the PythonLabs team. Chapter 6, Object-Oriented Programming, introduction by Alex Martelli This chapter offers a wide range of recipes that demonstrate the power of object- oriented programming with Python, including fundamental techniques such as delegating and controlling attribute access via special methods, intermediate ones such as the implementation of various design patterns, and some simple but useful applications of advanced concepts, such as custom metaclasses, which are covered in greater depth in Chapter 20. Alex Martelli, also known as the martelli-bot, is a co-editor of this volume. After almost a decade with IBM Research, then a bit more than that with think3, inc., Alex now works as a freelance consultant, most recently for AB Strakt, a Swed- ish Python-centered firm. He also edits and writes Python articles and books, including Python in a Nutshell (O’Reilly) and, occasionally, research works on the game of contract bridge. Chapter 7, Persistence and Databases, introduction by Aaron Watters This chapter presents Python techniques for persistence, including serialization approaches and interaction with various databases. Aaron Watters was one of the earliest advocates of Python and is an expert in databases. He’s known for having been the lead author on the first book on Python (Internet Programming with Python, M&T Books, now out of print), and he has authored many widely used Python extensions, such as kjBuckets and kwParsing. Aaron currently works as a freelance consultant. Chapter 8, Debugging and Testing, introduction by Mark Hammond This chapter includes a collection of recipes that assist with the debugging and testing process, from customizing error logging and traceback information, to unit testing with custom modules, unittest and doctest. Mark Hammond is best known for his work supporting Python on the Win- dows platform. With Greg Stein, he built an incredible library of modules inter- facing Python to a wide variety of APIs, libraries, and component models such as COM. He is also an expert designer and builder of developer tools, most nota- bly Pythonwin and Komodo. Finally, Mark is an expert at debugging even the most messy systems—during Komodo development, for example, Mark was often called upon to debug problems that spanned three languages (Python, C++, JavaScript), multiple threads, and multiple processes. Mark is also co- author, with Andy Robinson, of Python Programming on Win32 (O’Reilly). • 23. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xxiv | Preface Chapter 9, Processes, Threads, and Synchronization, introduction by Greg Wilson This chapter covers a variety of techniques for concurrent programming, includ- ing threads, queues, and multiple processes. Greg Wilson writes children’s books, as well as books on parallel programming and data crunching. When he’s not doing that, he’s a contributing editor with Doctor Dobb’s Journal, an adjunct professor in Computer Science at the Univer- sity of Toronto, and a freelance software developer. Greg was the original driv- ing force behind the Software Carpentry project, and he recently received a grant from the Python Software Foundation to develop Pythonic course material for computational scientists and engineers. Chapter 10, System Administration, introduction by Donn Cave This chapter includes recipes for a number of common system administration tasks, from generating passwords and interacting with the Windows registry, to handling mailbox and web server issues. Donn Cave is a software engineer at the University of Washington’s central com- puter site. Over the years, Donn has proven to be a fount of information on comp.lang.python on all matters related to system calls, Unix, system administra- tion, files, signals, and the like. Chapter 11, User Interfaces, introduction by Fredrik Lundh This chapter contains recipes for common GUI tasks, mostly with Tkinter, but also a smattering of wxPython, Qt, image processing, and GUI recipes specific to Jython (for JVM—Java Virtual Machine), Mac OS X, and IronPython (for dot- NET). Fredrik Lundh, also known as the eff-bot, is the CTO of Secret Labs AB, a Swed- ish Python-focused company providing a variety of products and technologies. Fredrik is the world’s leading expert on Tkinter (the most popular GUI toolkit for Python), as well as the main author of the Python Imaging Library (PIL). He is also the author of Python Standard Library (O’Reilly), which is a good comple- ment to this volume and focuses on the modules in the standard Python library. Finally, he is a prolific contributor to comp.lang.python, helping novices and experts alike. Chapter 12, Processing XML, introduction by Paul Prescod This chapter offers techniques for parsing, processing, and generating XML using a variety of Python tools. Paul Prescod is an expert in three technologies: Python, which he need not jus- tify; XML, which makes sense in a pragmatic world (Paul is co-author of the XML Handbook, with Charles Goldfarb, published by Prentice Hall); and Uni- code, which somehow must address some deep-seated desire for pain and confu- sion that neither of the other two technologies satisfies. Paul is currently a product manager at Blast Radius. • 24. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Preface | xxv Chapter 13, Network Programming, introduction by Guido van Rossum This chapter covers a variety of network programming techniques, from writing basic TCP clients and servers to manipulating MIME messages. Guido created Python, nurtured it throughout its infancy, and is shepherding its growth. Need we say more? Chapter 14, Web Programming, introduction by Andy McKay This chapter presents a variety of web-related recipes, including ones for CGI scripting, running a Java servlet with Jython, and accessing the content of web pages. Andy McKay is the co-founder and vice president of Enfold Systems. In the last few years, Andy went from being a happy Perl user to a fanatical Python, Zope, and Plone expert. He wrote the Definitive Guide to Plone (Apress) and runs the popular Zope discussion site, Chapter 15, Distributed Programming, introduction by Jeremy Hylton This chapter provides recipes for using Python in simple distributed systems, including XML-RPC, CORBA, and Twisted’s Perspective Broker. Jeremy Hylton works for Google. In addition to young twins, Jeremy’s interests including programming language theory, parsers, and the like. As part of his work for CNRI, Jeremy worked on a variety of distributed systems. Chapter 16, Programs About Programs, introduction by Paul F. Dubois This chapter contains Python techniques that involve program introspection, currying, dynamic importing, distributing programs, lexing and parsing. Paul Dubois has been working at the Lawrence Livermore National Laboratory for many years, building software systems for scientists working on everything from nuclear simulations to climate modeling. He has considerable experience with a wide range of scientific computing problems, as well as experience with language design and advanced object-oriented programming techniques. Chapter 17, Extending and Embedding, introduction by David Beazley This chapter offers techniques for extending Python and recipes that assist in the development of extensions. David Beazley’s chief claim to fame is SWIG, an amazingly powerful hack that lets one quickly wrap C and other libraries and use them from Python, Tcl, Perl, and myriad other languages. Behind this seemingly language-neutral tool lies a Python supporter of the first order, as evidenced by his book, Python Essential Reference (New Riders). David Beazley is a fairly sick man (in a good way), lead- ing us to believe that more scarily useful tools are likely to emerge from his brain. He’s currently inflicting his sense of humor on computer science students at the University of Chicago. • 25. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xxvi | Preface Chapter 18, Algorithms, introduction by Tim Peters This chapter provides a collection of fascinating and useful algorithms and data structures implemented in Python. See the discussion of Chapter 5 for information about Tim Peters. Chapter 19, Iterators and Generators, introduction by Raymond Hettinger This chapter (new in this edition) contains recipes demonstrating the variety and power of iterators and generators—how Python makes your loops’ structures simpler, faster, and reusable. Raymond Hettinger is the creator of the itertools package, original proposer of generator expressions, and has become a major contributor to the development of Python—if you don’t know who originated and implemented some major novelty or important optimization in the 2.3 and 2.4 releases of Python, our advice is to bet it was Raymond! Chapter 20, Descriptors, Decorators, and Metaclasses, introduction by Raymond Het- tinger This chapter (new in this edition) provides an in-depth look into the infrastruc- tural elements which make Python’s OOP so powerful and smooth, and how you can exploit and customize them for fun and profit. From handy idioms for building properties, to aliasing and caching attributes, all the way to decorators which optimize your functions by hacking their bytecode and to a factory of cus- tom metaclasses to solve metatype conflicts, this chapter shows how, while surely “there be dragons here,” they’re the wise, powerful and beneficent Chi- nese variety thereof...! See the discussion of Chapter 19 for information about Raymond Hettinger. Further Reading There are many texts available to help you learn Python or refine your Python knowl- edge, from introductory texts all the way to quite formal language descriptions. We recommend the following books for general information about Python (all these books cover at least Python 2.2, unless otherwise noted): • Python Programming for the Absolute Beginner, by Michael Dawson (Thomson Course Technology), is a hands-on, highly accessible introduction to Python for people who have never programmed. • Learning Python, by Mark Lutz and David Ascher (O’Reilly), is a thorough intro- duction to the fundamentals of Python. • Practical Python, by Magnus Lie Hetland (APress), is an introduction to Python which also develops, in detail, ten fully worked out, substantial programs in many different areas. • 26. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Preface | xxvii • Dive into Python, by Mark Pilgrim (APress), is a fast-paced introduction to Python for experienced programmers, and it is also freely available for online reading and downloading ( • Python Standard Library, by Fredrik Lundh (O’Reilly), provides a use case for each module in the rich library that comes with every standard Python distribu- tion (in the current first edition, the book only covers Python up to 2.0). • Programming Python, by Mark Lutz (O’Reilly), is a thorough rundown of Python programming techniques (in the current second edition, the book only covers Python up to 2.0). • Python Essential Reference, by David Beazley (New Riders), is a quick reference that focuses on the Python language and the core Python libraries (in the cur- rent second edition, the book only covers Python up to 2.1). • Python in a Nutshell, by Alex Martelli (O’Reilly), is a comprehensive quick refer- ence to the Python language and the key libraries used by most Python program- mers. In addition, several more special-purpose books can help you explore particular aspects of Python programming. Which books you will like best depends a lot on your areas of interest. From personal experience, the editors can recommend at least the following: • Python and XML, by Christopher A. Jones and Fred L. Drake, Jr. (O’Reilly), offers thorough coverage of using Python to read, process, and transform XML. • Jython Essentials, by Samuele Pedroni and Noel Rappin (O’Reilly), is the author- itative book on Jython, the port of Python to the JVM. Particularly useful if you already know some (or a lot of) Java. • Game Programming with Python, by Sean Riley (Charles River Media), covers programming computer games with Python, all the way from advanced graphics to moderate amounts of “artificial intelligence.” • Python Web Programming, by Steve Holden (New Riders), covers building net- worked systems using Python, with introductions to many other related technol- ogies (databases, HTTP, HTML, etc.). Very suitable for readers with none to medium experience with these fields, but has something to teach everyone. In addition to these books, other important sources of information can help explain some of the code in the recipes in this book. We’ve pointed out the information that seemed particularly relevant in the “See Also” sections of each recipe. In these sec- tions, we often refer to the standard Python documentation: most often the Library Reference, sometimes the Reference Manual, and occasionally the Tutorial. This doc- umentation is freely available in a variety of forms: • 27. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xxviii | Preface • On the web site (at, which always con- tains the most up-to-date documentation about Python. • On the web site (at, accompanied by module-by- module documentation of the standard library automatically generated by the very useful pydoc tool. • In Python itself. Recent versions of Python boast a nice online help system, which is worth exploring if you’ve never used it. Just type help( ) at the interac- tive Python interpreter prompt to start exploring. • As part of the online help in your Python installation. ActivePython’s installer, for example, includes a searchable Windows help file. The standard Python dis- tribution currently includes HTML pages, but there are plans to include a simi- lar Windows Help file in future releases. We have not included specific section numbers in our references to the standard Python documentation, since the organization of these manuals can change from release to release. You should be able to use the table of contents and indexes to find the relevant material. For the Library Reference, in particular, the Module Index (an alphabetical list of all standard library modules, each module name being a hyper- link to the Library Reference documentation for that module) is invaluable. Simi- larly, we have not given specific pointers in our references to Python in a Nutshell: that book is still in its first edition (covering Python up to 2.2) at the time of this writing, but by the time you’re reading, a second edition (covering Python 2.3 and 2.4) is likely to be forthcoming, if not already published. Conventions Used in This Book Pronouns: the first person singular is meant to convey that the recipe’s or chapter introduction’s author is speaking (when multiple credits are given for a recipe, the author is the first person credited); however, even such remarks have at times had to be edited enough that they may not reflect the original author’s intended meaning (we, the editors, tried hard to avoid that, but we know we must have failed in some cases, since there were so many remarks, and authorial intent was often not entirely clear). The second person is meant to refer to you, the reader. The first person plural collectively indicates you, the reader, plus the recipe’s author and co-authors, the editors, and my friend Joe (hi Joe!)—in other words, it’s a very inclusive “we” or “us.” Code: each block of code may indicate a complete module or script (or, often, a Python source file that is usable both as a script and as a module), an isolated snip- pet from some hypothetical module or script, or part of a Python interactive inter- preter session (indicated by the prompt >>>). • 28. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Preface | xxix The following typographical conventions are used throughout this book: Italic for commands, filenames, for emphasis, and for first use of a term. Constant width for general code fragments and keywords (mostly Python ones, but also other languages, such as C or HTML, where they occur). Constant width is also used for all names defined in Python’s library and third-party modules. Constant width bold is used to emphasize particular lines within code listings and show output that is produced. How to Contact Us We have tested and verified all the information in this book to the best of our abili- ties, but you may find that some features have changed, or that we have let errors slip through the production of the book. Please let us know of any errors that you find, as well as any suggestions for future editions, by writing to: O’Reilly Media 1005 Gravenstein Highway North Sebastopol, CA 95472 (800) 998-9938 (in the United States or Canada) (707) 829-0515 (international/local) (707) 829-0104 (fax) We have a web site for the book, where we’ll list examples, errata, and any plans for future editions. You can access this page at: To ask technical questions or comment on the book, send email to: For more information about our books, conferences, Resource Centers, and the O’Reilly Network, see our web site at: The online cookbook from which most of the recipes for this book were taken is available at: Safari® Enabled When you see a Safari Enabled icon on the cover of your favorite tech- nology book, that means the book is available online through the O’Reilly Network Safari Bookshelf. • 29. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xxx | Preface Safari offers a solution that’s better than e-books. It’s a virtual library that lets you easily search thousands of top tech books, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current informa- tion. Try it for free at Acknowledgments Most publications, from mysteries to scientific papers to computer books, claim that the work being published would not have been possible without the collaboration of many others, typically including local forensic scientists, colleagues, and children, respectively. This book makes this claim to an extreme degree. Most of the words, code, and ideas in this volume were contributed by people not listed on the front cover. The original recipe authors, readers who submitted useful and insightful com- ments to the cookbook web site, and the authors of the chapter introductions, are the true authors of the book, and they deserve the credit. David Ascher The software that runs the online cookbook was the product of Andy McKay’s con- stant and diligent effort. Andy was ActiveState’s key Zope developer during the online data-collection phase of this project, and one of the key developers behind ASPN (, ActiveState’s content site, which serves a wide variety of information for and by programmers of open source languages such as Python, Perl, PHP, Tcl, and XSLT. Andy McKay used to be a Perl developer, by the way. At about the same time that I started at ActiveState, the company decided to use Zope to build what would become ASPN. In the years that followed, Andy has become a Zope master and somewhat of a Python fanatic (without any advocacy from me!), and is currently a Zope and Plone author, consultant and entrepreneur. Based on an original design that I put together with Diane Mueller, also of ActiveState, Andy single-handedly implemented ASPN in record time, then pro- ceeded to adjust it to ever-changing requirements for new features that we hadn’t anticipated in the early design phase, staying cheerful and professional throughout. It’s a pleasure to have him as the author of the introduction to the chapter on web recipes. Since Andy’s departure, James McGill has taken over as caretaker of the online cookbook—he makes sure that the cookbook is live at all hours of the day or night, ready to serve Pythonistas worldwide. Paul Prescod, then also of ActiveState, was a kindred spirit throughout the project, helping with the online editorial process, suggesting changes, and encouraging read- ers of comp.lang.python to visit the web site and submit recipes. Paul also helped with some of his considerable XML knowledge when it came to figuring out how to take the data out of Zope and get it ready for the publication process. • 30. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Preface | xxxi The last activator I’d like to thank, for two different reasons, is Dick Hardt, founder and CEO of ActiveState. The first is that Dick agreed to let me work on the cook- book as part of my job. Had he not, I wouldn’t have been able to participate in it. The second reason I’d like to thank Dick is for suggesting at the outset that a share of the book royalties go to the Python Software Foundation. This decision not only made it easier to enlist Python users into becoming contributors but has also resulted in some long-term revenue to an organization that I believe needs and deserves finan- cial support. All Python users will benefit. Writing a software system a second time is dangerous; the “second-system” syn- drome is a well-known engineering scenario in which teams that are allowed to rebuild systems “right” often end up with interminable, over-engineered projects. I’m pleased to say that this didn’t happen in the case of this second edition, for two pri- mary reasons. The first was the decision to trim the scope of the cookbook to cover only truly modern Python—that made the content more manageable and the book much more interesting to contemporary audiences. The second factor was that every- one realized with hindsight that I would have no time to contribute to the day-to-day editing of this second edition. I’m as glad as ever to have been associated with this book, and pleased that I have no guilt regarding the amount of work I didn’t contrib- ute. When people like Alex and Anna are willing to take on the work, it’s much bet- ter for everyone else to get out of the way. Finally, I’d like to thank the O’Reilly editors who have had a big hand in shaping the cookbook. Laura Lewin was the original editor for the first edition, and she helped make sure that the project moved along, securing and coordinating the contribu- tions of the introduction authors. Paula Ferguson then took the baton, provided a huge amount of precious feedback, and copyedited the final manuscript, ensuring that the prose was as readable as possible given the multiplicity of voices in the book. Jonathan Gennick was the editor for the second edition, and as far as I can tell, he basically let Alex and Anna drive, which was the right thing to do. Another editor I forgot to mention last time was Tim O’Reilly, who got more involved in this book than in most, in its early (rough) phases, and provided very useful input. Each time I review this acknowledgments section, I can’t help but remember O’Reilly’s Editor-in-Chief at the inception of the project, Frank Willison. Frank died suddenly on a black day, July 30, 2001. He was the person who most wanted to see this book happen, for the simple reason that he believed the Python community deserved it. Frank was always willing to explore new ideas, and he was generous to a fault. The idea of a book with over a hundred authors would have terrified most edi- tors. Frank saw it as a challenge and an experiment. I still miss Frank. Alex Martelli I first met Python thanks to the gentle insistence of a former colleague, Alessandro Bottoni. He kept courteously repeating that I really should give Python a try, in spite • 31. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. xxxii | Preface of my claims that I already knew more programming languages than I knew what to do with. If I hadn’t trusted his technical and aesthetic judgment enough to invest the needed time and energy on the basis of his suggestion, I most definitely wouldn’t be writing and editing Python books today. Thanks for your well-placed stubbornness, Alessandro! Of course, once I tasted Python, I was irretrievably hooked—my lifelong taste for very high-level (often mis-named “scripting”) languages at last congealed into one superb synthesis. Here, at long last, was a language with the syntactic ease of Rexx (and then some), the semantic simplicity of Tcl (and then some), the intellectual rigor of Scheme (and other Lisp variants), and the awesome power of Perl (and then some). How could I resist? Still, I do owe a debt to Mike Cowlishaw (inventor of Rexx), who I had the pleasure of having as a colleague when I worked for IBM Research, for first getting me hooked on scripting. I must also thank John Ouster- hout and Larry Wall, the inventors of Tcl and Perl, respectively, for later reinforcing my addiction through their brainchildren. Greg Wilson first introduced me to O’Reilly, so he must get his share of thanks, too—and I’m overjoyed at having him as one of the introduction authors. I am also grateful to David Ascher, and several people at O’Reilly, for signing me up as co-edi- tor of the first edition of this book and supporting so immediately and enthusiasti- cally my idea that, hmmm, the time had sure come for a second edition (in dazed retrospect, I suspect what I meant was mostly that I had forgotten how deuced much work it had been to do the first one...and failed to realize that, with all the new materials heaped on ActiveState’s site, as well as Python’s wonderful progress over three years, the second edition would take more work than the first one...!). I couldn’t possibly have done the job without an impressive array of technology to help me. I don’t know the names of all the people I should thank for the Internet, ADSL, and Google’s search engines, which, together, let me look things up so eas- ily—or for many of the other hardware and software technologies cooperating to amplify my productivity. But, I do know I couldn’t have made it without Theo de Raadt’s OpenBSD operating system, Steve Jobs’ inspiration behind Mac OS X and the iBook G4 on which I did most of the work, Bram Moolenaar’s VIM editor, and, of course, Guido van Rossum’s Python language. So, I’ll single out Theo, Steve, Bram, and Guido for special thanks! Nor, as any book author will surely confirm, could I have done it without patience and moral support from friends and family—chiefly my children Lucio and Flavia, my sister Elisabetta, my father Lanfranco. But the one person who was truly indis- pensable to this second edition was my wife and co-editor Anna. Having recon- nected (after many years apart) thanks to Python, taken our honeymoon at the Open Source Convention, given a joint Lightning Talk about our “Pythonic Marriage,” maybe I should have surmised how wonderful it would be to work so closely with her, day in and day out, on such a large and complex joint project. It was truly • 32. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Preface | xxxiii incredible, all the way through, fully including the heated debates about this or that technical or organizational point or exact choice of wording in delicate cases. Throughout the effort and the stress, her skill, her love, her joy, always shined through, sustained me, and constantly renewed my energies and my determination. Thanks, Anna! Anna Martelli Ravenscroft I discovered Python about two years ago. I fell in love, both with Python and (con- currently) with the martelli-bot. Python is a language that is near to my heart, prima- rily because it is so quickly usable. It doesn’t require you to become a hermit for the next four years in order to do anything with the language. Thank you to Guido. And thanks to the amazing Python community for providing such a welcoming atmo- sphere to newcomers. Working on this book was quite the learning experience for me. Besides all the Python code, I also learned both XML and VI, as well as reacquainting myself with Subversion. Thanks go to Holger Krekel and codespeak, for hosting our subversion repository while we travelled. Which brings us to a group of people who deserve spe- cial thanks: our reviewers. Holger Krekel, again, was exceptionally thorough, and ensured, among other things, that we had solid Unicode support. Raymond Het- tinger gave us a huge amount of valuable, detailed insight throughout, particularly where iterators and generators were concerned. Both Raymond and Holger often offered alternatives to the presented “solutions” when warranted. Valentino Volonghi pointed out programming style issues as well as formatting issues and brought an incredible amount of enthusiasm to his reviews. Ryan Alexander, a new- comer to Python with a background in Java, provided extremely detailed recommen- dations on ordering and presenting materials (recipes and chapters), as well as pointing out explanations that were weak or missing altogether. His perspective was invaluable in making this book more accessible and useful to new Pythonistas. Sev- eral other individuals provided feedback on specific chapters or recipes, too numer- ous to list here. Your work, however, is greatly appreciated. Of course, thanks go to my husband. I am amazed at Alex’s patience with questions (and I questioned a lot). His dedication to excellence is a co-author’s dream. When presented with feedback, he consistently responded with appreciation and focus on making the book better. He’s one of the least ego-istical writers I’ve ever met. Thank you to Dan, for encouraging my geekiness by starting me on Linux, teaching me proper terminology for the stuff I was doing, and for getting me hooked on the Internet. And finally, an extra special thanks to my children, Inanna and Graeme, for their hugs, understanding, and support when I was in geekmode, particularly during the final push to complete the book. You guys are the best kids a mother could wish for. • 33. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1 Chapter 1 CHAPTER 1 Text 1.0 Introduction Credit: Fred L. Drake, Jr., PythonLabs Text-processing applications form a substantial part of the application space for any scripting language, if only because everyone can agree that text processing is useful. Everyone has bits of text that need to be reformatted or transformed in various ways. The catch, of course, is that every application is just a little bit different from every other application, so it can be difficult to find just the right reusable code to work with different file formats, no matter how similar they are. What Is Text? Sounds like an easy question, doesn’t it? After all, we know it when we see it, don’t we? Text is a sequence of characters, and it is distinguished from binary data by that very fact. Binary data, after all, is a sequence of bytes. Unfortunately, all data enters our applications as a sequence of bytes. There’s no library function we can call that will tell us whether a particular sequence of bytes represents text, although we can create some useful heuristics that tell us whether data can safely (not necessarily correctly) be handled as text. Recipe 1.11 “Checking Whether a String Is Text or Binary” shows just such a heuristic. Python strings are immutable sequences of bytes or characters. Most of the ways we create and process strings treat them as sequences of characters, but many are just as applicable to sequences of bytes. Unicode strings are immutable sequences of Uni- code characters: transformations of Unicode strings into and from plain strings use codecs (coder-decoders) objects that embody knowledge about the many standard ways in which sequences of characters can be represented by sequences of bytes (also known as encodings and character sets). Note that Unicode strings do not serve double duty as sequences of bytes. Recipe 1.20 “Handling International Text with Unicode,“ recipe 1.21 “Converting Between Unicode and Plain Strings,” and • 34. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 2 | Chapter 1: Text recipe 1.22 “Printing Unicode Characters to Standard Output” illustrate the funda- mentals of Unicode in Python. Okay, let’s assume that our application knows from the context that it’s looking at text. That’s usually the best approach because that’s where external input comes into play. We’re looking at a file either because it has a well-known name and defined for- mat (common in the “Unix” world) or because it has a well-known filename exten- sion that indicates the format of the contents (common on Windows). But now we have a problem: we had to use the word format to make the previous paragraph meaningful. Wasn’t text supposed to be simple? Let’s face it: there’s no such thing as “pure” text, and if there were, we probably wouldn’t care about it (with the possible exception of applications in the field of computational linguistics, where pure text may indeed sometimes be studied for its own sake). What we want to deal with in our applications is information contained in text. The text we care about may contain configuration data, commands to con- trol or define processes, documents for human consumption, or even tabular data. Text that contains configuration data or a series of commands usually can be expected to conform to a fairly strict syntax that can be checked before relying on the information in the text. Informing the user of an error in the input text is typically sufficient to deal with things that aren’t what we were expecting. Documents intended for humans tend to be simple, but they vary widely in detail. Since they are usually written in a natural language, their syntax and grammar can be difficult to check, at best. Different texts may use different character sets or encod- ings, and it can be difficult or even impossible to tell which character set or encoding was used to create a text if that information is not available in addition to the text itself. It is, however, necessary to support proper representation of natural-language documents. Natural-language text has structure as well, but the structures are often less explicit in the text and require at least some understanding of the language in which the text was written. Characters make up words, which make up sentences, which make up paragraphs, and still larger structures may be present as well. Para- graphs alone can be particularly difficult to locate unless you know what typographi- cal conventions were used for a document: is each line a paragraph, or can multiple lines make up a paragraph? If the latter, how do we tell which lines are grouped together to make a paragraph? Paragraphs may be separated by blank lines, indenta- tion, or some other special mark. See recipe 19.10 “Reading a Text File by Para- graphs” for an example of reading a text file as a sequence of paragraphs separated by blank lines. Tabular data has many issues that are similar to the problems associated with natu- ral-language text, but it adds a second dimension to the input format: the text is no longer linear—it is no longer a sequence of characters, but rather a matrix of charac- ters from which individual blocks of text must be identified and organized. • 35. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Introduction | 3 Basic Textual Operations As with any other data format, we need to do different things with text at different times. However, there are still three basic operations: • Parsing the data into a structure internal to our application • Transforming the input into something similar in some way, but with changes of some kind • Generating completely new data Parsing can be performed in a variety of ways, and many formats can be suitably handled by ad hoc parsers that deal effectively with a very constrained format. Exam- ples of this approach include parsers for RFC 2822-style email headers (see the rfc822 module in Python’s standard library) and the configuration files handled by the ConfigParser module. The netrc module offers another example of a parser for an application-specific file format, this one based on the shlex module. shlex offers a fairly typical tokenizer for basic languages, useful in creating readable configuration files or allowing users to enter commands to an interactive prompt. These sorts of ad hoc parsers are abundant in Python’s standard library, and recipes using them can be found in Chapter 2 and Chapter 13. More formal parsing tools are also available for Python; they depend on larger add-on packages and are surveyed in the introduction to Chapter 16. Transforming text from one format to another is more interesting when viewed as text processing, which is what we usually think of first when we talk about text. In this chapter, we’ll take a look at some ways to approach transformations that can be applied for different purposes. Sometimes we’ll work with text stored in external files, and other times we’ll simply work with it as strings in memory. The generation of textual data from application-specific data structures is most eas- ily performed using Python’s print statement or the write method of a file or file-like object. This is often done using a method of the application object or a function, which takes the output file as a parameter. The function can then use statements such as these: print >>thefile, sometext thefile.write(sometext) which generate output to the appropriate file. However, this isn’t generally thought of as text processing, as here there is no input text to be processed. Examples of using both print and write can of course be found throughout this book. Sources of Text Working with text stored as a string in memory can be easy when the text is not too large. Operations that search the text can operate over multiple lines very easily and quickly, and there’s no need to worry about searching for something that might cross • 36. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 4 | Chapter 1: Text a buffer boundary. Being able to keep the text in memory as a simple string makes it very easy to take advantage of the built-in string operations available as methods of the string object. File-based transformations deserve special treatment, because there can be substan- tial overhead related to I/O performance and the amount of data that must actually be stored in memory. When working with data stored on disk, we often want to avoid loading entire files into memory, due to the size of the data: loading an 80 MB file into memory should not be done too casually! When our application needs only part of the data at a time, working on smaller segments of the data can yield substan- tial performance improvements, simply because we’ve allowed enough space for our program to run. If we are careful about buffer management, we can still maintain the performance advantage of using a small number of relatively large disk read and write operations by working on large chunks of data at a time. File-related recipes are found in Chapter 2. Another interesting source for textual data comes to light when we consider the net- work. Text is often retrieved from the network using a socket. While we can always view a socket as a file (using the makefile method of the socket object), the data that is retrieved over a socket may come in chunks, or we may have to wait for more data to arrive. The textual data may not consist of all data until the end of the data stream, so a file object created with makefile may not be entirely appropriate to pass to text-processing code. When working with text from a network connection, we often need to read the data from the connection before passing it along for further processing. If the data is large, it can be handled by saving it to a file as it arrives and then using that file when performing text-processing operations. More elaborate solutions can be built when the text processing needs to be started before all the data is available. Examples of parsers that are useful in such situations may be found in the htmllib and HTMLParser modules in the standard library. String Basics The main tool Python gives us to process text is strings—immutable sequences of characters. There are actually two kinds of strings: plain strings, which contain 8-bit (ASCII) characters; and Unicode strings, which contain Unicode characters. We won’t deal much with Unicode strings here: their functionality is similar to that of plain strings, except each character takes up 2 (or 4) bytes, so that the number of dif- ferent characters is in the tens of thousands (or even billions), as opposed to the 256 different characters that make up plain strings. Unicode strings are important if you must deal with text in many different alphabets, particularly Asian ideographs. Plain strings are sufficient to deal with English or any of a limited set of non-Asian lan- guages. For example, all western European alphabets can be encoded in plain strings, typically using the international standard encoding known as ISO-8859-1 (or ISO- 8859-15, if you need the Euro currency symbol as well). • 37. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. Introduction | 5 In Python, you express a literal string (curiously more often known as a string literal) as: 'this is a literal string' "this is another string" String values can be enclosed in either single or double quotes. The two different kinds of quotes work the same way, but having both allows you to include one kind of quotes inside of a string specified with the other kind of quotes, without needing to escape them with the backslash character: 'isn't that grand' "isn't that grand" To have a string literal span multiple lines, you can use a backslash as the last charac- ter on the line, which indicates that the next line is a continuation: big = "This is a long string that spans two lines." You must embed newlines in the string if you want the string to output on two lines: big = "This is a long stringn that prints on two lines." Another approach is to enclose the string in a pair of matching triple quotes (either single or double): bigger = """ This is an even bigger string that spans three lines. """ Using triple quotes, you don’t need to use the continuation character, and line breaks in the string literal are preserved as newline characters in the resulting Python string object. You can also make a string literal “raw” string by preceding it with an r or R: big = r"This is a long string with a backslash and a newline in it" With a raw string, backslash escape sequences are left alone, rather than being inter- preted. Finally, you can precede a string literal with a u or U to make it a Unicode string: hello = u'Hellou0020World' Strings are immutable, which means that no matter what operation you do on a string, you will always produce a new string object, rather than mutating the exist- ing string. A string is a sequence of characters, which means that you can access a single character by indexing: mystr = "my string" mystr[0] # 'm' mystr[-2] # 'n' • 38. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 6 | Chapter 1: Text You can also access a portion of the string with a slice: mystr[1:4] # 'y s' mystr[3:] # 'string' mystr[-3:] # 'ing' Slices can be extended, that is, include a third parameter that is known as the stride or step of the slice: mystr[:3:-1] # 'gnirt' mystr[1::2] # 'ysrn' You can loop on a string’s characters: for c in mystr: This binds c to each of the characters in mystr in turn. You can form another sequence: list(mystr) # returns ['m','y',' ','s','t','r','i','n','g'] You can concatenate strings by addition: mystr+'oid' # 'my stringoid' You can also repeat strings by multiplication: 'xo'*3 # 'xoxoxo' In general, you can do anything to a string that you can do to any other sequence, as long as it doesn’t require changing the sequence, since strings are immutable. String objects have many useful methods. For example, you can test a string’s con- tents with s.isdigit( ), which returns True if s is not empty and all of the characters in s are digits (otherwise, it returns False). You can produce a new modified string with a method call such as s.upper( ), which returns a new string that is like s, but with every letter changed into its uppercase equivalent. You can search for a string inside another with haystack.count('needle'), which returns the number of times the substring 'needle' appears in the string haystack. When you have a large string that spans multiple lines, you can split it into a list of single-line strings with splitlines: list_of_lines = one_large_string.splitlines( ) You can produce the single large string again with join: one_large_string = 'n'.join(list_of_lines) The recipes in this chapter show off many methods of the string object. You can find complete documentation in Python’s Library Reference and Python in a Nutshell. Strings in Python can also be manipulated with regular expressions, via the re mod- ule. Regular expressions are a powerful (but complicated) set of tools that you may already be familiar with from another language (such as Perl), or from the use of tools such as the vi editor and text-mode commands such as grep. You’ll find a number of uses of regular expressions in recipes in the second half of this chapter. • 39. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.1 Processing a String One Character at a Time | 7 For complete documentation, see the Library Reference and Python in a Nutshell. J.E.F. Friedl, Mastering Regular Expressions (O’Reilly) is also recommended if you need to master this subject—Python’s regular expressions are basically the same as Perl’s, which Friedl covers thoroughly. Python’s standard module string offers much of the same functionality that is avail- able from string methods, packaged up as functions instead of methods. The string module also offers a few additional functions, such as the useful string.maketrans function that is demonstrated in a few recipes in this chapter; several helpful string constants (string.digits, for example, is '0123456789') and, in Python 2.4, the new class Template, for simple yet flexible formatting of strings with embedded variables, which as you’ll see features in one of this chapter’s recipes. The string-formatting operator, %, provides a handy way to put strings together and to obtain precisely for- matted strings from such objects as floating-point numbers. Again, you’ll find reci- pes in this chapter that show how to use % for your purposes. Python also has lots of standard and extension modules that perform special processing on strings of many kinds. This chapter doesn’t cover such specialized resources, but Chapter 12 is, for example, entirely devoted to the important specialized subject of processing XML. 1.1 Processing a String One Character at a Time Credit: Luther Blissett Problem You want to process a string one character at a time. Solution You can build a list whose items are the string’s characters (meaning that the items are strings, each of length of one—Python doesn’t have a special type for “charac- ters” as distinct from strings). Just call the built-in list, with the string as its argu- ment: thelist = list(thestring) You may not even need to build the list, since you can loop directly on the string with a for statement: for c in thestring: do_something_with(c) or in the for clause of a list comprehension: results = [do_something_with(c) for c in thestring] or, with exactly the same effects as this list comprehension, you can call a function on each character with the map built-in function: results = map(do_something, thestring) • 40. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 8 | Chapter 1: Text Discussion In Python, characters are just strings of length one. You can loop over a string to access each of its characters, one by one. You can use map for much the same pur- pose, as long as what you need to do with each character is call a function on it. Finally, you can call the built-in type list to obtain a list of the length-one sub- strings of the string (i.e., the string’s characters). If what you want is a set whose ele- ments are the string’s characters, you can call sets.Set with the string as the argument (in Python 2.4, you can also call the built-in set in just the same way): import sets magic_chars = sets.Set('abracadabra') poppins_chars = sets.Set('supercalifragilisticexpialidocious') print ''.join(magic_chars & poppins_chars) # set intersection acrd See Also The Library Reference section on sequences; Perl Cookbook Recipe 1.5. 1.2 Converting Between Characters and Numeric Codes Credit: Luther Blissett Problem You need to turn a character into its numeric ASCII (ISO) or Unicode code, and vice versa. Solution That’s what the built-in functions ord and chr are for: >>> print ord('a') 97 >>> print chr(97) a The built-in function ord also accepts as its argument a Unicode string of length one, in which case it returns a Unicode code value, up to 65536. To make a Unicode string of length one from a numeric Unicode code value, use the built-in function unichr: >>> print ord(u'u2020') 8224 >>> print repr(unichr(8224)) u'u2020' • 41. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.3 Testing Whether an Object Is String-like | 9 Discussion It’s a mundane task, to be sure, but it is sometimes useful to turn a character (which in Python just means a string of length one) into its ASCII or Unicode code, and vice versa. The built-in functions ord, chr, and unichr cover all the related needs. Note, in particular, the huge difference between chr(n) and str(n), which beginners some- times confuse...: >>> print repr(chr(97)) 'a' >>> print repr(str(97)) '97' chr takes as its argument a small integer and returns the corresponding single- character string according to ASCII, while str, called with any integer, returns the string that is the decimal representation of that integer. To turn a string into a list of character value codes, use the built-in functions map and ord together, as follows: >>> print map(ord, 'ciao') [99, 105, 97, 111] To build a string from a list of character codes, use ''.join, map and chr; for example: >>> print ''.join(map(chr, range(97, 100))) abc See Also Documentation for the built-in functions chr, ord, and unichr in the Library Refer- ence and Python in a Nutshell. 1.3 Testing Whether an Object Is String-like Credit: Luther Blissett Problem You need to test if an object, typically an argument to a function or method you’re writing, is a string (or more precisely, whether the object is string-like). Solution A simple and fast way to check whether something is a string or Unicode object is to use the built-ins isinstance and basestring, as follows: def isAString(anobj): return isinstance(anobj, basestring) • 42. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 10 | Chapter 1: Text Discussion The first approach to solving this recipe’s problem that comes to many program- mers’ minds is type-testing: def isExactlyAString(anobj): return type(anobj) is type('') However, this approach is pretty bad, as it willfully destroys one of Python’s greatest strengths—smooth, signature-based polymorphism. This kind of test would reject Unicode objects, instances of user-coded subclasses of str, and instances of any user- coded type that is meant to be “string-like”. Using the isinstance built-in function, as recommended in this recipe’s Solution, is much better. The built-in type basestring exists exactly to enable this approach. basestring is a common base class for the str and unicode types, and any string-like type that user code might define should also subclass basestring, just to make sure that such isinstance testing works as intended. basestring is essentially an “empty” type, just like object, so no cost is involved in subclassing it. Unfortunately, the canonical isinstance checking fails to accept such clearly string- like objects as instances of the UserString class from Python Standard Library mod- ule UserString, since that class, alas, does not inherit from basestring. If you need to support such types, you can check directly whether an object behaves like a string— for example: def isStringLike(anobj): try: anobj + '' except: return False else: return True This isStringLike function is slower and more complicated than the isAString func- tion presented in the “Solution”, but it does accept instances of UserString (and other string-like types) as well as instances of str and unicode. The general Python approach to type-checking is known as duck typing: if it walks like a duck and quacks like a duck, it’s duck-like enough for our purposes. The isStringLike function in this recipe goes only as far as the quacks-like part, but that may be enough. If and when you need to check for more string-like features of the object anobj, it’s easy to test a few more properties by using a richer expression in the try clause—for example, changing the clause to: try: anobj.lower( ) + anobj + '' In my experience, however, the simple test shown in the isStringLike function usu- ally does what I need. The most Pythonic approach to type validation (or any validation task, really) is just to try to perform whatever task you need to do, detecting and handling any errors or exceptions that might result if the situation is somehow invalid—an approach known as “it’s easier to ask forgiveness than permission” (EAFP). try/except is the • 43. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.4 Aligning Strings | 11 key tool in enabling the EAFP style. Sometimes, as in this recipe, you may choose some simple task, such as concatenation to the empty string, as a stand-in for a much richer set of properties (such as, all the wealth of operations and methods that string objects make available). See Also Documentation for the built-ins isinstance and basestring in the Library Reference and Python in a Nutshell. 1.4 Aligning Strings Credit: Luther Blissett Problem You want to align strings: left, right, or center. Solution That’s what the ljust, rjust, and center methods of string objects are for. Each takes a single argument, the width of the string you want as a result, and returns a copy of the starting string with spaces added on either or both sides: >>> print '|', 'hej'.ljust(20), '|', 'hej'.rjust(20), '|', 'hej'.center(20), '|' | hej | hej | hej | Discussion Centering, left-justifying, or right-justifying text comes up surprisingly often—for example, when you want to print a simple report with centered page numbers in a monospaced font. Because of this, Python string objects supply this functionality through three of their many methods. In Python 2.3, the padding character is always a space. In Python 2.4, however, while space-padding is still the default, you may optionally call any of these methods with a second argument, a single character to be used for the padding: >>> print 'hej'.center(20, '+') ++++++++hej+++++++++ See Also The Library Reference section on string methods; Java Cookbook recipe 3.5. • 44. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 12 | Chapter 1: Text 1.5 Trimming Space from the Ends of a String Credit: Luther Blissett Problem You need to work on a string without regard for any extra leading or trailing spaces a user may have typed. Solution That’s what the lstrip, rstrip, and strip methods of string objects are for. Each takes no argument and returns a copy of the starting string, shorn of whitespace on either or both sides: >>> x = ' hej ' >>> print '|', x.lstrip( ), '|', x.rstrip( ), '|', x.strip( ), '|' | hej | hej | hej | Discussion Just as you may need to add space to either end of a string to align that string left, right, or center in a field of fixed width (as covered previously in recipe 1.4 “Aligning Strings”), so may you need to remove all whitespace (blanks, tabs, newlines, etc.) from either or both ends. Because this need is frequent, Python string objects supply this functionality through three of their many methods. Optionally, you may call each of these methods with an argument, a string composed of all the characters you want to trim from either or both ends instead of trimming whitespace characters: >>> x = 'xyxxyy hejyx yyx' >>> print '|'+x.strip('xy')+'|' | hejyx | Note that in these cases the leading and trailing spaces have been left in the resulting string, as have the 'yx' that are followed by spaces: only all the occurrences of 'x' and 'y' at either end of the string have been removed from the resulting string. See Also The Library Reference section on string methods; Recipe 1.4 “Aligning Strings”; Java Cookbook recipe 3.12. 1.6 Combining Strings Credit: Luther Blissett Problem You have several small strings that you need to combine into one larger string. • 45. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.6 Combining Strings | 13 Solution To join a sequence of small strings into one large string, use the string operator join. Say that pieces is a list whose items are strings, and you want one big string with all the items concatenated in order; then, you should code: largeString = ''.join(pieces) To put together pieces stored in a few variables, the string-formatting operator % can often be even handier: largeString = '%s%s something %s yet more' % (small1, small2, small3) Discussion In Python, the + operator concatenates strings and therefore offers seemingly obvi- ous solutions for putting small strings together into a larger one. For example, when you have pieces stored in a few variables, it seems quite natural to code something like: largeString = small1 + small2 + ' something ' + small3 + ' yet more' And similarly, when you have a sequence of small strings named pieces, it seems quite natural to code something like: largeString = '' for piece in pieces: largeString += piece Or, equivalently, but more fancifully and compactly: import operator largeString = reduce(operator.add, pieces, '') However, it’s very important to realize that none of these seemingly obvious solu- tion is good—the approaches shown in the “Solution” are vastly superior. In Python, string objects are immutable. Therefore, any operation on a string, includ- ing string concatenation, produces a new string object, rather than modifying an existing one. Concatenating N strings thus involves building and then immediately throwing away each of N-1 intermediate results. Performance is therefore vastly bet- ter for operations that build no intermediate results, but rather produce the desired end result at once. Python’s string-formatting operator % is one such operation, particularly suitable when you have a few pieces (e.g., each bound to a different variable) that you want to put together, perhaps with some constant text in addition. Performance is not a major issue for this specific kind of task. However, the % operator also has other potential advantages, when compared to an expression that uses multiple + opera- tions on strings. % is more readable, once you get used to it. Also, you don’t have to call str on pieces that aren’t already strings (e.g., numbers), because the format spec- ifier %s does so implicitly. Another advantage is that you can use format specifiers • 46. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 14 | Chapter 1: Text other than %s, so that, for example, you can control how many significant digits the string form of a floating-point number should display. When you have many small string pieces in a sequence, performance can become a truly important issue. The time needed to execute a loop using + or += (or a fancier but equivalent approach using the built-in function reduce) grows with the square of the number of characters you are accumulating, since the time to allocate and fill a large string is roughly proportional to the length of that string. Fortunately, Python offers an excellent alternative. The join method of a string object s takes as its only argument a sequence of strings and produces a string result obtained by concatenat- ing all items in the sequence, with a copy of s joining each item to its neighbors. For example, ''.join(pieces) concatenates all the items of pieces in a single gulp, with- out interposing anything between them, and ', '.join(pieces) concatenates the What Is ”a Sequence?“ Python does not have a specific type called sequence, but sequence is still an often-used term in Python. sequence, strictly speaking, means: a container that can be iterated on, to get a finite number of items, one at a time, and that also supports indexing, slicing, and being passed to the built-in function len (which gives the number of items in a con- tainer). Python lists are the “sequences” you’ll meet most often, but there are many others (strings, unicode objects, tuples, array.arrays,etc.). Often, one does not need indexing, slicing, and len—the ability to iterate, one item at a time, suffices. In that case, one should speak of an iterable (or, to focus on the finite number of items issue, a bounded iterable). Iterables that are not sequences include dic- tionaries (iteration gives the keys of the dictionary, one at a time in arbitrary order), file objects (iteration gives the lines of the text file, one at a time), and many more, includ- ing iterators and generators. Any iterable can be used in a for loop statement and in many equivalent contexts (the for clause of a list comprehension or Python 2.4 gener- ator expression, and also many built-ins such as min, max, zip, sum, str.join, etc.). At, you can find a Python Glossary that can help you with these and several other terms. However, while the editors of this cookbook have tried to adhere to the word usage that the glossary describes, you will still find many places where this book says a sequence or an iterable or even a list, where, by strict terminology, one should always say a bounded iterable. For example, at the start of this recipe’s Solution, we say “a sequence of small strings” where, in fact, any bounded iterable of strings suffices. The problem with using “bounded iterable” all over the place is that it would make this book read more like a mathematics text- book than a practical programming book! So, we have deviated from terminological rigor where readability, and maintaining in the book a variety of “voices”, were better served by slightly imprecise terminology that is nevertheless entirely clear in context. • 47. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.7 Reversing a String by Words or Characters | 15 items putting a comma and a space between each pair of them. It’s the fastest, neat- est, and most elegant and readable way to put a large string together. When the pieces are not all available at the same time, but rather come in sequen- tially from input or computation, use a list as an intermediate data structure to hold the pieces (to add items at the end of a list, you can call the append or extend meth- ods of the list). At the end, when the list of pieces is complete, call ''.join(thelist) to obtain the big string that’s the concatenation of all pieces. Of all the many handy tips and tricks I could give you about Python strings, I consider this one by far the most significant: the most frequent reason some Python programs are too slow is that they build up big strings with + or +=. So, train yourself never to do that. Use, instead, the ''.join approach recommented in this recipe. Python 2.4 makes a heroic attempt to ameliorate the issue, reducing a little the per- formance penalty due to such erroneous use of +=. While ''.join is still way faster and in all ways preferable, at least some newbie or careless programmer gets to waste somewhat fewer machine cycles. Similarly, psyco (a specializing just-in-time [JIT] Python compiler found at, can reduce the += penalty even further. Nevertheless, ''.join remains the best approach in all cases. See Also The Library Reference and Python in a Nutshell sections on string methods, string- formatting operations, and the operator module. 1.7 Reversing a String by Words or Characters Credit: Alex Martelli Problem You want to reverse the characters or words in a string. Solution Strings are immutable, so, to reverse one, we need to make a copy. The simplest approach for reversing is to take an extended slice with a “step” of -1, so that the slic- ing proceeds backwards: revchars = astring[::-1] To flip words, we need to make a list of words, reverse it, and join it back into a string with a space as the joiner: revwords = astring.split( ) # string -> list of words revwords.reverse( ) # reverse the list in place revwords = ' '.join(revwords) # list of strings -> string • 48. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 16 | Chapter 1: Text or, if you prefer terse and compact “one-liners”: revwords = ' '.join(astring.split( )[::-1]) If you need to reverse by words while preserving untouched the intermediate whitespace, you can split by a regular expression: import re revwords = re.split(r'(s+)', astring) # separators too, since '(...)' revwords.reverse( ) # reverse the list in place revwords = ''.join(revwords) # list of strings -> string Note that the joiner must be the empty string in this case, because the whitespace separators are kept in the revwords list (by using re.split with a regular expression that includes a parenthesized group). Again, you could make a one-liner, if you wished: revwords = ''.join(re.split(r'(s+)', astring)[::-1]) but this is getting too dense and unreadable to be good Python code! Discussion In Python 2.4, you may make the by-word one-liners more readable by using the new built-in function reversed instead of the less readable extended-slicing indicator [::-1]: revwords = ' '.join(reversed(astring.split( ))) revwords = ''.join(reversed(re.split(r'(s+)', astring))) For the by-character case, though, astring[::-1] remains best, even in 2.4, because to use reversed, you’d have to introduce a call to ''.join as well: revchars = ''.join(reversed(astring)) The new reversed built-in returns an iterator, suitable for looping on or for passing to some “accumulator” callable such as ''.join—it does not return a ready-made string! See Also Library Reference and Python in a Nutshell docs on sequence types and slicing, and (2.4 only) the reversed built-in; Perl Cookbook recipe 1.6. 1.8 Checking Whether a String Contains a Set of Characters Credit: Jürgen Hermann, Horst Hansen Problem You need to check for the occurrence of any of a set of characters in a string. • 49. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.8 Checking Whether a String Contains a Set of Characters | 17 Solution The simplest approach is clear, fast, and general (it works for any sequence, not just strings, and for any container on which you can test for membership, not just sets): def containsAny(seq, aset): """ Check whether sequence seq contains ANY of the items in aset. """ for c in seq: if c in aset: return True return False You can gain a little speed by moving to a higher-level, more sophisticated approach, based on the itertools standard library module, essentially expressing the same approach in a different way: import itertools def containsAny(seq, aset): for item in itertools.ifilter(aset.__contains__, seq): return True return False Discussion Most problems related to sets are best handled by using the set built-in type intro- duced in Python 2.4 (if you’re using Python 2.3, you can use the equivalent sets.Set type from the Python Standard Library). However, there are exceptions. Here, for example, a pure set-based approach would be something like: def containsAny(seq, aset): return bool(set(aset).intersection(seq)) However, with this approach, every item in seq inevitably has to be examined. The functions in this recipe’s Solution, on the other hand, “short-circuit”: they return as soon as they know the answer. They must still check every item in seq when the answer is False—we could never affirm that no item in seq is a member of aset with- out examining all the items, of course. But when the answer is True, we often learn about that very soon, namely as soon as we examine one item that is a member of aset. Whether this matters at all is very data-dependent, of course. It will make no practical difference when seq is short, or when the answer is typically False, but it may be extremely important for a very long seq (when the answer can typically be soon determined to be True). The first version of containsAny presented in the recipe has the advantage of simplic- ity and clarity: it expresses the fundamental idea with total transparency. The sec- ond version may appear to be “clever”, and that is not a complimentary adjective in the Python world, where simplicity and clarity are core values. However, the second version is well worth considering, because it shows a higher-level approach, based on the itertools module of the standard library. Higher-level approaches are most often preferable to lower-level ones (although the issue is moot in this particular case). itertools.ifilter takes a predicate and an iterable, and yields the items in that • 50. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 18 | Chapter 1: Text iterable that satisfy the “predicate”. Here, as the “predicate”, we use aset.__contains_ _, the bound method that is internally called when we code in aset for membership testing. So, if ifilter yields anything at all, it yields an item of seq that is also a member of aset, so we can return True as soon as this happens. If we get to the statement following the for, it must mean the return True never executed, because no items of seq are members of aset, so we can return False. If your application needs some function such as containsAny to check whether a string (or other sequence) contains any members of a set, you may also need such variants as: def containsOnly(seq, aset): """ Check whether sequence seq contains ONLY items in aset. """ for c in seq: if c not in aset: return False return True containsOnly is the same function as containsAny, but with the logic turned upside- down. Other apparently similar tasks don’t lend themselves to short-circuiting (they intrinsically need to examine all items) and so are best tackled by using the built-in type set (in Python 2.4; in 2.3, you can use sets.Set in the same way): def containsAll(seq, aset): """ Check whether sequence seq contains ALL the items in aset. """ return not set(aset).difference(seq) If you’re not accustomed to using the set (or sets.Set) method difference, be aware of its semantics: for any set a, a.difference(b) (just like a-set(b)) returns the set of all elements of a that are not in b. For example: >>> L1 = [1, 2, 3, 3] >>> L2 = [1, 2, 3, 4] >>> set(L1).difference(L2) set([ ]) >>> set(L2).difference(L1) set([4]) which hopefully helps explain why: >>> containsAll(L1, L2) False >>> containsAll(L2, L1) True What Is “a Predicate?” A term you can see often in discussions about programming is predicate: it just means a function (or other callable object) that returns True or False as its result. A predicate is said to be satisfied when it returns True. • 51. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.8 Checking Whether a String Contains a Set of Characters | 19 (In other words, don’t confuse difference with another method of set, symmetric_ difference, which returns the set of all items that are in either argument and not in the other.) When you’re dealing specifically with (plain, not Unicode) strings for both seq and aset, you may not need the full generality of the functions presented in this recipe, and may want to try the more specialized approach explained in recipe 1.10 “Filter- ing a String for a Set of Characters” based on strings’ method translate and the string.maketrans function from the Python Standard Library. For example: import string notrans = string.maketrans('', '') # identity "translation" def containsAny(astr, strset): return len(strset) != len(strset.translate(notrans, astr)) def containsAll(astr, strset): return not strset.translate(notrans, astr) This somewhat tricky approach relies on strset.translate(notrans, astr) being the subsequence of strset that is made of characters not in astr. When that subse- quence has the same length as strset, no characters have been removed by strset.translate, therefore no characters of strset are in astr. Conversely, when the subsequence is empty, all characters have been removed, so all characters of strset are in astr. The translate method keeps coming up naturally when one wants to treat strings as sets of characters, because it’s speedy as well as handy and flexible; see recipe 1.10 “Filtering a String for a Set of Characters” for more details. These two sets of approaches to the recipe’s tasks have very different levels of gener- ality. The earlier approaches are very general: not at all limited to string processing, they make rather minimal demands on the objects you apply them to. The approach based on the translate method, on the other hand, works only when both astr and strset are strings, or very closely mimic plain strings’ functionality. Not even Uni- code strings suffice, because the translate method of Unicode strings has a signa- ture that is different from that of plain strings—a single argument (a dict mapping code numbers to Unicode strings or None) instead of two (both strings). See Also Recipe 1.10 “Filtering a String for a Set of Characters”; documentation for the translate method of strings and Unicode objects, and maketrans function in the string module, in the Library Reference and Python in a Nutshell; ditto for documen- tation of built-in set (Python 2.4 only), modules sets and itertools, and the special method __contains__. • 52. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 20 | Chapter 1: Text 1.9 Simplifying Usage of Strings’ translate Method Credit: Chris Perkins, Raymond Hettinger Problem You often want to use the fast code in strings’ translate method, but find it hard to remember in detail how that method and the function string.maketrans work, so you want a handy facade to simplify their use in typical cases. Solution The translate method of strings is quite powerful and flexible, as detailed in recipe 1.10 “Filtering a String for a Set of Characters.” However, exactly because of that power and flexibility, it may be a nice idea to front it with a “facade” that simplifies its typical use. A little factory function, returning a closure, can do wonders for this kind of task: import string def translator(frm='', to='', delete='', keep=None): if len(to) == 1: to = to * len(frm) trans = string.maketrans(frm, to) if keep is not None: allchars = string.maketrans('', '') delete = allchars.translate(allchars, keep.translate(allchars, delete)) def translate(s): return s.translate(trans, delete) return translate Discussion I often find myself wanting to use strings’ translate method for any one of a few purposes, but each time I have to stop and think about the details (see recipe 1.10 “Filtering a String for a Set of Characters” for more information about those details). So, I wrote myself a class (later remade into the factory closure presented in this rec- ipe’s Solution) to encapsulate various possibilities behind a simpler-to-use facade. Now, when I want a function that keeps only characters from a given set, I can easily build and use that function: >>> digits_only = translator(keep=string.digits) >>> digits_only('Chris Perkins : 224-7992') '2247992' It’s similarly simple when I want to remove a set of characters: >>> no_digits = translator(delete=string.digits) >>> no_digits('Chris Perkins : 224-7992') 'Chris Perkins : -' • 53. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.9 Simplifying Usage of Strings’ translate Method | 21 and when I want to replace a set of characters with a single character: >>> digits_to_hash = translator(from=string.digits, to='#') >>> digits_to_hash('Chris Perkins : 224-7992') 'Chris Perkins : ###-####' While the latter may appear to be a bit of a special case, it is a task that keeps com- ing up for me every once in a while. I had to make one arbitrary design decision in this recipe—namely, I decided that the delete parameter “trumps” the keep parameter if they overlap: >>> trans = translator(delete='abcd', keep='cdef') >>> trans('abcdefg') 'ef' For your applications it might be preferable to ignore delete if keep is specified, or, perhaps better, to raise an exception if they are both specified, since it may not make much sense to let them both be given in the same call to translator, anyway. Also: as noted in recipe 1.8 “Checking Whether a String Contains a Set of Characters” and recipe 1.10 “Filtering a String for a Set of Characters,” the code in this recipe works only for normal strings, not for Unicode strings. See recipe 1.10 “Filtering a String for a Set of Characters” to learn how to code this kind of functionality for Unicode strings, whose translate method is different from that of plain (i.e., byte) strings. Closures A closure is nothing terribly complicated: just an “inner” function that refers to names (variables) that are local to an “outer” function containing it. Canonical toy-level example: def make_adder(addend): def adder(augend): return augend+addend return adder Executing p = make_adder(23) makes a closure of inner function adder internally refer- ring to a name addend that is bound to the value 23. Then, q = make_adder(42) makes another closure, for which, internally, name addend is instead bound to the value 42. Making q in no way interferes with p, they can happily and independently coexist. So we can now execute, say, print p(100), q(100) and enjoy the output 123 142. In practice, you may often see make_adder referred to as a closure rather than by the pedantic, ponderous periphrasis “a function that returns a closure”—fortunately, con- text often clarifies the situation. Calling make_adder a factory (or factory function) is both accurate and concise; you may also say it’s a closure factory to specify it builds and returns closures, rather than, say, classes or class instances. • 54. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 22 | Chapter 1: Text See Also Recipe 1.10 “Filtering a String for a Set of Characters” for a direct equivalent of this recipe’s translator(keep=...), more information on the translate method, and an equivalent approach for Unicode strings; documentation for strings’ translate method, and for the maketrans function in the string module, in the Library Refer- ence and Python in a Nutshell. 1.10 Filtering a String for a Set of Characters Credit: Jürgen Hermann, Nick Perkins, Peter Cogolo Problem Given a set of characters to keep, you need to build a filtering function that, applied to any string s, returns a copy of s that contains only characters in the set. Solution The translate method of string objects is fast and handy for all tasks of this ilk. However, to call translate effectively to solve this recipe’s task, we must do some advance preparation. The first argument to translate is a translation table: in this recipe, we do not want to do any translation, so we must prepare a first argument that specifies “no translation”. The second argument to translate specifies which characters we want to delete: since the task here says that we’re given, instead, a set of characters to keep (i.e., to not delete), we must prepare a second argument that gives the set complement—deleting all characters we must not keep. A closure is the best way to do this advance preparation just once, obtaining a fast filtering function tailored to our exact needs: import string # Make a reusable string of all characters, which does double duty # as a translation table specifying "no translation whatsoever" allchars = string.maketrans('', '') def makefilter(keep): """ Return a function that takes a string and returns a partial copy of that string consisting of only the characters in 'keep'. Note that `keep' must be a plain string. """ # Make a string of all characters that are not in 'keep': the "set # complement" of keep, meaning the string of characters we must delete delchars = allchars.translate(allchars, keep) # Make and return the desired filtering function (as a closure) def thefilter(s): return s.translate(allchars, delchars) return thefilter if __name__ == '__main__': just_vowels = makefilter('aeiouy') print just_vowels('four score and seven years ago') • 55. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.10 Filtering a String for a Set of Characters | 23 # emits: ouoeaeeyeaao print just_vowels('tiger, tiger burning bright') # emits: ieieuii Discussion The key to understanding this recipe lies in the definitions of the maketrans function in the string module of the Python Standard Library and in the translate method of string objects. translate returns a copy of the string you call it on, replacing each character in it with the corresponding character in the translation table passed in as the first argument and deleting the characters specified in the second argument. maketrans is a utility function to create translation tables. (A translation table is a string t of exactly 256 characters: when you pass t as the first argument of a translate method, each character c of the string on which you call the method is translated in the resulting string into the character t[ord(c)].) In this recipe, efficiency is maximized by splitting the filtering task into preparation and execution phases. The string of all characters is clearly reusable, so we build it once and for all as a global variable when this module is imported. That way, we ensure that each filtering function uses the same string-of-all-characters object, not wasting any memory. The string of characters to delete, which we need to pass as the second argument to the translate method, depends on the set of characters to keep, because it must be built as the “set complement” of the latter: we must tell translate to delete every character that we do not want to keep. So, we build the delete-these- characters string in the makefilter factory function. This building is done quite rap- idly by using the translate method to delete the “characters to keep” from the string of all characters. The translate method is very fast, as are the construction and exe- cution of these useful little resulting functions. The test code that executes when this recipe runs as a main script shows how to build a filtering function by calling makefilter, bind a name to the filtering function (by simply assigning the result of calling makefilter to a name), then call the filtering function on some strings and print the results. Incidentally, calling a filtering function with allchars as the argument puts the set of characters being kept into a canonic string form, alphabetically sorted and without duplicates. You can use this idea to code a very simple function to return the canonic form of any set of characters presented as an arbitrary string: def canonicform(s): """ Given a string s, return s's characters as a canonic-form string: alphabetized and without duplicates. """ return makefilter(s)(allchars) The Solution uses a def statement to make the nested function (closure) it returns, because def is the most normal, general, and clear way to make functions. If you prefer, you could use lambda instead, changing the def and return statements in func- tion makefilter into just one return lambda statement: return lambda s: s.translate(allchars, delchars) • 56. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 24 | Chapter 1: Text Most Pythonistas, but not all, consider using def clearer and more readable than using lambda. Since this recipe deals with strings seen as sets of characters, you could alternatively use the sets.Set type (or, in Python 2.4, the new built-in set type) to perform the same tasks. Thanks to the translate method’s power and speed, it’s often faster to work directly on strings, rather than go through sets, for tasks of this ilk. However, just as noted in recipe 1.8 “Checking Whether a String Contains a Set of Charac- ters,” the functions in this recipe only work for normal strings, not for Unicode strings. To solve this recipe’s task for Unicode strings, we must do some very different prepa- ration. A Unicode string’s translate method takes only one argument: a mapping or sequence, which is indexed with the code number of each character in the string. Characters whose codes are not keys in the mapping (or indices in the sequence) are just copied over to the output string. Otherwise, the value corresponding to each character’s code must be either a Unicode string (which is substituted for the charac- ter) or None (in which case the character is deleted). A very nice and powerful arrangement, but unfortunately not one that’s identical to the way plain strings work, so we must recode. Normally, we use either a dict or a list as the argument to a Unicode string’s translate method to translate some characters and/or delete some. But for the spe- cific task of this recipe (i.e., keep just some characters, delete all others), we might need an inordinately large dict or string, just mapping all other characters to None. It’s better to code, instead, a little class that appropriately implements a __getitem__ method (the special method that gets called in indexing operations). Once we’re going to the (slight) trouble of coding a little class, we might as well make its instances callable and have makefilter be just a synonym for the class itself: import sets class Keeper(object): def __init__(self, keep): self.keep = sets.Set(map(ord, keep)) def __getitem__(self, n): if n not in self.keep: return None return unichr(n) def __call__(self, s): return unicode(s).translate(self) makefilter = Keeper if __name__ == '__main__': just_vowels = makefilter('aeiouy') print just_vowels(u'four score and seven years ago') # emits: ouoeaeeyeaao print just_vowels(u'tiger, tiger burning bright') # emits: ieieuii • 57. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.11 Checking Whether a String Is Text or Binary | 25 We might name the class itself makefilter, but, by convention, one normally names classes with an uppercase initial; there is essentially no cost in following that conven- tion here, too, so we did. See Also Recipe 1.8 “Checking Whether a String Contains a Set of Characters”; documenta- tion for the translate method of strings and Unicode objects, and maketrans func- tion in the string module, in the Library Reference and Python in a Nutshell. 1.11 Checking Whether a String Is Text or Binary Credit: Andrew Dalke Problem Python can use a plain string to hold either text or arbitrary bytes, and you need to determine (heuristically, of course: there can be no precise algorithm for this) which of the two cases holds for a certain string. Solution We can use the same heuristic criteria as Perl does, deeming a string binary if it con- tains any nulls or if more than 30% of its characters have the high bit set (i.e., codes greater than 126) or are strange control codes. We have to code this ourselves, but this also means we easily get to tweak the heuristics for special application needs: from __future__ import division # ensure / does NOT truncate import string text_characters = "".join(map(chr, range(32, 127))) + "nrtb" _null_trans = string.maketrans("", "") def istext(s, text_characters=text_characters, threshold=0.30): # if s contains any null, it's not text: if "0" in s: return False # an “empty” string is "text" (arbitrary but reasonable choice): if not s: return True # Get the substring of s made up of non-text characters t = s.translate(_null_trans, text_characters) # s is 'text' if less than 30% of its characters are non-text ones: return len(t)/len(s) <= threshold Discussion You can easily do minor customizations to the heuristics used by function istext by passing in specific values for the threshold, which defaults to 0.30 (30%), or for the string of those characters that are to be deemed “text” (which defaults to normal ASCII characters plus the four “normal” control characters, meaning ones that are often found in text). For example, if you expected Italian text encoded as ISO-8859- • 58. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 26 | Chapter 1: Text 1, you could add the accented letters used in Italian, "àèéìòù", to the text_ characters argument. Often, what you need to check as being either binary or text is not a string, but a file. Again, we can use the same heuristics as Perl, checking just the first block of the file with the istext function shown in this recipe’s Solution: def istextfile(filename, blocksize=512, **kwds): return istext(open(filename).read(blocksize), **kwds) Note that, by default, the expression len(t)/len(s) used in the body of function istext would truncate the result to 0, since it is a division between integer numbers. In some future version (probably Python 3.0, a few years away), Python will change the meaning of the / operator so that it performs division without truncation—if you really do want truncation, you should use the truncating-division operator, //. However, Python has not yet changed the semantics of division, keeping the old one by default in order to ensure backwards compatibility. It’s important that the mil- lions of lines of code of Python programs and modules that already exist keep run- ning smoothly under all new 2.x versions of Python—only upon a change of major language version number, no more often than every decade or so, is Python allowed to change in ways that aren’t backwards-compatible. Since, in the small module containing this recipe’s Solution, it’s handy for us to get the division behavior that is scheduled for introduction in some future release, we start our module with the statement: from __future__ import division This statement doesn’t affect the rest of the program, only the specific module that starts with this statement; throughout this module, / performs “true division” (with- out truncation). As of Python 2.3 and 2.4, division is the only thing you may want to import from __future__. Other features that used to be scheduled for the future, nested_scopes and generators, are now part of the language and cannot be turned off—it’s innocuous to import them, but it makes sense to do so only if your pro- gram also needs to run under some older version of Python. See Also Recipe 1.10 “Filtering a String for a Set of Characters” for more details about func- tion maketrans and string method translate; Language Reference for details about true versus truncating division. 1.12 Controlling Case Credit: Luther Blissett Problem You need to convert a string from uppercase to lowercase, or vice versa. • 59. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.12 Controlling Case | 27 Solution That’s what the upper and lower methods of string objects are for. Each takes no arguments and returns a copy of the string in which each letter has been changed to upper- or lowercase, respectively. big = little.upper( ) little = big.lower( ) Characters that are not letters are copied unchanged. s.capitalize is similar to s[:1].upper( )+s[1:].lower( ): the first character is changed to uppercase, and all others are changed to lowercase. s.title is again simi- lar, but it capitalizes the first letter of each word (where a “word” is a sequence of let- ters) and uses lowercase for all other letters: >>> print 'one tWo thrEe'.capitalize( ) One two three >>> print 'one tWo thrEe'.title( ) One Two Three Discussion Case manipulation of strings is a very frequent need. Because of this, several string methods let you produce case-altered copies of strings. Moreover, you can also check whether a string object is already in a given case form, with the methods isupper, islower, and istitle, which all return True if the string is not empty, contains at least one letter, and already meets the uppercase, lowercase, or titlecase constraints. There is no analogous iscapitalized method, and coding it is not trivial, if we want behavior that’s strictly similar to strings’ is... methods. Those methods all return False for an “empty” string, and the three case-checking ones also return False for strings that, while not empty, contain no letters at all. The simplest and clearest way to code iscapitalized is clearly: def iscapitalized(s): return s == s.capitalize( ) However, this version deviates from the boundary-case semantics of the analogous is... methods, since it also returns True for strings that are empty or contain no let- ters. Here’s a stricter one: import string notrans = string.maketrans('', '') # identity "translation" def containsAny(str, strset): return len(strset) != len(strset.translate(notrans, str)) def iscapitalized(s): return s == s.capitalize( ) and containsAny(s, string.letters) Here, we use the function shown in recipe 1.8 “Checking Whether a String Contains a Set of Characters” to ensure we return False if s is empty or contains no letters. As noted in recipe 1.8 “Checking Whether a String Contains a Set of Characters,” this means that this specific version works only for plain strings, not for Unicode ones. • 60. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 28 | Chapter 1: Text See Also Library Reference and Python in a Nutshell docs on string methods; Perl Cookbook recipe 1.9; recipe 1.8 “Checking Whether a String Contains a Set of Characters.” 1.13 Accessing Substrings Credit: Alex Martelli Problem You want to access portions of a string. For example, you’ve read a fixed-width record and want to extract the record’s fields. Solution Slicing is great, but it only does one field at a time: afield = theline[3:8] If you need to think in terms of field lengths, struct.unpack may be appropriate. For example: import struct # Get a 5-byte string, skip 3, get two 8-byte strings, then all the rest: baseformat = "5s 3x 8s 8s" # by how many bytes does theline exceed the length implied by this # base-format (24 bytes in this case, but struct.calcsize is general) numremain = len(theline) - struct.calcsize(baseformat) # complete the format with the appropriate 's' field, then unpack format = "%s %ds" % (baseformat, numremain) l, s1, s2, t = struct.unpack(format, theline) If you want to skip rather than get "all the rest", then just unpack the initial part of theline with the right length: l, s1, s2 = struct.unpack(baseformat, theline[:struct.calcsize(baseformat)]) If you need to split at five-byte boundaries, you can easily code a list comprehension (LC) of slices: fivers = [theline[k:k+5] for k in xrange(0, len(theline), 5)] Chopping a string into individual characters is of course easier: chars = list(theline) If you prefer to think of your data as being cut up at specific columns, slicing with LCs is generally handier: cuts = [8, 14, 20, 26, 30] pieces = [ theline[i:j] for i, j in zip([0]+cuts, cuts+[None]) ] • 61. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.13 Accessing Substrings | 29 The call to zip in this LC returns a list of pairs of the form (cuts[k], cuts[k+1]), except that the first pair is (0, cuts[0]), and the last one is (cuts[len(cuts)-1], None). In other words, each pair gives the right (i, j) for slicing between each cut and the next, except that the first one is for the slice before the first cut, and the last one is for the slice from the last cut to the end of the string. The rest of the LC just uses these pairs to cut up the appropriate slices of theline. Discussion This recipe was inspired by recipe 1.1 in the Perl Cookbook. Python’s slicing takes the place of Perl’s substr. Perl’s built-in unpack and Python’s struct.unpack are simi- lar. Perl’s is slightly richer, since it accepts a field length of * for the last field to mean all the rest. In Python, we have to compute and insert the exact length for either extraction or skipping. This isn’t a major issue because such extraction tasks will usually be encapsulated into small functions. Memoizing, also known as automatic caching, may help with performance if the function is called repeatedly, since it allows you to avoid redoing the preparation of the format for the struct unpacking. See recipe 18.5 “Memoizing (Caching) the Return Values of Functions” for details about memoizing. In a purely Python context, the point of this recipe is to remind you that struct.unpack is often viable, and sometimes preferable, as an alternative to string slicing (not quite as often as unpack versus substr in Perl, given the lack of a *-valued field length, but often enough to be worth keeping in mind). Each of these snippets is, of course, best encapsulated in a function. Among other advantages, encapsulation ensures we don’t have to work out the computation of the last field’s length on each and every use. This function is the equivalent of the first snippet using struct.unpack in the “Solution”: def fields(baseformat, theline, lastfield=False): # by how many bytes does theline exceed the length implied by # base-format (struct.calcsize computes exactly that length) numremain = len(theline)-struct.calcsize(baseformat) # complete the format with the appropriate 's' or 'x' field, then unpack format = "%s %d%s" % (baseformat, numremain, lastfield and "s" or "x") return struct.unpack(format, theline) A design decision worth noticing (and, perhaps, worth criticizing) is that of having a lastfield=False optional parameter. This reflects the observation that, while we often want to skip the last, unknown-length subfield, sometimes we want to retain it instead. The use of lastfield in the expression lastfield and s or x (equivalent to C’s ternary operator lastfield?"s":"c") saves an if/else, but it’s unclear whether the saving is worth the obscurity. See recipe 18.9 “Simulating the Ternary Operator in Python” for more about simulating ternary operators in Python. • 62. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 30 | Chapter 1: Text If function fields is called in a loop, memoizing (caching) with a key that is the tuple (baseformat, len(theline), lastfield) may offer faster performance. Here’s a ver- sion of fields with memoizing: def fields(baseformat, theline, lastfield=False, _cache={ }): # build the key and try getting the cached format string key = baseformat, len(theline), lastfield format = _cache.get(key) if format is None: # no format string was cached, build and cache it numremain = len(theline)-struct.calcsize(baseformat) _cache[key] = format = "%s %d%s" % ( baseformat, numremain, lastfield and "s" or "x") return struct.unpack(format, theline) The idea behind this memoizing is to perform the somewhat costly preparation of format only once for each set of arguments requiring that preparation, thereafter storing it in the _cache dictionary. Of course, like all optimizations, memoizing needs to be validated by measuring performance to check that each given optimization does actually speed things up. In this case, I measure an increase in speed of approxi- mately 30% to 40% for the memoized version, meaning that the optimization is probably not worth the bother unless the function is part of a performance bottle- neck for your program. The function equivalent of the next LC snippet in the solution is: def split_by(theline, n, lastfield=False): # cut up all the needed pieces pieces = [theline[k:k+n] for k in xrange(0, len(theline), n)] # drop the last piece if too short and not required if not lastfield and len(pieces[-1]) < n: pieces.pop( ) return pieces And for the last snippet: def split_at(theline, cuts, lastfield=False): # cut up all the needed pieces pieces = [ theline[i:j] for i, j in zip([0]+cuts, cuts+[None]) ] # drop the last piece if not required if not lastfield: pieces.pop( ) return pieces In both of these cases, a list comprehension doing slicing turns out to be slightly preferable to the use of struct.unpack. A completely different approach is to use generators, such as: def split_at(the_line, cuts, lastfield=False): last = 0 for cut in cuts: yield the_line[last:cut] last = cut if lastfield: yield the_line[last:] • 63. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.14 Changing the Indentation of a Multiline String | 31 def split_by(the_line, n, lastfield=False): return split_at(the_line, xrange(n, len(the_line), n), lastfield) Generator-based approaches are particularly appropriate when all you need to do on the sequence of resulting fields is loop over it, either explicitly, or implicitly by call- ing on it some “accumulator” callable such as ''.join. If you do need to materialize a list of the fields, and what you have available is a generator instead, you only need to call the built-in list on the generator, as in: list_of_fields = list(split_by(the_line, 5)) See Also Recipe 18.9 “Simulating the Ternary Operator in Python” and recipe 18.5 “Memoiz- ing (Caching) the Return Values of Functions”; Perl Cookbook recipe 1.1. 1.14 Changing the Indentation of a Multiline String Credit: Tom Good Problem You have a string made up of multiple lines, and you need to build another string from it, adding or removing leading spaces on each line so that the indentation of each line is some absolute number of spaces. Solution The methods of string objects are quite handy, and let us write a simple function to perform this task: def reindent(s, numSpaces): leading_space = numSpaces * ' ' lines = [ leading_space + line.strip( ) for line in s.splitlines( ) ] return 'n'.join(lines) Discussion When working with text, it may be necessary to change the indentation level of a block. This recipe’s code adds leading spaces to or removes them from each line of a multiline string so that the indentation level of each line matches some absolute number of spaces. For example: >>> x = """ line one ... line two ... and line three ... """ >>> print x line one • 64. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 32 | Chapter 1: Text line two and line three >>> print reindent(x, 4) line one line two and line three Even if the lines in s are initially indented differently, this recipe makes their indenta- tion homogeneous, which is sometimes what we want, and sometimes not. A fre- quent need is to adjust the amount of leading spaces in each line, so that the relative indentation of each line in the block is preserved. This is not difficult for either posi- tive or negative values of the adjustment. However, negative values need a check to ensure that no nonspace characters are snipped from the start of the lines. Thus, we may as well split the functionality into two functions to perform the transforma- tions, plus one to measure the number of leading spaces of each line and return the result as a list: def addSpaces(s, numAdd): white = " "*numAdd return white + white.join(s.splitlines(True)) def numSpaces(s): return [len(line)-len(line.lstrip( )) for line in s.splitlines( )] def delSpaces(s, numDel): if numDel > min(numSpaces(s)): raise ValueError, "removing more spaces than there are!" return 'n'.join([ line[numDel:] for line in s.splitlines( ) ]) All of these functions rely on the string method splitlines, which is similar to a split on 'n'. splitlines has the extra ability to leave the trailing newline on each line (when you call it with True as its argument). Sometimes this turns out to be handy: addSpaces could not be quite as short and sweet without this ability of the splitlines string method. Here’s how we can combine these functions to build another function to delete just enough leading spaces from each line to ensure that the least-indented line of the block becomes flush left, while preserving the relative indentation of the lines: def unIndentBlock(s): return delSpaces(s, min(numSpaces(s))) See Also Library Reference and Python in a Nutshell docs on sequence types. 1.15 Expanding and Compressing Tabs Credit: Alex Martelli, David Ascher Problem You want to convert tabs in a string to the appropriate number of spaces, or vice versa. • 65. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.15 Expanding and Compressing Tabs | 33 Solution Changing tabs to the appropriate number of spaces is a reasonably frequent task, easily accomplished with Python strings’ expandtabs method. Because strings are immutable, the method returns a new string object, a modified copy of the original one. However, it’s easy to rebind a string variable name from the original to the mod- ified-copy value: mystring = mystring.expandtabs( ) This doesn’t change the string object to which mystring originally referred, but it does rebind the name mystring to a newly created string object, a modified copy of mystring in which tabs are expanded into runs of spaces. expandtabs, by default, uses a tab length of 8; you can pass expandtabs an integer argument to use as the tab length. Changing spaces into tabs is a rare and peculiar need. Compression, if that’s what you’re after, is far better performed in other ways, so Python doesn’t offer a built-in way to “unexpand” spaces into tabs. We can, of course, write our own function for the purpose. String processing tends to be fastest in a split/process/rejoin approach, rather than with repeated overall string transformations: def unexpand(astring, tablen=8): import re # split into alternating space and non-space sequences pieces = re.split(r'( +)', astring.expandtabs(tablen)) # keep track of the total length of the string so far lensofar = 0 for i, piece in enumerate(pieces): thislen = len(piece) lensofar += thislen if piece.isspace( ): # change each space sequences into tabs+spaces numblanks = lensofar % tablen numtabs = (thislen-numblanks+tablen-1)/tablen pieces[i] = 't'*numtabs + ' '*numblanks return ''.join(pieces) Function unexpand, as written in this example, works only for a single-line string; to deal with a multi-line string, use ''.join([ unexpand(s) for s in astring.splitlines(True) ]). Discussion While regular expressions are never indispensable for the purpose of manipulating strings in Python, they are occasionally quite handy. Function unexpand, as pre- sented in the recipe, for example, takes advantage of one extra feature of re.split with respect to string’s split method: when the regular expression contains a (parenthesized) group, re.split returns a list where the split pieces are interleaved with the “splitter” pieces. So, here, we get alternate runs of nonblanks and blanks as • 66. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 34 | Chapter 1: Text items of list pieces; the for loop keeps track of the length of string it has seen so far, and changes pieces that are made of blanks to as many tabs as possible, plus as many blanks are needed to maintain the overall length. Some programming tasks that could still be described as expanding tabs are unfortu- nately not quite as easy as just calling the expandtabs method. A category that does happen with some regularity is to fix Python source files, which use a mix of tabs and spaces for indentation (a very bad idea), so that they instead use spaces only (which is the best approach). This could entail extra complications, for example, when you need to guess the tab length (and want to end up with the standard four spaces per indentation level, which is strongly advisable). It can also happen when you need to preserve tabs that are inside strings, rather than tabs being used for indentation (because somebody erroneously used actual tabs, rather than 't', to indicate tabs in strings), or even because you’re asked to treat docstrings differently from other strings. Some cases are not too bad—for example, when you want to expand tabs that occur only within runs of whitespace at the start of each line, leaving any other tab alone. A little function using a regular expression suffices: def expand_at_linestart(P, tablen=8): import re def exp(mo): return ).expandtabs(tablen) return ''.join([ re.sub(r'^s+', exp, s) for s in P.splitlines(True) ]) This function expand_at_linestart exploits the re.sub function, which looks for a regular expression in a string and, each time it gets a match, calls a function, passing the match object as the argument, to obtain the string to substitute in place of the match. For convenience, expand_at_linestart is coded to deal with a multiline string argument P, performing the list comprehension over the results of the splitlines call, and the 'n'.join of the whole. Of course, this convenience does not stop the function from being able to deal with a single-line P. If your specifications regarding which tabs are to be expanded are even more com- plex, such as needing to deal differently with tabs depending on whether they’re inside or outside of strings, and on whether or not strings are docstrings, at the very least, you need to perform a tokenization. In addition, you may also have to perform a full parse of the source code you’re dealing with, rather than using simple string or regular-expression operations. If this is the case, you can expect a substantial amount of work. Some beginning pointers to help you get started may be found in Chapter 16. If you ever find yourself sweating out this kind of task, you will no doubt get excel- lent motivation in the future for following the normal and recommended Python style in the source code you write or edit: only spaces, four per indentation level, no tabs, and always 't', never an actual tab character, to include a tab in a string lit- eral. Your favorite editor can no doubt be told to enforce all of these conventions whenever a Python source file is saved; the editor that comes with IDLE (the free • 67. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.16 Interpolating Variables in a String | 35 integrated development environment that comes with Python), for example, sup- ports these conventions. It is much easier to arrange your editor so that the problem never arises, rather than striving to fix it after the fact! See Also Documentation for the expandtabs method of strings in the “Sequence Types” sec- tion of the Library Reference; Perl Cookbook recipe 1.7; Library Reference and Python in a Nutshell documentation of module re. 1.16 Interpolating Variables in a String Credit: Scott David Daniels Problem You need a simple way to get a copy of a string where specially marked substrings are replaced with the results of looking up the substrings in a dictionary. Solution Here is a solution that works in Python 2.3 as well as in 2.4: def expand(format, d, marker='"', safe=False): if safe: def lookup(w): return d.get(w, w.join(marker*2)) else: def lookup(w): return d[w] parts = format.split(marker) parts[1::2] = map(lookup, parts[1::2]) return ''.join(parts) if __name__ == '__main__': print expand('just "a" test', {'a': 'one'}) # emits: just one test When the parameter safe is False, the default, every marked substring must be found in dictionary d, otherwise expand terminates with a KeyError exception. When parameter safe is explicitly passed as True, marked substrings that are not found in the dictionary are just left intact in the output string. Discussion The code in the body of the expand function has some points of interest. It defines one of two different nested functions (with the name of lookup either way), depend- ing on whether the expansion is required to be safe. Safe means no KeyError excep- tion gets raised for marked strings not found in the dictionary. If not required to be safe (the default), lookup just indexes into dictionary d and raises an error if the sub- string is not found. But, if lookup is required to be “safe”, it uses d’s method get and supplies as the default the substring being looked up, with a marker on either side. In • 68. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 36 | Chapter 1: Text this way, by passing safe as True, you may choose to have unknown formatting markers come right through to the output rather than raising exceptions. marker+w+marker would be an obvious alternative to the chosen w.join(marker*2), but I’ve chosen the latter exactly to display a non-obvious but interesting way to con- struct such a quoted string. With either version of lookup, expand operates according to the split/modify/join idiom that is so important for Python string processing. The modify part, in expand’s case, makes use of the possibility of accessing and modifying a list’s slice with a “step” or “stride”. Specifically, expand accesses and rebinds all of those items of parts that lie at an odd index, because those items are exactly the ones that were enclosed between a pair of markers in the original format string. Therefore, they are the marked substrings that may be looked up in the dictionary. The syntax of format strings accepted by this recipe’s function expand is more flexi- ble than the $-based syntax of string.Template. You can specify a different marker when you want your format string to contain double quotes, for example. There is no constraint for each specially marked substring to be an identifier, so you can easily interpolate Python expressions (with a d whose __getitem__ performs an eval) or any other kind of placeholder. Moreover, you can easily get slightly different, useful effects. For example: print expand('just "a" ""little"" test', {'a' : 'one', '' : '"'}) emits just one "little" test. Advanced users can customize Python 2.4’s string.Template class, by inheritance, to match all of these capabilities, and more, but this recipe’s little expand function is still simpler to use in some flexible ways. See Also Library Reference docs for string.Template (Python 2.4, only), the section on sequence types (for string methods split and join, and for slicing operations), and the section on dictionaries (for indexing and the get method). For more information on Python 2.4’s string.Template class, see recipe 1.17 “Interpolating Variables in a String in Python 2.4.” 1.17 Interpolating Variables in a String in Python 2.4 Credit: John Nielsen, Lawrence Oluyede, Nick Coghlan Problem Using Python 2.4, you need a simple way to get a copy of a string where specially marked identifiers are replaced with the results of looking up the identifiers in a dictionary. • 69. This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. 1.17 Interpolating Variables in a String in Python 2.4 | 37 Solution Python 2.4 offers the new string.Template class for this purpose. Here is a snippet of code showing how to use that class: import string # make a template from a string where some identifiers are marked with $ new_style = string.Template('this is $thing') # use the substitute method of the template with a dictionary argument: print new_style.substitute({'thing':5}) # emits: this is 5 print new_style.substitute({'thing':'test'}) # emits: this is test # alternatively, you can pass keyword-arguments to 'substitute': print new_style.substitute(thing=5) # emits: this is 5 print new_style.substitute(thing='test') # emits: this is test Discussion In Python 2.3, a format string for identifier-substitution has to be expressed in a less simple format: old_style = 'this is %(thing)s' with the identifier in parentheses after a %, and an s right after the closed parenthe- sis. Then, you use the % operator, with the format string on the left of the operator, and a dictionary on the right: print old_style % {'thing':5} # emits: this is 5 print old_style % {'thing':'test'} # emits: this is test Of course, this code keeps working in Python 2.4, too. However, the new string.Template class offers a simpler alternative. When you build a string.Template instance, you may include a dollar sign ($) by doubling it, and you may have the interpolated identifier immediately followed by letters or digits by enclosing it in curly braces ({ }). Here is an example that requires both of these refinements: form_letter = '''D
global_05_local_5_shard_00000035_processed.jsonl/32524
Your SlideShare is downloading. × Question 2 Evaluation A2 Question 2 Evaluation A2 Question 2 Evaluation A2 Question 2 Evaluation A2 Question 2 Evaluation A2 Upcoming SlideShare Loading in...5 Thanks for flagging this SlideShare! Oops! An error has occurred. Text the download link to your phone Standard text messaging rates apply Question 2 Evaluation A2 Published on • Be the first to comment • Be the first to like this No Downloads Total Views On Slideshare From Embeds Number of Embeds Embeds 0 No embeds Report content Flagged as inappropriate Flag as inappropriate Flag as inappropriate Select your reason for flagging this presentation as inappropriate. No notes for slide • 1. How effective is the COMBINATION of your main product and ancillary task? • 2. All the way through the making of my main product, I knew it didn’t belong within the mainstream category. It is very reminiscent of Indie films such as the films the company Fox Searchlight produces; Low budget, simple, alternative (Indie) . So, from the start I had the hint that I would need to research independent print companies for the ancillary tasks, especially for the film magazine as I knew not a lot of film magazines create a front page or a film review for short films. This was very tricky as it meant more work for me, but I did like the idea that I would get more creative freedom as I wouldn’t have to follow conventions of mainstream print products which has very precise and consistent styles to them. • 3. Creating the Film Poster was tricky because most short films do not include a Film Posters, so for this I had to follow convention of actual full feature films. However, I researched more alternative or Indie films instead of mainstream, big budget films to achieve a look that would be a good combination with my short film and that would attract the same target audience. It is incredibly important that both products gave off the same image and vibe as you do not want to give the audience the wrong impression of what they see on the poster and on screen. You want it to have the same image that interlinks and complimented each other. In my opinion I think I did a good job in portraying my short film within the poster. The picture linked in with the story line and all of it interlinks with the film’s narrative. • 4. Creating the Magazine Front Cover was the most fun process through the making of this project. I got full creative control and I got to play around with different softwares. I knew that picking a mainstream magazine to base my magazine cover on, such as EMPIRE or TOTAL FILM, would give out the wrong impression for it. This is why I researched into independent film magazines and found LITTLE WHITE LIES an independent film magazine which bases its articles on more independent films and artistry. I completely fell in love with their style and immediately knew that I wanted to work in this style. Their front page usually consists of an edited picture of the protagonist/s of the film their featuring with nothing else on the page. I thought using LWL’s style would make a good combination with my short film as both are very different and alternative. I think that the target audience for my film would be the type of audience that would buy this magazine as it is artistic and not mainstream. • 5. Creating the Film Review was quite easy as I decided to stick with the styling of LITTLE WHITE LIES magazine, I just tried to mimic the layout they use for the review to achieve a believable film review. The film review was by far the easiest part of the making of this project, since I felt that LITTLE WHITE LIES magazine gave off the right impression for my short film and having already made the Front cover for the magazine, it was just common sense to carry on using the magazine layout for the film review of my film, as the combination between my film and magazine was already very good. The only thing that I found hard about making the film review was using the right language within the review which would portray the film as I want it to be portrayed. Overall though I am very happy with the results.
global_05_local_5_shard_00000035_processed.jsonl/32598
Related Movies The Mother Titanic Town Home > Movies > T > Titanic Town Release Date: September 01, 2000Running Time: 96 mins. MPAA Rating: NoneBox Office: $59,844.00 Genre: Adaptation, Comedy, Drama Julie Walters Ciarán Hinds Ciaran McMenamin Nuala O'Neill All Cast & Crew >> An ordinary housewife in 1970s Belfast takes on both the IRA and the British Army in order to put an end to the city's violence. Bernadette decides enough is enough when a friend is killed in front of her young son's eyes. She speaks out in public, but the Protestant press turn her words into an anti-IRA campaign. She is ostracized by her own community, until she decides to talk directly to the IRA and the British government. Things get complex when her daughter's boyfriend is arrested as a terrorist. Based on an autobiographical novel by Mary Costello.
global_05_local_5_shard_00000035_processed.jsonl/32637
Define: Spectrum Banging I’m not sure exactly where the term spectrum banging came from—my friends and I used it in college, I have a feeling someone made it up. Google doesn’t seem to use it the way I do. I find it a useful concept, though, and use it frequently. Spectrum banging is when you go from one end of the spectrum to the other so fast and furiously that you bang yourself against the other end. For example, you date someone who is a little bit loony tunes, and that ends badly, and the next person you date is a completely uptight and prim-and-proper. Spectrum banging. Or, you come out of the closet and come to your queer identity in college, suddenly away from your birth family unit and able to explore yourself, and you completely cover your dorm room in rainbows, and exclusively go to gay bars, exclusively watch gay movies, exclusively listen to gay music, etc etc. Spectrum banging. I’ve used this in lots of other examples, too, not just sexuality or dating. I was just discussing it last night in some of the aftercare and fallout from d/s, and the ways my own triggers cause me to spectrum bang and have really strong reactions (that are sometimes too strong). I tend to be pretty resistant of the concept of spectrums in general—I think things are usually more multi-faceted than a binary, usually at least three if not a whole galaxy. But often the reaction to something is specifically a spectrum, and we tend toward the opposite, perhaps so far unable to see the other possible paths or responses. Sometimes, there is a sense that where you “should” be on the spectrum is somewhere in the balanced middle—but that is not necessarily the case. Sometimes banging the spectrum can result in the spectrum becoming bigger (or 3D, or some other format), and perhaps that “banging” is actually where you—or your friend or ex or whomever—will end up. What spectrum banging refers to is often a phase, sure, but it is also sometimes a real transition, so be careful about the judgment attached to this phrase. Is this term useful for you? Got an example of this you can think of? Published by Sinclair Sexsmith 7 thoughts on “Define: Spectrum Banging” 1. earthquakepixie says: I think the fact that "spectrum banging" supports binary systems is ok because we don't notice changes that happen in a multifaceted way as much as we do those can can easily be placed on a linear spectrum. We need terms to describe the reactions we have to large amounts of oppositeness. Like how multifaceted change is viewed as "wow, you've been changing a lot" as opposed to "OMG! You just changed into the complete opposite of what you were!". That oppositeness, I think, necessarily exists on a spectrum and I think the oppositeness is what gets our attention. like the way bold contrasts stand out more than grey areas Spectrum banging also really defines my coming out. I was a late bloomer and I'm pretty sure managed to catch up on 20 years of gay culture in one year. I went from being a "straight" socially conservative home-schooled kid to an outgoing lesbian sadomasochist that helps run sex parties in a very short amount of time. 2. randy says: The more common "rebounding" doesn't have such a binary connotation, even less with "recoiling from" something. I usually see most things as an array–particularly things like gender, where you can be more or less masculine AND also more or less feminine. They aren't exclusive nor inclusive so don't fit well on a spectrum. A speculum otoh…well that only helps sometimes. 3. radicalyffe says: I find that idea kinda amusing! :) When I first found out that transition was possible I embraced manly masculinity like never before. My doctors all thought my 'presentation' was top notch, and it made it really easy to get on hormones etc. I had permission, nay, INCENTIVE to be as manly as I wanted for the first time in my life and it was AWESOME. For about 2 months. Then I banged up against the wall, and wandered back to somewhere like my 'natural' gender. Which is kinda hyper-butch, hyper-femme, in a queer way. No one can tell if I'm a butch dyke or a sissy fag, these days. All they know when they look at me is that I'm some kinda queer! I don't like the idea of a gender spectrum much, but it is a useful way of explaining it to people. – Step one, get them to disconnect biological gender (aka sex) and presentation/identity – Step two, The newbie usually comes up with this concept of a spectrum themselves at this point, and shooting them down isn't helpful. Explain the idea of someone being able to move along the 'spectrum' that they are now imagining gender is. – Step three, introduce the idea that someone could inhabit multiple points on that 'spectrum' simultaneously. Concrete examples are helpful. (Effeminate bears? Jock twinks? Lipstick lesbians? Butches who do girl drag? What ever they are most familiar with) – Step four, point out that perhaps a 'spectrum' isn't the most useful analogy for gender if people can inhabit multiple points at once. Thats my tactic anyway. :) 4. Joy says: This is the phrase that describes my life, and I never knew it till now. I love opposites. I love both ends of the spectrum (many, many spectrums), and will thus often swoop back and forth between them. Re: Spectrum vs. 3+D models A friend of mine recently asked why I was characterizing my most recent stage of spiritual development as "grey" – a merging of black and white, ego and shadow, etc – rather than an array of all colors. I explained that that's how it works in the crayon box – and it's true. My deep self thinks in Crayola terms, not the physics of light, so it's what makes sense. But even more so, the spectrum is *manageable* – and banging around on it has let/will let me get to a point where I can branch off of the linear spectrum onto the whole great color wheel. I *know* there's a whole multi-dimensional world of and in myself – but I needed to deal with something a bit simpler, for now. 5. Atypicalezzy says: I had to think about the term for a bit and then I remembered a time in my life where "spectrum banging" was all too appropriate. Actually, in writing this, I've come to realize that "Spectrum banging" characterizes most of my life stages, from prepubescent, to emerging sexuality, to now. As an adult I can now say that spectrum banging is useful to me in that I have been on both sides and many points in the middle, which as a human allows me to connect to more people than before, since I can meet them at a familiar point. Useful little phrase! Leave a Reply
global_05_local_5_shard_00000035_processed.jsonl/32673
Edward Krasinski Untitled 1968 Artwork details Edward Krasinski 1925–2004 Bez tytulu Date 1968 Medium Fibreboard, 2 cardboard tubes, 2 cords and transfer lettering Dimensions 110 x 440 x 1000 mm Acquisition Presented by Tate Patrons 2007 Not on display T12560 consists of two cardboard cylinders, painted black and positioned at opposite ends of a rectangle of hardboard, which has also been painted black. The cylinders are positioned on their sides and each is secured in place by a long nail. The left hand cylinder is labelled with a white adhesive letter A on the board in front of it, and it has a length of coarse string wrapped around it twice, so that it resembles a spool. The string extends several centimetres towards the other cylinder. The right hand cylinder is labelled with a white adhesive letter B; a short length of string, fixed to the top of the cylinder as if unwound from it, extends towards spool A. Both of the ends are stuck to the board, and have been painted red. T12560 is closely related to T12567, which also features a spool of string. However, in T12567, there is only one spool, whereas in T12560, the two spools A and B suggest two fixed points, between which a kind of conceptual energy might form, as in a circuit. This impression is enhanced by the red paint applied at the points of rupture, at the ends of the string. The single spool in T12567 also has red paint at the point of rupture, but as this end is positioned at the extremity of the board, it suggests a relation to something outside of the work, and not an internal circuit, as in T12560. The idea of unravelling, communicated by the use of string, wire and spools or rollers, is a common motif in Krasinski’s work. Krasinski produced several large rollers or spools with blue rubber cord wrapped around them, and the letters A, B or C printed on their sides (reproduced in Polit, p.41), and his Dévidoir 1970 (in English Reel), features a large industrial spool with thick electric cable wrapped around it (reproduced in Polit, pp.165–8). The unravelling of an unknown length of string has a clear conceptual relationship to Krasinski’s trademark strip of blue Scotch tape, which he used in his installations, and which he also defined as ‘length unknown’ (quoted in Kiessler and Mytkowska, p.83). Further reading: Paweł Polit (ed.), Edward Krasinski: Elementarz/ABC, Krakow 2008. Elizaveta Butakova March 2010 About this artwork
global_05_local_5_shard_00000035_processed.jsonl/32684
Before Watch Dogs: the best and worst hacking games The games Watch Dogs is up against - and the ones it's really not Best and worst hacking mini games through the ages After a lot of delay and a huge amount of hype, Watch Dogs has finally arrived. But Ubisoft's hyper-connected sandbox certainly isn't the first game to tackle the hackers. From Enter The Matrix to Bioshock, games have been trying to make hacking interesting for years. Some have hit, some have been compromised in the act. It's certainly no easy task to take something so complex and boil it down to a form that makes you feel like a real Aiden Pearce while still being fun. So here's our pick of the games that got it right - and those that were sorely off the mark. Enter The Matrix You'd think that nailing a game based on the world of The Matrix would be a doozy. BZZZT wrong. Enter the Matrix was sorely disappointing on every level - except one. While the action failed to immerse us in the Wachowski brothers' alternate reality, the game's surprisingly rich hacking system let us feel like Morpheus for a fleeting few moments. Based on the DOS operating system, hacking could be used to unlock cheats and weapons by navigating file structures. Unlocking the multiplayer mode was neat, but everyone knows that the real quest was getting that sword. Will Watch Dogs de-crown Uplink as the hacking game? Introversion Software's title turns 13 this year so it's about time someone did. Uplink took most of its inspiration from Hollywood, basing its cinematic style on films like Wargames. Perhaps the "hacking simulator" genre will never earn mainstream appeal, but for the cyber thrill seekers Uplink had enough depth to make it the go-to game. Get in, do your thing, and then get out before the FBI manage to trace you. The game's fostered a thriving modding community over the years, and even got an iPad release in 2012. Fallout 3 So long as your science skill was high enough to access them, Fallout 3's hacking terminals provided a neat mini-game that actually demand a bit of strategy. Each terminal throws up a bunch of words mixed with random characters - one of which is obscuring the correct password - and from that point it's a process of elimination. Really, a computer that tells you when you're getting closer to the answer doesn't make a lot of sense in the real world, but for the sake of the game it works well. Just watch out for those trap terminals. You know, the ones with the FRAG GRENADES INSIDE. Bioshock approached hacking like it was plumbing, streaming data (illustrated as a liquid) from point A to point B through one big pipe. It was basically Pipe Mania but with added risk of death; failing a Bioshock hack could mean triggering an alarm. Hacking could be used to access security bots, cameras turrets, and reduce the price of vending machines and health stations. Equipping engineering tonics would improve the player's hacking ability, but you could skip it all if you had an automatic hack tool to hand. Deus Ex: Human Revolution With its focus on themes like AI and espionage, the fact that Deux Ex: Human Revolution had a solid hacking element shouldn't have been too surprising. The player hacked into terminals via an I/O port and was then faced with a number of nodes which they had to capture. Hacking could gain access to safes, cameras, or be used to turn turret guns against the enemy. There was also a good balance in difficulty as the task gets progressively harder at higher levels, which made it worth investing those points into the hacking skill. And the longer you took, the more likely it was that you'd be caught. It was enough to make you feel like a real-life Boris Grishenko.
global_05_local_5_shard_00000035_processed.jsonl/32685
The future of web standards Jeffrey Zeldman predicts exciting times ahead in web design The future of web standards Contrary to popular opinion, the phrase 'Web 2.0' was not coined by Tim O'Reilly and did not, originally, refer to web applications like Facebook and Twitter that enable Muggles, er, non-web-professionals, to share information online. More than a decade ago, Darcy DiNucci predicted that: "The Web we know now, which loads into a browser window in essentially static screenfulls, is only an embryo of the Web to come. The first glimmerings of Web 2.0 are beginning to appear, and we are just starting to see how that embryo might develop. The Web will be understood not as screenfulls of text and graphics but as a transport mechanism, the ether through which interactivity happens. It will [...] appear on your computer screen, [...] on your TV set [...] your car dashboard [...] your cell phone [...] hand-held game machines [...] maybe even your microwave oven." – DiNucci, D. (1999) "Fragmented Future," Print 53 This first use of the phrase 'Web 2.0' was a vision of what we now call ubiquitous computing and what marketers call convergence. As with all futurist visions considered in the cold light of hindsight, some of DiNucci's language sounds naïve and a few of her predictions fall short. Certainly "your TV set" hasn't become the hippest place for hot Web 2.0 action in most countries, unless you consider downloading episodes of The Real Housewives of New Jersey the height of web-based interactivity. But DiNucci looks a positive oracle where her "cell phone" prediction is concerned, because the ubiquity of high-resolution CSS3- and HTML5- capable smartphones powered by WebKit is bringing real, empowering change to our medium. In a word, yes. After the hype of the dot com boom and bust, the hard sell around blogging, the endless flogging of social media and other widely heralded game-changers, we who practice web design find ourselves at a genuine inflection point. With browsers and devices of great reliability supporting mature standards, with a seemingly bottomless demand for apps powered by these standards, and with consumers queueing in the rain to possess the newest complex device before their neighbour gets hold of it, the era of mature standards-based design is upon us. The web we grew up with is as obsolete as the concept album. (Kids, ask your parents.) In yesterday's web, each corporate site stood alone, a self-contained object like The Beatles' Sgt. Pepper's Lonely Hearts Club Band album. Today, a corporate site is only as good as the third-party APIs and links it facilitates. Yesterday's websites were optimised for Internet Explorer Version X or Netscape Navigator Version Y; today, site owners live and die on the addictiveness and ease of use of their mobile site and apps. Time was, the adjectives 'well-designed' or 'rich' were code for 'created in Flash', but after more than a decade of standards-based design and advocacy, and with the advent of web fonts, we know that (X)HTML, CSS and JavaScript can power web experiences of extraordinary beauty – and are even more likely than Flash to be the driving force behind the richest web applications and experiences. Wildly successful sites such as Flickr, Twitter and Facebook offer genuinely portable social experiences, on and off the desktop. You don't even have to go to Facebook or Twitter to experience Facebook and Twitter content, or to share third-party web content with your Twitter and Facebook friends. Training wheels off As our knowledge of standards-based design has matured (ironically helped, in large part, by the five years between IE6 and IE7, which gave us time to figure out bugs and workarounds and teach them to even our most standards-averse colleagues), most of us have also become more and more interested in user experience and content strategy – a discipline that's been around for ages but is only now gaining the attention it deserves, thanks in part to the evangelism of Kristina Halvorson. We've become user-focused and best practices-aware at the very moment that emerging standards offer us tremendous new power, our new browsers (including IE9) give us the chance to explore that power, and our best browsers power our most popular and powerful phones. Talk about convergence! And with consumers buying two smartphones for every desktop computer they purchase, the demands, challenges and opportunities of the mobile space are reshaping our assumptions about design and user behaviour. So let's consider this moment of change and sweep away the misconceptions and half-truths that keep some of us from embracing the opportunity before us. For openers, let's check out CSS3. CSS3 for you and me CSS3 is the W3C's latest, ablest and most complex version of the web's standard language for visual design. CSS3 media queries are an empowering technology behind 'Responsive Web Design', an emerging best practice and key component of the mature, multi-platform web. Just as important is what CSS3 isn't. CSS3 isn't a monolithic specification (like CSS 2.1) that must be implemented in its entirety before people from nice homes consider it safe to use. Learning from browser implementation struggles of years past, the W3C wisely opted to design CSS3 as a series of modules, which can be worked out in browsers piece by piece. iPhone in css3 PURE CSS3: An iPhone made with no images (just pure CSS3) If prior W3C specs are like a full-blown website redesign that has to be perfect on the day of the launch, CSS3 is more like a series of gentle site updates, rolled out over months and years to give users time to get used to them – and designer/developers time to get them right. This means you don't have to read and memorise the entire CSS3 spec at once, and browser makers don't have to try to implement every bit of it immediately – which is how browser makers have got into trouble in the past, and how we used to get stuck with half-baked CSS implementations for years at a time. Think back to the old IE box model that was more intuitive than the actual CSS1 box model, but wrong. Designers had to hack around it for nearly a decade, using Tantek Çelik's famous Box Model Hack and various other workarounds. Those who refused to use hacks on principle often beat IE's box model into shape by bloating their markup with otherwise needless containing divs. Fortunately, we won't be stuck with similar problems as browser engineers tackle the new CSS specs, because the modularity of CSS3 enables browser geeks to sweat the details, one feature at a time. Thus we get well thought-out, reasonably consistent feature implementations in the latest Safari, Firefox and Opera. And since more than a vanguard of web designers is experimenting with CSS3, the browser makers get instant feedback about what works and doesn't. In some cases this feedback can be rolled back into the W3C spec before it's finalised, creating the kind of feedback loop we never had before. It's a whole new web of shared understandings, out in the open, where anyone with a good idea can see and contribute.
global_05_local_5_shard_00000035_processed.jsonl/32689
next month will begin shipping its Communities application, designed to let companies build external-facing social sites for interacting with their customers and partners. Communities uses the technology in's Chatter application, which is designed for building enterprise social networks for internal employee collaboration. Pricing for Communities starts at US$500 per month, per community site. Companies need to have a license to use the application, but external participants don't need to be customers to participate in the sites created with it. Communities can be used to set up customer service hubs, marketing sites and partner support portals. The application is integrated with's core CRM (customer relationship management) suite, so data from the community sites can be captured and funneled to CRM files. Communities was announced in August of last year and went into a "limited pilot" release later, during which some customers got a head start creating sites. Those customers included the U.S. Food and Drug Administration, GE and Pernod Ricard. With this product, continues to beef up its enterprise collaboration portfolio and put itself in greater competition with enterprise social networking products from companies such as Microsoft, IBM, Jive Software, Socialtext and Tibco.
global_05_local_5_shard_00000035_processed.jsonl/32724
Gigabyte BRIX is a mini-PC with an Ivy Bridge SoC Posted by Trent Nouveau As Liliputing's Brad Linder notes, the Gigabyte Brix is somewhat similar in appearance to Intel's very own NUC, or New Unit of Computing. However, while Santa Clara's top-end NUC is only fitted with a Core i5 processor, the Gigabyte Brix is loaded with a far more powerful piece of silicon: the i7. Additional specs include two USB 3.0 ports, HDMI and Mini DisplayPorts, ethernet and 802.11n WiFi. There is also an mSATA slot for SSDs and two memory slots for up to 16GB of RAM. Unsurprisingly, Gigabyte intends to sell the BROX as a barebones systems, packaged with a Core i3, Core i5, or Core i7 chip. So be prepared to supply your own storage, memory and OS. Unfortunately, Gigabyte has yet to release pricing details, although we wouldn't be surprised if the above-mentioned units were ultimately cheaper than Intel's very own NUCs.
global_05_local_5_shard_00000035_processed.jsonl/32730
Age Range 6 years old Make a wizard clock like you see in the Weasley household! Blank clock face (copied on cardstock) Labels (such as “at work” “at home” “in mortal peril”) Pens, pencils, or crayons Clock hands Where Have you been? Here is a fun activity to make your own clock just like the Weasleys have. We saw it in the CoS movie too! Students can assemble their clock faces to look as they wish, pasting as many or as few phrases as they like. For each member of the family they include, give them a clock hand, instructing them to write that person's name on the hand. Attach the hands with a brad. Finding Hogwarts
global_05_local_5_shard_00000035_processed.jsonl/32772
Never mind the bad sex award – where's the good sex in fiction? As someone who works hard to get it right in my own novels, I'm very aware of just how difficult it is to depict well Playing Twister You don't want to see the rest of this picture ... a game of Twister in progress Photograph: Sarah Lee As the bad sex in fiction award shortlist lined up yesterday, the authors and their publishers scrambled to declare they'd have been offended not to have made the cut. Perhaps they were forgetting: it's the quality of the writing, not the sex, that's being assessed – and writing about sex well is one of the hardest things to do. There's an assumption that it will involve writing the nuts and bolts, what goes where. Wrong. Try it. "His right hand slipped down her left thigh, as his left hand deftly undid the catch of her bra, and then he whispered in her ear … " – which one? Where's this guy standing? Or is he sitting? Perhaps lying? And what's she doing with her hands, right and left? Writing about sex can be like a complicated game of Twister. You sit in front of your laptop, trying to work out where everything's going. It's worse than following the instructions for assembling flatpack furniture. Maybe there are some people who are turned on by DIY manuals, but for most of us they have the opposite effect. There are better ways for the writer to seduce the reader. Clothes are tricky. They don't magically dissolve but have to be removed, hopefully as part of mutual seduction. When Erica Jong invented "the zipless fuck" in Fear of Flying, who's to say she wasn't just a desperate author stuck with the practical details of getting socks shed, buckles undone and knickers off? Too much detail here and it's back to those flatpack manuals again. No wonder bodices get ripped – so much easier than fiddling around with the laces. Another problem is that what turns one person on is sure to be a turn off for someone else. For every reader who finds an action sexy, another is going "Yuck, he did what?" I loved the sex scene in Sebastian Faulks's Birdsong, but I have several friends who thought it provided way too much information. There can also be national variations. True to stereotyping, I've been asked to add sex by my Dutch editor, and to clean it up by my American editor. The solution to these problems is for the writer not to be too specific about what the characters are doing, but very specific about their reactions. The reader has to use their imagination, make their own connections, project their own private fantasies onto the characters. "Are they doing what I think they are?" Whatever it is, yup. I've been staggered by some of the deductions people have made about my sex scenes, but I'm quite happy to take the credit so long as they liked it. Then there's foreplay. Just like real sex, written sex needs a long build-up, from increased physical awareness to flirting to the first tentative touches and beyond. Tiny details are more important than larger actions; the fall of a shadow on the hollow at the base of the throat, the softness of skin on the inside of the wrist, the curve of a mouth. And, perhaps reflecting real life, men aren't as into foreplay. It takes an average of three minutes for a man to go from start to finish, 13 minutes for a woman. Perhaps that's why most of the shortlist for the bad sex awards are male. That's not to say they don't try with the best of intentions. Think Alan Titchmarsh, an earlier contender for the Literary Review's very dubious honour: "She planted moist, hot kisses all over his body. Beads of sweat began to appear on Guy's forehead as he became more entangled in the lissom limbs of this human boa constrictor." Boa constrictor? Oh dear. But at least Titchmarsh is trying to deal with one of the big problems with writing about sex. Most of the words usually associated with sex scenes don't work, especially body parts. For example, there isn't a single word for a penis that doesn't sound daft. Dick, cock, willie, member etc. They make me giggle, and while laughter is great in sex, it shouldn't be the sniggering sort. Who hasn't giggled over the rude bits in Lady Chatterley's Lover when they were at school? It's simply not sexy. Female genitalia are even worse. The earthy, Anglo-Saxon words work in context but I think their use should be limited or they lose impact. In my writing I don't name any body parts. It's not because I'm embarrassed – I'd only be embarrassed by using a phrase like front bottom – I just think the words jar. I try to be explicit, but without using an explicit vocabulary. So what's left? Well, how about emotions, physical sensations and images. In the middle of sex I'm not thinking, ooh he's just thrust his throbbing organ against my front bottom, so why should a character? Instead of writing about actions, I concentrate on the responses, how it feels both mentally and physically. Get into the head of the character and you can create the illusion that yes, this is real, this is happening to you the reader. I write mainly for women readers, and speaking for my sex I think we like being seduced. We don't want bedroom antics shoved in our faces, literally or metaphorically. We like a little delicacy, a little subtlety. As Anaïs Nin wrote in Delta of Venus: "Without feelings, inventions, moods, no surprises in bed. Sex must be mixed with tears, laughter, words, promises, scenes, jealousy, envy, all the spices of fear, foreign travel, new faces, novels, stories, dreams, fantasies, music, dancing, opium, wine." Maybe it's me, but I find that image, and the concentration on physical sensation, a whole lot sexier than any amount of thrusting, grabbing or grinding. I'm not aiming to produce one-handed reads, but I do hope readers identify with my characters and get turned on when they do, and that means writing about how characters feel and think – about sex, about everything.
global_05_local_5_shard_00000035_processed.jsonl/32775
Civil rights must trump faith Did Lillian Ladele, the devout Islington registrar whose refusal to conduct gay marriages has, astonishingly, been endorsed by an employment tribunal, ever wonder if she was in the right job? She could hardly have picked a career more likely to lead to spiritual conflict. The point of civil ceremonies always was to end religious control of marriage. Guided by Christian beliefs so powerful they will not countenance, even outside the church, the union of two women or of two men, Ms Ladele must have had cause to wonder, throughout her career, about the fitness of all the other unchaste sinners over whose civil unions she has presided. Yet not until partnerships for gay people were added to the town hall's repertoire did she decide that these ceremonies were incompatible with holy writ. In certain circles, Miss Ladele now finds herself a heroine. The tribunal decided, in effect, that British anti-discrimination law is trumped by Miss Ladele's faith. While Islington Council was correct to consider the rights of the gay community, it 'took no notice of the rights of Miss Ladele by virtue of her orthodox Christian beliefs'. If this judgment is upheld, the implications are serious and troubling. Employees flourishing their religious convictions will be able to challenge almost any job description, whether these involve an aversion to pork, to certain clothes, to abortion pills, to gay people or to working on holy days. There is an exception. Any pious gay man or woman, convinced that God has ordained for them a career in a church or mosque, will find that in the world of faith, worldly rights have no authority.
global_05_local_5_shard_00000035_processed.jsonl/32793
How Jay Sean and Taio Cruz took America by storm Jay Sean and Taio Cruz have achieved something very few British acts have managed – selling R&B and urban pop back to the US. They tell Lola Adesioye how they did it jay sean 'You have to keep the dream alive' ... Jay Sean performing in Los Angeles. Photograph: Angela Weiss/Getty Images Every few years, the US charts are subject to what is always called a "British invasion". In 1965 alone, the Beatles, the Rolling Stones, the Animals, Manfred Mann, Freddie and the Dreamers, Wayne Fontana and the Mindbenders, Herman's Hermits and the Dave Clark Five all reached No 1 on the Billboard Hot 100. In the early 80s, Eurythmics, Duran Duran, the Police, the Human League, Culture Club, Wham!, Simple Minds, Tears for Fears and Paul Young all topped the chart within a few months of each other. Early in the last decade, the success of Coldplay and Radiohead prompted suggestions of a British invasion of the album chart. Take a look at those acts. With the exception of Culture Club's bass player, Mikey Craig, every one of them is white. Black British acts topping the US chart are few and far between, Fine Young Cannibals, fronted by Roland Gift, had a pair of No 1s in 1989; the reggae singer Maxi Priest reached the top in 1990, as did Seal in 1995. Mel B managed it as a member of the Spice Girls in 1997. The reasons for that lack of success are easy to determine: America has long led the world in western black music – blues, rock'n'roll, soul, funk and R&B all emerged from the US, as did their greatest practitioners. The dominant global musical force of the last 20 years, hip-hop, emerged as a black American form, before mutating into different musical strains as it conquered the world. No matter the many distinct virtues of British black music – why would you need our rappers if you've got hundreds of your own? Something is starting to change, however. Of the last four Hot 100 No 1s by British acts, three have been by artists who aren't white – Bleeding Love by Leona Lewis in 2008, Down by the British-Asian artist Jay Sean (with Lil Wayne) last year, and Break Your Heart by Taio Cruz (with Ludacris), which reached the top a fortnight ago. Both achievements were made even more remarkable than a first glance suggests. Down was one of two Jay Sean singles to enter the Billboard top 10 at the same time, alongside Do You Remember. Cruz's Break Your Heart, meanwhile, became the fastest-selling single in US chart history on its way to No 1. "I don't think you can underestimate how difficult it is to break America in any genre if you're a British artist," says Mark Sutherland, global editor of Billboard, the bible of the US music industry, and the magazine that gives its name to the national chart. "But it's particularly different in this genre. Jay Sean and Taio Cruz, by any standards, have done something fairly remarkable by getting to No 1." Many in the industry are wondering whether or not their success suggests there are more British urban acts capable of making a successful Atlantic crossing. "There has been a simmering trend in the past few years for American acts to co-sign a Brit – like the adoption of a parallel act oversees," explains Jasmine Dotiwala, the former head of MTV Base production in the UK. "Damon Dash [Jay-Z's former business partner] began it years ago with UK rap outfit SAS, then came John Legend and Estelle." Now, she points out, the UK rapper Sway has won the patronage of Akon, and that's not all. "Jay-Z has now signed Ladbroke Grove's Rita Ora and Hugo and there is talk of a major American signing Tinie Tempah, too." Sutherland agrees that linking up with an American artist works, pointing out that both Jay Sean and Cruz "have both been quite clever" to hook up with US rappers on their breakthrough hits. "They might have done well without those collaborations, but what it does do is make radio programmers more open. They have heard of Ludacris, they've heard of Lil Wayne, so it's good for opening a few more doors that may have otherwise remained closed." The thing that will ensure the doors remain open is the sales the two singles have generated, in a market that is shrinking. "The machine called the industry – that includes labels and promoters – is now able to see that UK sounds sell," asserts Dotiwala. That doesn't mean, however, that any UK urban act now has a shot at US success. Where once the prevailing wisdom was that British urban artists who went to America were more likely to do well if they embraced their Britishness rather than imitating American styles, overt Britishness has proven to be more of a hindrance than a help for some contemporary urban artists. "In the UK, artists like Dizzee Rascal, Tinchy Stryder and N-Dubz are all representative of the youth culture," says Cruz. "But that [youth culture] isn't in America, so there's no one to relate to it. The kids in America don't talk like that and they don't use the same slang, so it kinda goes over their head. I think singing is a very universal thing so if I'm singing about love, everyone can relate to that. So my music is a bit more relatable." In fact, Dizzee Rascal was seen as a such a niche concern that his early records were released in the US on the critic-and-blogger-friendly indie label Matador, rather than on an urban label such as Def Jam or Cash Money. What sets Jay Sean and Cruz apart is the style of the records. Even when they were making music just for British audiences, they leaned towards polished, glossy American production standards – each decided early on that their eventual goal was to succeed in the US. In fact, when Jay Sean was headhunted by Universal's Cash Money imprint, the label's chief executive had no idea about his nationality. "He didn't know where I was from," says Jay Sean. "When I sat in front of the CEO and I started talking, the first thing he said was, 'Where you from?' For them, they don't care where I'm from, my music is the only thing they care about." And, ultimately, it is the music that makes hits in a country the size of the US. Cruz and Sean, who are both thoughtful and articulate about their careers, have tapped into a major shift in sound that is occurring within US hip-hop and R&B. That shift is seeing artists such as Beyoncé and the Black Eyed Peas move from their former styles to a fusion of pop and dance and urban. Cruz and Sean saw the changing style and cut their records accordingly, meaning they weren't just followers of this new direction, but part of the shift themselves. That is why, reckons David Miller, vice-president of international marketing at Atlantic Records, neither Jay Sean nor Cruz can be put squarely in the urban genre. "Taio Cruz – I definitely wouldn't call him urban," Miller says. "That's pop. Straight-up pop. Jay Sean is a cool UK act that borders between pop and urban, I suppose. It's a time now in the music industry when pop is going to be as prominent as it ever has been. It's becoming less urban and more pop/dance. They are pop artists – capitalising on a pop sound that America is working with at the moment." The American way of success also means doing something the US industry has long been reluctant to believe UK acts are capable of: working as hard as Americans do. "I'm not afraid of hard work," Jay Sean says. "When I signed to Cash Money, I realised the reason why they were so successful is because they work so hard. I'm not saying people in England don't hustle, but when it comes to America, it's even harder." Working harder doesn't just mean turning up for meet-and-greets, or radio shows, or signings. Both Sean and Cruz – as well as other British artists such Estelle and producer Dready, who used to be part of So Solid Crew and now works with Busta Rhymes – made a leap of faith and moved to the US with no guarantee the relocation would be a success, often when the UK industry seemed to have turned its back on them. "Don't forget," says Dotiwala, "[these acts], including Estelle, have all persevered throughout the years when they have all been dropped by their respective labels, lost deals and had people not believe in them. Still they've tried different paths to get to their end goal. Many UK acts, once they have five minutes of UK fame and things go sour deal-wise, end up giving up. Estelle, Jay and Taio have grafted hard behind the scenes for a very long time to make a name for themselves." The artists also don't take their British success as something that can automatically be replicated. Jay Sean says: "We don't necessarily expect that because we've had some success in England, that [Americans] will care. You have to be tough; you have to be resilient. You have to keep the dream alive. If it's tough for us in England, it's tougher here. You have to be able to adapt, because it's a different climate out here." So what does the future hold for them and other UK artists? The future is bright for Jay Sean and Cruz. Both are involved in projects featuring major American stars, and both see the opportunity to expand their brands way beyond just music. Acting may be in the stars for Jay Sean, while Cruz has already established a reputation as a producer back home, and is also involved in fashion. Atlantic's David Miller believes there are many more British urban artists who – with the right sound, the right look and the right work ethic – could succeed in the same way in the US, particularly female acts. "There are lots of artists who could have success here," he says, nominating former Sugababe Keisha Buchanan, Sabrina Washington of Mis-Teeq and Jamelia. "They are incredibly talented, they're not trying to be anything other than they are, and if they went down the Rihanna route and did pop/R&B with a bit of dance, they'd be very successful." Miller, Dotiwala and Sutherland are untied in the belief that many more British artists will come through. "The internet has made the world much smaller," says Dotiwala. "We now research and have access to any music in every part of the globe. While in the past it may have been fashionable for countries to occasionally open the door to a foreign act, now we're all connected on Twitter, Facebook and social networks 24/7. We get the American slanguage as immediately as artists invent the phrases. Our timelines are equal, unlike the days a hot American urban phrase could take days and weeks to filter through to the UK. Now it's about diversity." That, and one other thing: songs as good as those that made Taio Cruz and Jay Sean stars.
global_05_local_5_shard_00000035_processed.jsonl/32798
Q: Did you feel suicidal before you were sectioned? A: Nah, I'm not that brave or clever. I wouldn't know how to tie a rope, know what I mean? The first sign, says Frank Bruno, that anything was wrong was when he stopped wanting to work out. From the age of 14 he had channelled all the energy a body his size generates into obsessive gym work. Even when his boxing career ended and his marriage fell apart and the TV offers dried up, he still managed to dredge up the motivation to keep himself fit. Then, at the beginning of 2003, he lost the will to exercise. "I just got fed up, man. I got pissed off. A lot of tension, a lot of different feelings going on through my head. I couldn't be bothered. I didn't give a shit. But it was the worst thing I could have done." It was the beginning of a descent which, as everyone now knows, would end on September 22 of that year when Bruno was sectioned and held for 28 days in the Goodmayes psychiatric hospital in Essex. Today he stands at a bar in Soho and looks a little sheepish, as if he hasn't quite decided how to present himself in light of all this. The old Bruno persona clearly won't do. Where once he was jocular, now everything about him tends towards the subdued; the black silk shirt and loose-fitting trousers that seek to downplay his size (they don't - he still fills the room like an obelisk); the excessive chivalry; the handshake so forceless it's like being touched by a ghost. Two weeks ago, the News of the World splashed with details of Bruno's former cocaine abuse, the revelatory selling point of his memoir, Fighting Back. Although he doesn't take drugs any more, the battle to be happy, says Bruno, is not over yet. Looking back it's a wonder anyone was surprised when he was diagnosed with bipolar disorder. His public appearances had for a long time been characterised by a manic repetitiveness (particularly of the word "wicked") and a blinding good humour that looks, in hindsight, like the exaggerated high of a very big low. He was a national hero less for being a good boxer than a good sport, a man of such boundless equanimity that TV producers presented his manner as a side-effect of too many blows to the head. Then, as now, one wondered the extent to which he was in control of the joke. "Mustn't grumble," says Bruno of the way things have turned out, and his eyes slide sideways. Today the only drug he takes is Lithium which, he says, "the doctor says I have to take, for my moods and different things like that". He is exercising again, so much so that friends have called him a "prisoner of the gym," not least because he lives in an apartment in the health farm Champneys, which is owned by a friend. He finds it preferable to being alone in a house. "I like going to the gym every day. Some people like going to the pub; I enjoy going to the gym. It's a big priority. Sometimes I get carried away." It was loneliness, says Bruno, which was his undoing, even though his career had been one long lesson in it. "Boxing is the toughest and loneliest sport in the world. You've got all the fans, lots of hangers-on jumping up and shouting different words. But when you actually go in the ring, it's a very lonely and scary place. It's just you and the other guy." In Bruno's case the "other guy" tended to win, or at least that was the impression one always had. In fact, he won more fights than he lost over the course of his 15-year career. But a lot of his victories were in the early years, in his native south London, when the stakes were quite low. He never beat the top guys, not Mike Tyson nor Lennox Lewis, and although he won the world heavyweight title in 1995 against Oliver McCall, he lost it six months later to Tyson, in the last fight of his career. I ask why he never took part in the verbal abuse that boxers traditionally exchange at the weigh-in. Bruno has described himself as an angry young man, frustrated by his poor performance at school and by his home life, where throughout his early teens his father was bed-ridden with cancer. "It took him five years to die; I wish he'd gone earlier rather than suffering." But by the time he became a professional boxer, Bruno's bad attitude seemed to have evaporated, which was not, in his line of work, necessarily considered a good thing. "I'm not being funny," he says, "but I mean ... I'm not into all them slagging matches. It helps sell tickets, it helps the promoter, but it consumes too much energy. If I can avoid it, I will." Did he feel intimidated when members of Tyson's entourage drew a finger across their throats at him as he walked to the ring? "I would try to block it out. Some of them were coming out with a lot of shit; I didn't get involved." Bruno says he likes Tyson, who wrote him an open letter of support after his breakdown. I'm surprised by this, given the pummelling Tyson gave him in the last title fight. But I suppose if there is anyone in boxing who can make Bruno's problems look small-scale, it's Tyson. Everything Bruno has done, or is alleged to have done, Tyson has done bigger. "He's a dangerous guy; a dangerous human being. But deep down he's nice and I like him. Yeah, I like him. I like him. I like him." He pauses. "I'm not gay or nothing like that; I don't like him in that sense. But he's an alright guy." For the first time in the interview he laughs that extraordinary laugh of his that seems to provide its own echo. Then he stops abruptly and clarifies his position on gay rights. "I ain't got no right to judge someone. I haven't got anything against lesbians, neither. We live in a world where they've got as much right as anybody else. I know a lot of gay people in the pantomime business and they're very nice. Gay people and lesbians, you know; whatever." While Bruno's reputation has survived the drugs scandal and his breakdown, there are still lingering doubts about what happened during his marriage to Laura. They met at an ice rink in 1980 and married 10 years later. Then in 1997 Laura was reported to have obtained a court order banning her husband from "assaulting, molesting or harassing" - allegations he always denied, and for years the couple yo-yoed between separation and reconciliation. They have three children and the terms of the divorce, which was finally granted in 2001, prevent him from discussing it in detail. Among the grounds for being sectioned are that one is a danger to oneself or to others; Bruno insists his relate only to the former. But he admits that he must have been difficult to live with. It was when Laura left for the last time that things really started to go downhill. "Paranoia," he says. "I'd listen to three radio stations at the same time. Different channels coming in. I got confused and snappy and impatient. I couldn't, couldn't, couldn't function. Losing my wife, seeing my kids less regularly, not eating properly, staying up late, up and down the motorway like a yo-yo. [He was making money doing bits and pieces of DJing.] Living by myself, getting uptight, wound up, over stupid little things. If you're not balanced, your mind's not balanced ... my fuse went. The lights were on, in the house, but there were no bulbs in there." The usual consolations didn't work. Where once he would relax by "going into my music room and making a couple of tapes", he started to "hate music". He invited some young boxers, one of them Wayne Rooney's brother, from Liverpool to stay with him in the house, under the auspices of offering them training. But he wasn't up to it and although he can't quite remember how, a load of freeloaders moved in. "Not the Liverpool kids, but others who were dodgy and shouldn't have been there." Things got worse when Bruno's great friend and mentor, his former trainer George Francis, killed himself after his wife and son died in the same year. "George would've said to me keep training, keep looking after yourself, face-wise, emotionally-wise, inner-wise. Spiritually. He looked after himself, George. But unfortunately the pressure got to him and he just said eff it, I'm going." Was Bruno suicidal? He sucks his orange juice noisily through his straw. "Nah, I'm not that brave. I'm not that clever to do a suicide. I wouldn't know how to tie a rope in the first place, you know what I mean? I felt down, and I felt upset with myself. But I never felt suicidal." He thinks it was his daughter who had him sectioned. "A combination of my daughter, my friend and some nurses who came round to check on me. I was being horrible to them. I didn't mean to be; but I wanted them to leave me alone." Of course, he says, he doesn't hold it against her. He takes out his mobile phone and shows me an "I love you dad" text message she sent him last week. During the first few days at Goodmayes he fought against the authorities. But then, he says, he went to a couple of therapy sessions and started to find it interesting. He didn't see the Sun's headline breaking the story - "Bonkers Bruno" - but someone told him about it. "I can't knock them," he says. "They helped me fight, helped me be famous; if it weren't for the press I wouldn't be here now, especially the Sun. I can't really get involved. They can call me whatever they want." This suggests a keener self-awareness than Bruno has been given credit for, particularly during his heyday in the 1980s when his television appearances as the thicko boxer with the catchphrase - "know what I mean, 'arry" - earned him accusations of Uncle Tom-ism from, among others, Lennox Lewis. Mention of this still gets Bruno agitated. "A lot of people were very jealous. When I came into boxing, I brought it to the next level with adverts and doing pantomime and people just got jealous of me doing that. And they started calling me all sorts of different names. But if they'd had the opportunity to do it, they would have. You know Chris Eubank told me he would have loved to have got into pantomime." So why did Bruno succeed where they failed? "I don't know. I had a good manager in Terry Lawless. I had good backing people, like Jarvis Astaire. They knew how to market me in that way. But it's jealousy." But they marketed him as a caricature. "It was a caricature, that I was ducking and diving. But people just got jealous. Concoctions and rumours and confusion and shit." He looks cross and confused. Has he spoken to Lewis recently? "I haven't seen Lennox Lewis for ages. If he would come down off his pedestal and chill out a little bit, yeah, I'd talk to him. But if he don't want to talk to me I ain't going to lose no sleep." Bruno is comfortably enough off not to have to think about working. But he is aware of what idleness does to him and he would like to get back into some kind of performing. "Hopefully pantomime," he says, as if resigning himself to an unpleasant fate, "or a TV soap like East- Enders. Just keep pecking along like everybody else does." If he misses the adrenaline of the ring he just goes round to his mate's house and lets his rottweiler "chase me around for a bit. Ha ha." Now 43, he has thought about training young boxers again, but he says it requires too much "emotional involvement". He knows his limitations. "Mind you," he says, "I wouldn't mind getting emotionally involved with a woman." He is starting to feel strong enough to go out again, to nightclubs. "I don't need anything to get me in the mood. Once I'm in a good mood I don't need anything to make me enjoy myself. I'm a nutter, naturally, by itself. I can be the life and soul." Despite everything, if he hadn't gone into boxing he believes his life would have been infinitely worse. "I'd be out doing odd jobs, or sweeping the road, or be the metal polisher or on a building site or doing some criminal activity. My head has got regrets, but I haven't. I've done pretty well for myself and met some nice people and done some nice things. Regrets, no." We go outside for the photos and Bruno is recognised by everyone who passes. "All right, boss?" he calls to a staring traffic warden. A chef from the Italian restaurant next door yells, "Do you want to fight me?" and Bruno flicks him a savage look. "Chloe will fight you," he says, indicating the PR woman. He poses in a doorway and says, quietly, "Wicked, wicked, wicked, wicked." And then the photographer tries to show him his image as it appears on the screen of the digital camera. Bruno shrinks from it, like Dracula before a mirror. "I don't want to see it," he cries. "I don't want to look at myself ". · Frank Fighting Back is published by Yellow Jersey Press, £18.99
global_05_local_5_shard_00000035_processed.jsonl/32802
Gene Simmons gets kiss of death from notorious web forum Kiss bassist is bumped offline after comments endorsing aggressive stance against copyright infringement Gene Simmons of Kiss Tongue in cheek ... Gene Simmons of Kiss Photograph: Serge Thomann/WireImage Never one to bite his tongue (sorry), the public face of Kiss, its bassist Gene Simmons, has become the latest target of assiduous online attackers, Anonymous. Two of Simmons' official websites, and, have been hit by the group of activists as an apparent reprisal for insisting that musicians should be far more aggressive in the pursuit of illicit filesharers. The Anonymous group, linked umbilically to influential online forum 4Chan, have forced several websites linked to copyright-protection bodies offline in recent weeks. The offending comments were made by Simmons on a panel about building a successful entertainment brand. He said on Tuesday: "Make sure your brand is protected. Make sure there are no incursions. Be litigious. Sue everybody. Take their homes, their cars. Don't let anybody cross that line. "The music industry was asleep at the wheel, and didn't have the balls to sue every fresh-faced, freckle-faced college kid who downloaded material. And so now we're left with hundreds of thousands of people without jobs. There's no industry." Ouch. You can almost hear Anonymous wheeling around their (illegal) DDoS missiles. And, sure enough, little more than 24 hours later Simmons' online brand has been knocked off the internet. Anonymous attack Gene Simmons Anonymous attack Gene Simmons (Though we have to point out that Simmons has perhaps forgotten about the efforts made by Metallica, for example, which named 300,000 users of Napster back in 2000 and got them kicked off the system. Dr Dre did the same. Asleep at the wheel? Hardly. It's just the flipside of the benefit that being big brought - where the record companies could output something to lots of people at once. When they had to chase individuals, their problem became much bigger.) As Slyck rightly points out, the loose-tongued rocker is the latest target of a group which counts the Motion Picture Association of America, Recording Industry Association of America, Copyright Alliance, Ministry of Sound, solicitors' firms DG Legal, ACS:Law and Gallant Macmillan among recent victims. The latter, interestingly, appears to have been too strong to knock offline. There is, of course, an oft-overlooked voice in the music industry that Rich Huxley pointed out. Huxley, as is most likely with other artists paving new forms of distribution, says: "There has never been a better time to be an enterprising musician," adding: "I am part of the music industries and I want representation." His point: "There's no way to stop sharing and we shouldn't be striving to do so. That it takes place on the internet just means that in some ways it's track-able and identifiable. "It's useless and impossible to enforce anti-sharing laws as it's always been the case that humankind finds another way. If sharing music online becomes illegal then people will revert to DVD/hard-drive sharing or find untraceable ways of continuing to to share. Maybe we'll swap CDs with our friends again? Maybe we'll borrow from libraries. To blame the internet is to blame the medium. To quote Steve Lawson 'It's like blaming Microsoft Excel for tax fraud'."
global_05_local_5_shard_00000035_processed.jsonl/32817
Sir Douglas Mawson, the unsung hero of Antarctica, gets his due at last A biography of Sir Douglas Mawson tells how he survived perils worthy of a Hollywood epic • The Observer, • Jump to comments () Sir Douglas Mawson Sir Douglas Mawson and his team after hoisting the union flag on the newly claimed Antarctic territory of Proclamation Island in January 1930. Photograph: Haynes Archive/Popperfoto/Getty In the annals of heroic Antarctic exploration the names of Robert Falcon Scott, Ernest Shackleton and Roald Amundsen have all become immortalised in books and movies. But now American author David Roberts is seeking to resurrect the achievements of a much lesser known Yorkshire-born explorer, Sir Douglas Mawson, whose exploits in the frozen southern continent could be said to match, or even better, those of his more famous contemporaries. Mawson, whose family left for Australia when he was two, made several trips to the Antarctic, braving conditions and dangers every bit as dangerous as his rival explorers. But his trips also involved more exploration and – crucially – provided more valuable information for scientists than his rivals. Roberts's book, Alone on the Ice, tells Mawson's remarkable story, including his joining the first expedition to ascend Mount Erebus – a giant active volcano in Antarctica. It also tells how Mawson was among the first to discover what was then thought to be the position of the magnetic south pole, rather than the geographic south pole that was the focus of more attention but less scientifically important. Roberts believes that Mawson is so little known for two reasons. First, he was Australian, and the British press of the time was far more interested in homegrown imperial heroes such as Scott. And second, Mawson shunned the exciting race to the south pole that had captured the public imagination in favour of actual science. "The three way race between Scott, Shackleton and Amundsen was a story for the masses. But it was a lot harder to do what Mawson wanted to do," Roberts said. Yet Mawson's exploits and travails, chronicled in horrifying detail in Roberts's book, are the stuff of Hollywood blockbusters. Mawson and his colleagues were so starved they regularly shot and ate their huskies, feeding the remaining dogs with some of the meat. Icebergs are dodged, crevasses crawled over, blizzards sheltered from, and astonishing feats of endurance performed with stiff upper lips all round, partly from the crippling frostbite. At the heart of the book is Mawson's Australasian Antarctic expedition, which lasted from 1911 to 1914. The huge expedition, unlike the focused attempts to reach the south pole, saw numerous teams of explorers establish three permanent bases in which to survive a terrible, dark, permanently stormy winter. Then, with warmer weather, they fanned out over a vast area of unexplored land. Mawson, with Swiss skier Xavier Mertz and army officer Belgrave Ninnis, headed out from a base camp at Commonwealth Bay into the vast, empty wilderness. Disaster turned the return journey into one of the most stunning – yet little known – stories of survival in all Antarctic exploration. As they traversed snowy ice fields with sledges pulled by dogs, Ninnis and his sledge plunged into a crevasse. Not only was he dead, but his sledge carried the team's tent and most of their food. Mawson and Mertz faced a desperate rush back to base without a proper tent, in the face of howling gales and with only tiny amounts of food. It was an appalling journey, with the huskies becoming a source of food as well as a way to pull the sleds – a tactic that had diminishing returns as each dog was devoured. Desperately weak and suffering from ailments that included skin peeling off, hair loss and frostbite, Mawson and Mertz were delayed by the weather which forced them to spend days in a makeshift shelter. Mertz became weak and delirious, forcing them to halt as a deadline for the expedition's ship to meet them at Commonwealth Bay loomed. But as Mertz lay dying, Mawson refused to leave him, risking his own survival. "His loyalty to Mertz was extreme. He stays with him to the very end," Roberts said. But Metz's death, as Mawson continued his mission alone in the huge emptiness of Antarctica, was not the lowest point of the trek. Mawson plunged through the snow over a crevasse and ended up hanging by a rope after his sledge became wedged in the snow. Starving by this point, his diary revealed that his main emotion was not fear of imminent death, but anger that he would die without gorging himself on the food remaining on his sledge. He hauled himself back up twice after the snow edge collapsed under his weight. For Roberts, Mawson's mental fortitude was more remarkable than his physical strength. "He was immensely mentally tough," he said. Mawson made it back to the camp hours after the expedition boat had departed. He had to endure another Antarctic winter with the men the ship left behind before it could return. But at least they had a radio mast working and Mawson sent a radio message to his long-suffering fiancée, Paquita Delprat, back in Australia. Having suffered unimaginable loneliness and physical deprivation and the loss of two friends, the message began with an understatement worthy of any imperial hero: "Deeply regret delay only just managed to reach hut." Today's best video Today in pictures
global_05_local_5_shard_00000035_processed.jsonl/32818
Chile earthquake: five dead as tsunami warning triggers coastal evacuation – live updates • Earthquake triggers tsunami warnings, mass evacuations • Five people are reported to have died in the aftermath • Authorities have called for 'preventative evacuation' • Tsunami warnings cancelled, advisory in place for Hawaii Chile shakemap A map by the US Geological Survey shows the location of a magnitude 8.2 earthquake off the coast of Chile, some 100km from the city of Iquique. Image: USGS/EPA
global_05_local_5_shard_00000035_processed.jsonl/32836
Wednesday, June 3, 2015 • Afternoon Edition • "At least we're not Newsarama!" Marvel Announces Alpha Miniseries Written by ThanosCopter on Friday, November 02 2012 and posted in News with Benefits Marvel Announces Alpha Miniseries The series will focus on Spider-Man's brief sidekick. Source: Comics Beat Marvel has announced an Alpha miniseries, focusing on the Spider-Man sidekick created by Dan Slott.  The series, written by Josh Fialkov with art by Nuno Plati, will focus on how the character adapts to living in Pittsburgh.  To be blunt, I don't know what the hell Marvel is smoking to think that Alpha has any legs whatsoever in the market.  His storyline reminded friends that today's teenagers are repellent, amoral scuzbags that deserve to be publicly shamed and castrated before they became a burden on society and his character was almost universally derided as "the worst thing since Ke$ha."  I don't see how moving Alpha to Pittsburgh and giving him ties to Miguel O'Hara the new Spider-Man will make him any better. At least Alpha will fit in nicely with the residents of Pittsburgh, long considered to be some of the most socially repugnant inhabitants of North America.  I imagine that Alpha will stay busy due to the city's high crime rate and get dating advice from alleged rapist Ben Roethlisberger.  He might even head to the Andy Warhol and marvel at some of the canvases the artist urinated on.  The first issue hits stores in February.  Be sure to avoid Zechs the week it comes out. Comment without an Outhouse Account using Facebook About the Author - ThanosCopter More articles from ThanosCopter
global_05_local_5_shard_00000035_processed.jsonl/32946
This Sneaky Pink Iguana Evaded Charles Darwin's Attention Looking at it, you'd think it would be hard to miss. But this rare pink iguana, referred to as "rosada," evaded Charles Darwin and many other biologists and explorers when they visited the Galapagos island. Read on for more. From Discovery News: Based on blood samples and DNA analysis, it is believed that about 10.5 million years ago a common ancestor to both marine and land iguanas from Central or South America colonized the Galapagos Islands, and that the "rosada" originated about 5 million years ago. Fast air travel and telecommunications might make us believe that the Earth got smaller, but it's still pretty big and full of marvels to discover. Via Discovery News Photos: Gabriele Gentile More Animals Articles Ubercool "Mexican walking fish" Nearing Extinction Video of Endangered Beluga Whales Playing Starving Polar Bears Turning to Cannibalism Tags: Animals | Conservation New to TreeHugger?
global_05_local_5_shard_00000035_processed.jsonl/32948
Thread: Buffy or Angel? View Single Post Old August 10 2008, 07:39 PM   #25 judge alba senior street judge judge alba's Avatar Location: mega city 1 Re: Buffy or Angel? voted for buffy couldnt get into angel for some reason it just bored me even though they arte pretty much the same kind of while i could get into buffy it was more funnier Swift as the wind. Gentle as a forest. Fierce as fire. Firm as a mountain. Strike as powerful as thunder. judge alba is offline   Reply With Quote
global_05_local_5_shard_00000035_processed.jsonl/32972
What if, alone in his room, he begins to cry and cannot cease? What if one morning he finds that he lacks the courage to get up, finds it easier to spend the day in bed - that day and the next, and the next, in sheets that get grubbier and grubbier? What happens to people like that, people who cannot stand up to the testing, and crack? —  J.M. Coetzee, Youth
global_05_local_5_shard_00000035_processed.jsonl/32978
Asia'h Epperson Asia'h Epperson Trivia • Quotes • Asia'h: Something that people would be surprised to know about me is that I get shy sometimes and I get like these little shy spurts and when it happens my family and my friends will go like, "What is wrong with you? Why are you acting like this?" like it's such a big deal, but I don't know, it just happens sometimes, and I'm not [shy]. I'm like a very outgoing person, I'm just really live and sometimes I'll just get like really drawn in and just be like you know, I don't know I just go through those little spurts.
global_05_local_5_shard_00000035_processed.jsonl/32991
Login or register   <-- Previous EpisodeNext Episode --> Smallville: Infamous Linda Lake returns and attempts to blackmail Clark into giving her exclusives in return for keeping his secret. He refuses and reveals his secret to Lois so she can reveal his identity to the world. However, the world begins to turn against Clark and his friends. Meanwhile, Davis comes to Chloe for help and seeks medication to stop his transformations. Episode Info Episode number: 8x15 Production Number: 3T7465 Airdate: Thursday March 12th, 2009 Director: Glen Winter Writer: Caroline Dries Special Guest Stars Tori SpellingTori Spelling As Linda Lake Co-Guest Stars Stephen LoboStephen Lobo As Randall Brady Laura MennellLaura Mennell As Toni Michael Q. AdamsMichael Q. Adams As Unknown Michael RogersMichael Rogers As Federal Agent Joe MaffeiJoe Maffei As Newstand Vendor Michael Karl RichardsMichael Karl Richards As Unknown Dario DelacioDario Delacio As Doomsday Val ColeVal Cole As Newscaster Shayn SolbergShayn Solberg As Bystander Candace ChaseCandace Chase As Unknown Iris PalulyIris Paluly As Distraught Woman Daniel HogarthDaniel Hogarth As Young Fan Daniela BobadillaDaniela Bobadilla As Fanatic Teenager Main Cast Tom WellingTom Welling As Clark Kent / Kal-El Erica DuranceErica Durance As Lois Lane Allison MackAllison Mack As Chloe Sullivan Sam WitwerSam Witwer As Davis Bloome Lois takes a taxi from the airport and arrives at the Daily Planet in the pouring rain. Clark superspeeds up behind her and then admits that he missed her at the airport. Lois sorrowfully admits that she understands she isn’t a big priority with him. As she goes inside, gossip columnist Linda Lake flows out of a puddle in her water form and solidifies. She confronts Clark, telling him she knows that he’s the Red-Blue Blur vigilante because she’s been spying on him since she was forced to go underground. She’s lost her reputation but plans to use Clark to regain her glory. She tells Clark he either has to provide her with scoops or she’ll tell the world everything she knows about him. He tries to grab her but she easily evades him, turning into water and slipping away into the sewers... Read the full recap ArtistSong TitlePlayed When Uh Huh HerDreameras Lois waits for Clark Episode Quotes Clark: Well, I got held up at-at work! I finished one thing, Lois, and something else would come up! Lois: You're a reporter, Smallville! You're not saving the world! Clark: I know. I should've called. Lois: Look, I get it. You have other things on your mind. I don't expect to be the person at the top of your priority list. Linda Lake: Clark Kent - he can save an entire city in the blink of an eye but when it comes to ladies, the Red-Blue Blur still drives with the brakes on! Clark: Chloe, I always thought I would live in secret forever. But, you convinced me that Jimmy's picture, the Red-Blue Blur, was a symbol of hope. Chloe: Yeah, well, the world's out of focus superhero didn't have an address or a family or a face! I mean, are you sure that you're ready to have all of your intimate details made into the banner headline?! Clark: Well, I don't have a choice. At least this way I can control the way my story comes out in the press. Chloe: Right, because the paparazzi are famous for respecting people's privacy! Chloe: Even in a world this advanced, people are still pretty backwards when it comes to accepting change. Clark: I know Chloe but when the Red And Blue Blur hit the front page, people accepted it. And. maybe they're ready to accept me. There could be an upside to all this, you know. For the first time in my life, I may actually be able to be myself. Clark: Can I talk to you? Lois: Wow, what is that noise? Is someone talking? Clark: Lois, you can't ignore me forever. Lois: Could be worse, you could be ignored in a three-hour downpour. Clark: I want you to write my story. Lois: No offence but I've long since graduated from the lonely seeking lonelier classifieds. Clark: It's a pretty interesting one. Lois: Clark, I'm busy here! You may have forgotten about me but the news world didn't. Clark: After this story you're about to write, it never will. Lois: What story? Clark: I didn't forget to pick you up at the airport, Lois. The reason I wasn't there is because I was protecting people. I'm the Red-Blue Blur. Lois: (laughing) That's the best you can do?! Clark: That thing that saved you from the speeding car - that was me. That time the barn door flew off its hinges, you thought it was a weather anomaly - I did that! Lois: Yeah, right, what'd you do? Sneeze? Clark: Actually... Lois: Clark, next time you liquid lunch, take the rest of the day off! Lois: (after being caught by Clark) Guess I should stop calling you Smallville! Clark: You're speechless, that's never a good thing. Lois: The disappearing acts, the half-baked excuses... all this time I just coughed it up to a classic case of Peter Pan syndrome but... you're the opposite! You're like... a hero? Clark: Look, Lois, I... this is a lot to take in... all at once but I wanted you to hear it from me before you heard it from anyone else. Lois: So why am I the first one you've told? Clark: Actually, Lois, you're not. Lana and Chloe already know. Lois: Oh. Someone's had a busy morning. Clark: They've known for years. Lois: What guns you got in your arsenal? Clark: I guess I might as well throw it all out there. I can blast fire outta my eyes. Lois: Okay. Clark: I can hear a dog barking ten miles away. I can see through solid objects and I can run faster than the speed of sound. Lois: Wait! Rewind! Expand on your whole see through things thing. Clark: No, Lois, I... Look, I have to focus. Lois: How did I not put these pieces together? I mean, I-I lived with you! And, now we practically work on top of each other, I mean, have I been high this entire time?! Clark: The important thing is that you know now. And, there's no better reporter to tell my story than you. Would you do me the honour? Lois: Consider it done. Tomorrow's front page will tell the tale of the red and blue meteor-infected hero. Clark: About the meteors... we should talk about where I'm from. Chloe: Okay, now, I know I don't need to remind you what happened last time you turned back the clock. There's always a consequence. Clark: The world fears me, Chloe, and as long as they know who I am... I can't help them. I don't have a choice. Linda Lake: If your boyfriend really cared about saving people, he would've done things my way. Lois: People looked up to him. He could've been the hero they always needed. Linda Lake: Funny thing about people. The only thing they love more than building up heroes is tearing them down. Lois: Nice interception but you shouldn't be here, all the bloodhounds in the state will be sniffing you out. Clark: It's okay, I know this sounds crazy but in a few moments this will all be over. Lois: Okay, well, try me. My shock threshold is pretty high right now. Clark: Lois, I have a ring that allows me to go to any moment in time. Lois: Some people spend their entire lives looking for a way to stand out. To be a person that anybody would call special. When you first told me who you were... my thought was anyone but Clark. And, not because of the alien thing, I... I've known enough guys to know that you can be born on terraforma and be light years from normal. Lois: No, you don't. How can someone with x-ray vision be so blind? I've been down the hero road before and every time I made a giant U-turn but this... this was different. Davis: I can't control it anymore. Chloe: Control what? Davis: The beast. You must've blacked it out, you were in the Arctic with me, you told me that it was my destiny to kill the other Kryptonian. Chloe: What are you saying, Davis? The other Kryptonian? There's only one Kryptonian, there's only Clark. Davis: I'm Kryptonian. Chloe: You're Doomsday. Davis: I was sent to this planet to kill Clark. Chloe: You stay away from him. Davis: You have to warn him, Chloe. Something's been drawing me back here, I thought that it was you but no! It was Clark! Clark: Well, there was this one moment right after I told Lois the truth about me. I thought everything would be okay... and I could have it all but I was wrong. Clark: Steps out of the shadow into his red and blue, creating two completely separate identities? Chloe: Yeah. And, for the cherry on top, you get to tell Lois the truth and still know her reaction. Clark: All of this made one thing very clear, Chloe... Lois can never know who I really am. Linda Lake: Well, I've been puddling around Metropolis for the last week. I've seen lots of interesting stories. What a nice surprise to stumble upon your dirty little secret. Painful breathing, pale complexion, unsightly bone protrusions. Davis: You don't know what you're talking about. Linda Lake: Right. You just have a terrible skin condition. Episode References Lois: I guess I should stop calling your "Smallville." This is a repeat of a line from the Season 4 episode, "Blank," where Lois and Sheriff Adams witness Clark stopping two heavy machines from falling on Chloe. Both later have the incident erased from their memories. Other Episode Crew DeveloperAlfred Gough  |  Miles Millar Executive ProducerJoe Davola  |  Mike Tollin  |  Brian Robbins  |  James Marshall (3)  |  Kelly Souders  |  Brian Peterson (1)  |  Todd Slavkin  |  Darren Swimmer Co-Executive ProducerTim Scanlan ProducerRob Maier (1)  |  Jae Marchant  |  Al Septien  |  Turi Meyer Co-ProducerTom Flores Production DesignerJames Philpott EditorRon Spang CastingDeedee Bradley  |  Coreen Mayrs  |  Heike Brandstatter First Assistant DirectorMairzee Almas Second Assistant DirectorChristopher Lamb MusicLouis Febre Music EditorChris McGeary Costume DesignerMelanie Williams Set DecoratorAndrea French Property MasterAleya Naiman Construction CoordinatorTom Hunt (2) Script SupervisorBeth Mercer Supervising Sound EditorMichael E. Lawshe Re-Recording MixerDan Hiland  |  Gary D. Rogers GafferRichard Buckmaster Director of PhotographyGordon Verheul Story EditorDon Whitehead  |  Holly Henderson Stunt CoordinatorJacob Rupp Production ManagerScott Graham (3) Sound MixerRob Hanchar Executive Story EditorCaroline Dries Key Makeup ArtistNatalie Cosco Main Title ThemeRemy Zero Camera AssistantLarry Portmann Key HairstylistSarah Koppes Special Effects SupervisorMike Walls Missing Information Click here to add Episode Notes Click here to add Episode Goofs Click here to add Cultural References Click here to add Analysis
global_05_local_5_shard_00000035_processed.jsonl/33007
NASA has found cracks in the insulating foam on a space shuttle fuel tank and is investigating whether they are related to the debris-shedding problem that doomed Columbia and recurred on the last shuttle mission, managers said on Tuesday. "It would be premature to say that the cracks played a factor in that, but they might have," said John Chapman, who oversees the shuttle external tank program at NASA's Marshall Space Flight Center in Huntsville, Alabama. Technicians found nine hairline cracks in the insulation on a fuel tank that was originally earmarked for the Discovery mission launched July 26. It was twice filled with cryogenic fuels for tests before being replaced with another tank, for unrelated technical reasons, before Discovery launched, reports Reuters. According to Houston Chronicle, the latest findings on a fuel tank once assigned to the Discovery flight, but subsequently shipped back to Michoud from NASA's Kennedy Space Center in Florida, add a new wrinkle. The tank was twice filled with supercold liquid hydrogen and oxygen propellants during launchpad testing last spring, operations that cause the 154-foot-tall fuel tank to expand and contract, possibly enough to contribute to the foam cracking, said John Chapman, NASA's fuel tank project manager. Engineers are assessing three techniques to address the foam loss on the PAL ramp, a foam structure on the tank to deflect airflow away from external plumbing and electrical lines. They include applying the foam with a new manual spraying technique, using a robotic sprayer and removing the ramp altogether, Hale said. boys lie. No we do not!!!!
global_05_local_5_shard_00000035_processed.jsonl/33023
3 definitions by Tara Brown Top Definition When something sucks, but not overly sucks. Less emphatic that "shit" and a little more playful. Shit on a stick! I can't find my other sock...shitzkabob! by Tara Brown April 07, 2008 Canadian emote. Whenever a Canadian meets another Canadian outside of Canada, an instant bond occurs between the countrymen (women). They relax, embrace, exchange home city information, discuss hockey or some funny Newfie joke and generally ensure the other person is having a good time. Tara gave Kevin some canuckarma when she found out he was also from Vancouver. There's a lot of canuckarma in the room with all the Canadians discussing the latest hockey game. by Tara Brown April 06, 2008 When something is both creepy and cute at the same time. Stalkers who make up cute blog posts about you. by Tara Brown October 14, 2008 Free Daily Email
global_05_local_5_shard_00000035_processed.jsonl/33030
Top Definition (n) A certain breed of people that the word sexy will often be used to describe. Very elegent flow that some how attracts them to walls. Although can be very nerdy at times, are some of the most amazing individuals. Never dull moments with these ones. Can be very playful and especially like to hang out with friends. Love to smile and laugh. 1."Look at that celestie there, Oh she just hit a wall" by Havoc08 September 01, 2008 Free Daily Email Emails are sent from We'll never spam you.
global_05_local_5_shard_00000035_processed.jsonl/33031
Top Definition The coolest person you'll never meet. You wish you could meet them, but sadly, there's few to go around. Also called: Awesomeness Personified An awesome girlfriend as well it you're lucky enough to find one. "Wow, do you know Dava"? "No, I wish dude." by smitts2cool May 03, 2010 2 more definitions (1) A title for someone of noble birth. (2) Of divine heritage. I am a Dava, a daughter of my Heavenly Father. by Nichole Thirty-First February 09, 2010 Double Ass, Double Vagina - the act of four men having intercourse simultaneously with one woman, two men performing anal penetration while the other two men perform vaginal penetration. "Man, that broad is so loose, me and my three buds totally pounded her DAVA style." by alex and charlie June 13, 2006 Free Daily Email Emails are sent from We'll never spam you.
global_05_local_5_shard_00000035_processed.jsonl/33032
Top Definition A phrase used by one Gandalf the Grey, the famous, kindly wizard from the Lord of the Rings Trilogy. It is used during the Mines of Moria scene in the first in the trilogy, the Fellowship of the Ring. Gandalf says it to Peregrin "Pippin" Took, to display his anger and fustration directing at him for knocking a skeleton down a well, alerting the orcs of their whereabouts and putting the entire fellowship in danger once again. Throw yourself in next time, and rid us of your stupidity!!" -Gandalf the Grey by JuliaMarie August 14, 2007 2 more definitions someone dumb and irresponsible someone is a fool of a took if they leave their facebook logged in and another person hacks it by sjtothemax September 10, 2011 1. An insult proclaiming that the person called so is dumb, stupid, or unintellegent. 2) More than just a mere fool one who is VERY stupid. Fool of a TOOK. Robert: 1 + 1= 5!!! John: Actually...The correct answer to such an equation would be 2 (Two) John:...Fool of a Took... by Ace April 12, 2005 Free Daily Email Emails are sent from We'll never spam you.
global_05_local_5_shard_00000035_processed.jsonl/33033
Top Definition In the most basic form - vagina Useage: To describe any woman in just about any manner. (see "In a sentence") The visual: When a woman has her ass up in the air(from the "on her back" position) propped against something (like the edge of a bed) and she is basically laying on the top of her shoulders and the back of her neck. When she spreads her legs her vagina basically becomes a "Fur Cup". Other names: beaver, clam, snatch, pink taco, wisker biscut Used in a sentence: "Check out that fur cup at the bar!" "What's up fur cup?" "Dude....I totally stuffed her fur cup last night." by Mike "Meat" Fortuner April 11, 2006 6 Words related to Fur Cup Free Daily Email Emails are sent from We'll never spam you.
global_05_local_5_shard_00000035_processed.jsonl/33037
Top Definition When a girl is giving a knob job, she puts Skittles in her mouth right before the guy skeets. As he skeets in her mouth he says, "Mmm, taste the rainbow, slut!" "Man, Jake's mom gave me an awesome Russian Rainbow last night." by hercules slovakia February 14, 2006 Free Daily Email Emails are sent from We'll never spam you.
global_05_local_5_shard_00000035_processed.jsonl/33041
Talkin' nasty shit, Bizarre won't stop. I fucked two twins with a midget on top A sick mind, raping an old lady Knowing damn well Bizarre shouldn't have a baby All I can teach you, learn how to mack, smoke crack Smack a bitch when she talk back Matta fact, smack her cuz she's a slut Don't you realize, Bizarre don't give a fuck. Purple Pills I take a couple uppers I down a couple downers But nothing compares To these blue and yellow purple pills I been to mushroom mountain Once or twice but who's countin' But nothing compares To these blue and yellow purple pills Cool, calm, just like my mom With a couple of valium inside her palm It's Mr. Mischief with a trick up his sleeve To roll up on you like Christopher Reeve I can't describe the vibe I get When I drive by 6 people And 5 I hit Ah s**t I started a mosh pit Squashed a b***h And stomped the foster kids These shrooms make me hallucinate Then I sweat till I start losing weight Till I see dumb s**t start happenin' Dumber than Vanilla Ice tryin to rap again So bounce, bounce, c'mon bounce I said c'mon bounce Everybody in the house with a half an ounce Not weed I meant coke dumb ass sit down We don't bulls**t, better ask around D12 throws the bomb and's dashing town Bizarre, your mom is passing out Get her ass on the couch 'fore she crashes out Kon Artist & Kuniva f**k that, someone help Denaun He's upstairs naked with a weapon drawn Hey Von You see me stepping on these leprechauns? It gotta be acid cuz the X is gone Ya I took them all dog with some parmesian And I think my arm is gone It's probably numb Dumb, dumb, and full of cumm And I think he 'bout to swallow his tongue Scary ass it was a false alarm You think I'm 'bout to die when I just got on So stop acting stupid You so high That you might wake up with a guy On some new s**t I think I did too much This substance equals cuffs Red pills, blue pills, and green Big pills (That's ill) Dirty Dozen 80 of us Shady brothers Ladies love us That's why our baby mothers Love us but they hate each other They probably wanna take each other out And date each other Some-, something, something, something Something, something, something, something Pop pills Pills I pop Pop two pills On stilts I walk Snort two lines that were filled with chalk Thought it was Incredible I killed the Hulk I wanna roll away Like a rollerblade Until my eyes roll back in my skull for days And when I'm old and gray Look for coke to smoke I overdose When I pack up my nose with coke *cough cough cough* I must have broke the choke Had an accident when the Trojan broke Ahh, poor baby Born by wh**e lady Now I gotta straight born *infant* (You're crazy!) I pop four E's at one time And I don't need water when I'm swallowing mine (You got any shroom?) Does Bizarre smoke crack? I can't get jobs Cuz our arms show tracks Why the hell you niggas think I rap? I do it just to get your company hijacked If you like smack Then I might too (Swift, chill) I just wanna get high like you And I don't give a damn if they white or blue Speed, shrooms, down the valiums Even smoke weed outta vacuums I just got some and I'm going back soon I'm at rave Looking like a slave High off chronic Gin and tonic demonic Body smelt like vomit Pussy poppin', acid choppin', dope heavy guy Heroine mescaline pimp So ladies wanna try Blue pills, golden seals Got Bizarre actin' ill Drugs kill (Yeah, right) b***h I'm for real Shut your mouth you dirty s**t You know you want it in your butt I'll put it in your cunt Let Bizarre nutt by Devils Night February 17, 2005 9 more definitions Top Definition fat rapper in the group d-12 and source of some of the most ridiculous, disgusting, and most piss-yourself-laughing raps of all time. long live bizarre! If one is not free to rap about shooting preachers, getting dogs pregnant and jacking off with barbed wire, then the terrorists have already won... by maks May 21, 2004 Strikingly unconventional and far-fetched in style or appearance; odd. the three-head-monkey is really bizarre by Pietertje October 31, 2003 Also known as Rufus Johnson, Bizarre is the weirdo of the D12 group. He has an uncommon love for shower caps and tyre irons that he collects. Bizarre is the co founder of the D12 group along with RIP Big Proof. Inspired by rap pioneer KRS One, he has also worked with Pace Won, Young Zee, Rah Diggah, Redman and many other artists. His first album was released in 1997. It is entitled The Attack Of The Weirdos. His first CD with a mainstream appeal is Hanni Cap Circus that was released in 2005. It features the Rock Star video, an ironic view of Bizarre's life after "quitting" the group (it is, of course, fictional) Bizarre is currently working on a future album, Blue Cheese'N' Coney Island, that is due to release on October the 23rd, 2007. His rapping style is characterized by some sick hilarious rhymes with a filthy content. Often underrated, Bizarre has nevertheless some real interesting pieces of work at his active, like some local collaborations with DJ PDog and King Gordy. A 5Th grade teacher named Rufus Johnson "Bizarre kid", because he used to talk to himself and kept rhyming, which shows his early passion for rap music. by Isabelle Esling September 26, 2007 A Rapper in rap group D12 , whose lyrics tend to be very mysongnist and very offensice. Then again his lyrics are so fucking hilarious. Some Lyrics from Bizzare... Fight music- "Know why my hand's so num' ? Because my grandmother sucked my dick and i didnt cum" "She said Bizarre couldn't rap. I freaking hate you , i take your drawers down and rape while Dr. Dre Video Tapes you." by K3n June 19, 2004 A rapper who is most famous member of D12 9of those who really listen to rap). He talks about having sex with nine yars old, and raping family members, and torchering his kids. "Son your daddy has a foul mouth, from fucking bitches in there foul mouths. I can't help it my roots d12, all we do is pop pills and stay in jail. Peoiple say bizarre yopu gotta stop, fuck two twins with a midget on top, sick mind raping a ol' lady knowing damn well Bizarre shouldn't have a baby, all I can teach you learn how to make, smoke crack, slap a bitch when she talk back, matter fact slap your sis, she a slut, don't lie bizarre son give a fuck." by ill skillz December 31, 2004 1.Fat rapper from the group D12. He has hilarious lyrics and he wears a shower cap a lot. He's mediocre but he is so motherfuckin hilarious. "nigga fuck my wife, I'm tryna save my motherfuckin life." - Bizarre from One Shot 2 Shot by Peter S. Bizarre September 13, 2009 Free Daily Email Emails are sent from We'll never spam you.
global_05_local_5_shard_00000035_processed.jsonl/33044
Top Definition A large group of students who find using the dead language useful and/or exciting. Usually consists of some sort of Olympic Games, old, angry latin teachers, and kids in Harry Potter or Star Wars t-shirts. Boy: Salvete, puellae! Quid facit? Girl: not interested... Man, last night at latin convention was so fun. That kid dressed up in a toga praetexta and he wasn't even supposed to be a distinguished liberi! by niftyandspiffy101 October 22, 2011 Free Daily Email Emails are sent from We'll never spam you.
global_05_local_5_shard_00000035_processed.jsonl/33050
Top Definition When you change the smell of something by farting directly onto or into it. Most effective with co-workers' furniture. I was sitting in Virginia's chair and I refragranced it seven times. I think the last one was wet. by thamongrel May 15, 2008 5 Words related to refragranced Free Daily Email Emails are sent from We'll never spam you.
global_05_local_5_shard_00000035_processed.jsonl/33060
It's unfair to speak of NFL fan bases in all-encompassing terms. Are some Philadelphia Eagles fans quick with overreacting boos? Sure. Are Green Bay Packers fans more likely to be on a sausage-based diet? Sure, but some probably throw in some wings every now and then. Do most Jacksonville Jaguars fans not exist? We can't deny this. But to say that any fan base acts a single way is stereotyping and we'll never paint with such broad strokes -- except when it comes to Oakland Raiders fans. Them folks be rough. A criminal record is practically a prerequisite for membership in fan clubs. Case in point: this tremendous photograph taken by Thearon W. Henderson of Getty Images during the Raiders' loss to the the San Diego Chargers on Monday night. We don't know what started the fight -- nuanced conversation about the debt crisis, probably -- but it led to fans hitting security (or police) with handcuffs, arrests and lots and lots of punches. You know the old saying: A picture is worth 1,000 hours of community service. Notice how may of the fans are smiling as they watch this fight. I see at least five. Usually when you hear of a brawl like this at a football game, it takes place in the upper deck. This one looks like it was in the front row! Getty Images has more pictures of the fight, including some with fist-to-mouth contact. You can check them out at Deadspin if seeing fans of 4-12 teams duking it out is your thing.