[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

RDT doesn't format very well

bo

4/29/2006 7:10:00 AM

code like this:

while i < items.size do
9.times do |x|

ret<< CGI::unescapeHTML(item)

if item == 'something'
break
end
end
end

if I move away the space character preceding CGI:: and format, the
result would be:

while i < items.size do
9.times do |x|

ret<<CGI::unescapeHTML(item)

if item == 'something'
break
end
end
end

could anyone tell me how to make RDT format better?

3 Answers

Karl von Laudermann

5/1/2006 1:27:00 PM

0

bo wrote:
> if I move away the space character preceding CGI:: and format, the
> result would be:
>
> while i < items.size do
> 9.times do |x|
>
> ret<<CGI::unescapeHTML(item)
>
> if item == 'something'
> break
> end
> end
> end

If you remove the space preceding "CGI", the formatter is probably
interpreting "<<CGI" as the start of a "here document". Therefore the
following lines are being treated as literal text, not code. So you
should probably leave the spaces in.

bo

5/9/2006 3:51:00 AM

0

thanks for replying. I've found this the main problem for formating and
syntax highlight. vim has the same bug. it seems common for editors.
not a big deal though

ltlee1

11/13/2009 11:57:00 PM

0

On Nov 10, 6:40 pm, RichAsianKid <RichAsian...@hotmail.com> wrote:
> ltlee1 wrote:
> >http://www.economist.com/world/middleeast-africa/displaySto......
>
> > ------------------------
> > Is Israel too strong for Barack Obama?
>
> > Nov 5th 2009 | CAIRO AND JERUSALEM
> > From The Economist print edition
>
> > As America drops its demand for a total freeze on the building of
> > Israeli settlements in the West Bank, angry Palestinians say there is
> > no scope for resuming talks
>
> > Illustration by Peter Schrank
> > FIVE months after Barack Obama went to Cairo and persuaded most of the
> > Arab world, in a ringing declaration of even-handedness, that he would
> > face down Israel in his quest for a Palestinian state, American policy
> > seems to have run into the sand. The American president’s mediating
> > hand is weaker, his charisma damagingly faded. From the Palestinian
> > and Arab point of view, his administration—after grandly setting out
> > to force the Jewish state to stop the building of Jewish settlements
> > on Palestinian land as an early token of good faith, intended to bring
> > Israelis and Palestinians back to negotiation—has meekly capitulated
> > to Israel.
>
> > The upshot is that hopes for an early resumption of talks between the
> > main protagonists seem to have been dashed. Indeed, no one seems to
> > know how they can be restarted. The mood among moderates on both sides
> > is as glum as ever.
>
> > Mr Obama’s secretary of state, Hillary Clinton, made matters worse by
> > actually praising Israel’s prime minister, Binyamin Netanyahu, for
> > promising merely to “restrain” Israel’s building rather than stop it
> > altogether, as he was first asked to do. Previously Mrs Clinton had
> > insisted that stop meant stop. There should be no “organic growth” of
> > existing settlements and no exceptions for projects under way. Nor did
> > she specifically exempt East Jerusalem, which Palestinians view as
> > their future capital but which many Israelis see as theirs alone. And
> > she had earlier castigated Israel for demolishing Palestinian houses
> > in the city’s eastern part. Now, in Israel on October 31st, she
> > changed her tune, seeming to acquiesce in Mr Netanyahu’s refusal to
> > meet those earlier American demands and congratulating the prime
> > minister on his “unprecedented” offer to build at a slower rate than
> > before.
>
> > Mr Netanyahu’s case is that being “prepared to adopt a policy of
> > restraint on the existing settlements” is indeed a concession. No new
> > settlements would be started, no extra Palestinian land appropriated
> > for expansion. But some 3,000 housing units already commissioned must,
> > he said, be completed. Building must go on in East Jerusalem, he has
> > repeatedly said, as it cannot be part of a Palestinian state.
>
> > Mrs Clinton later awkwardly backpedalled, assuring the Palestinians
> > that she still considered all settlements “illegitimate”, while
> > pleading with them to resume talks. That seems unlikely. A storm of
> > abuse raged in the Palestinian and Arab press. Mr Obama, it was widely
> > deduced, had caved in after his own ratings in Israel had slumped,
> > according to some Israeli polls, to as low as 4%. Mahmoud Abbas, the
> > head of the Fatah party who presides over the Palestinian Authority in
> > the West Bank, expressed extreme disappointment—and continued to
> > insist that talks could not resume until there was a full building
> > freeze.
>
> > Among Palestinians at large, Mr Abbas has been derided for putting his
> > faith in the new American administration. Hamas, the Islamist movement
> > that runs the Gaza Strip, the smaller of the two main parts of a
> > future Palestinian state, mocked him for ever thinking that Mr Obama
> > could change American policy towards the Middle East.
>
> > Last month he called a general and presidential election for January
> > 24th. But with opinion polls showing his popularity diving, on
> > November 5th he said he would not stand for re-election. Hamas, in any
> > event, said it would refuse to take part in the polls. Mr Abbas, it
> > seems, has been forced to acknowledge that his authority—and his
> > ability to grapple with the Israelis in negotiations if they had
> > resumed—has been eviscerated.
>
> > Besides, even if talks did start again, no agreement would stick
> > without the acquiescence of Hamas, which won the last Palestinian
> > election, in 2006, and is still strong enough to kibosh any deal done
> > without it. Yet discussions between the two rival groups, under the
> > aegis of the Egyptians, have been stuttering along for more than a
> > year without getting anywhere.
>
> > Mr Netanyahu, on the other hand, was cock-a-hoop. The right-wing and
> > religious ministers who make up the bulk of his coalition government
> > can scarcely believe his luck. The prime minister is riding high in
> > the Israeli people’s esteem. Building work is proceeding apace in many
> > of the settlements. He looks as if he has emerged unscathed from a
> > brush with a hostile American president.
>
> > Mr Obama is being criticised, even by Israelis and Americans on the
> > left, for making demands of Mr Netanyahu that he should have known
> > would never be met. Some say the president should himself fly to
> > Israel to address the Israeli people directly with a game-changing
> > plan of his own. But no one, least of all in Washington, seems to know
> > what that might be.
>
> > ---------------------------
>
> > Of course America is at present the sole superpower. The problem is
> > with American democracy.
>
> > 1. Foreign policy is restrained by domestic politics. And domestic
> > politics is controlled by special interests such as the Jewish lobby.
>
> > 2. Election produces president who can speak well but otherwise has
> > no expertise in both domestic and international politics.
>
> Pastor asks God, "when will my wife forgive me for adultery?"
> God answers, not in her lifetime.
>
> Catholic priest asks God, "when will God forgive me when I molested
> those altar boys?"
> God answers, not in your lifetime.
>
> Rabbi asks God, "when will there be peace in the Middle East?"
> God answers, not in my lifetime.

No good solution from Israel's point of view. Hence Jewish politicians
will just
bid for time. They are not in a hurry to do anything drastic as long
as they can
get America on Israel's side.
>
> No matter how well you're a manager (ie cf your point 2) some challenges
> are still best prevented than overcome, and that's assuming you can
> overcome them in the first place.

The Palestine issue is uniquely Britain's contribution to humanity.

> Singapore's LKY understood this
> dynamic so well when he boasted it in his interview with Der Spiegel in
> 2005: "In multiracial societies, you don't vote in accordance with your
> economic interests and social interests, you vote in accordance with
> race and religion. Supposing I'd run their system here, Malays would
> vote for Muslims, Indians would vote for Indians, Chinese would vote for
> Chinese. I would have a constant clash in my Parliament which cannot be
> resolved because the Chinese majority would always overrule them. So I
> found a formula that changes that..."
>
> Democracy when combined with "yes we can" racial/ethnic/religious
> diversity accentuates rather than ameliorates conflict.
>
> And it's this purported metaphysical contradiction of the West that's
> its Achilles heel.- Hide quoted text -
>
> - Show quoted text -