[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Jason

5/2/2008 2:30:00 AM

Could someone help me convert a string with a number in it such as "26.7
feet" to just the word, "feet"?

I've searched documentation without luck. Thank you!
--
Posted via http://www.ruby-....

3 Answers

David A. Black

5/2/2008 2:35:00 AM

0

Hi --

On Fri, 2 May 2008, Jason Lillywhite wrote:

> Could someone help me convert a string with a number in it such as "26.7
> feet" to just the word, "feet"?
>
> I've searched documentation without luck. Thank you!

string[/\w+$/] would give you "feet". A lot depends on how you define
the operation you want (last sequence of characters, everything after
last number, etc.).


David

--
Rails training from David A. Black and Ruby Power and Light:
INTRO TO RAILS June 9-12 Berlin
ADVANCING WITH RAILS June 16-19 Berlin
INTRO TO RAILS June 24-27 London (Skills Matter)
See http://www.r... for details and updates!

Mr Posting Robot

10/28/2011 10:00:00 AM

0


BONZO@27-32-240-172 [numerous nyms] wrote:
>[Aussie coal lobby spin]

The next steps on climate change

Getting angry and going right

The Economist
Thu Oct 27th 2011

Austin -- Given the broad scientific consensus that climate change is
happening, based on data showing that climate change is happening, climate
scepticism must be predicated on a belief that the data is flawed. The paper
has a look at climate data to date and the methodological limitations that
have given rise to what Richard Muller, an astrophysicist, characterise as
"legitimate scepticism". As the article explains, Dr Muller, being somewhat
sceptical himself in the wake of the 2009 "Climategate" scandal, convened the
Berkeley Earth Surface Temperature group to examine the data and existing
analyses using a methodology designed to incorporate some of the concerns of
the legitimate sceptics. On Oct 20th, the group released 4 papers that
corroborate the climate consensus: "The group estimates that over the past 50
y the land surface warmed by 0.911?C: a mere 2% less than NOAA's estimate."

The corroboration should comfort people who are concerned about climate
change, although the data are not comforting in the grand scheme of things. No
doubt a lot of climate sceptics are stubborn and will not be moved by new
methodological approaches. Some, however, will. And although American
environmentalists are regrouping after a series of setbacks, they're hardly
going to abandon the issue of climate change. Reinforced data may help as
they retool their strategies.

What will those strategies be? Over at Duck of Minerva, Josh Busby, a
political scientist at the University of Texas, looks at 2 alternatives:
"Get Angry" or "Go Right". The 1st would involve a more voluble environmental
movement as a counterweight to the fractious climate sceptics (who are, keep
in mind, the minority)--a sort of "Green Tea Party" organised around such
issues as the controversial Keystone XL pipeline. The second strategy
would involve building the coalition by reaching out to Republicans, by
focusing on the potential economic benefits of a shift to clean power, for
example, or the national-security implications of dependence on oil imports.

With regard to the 1st strategy, targeted anger, as opposed to the inchoate
variety, can be useful and convincing. Around the anniversary of the Deepwater
Horizon spill, for example, some noted that the environmental impact of the
"disaster" was looking less catastrophic than people had initially
predicted. They took this as evidence that people had overreacted. But another
way of looking at it is that the public fury over the spill was key to
spurring the response that mitigated the impact. Similarly, the Environmental
Protection Agency is planning to regulate mercury, a pollutant that can harm
pregnancies, over the protests of nearly 1/2 of the states and most
congressional Republicans. Speaking at SXSWEco earlier this month, Mary Anne
Hitt of the Sierra Club's Beyond Coal Campaign, argued that the EPA's ability
to fight back has been strengthened by the public's response. On
issues where the harm is discernable and logical responses are readily
available, public anger can drive change.

When it comes to climate change, however, Mr Busby is rightly sceptical of the
angry approach: "Even if this movement were successful, it might get attached
to policies that ultimately prove unworkable. The Tea Party's influence on the
debt ceiling debate may be instructive." Building a bigger tent, he reckons,
would be more effective, partly because it would mitigate the risk of negative
political externalities such as partisan polarisation and would therefore be
more sustainable over the long term.

The "going right" strategy also benefits from the fact that it's possible to
address climate change without making it primarily or even overtly about
climate change. There are a lot of policies and developments afoot that have
climate benefits without being framed as such. The mercury regulation is
one. The EPA's action focuses on the impacts to human health, but one
result of the regulation will be to raise the costs of burning coal, a major
climate culprit. Another example comes from Texas, the nation's leading
wind-power state and not a particular friend of the environment. Last wk in
Fort Worth, I met a wind executive from Amarillo. I asked whether he supports
wind for the environmental benefits or for strictly business
reasons. Business, he said. Then he added something that flips the usual
script about renewable energy: a few wk earlier he had been in Copenhagen, and
was struck by the casual environmentalism of the Danes. As a result, he had
started to think about the environment, and had been riding his bike to
work. In, again, Amarillo.

We hadn't discussed his views on climate change, but then, it wasn't really
relevant. "Going right" on climate change is a worthwhile idea. As I've
written before, with regard to criminal-justice reform, if the "opposite"
party signs on to your programme, there's your proof of concept. And if
climate change is a bridge too far, you can tweak the strategy to "go right"
on subsidiary issues, like developing renewable energy.

MYREF: 20111028210001 msg2011102827119

[240 more news items]

---
Another problem that has to be taken seriously is a slow rise of sea level
which could become catastrophic if it continues to accelerate. We have
accurate measurements of sea level going back 200 years. We observe a
steady rise from 1800 to the present, with an acceleration during the last
50 years. It is widely believed that the recent acceleration is due to
human activities, since it coincides in time with the rapid increase of carbon
dioxide in the atmosphere.
-- Freeman Dyson, "Many Colored Glass: Reflections on the Place of Life in the

Professor Freeman Dyson, World Renowned "Heir To Einstein" Physicist
-- BONZO@27-32-240-172 [86 nyms and counting], 27 Feb 2011 12:50 +1100

Mr Posting Robot

11/17/2011 12:00:00 PM

0


BONZO@27-32-240-172 [numerous nyms] wrote:
>[Aussie coal lobby spin]

Global warming adds to economic woes

Reuters/SMH [Australia]
Nov 17, 2011 - 8:41PM

Rising temperatures are driving more frequent bouts of extreme weather which
governments should heed with climate action even as the world economy teeters.

Global carbon emissions rose by a record amount last y rebounding on the heels
of recession, showing the problem remains even when economies plummet.

Meanwhile a UN climate meeting which starts later this m in Durban, South
Africa, will likely be one of the most uneventful yet in stalled talks to
agree a global deal.

An early draft of a report on extreme weather events to be published by the
Intergovernmental Panel on Climate Change (IPCC) on Fri makes only broad brush
links with climate change.

It says that manmade climate change is "likely" responsible for hotter
heatwaves worldwide, in findings which experts from 110 countries debated this
wk and may still change. In IPCC jargon, "likely" means a two-thirds chance or m
ore.

The report should give more prominent weight to growing evidence for a link, how
ever.

Summer mean temperatures, including data for 2011, have risen inexorably above
the 1951-1980 average, unpublished research by NASA's James Hansen shows.

Each y about a tenth of the world's land area now experiences an "extremely
hot" June-July-August, something all but unheard of just 60 y ago, Hansen says.

In a stark example, a Russian heatwave last July wiped out a quarter of the
country's grain crop and panicked world food markets.

It prompted President Dmitry Medvedev to acknowledge a climate threat which
his predecessor, Vladimir Putin, had once joked about.

Extreme

Hansen defined extremely hot summers as those exceeding 3 standard deviations
from the average 1951-1980 climate.

One standard deviation captures about 2 thirds of observations compared with
the seasonal summer average, and 3 standard deviations nearly 99.9 per cent.

In other words, a summer more than 3 standard deviations from the average
should barely ever happen.

Yet they are occurring, in Europe in 2003, in eastern Europe in 2007, Russia
and the Middle E in 2010 and Texas in early 2011.

The argument is that such increasing frequency can't be explained only by
natural variation in the weather.

And the problem is growing, with Hansen's research showing average summer
temperatures globally are up by 1 standard deviation since 2001 compared with
1951-1961 in a steadily rising trend.

He forecasts by 2050, assuming present trends of growth in fossil fuel carbon
emissions, "extremely hot" summers in 1951-1980 terms would become the norm.

His observations appear robust for global data but less so for regions: the
recent trend in extremely hot US summers, for example, appears similar to
those of the 1930s.

Such "noise" from natural weather variation may be expected in local and
regional data.

Global full-year mean temperatures reached a record in 2010 tied with 1998 and
2005, the World Meteorological Organisation (WMO) said. The past decade was
the warmest since measurements began in the nineteenth century.

Evidence

Linking particular extreme weather events to climate change remains a matter
of probability rather than proof, given the chaotic events which drive natural p
atterns.

Researchers from Germany's Potsdam Institute for Climate Impact Research used
simulations with and without a warming trend to show that recently rising
temperatures in Russia, especially since 1980, had increased the chance of
last year's heatwave.

They calculated an 80% probability that the heatwave was due to climate
change, in a paper published last m in the Proceedings of the National Academy
of Sciences.

Moscow temperatures were the highest since the beginning of modern records and
exceeded the long-term average by 7.8 degrees Celsius, according to the WMO.

The WMO earlier this y said that it was "very likely" that human influence on
climate had at least doubled the risk of a heatwave such as the one in Europe
in 2003, blamed for 40,000-70k deaths, compared with pre-industrial times.

Climate change also explained roughly 1/2 the increased dryness of
Mediterranean winters in a recent study by the US National Oceanic and
Atmospheric Administration (NOAA).

Higher sea surface temperatures helped explain how 10 of the 12 driest winters
since 1902 had all been in the past 20 years, the authors said in the Journal
of Climate.

Since the last major IPCC report in 2007 many studies have shown that climate
change is adding to the frequency of heavy rain, even making individual flood
events more likely, adding to the evidence which goes beyond mere caution
calling for much steeper carbon cuts.

MYREF: 20111117230002 msg2011111715956

[242 more news items]

---
[Yasi is "the worst cyclone" to hit Qld:]
CORRECTION: The worst cyclone in history was the cat 5 Mahina in 1899.
[Bzzt! Thank you, come again!]
-- BONZO@27-32-240-172 [daily nymshifter], 3 Feb 2011 15:12 +1100