[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: [QUIZ] Posix Pangrams (#97

Gavin Kistner

10/6/2006 5:08:00 PM

From: Jamie Macey [mailto:jamie.macey@gmail.com]
> > (There's no joy in trying to parse/string HTML.)
> Sure there is.
>
> require 'rubygems'; require 'hpricot'; require 'open-uri'
> doc = Hpricot(open('http://www.unix.org/version3/apis/cu...))
> puts (doc/"p.tent/i").map{|i|i.inner_html}
>
> Hpricot makes HTML scraping fun again (no, really!).

:)

I copy/pasted the rows from the table and did it like this:
puts <<ENDS.scan( /<i>([^<]+)/ ).flatten.join( ' ' )
#HTML HERE
ENDS


Actually...I can't get Hpricot to install to test your code (gem server
seems to be down) but doesn't that grab way more information than you
wanted from the table? The table headers and all columns, too?

9 Answers

Jacob Fugal

10/6/2006 5:40:00 PM

0

On 10/6/06, Gavin Kistner <gavin.kistner@anark.com> wrote:
> From: Jamie Macey [mailto:jamie.macey@gmail.com]
> > require 'rubygems'; require 'hpricot'; require 'open-uri'
> > doc = Hpricot(open('http://www.unix.org/version3/apis/cu...))
> > puts (doc/"p.tent/i").map{|i|i.inner_html}
>
> Actually...I can't get Hpricot to install to test your code (gem server
> seems to be down) but doesn't that grab way more information than you
> wanted from the table? The table headers and all columns, too?

I'm assuming the problems with the gem server are related to the
problems with RubyForge. Hopefully that will be resolved soon, I know
it's being worked on.

Regarding your question: note the "/i" after "p.tent".

Jacob Fugal

Jamie Macey

10/6/2006 5:45:00 PM

0

On 10/6/06, Gavin Kistner <gavin.kistner@anark.com> wrote:
> From: Jamie Macey [mailto:jamie.macey@gmail.com]
> > require 'rubygems'; require 'hpricot'; require 'open-uri'
> > doc = Hpricot(open('http://www.unix.org/version3/apis/cu...))
> > puts (doc/"p.tent/i").map{|i|i.inner_html}
>
> Actually...I can't get Hpricot to install to test your code (gem server
> seems to be down) but doesn't that grab way more information than you
> wanted from the table? The table headers and all columns, too?

I am pulling the entire html file down, but by dividing the Hpricot
instance I'm essentially asking it to give me all the <i> tags that
are inside a <p> with the tent class. Given the content of the file I
could probably just do doc/"i" but it would also grab the 'opt' from
the definition list up top.

My code does give the same output as yours, excepting that since I'm
putsing the array rather than joining I get one command per line.

- Jamie

HD

10/11/2012 1:28:00 AM

0


"Why are people so cruel" <noonehome@microsoft.com> wrote in message
news:r%ods.11$Ow3.9@viwinnwfe02.internal.bigpond.com...
>
> "HD" <herpem@bigpond.com> wrote in message
> news:yNnds.5$1k5.1@viwinnwfe01.internal.bigpond.com...
>>
>> "Why are people so cruel" <noonehome@microsoft.com> wrote in message
>> news:tJlds.1938$tH2.381@viwinnwfe01.internal.bigpond.com...
>>> http://www.abc.net.au/news/2012-10-11/catholic-church-rejects-vic-police-allegations/4306518?s...
>>>
>>> What the item omits to tell you is that when an abuser was
>>> moved interstate the catholic church refused to disclose
>>> the abuser's whereabouts. If we needed proof that paedophilia
>>> is entrenched in the catholic church then this is it.
>>>
>>> Wind up the church, dispose of its assets and pay compensation
>>> to the victims.
>>
>> Wind up Australia, sell off everything, pay off the debt and distribute
>> the
>> rest.
>> I'm sure that China would be interested.
>>
>>
> Big problem looming for the catholic congregations - if the church cant
> or more likely wont pay compensation, then the congregations may
> become liable for their actions/inactions.

You are an idiot.
The victims are Catholics.
The Church belongs to the congregation.
Now you want to steal from the victims what belongs to them to pay the
victims.
Do you have any brains?










Why are people so cruel

10/11/2012 3:21:00 AM

0


"HD" <herpem@bigpond.com> wrote in message
news:egpds.11$1k5.7@viwinnwfe01.internal.bigpond.com...
>
> "Why are people so cruel" <noonehome@microsoft.com> wrote in message
> news:r%ods.11$Ow3.9@viwinnwfe02.internal.bigpond.com...
>>
>> "HD" <herpem@bigpond.com> wrote in message
>> news:yNnds.5$1k5.1@viwinnwfe01.internal.bigpond.com...
>>>
>>> "Why are people so cruel" <noonehome@microsoft.com> wrote in message
>>> news:tJlds.1938$tH2.381@viwinnwfe01.internal.bigpond.com...
>>>> http://www.abc.net.au/news/2012-10-11/catholic-church-rejects-vic-police-allegations/4306518?s...
>>>>
>>>> What the item omits to tell you is that when an abuser was
>>>> moved interstate the catholic church refused to disclose
>>>> the abuser's whereabouts. If we needed proof that paedophilia
>>>> is entrenched in the catholic church then this is it.
>>>>
>>>> Wind up the church, dispose of its assets and pay compensation
>>>> to the victims.
>>>
>>> Wind up Australia, sell off everything, pay off the debt and distribute
>>> the
>>> rest.
>>> I'm sure that China would be interested.
>>>
>>>
>> Big problem looming for the catholic congregations - if the church cant
>> or more likely wont pay compensation, then the congregations may
>> become liable for their actions/inactions.
>
> You are an idiot.
> The victims are Catholics.

Not true, some victims of catholic abuse did not belong to a congregation
or were abused by people groomed by catholics, so the net can be
widened quite substantially. It wont be long before we see paedophiles
using "I was groomed by a catholic priest" defence and "thought it was
normal behaviour".

> The Church belongs to the congregation.

And as such the congregation is "equally and severally liable" for their
joint acts or ommissions. Not reporting or ignoring abusers when it
became known to even one member of the congregation, makes them
all equally liable if the church does not have sufficient assets or has
established a structure specifically to avoid liability. The other issue
for many congregations will be when the structures to avoid liability
were established and as is likely it was done specifically to avoid
liability in the event of child abuse claims. That would indicate a criminal
conspiracy if they knew that the main reson for their structure was to
avoid paying compensation to victims of abuse.

> Now you want to steal from the victims what belongs to them to pay the
> victims.

Just like the catholics have stolen so many lives of innocent children.

> Do you have any brains?
>
>
Probably.

HD

10/11/2012 4:41:00 AM

0


"Why are people so cruel" <noonehome@microsoft.com> wrote in message
news:JWqds.13$Ow3.2@viwinnwfe02.internal.bigpond.com...
>
> "HD" <herpem@bigpond.com> wrote in message
> news:egpds.11$1k5.7@viwinnwfe01.internal.bigpond.com...
>>
>> "Why are people so cruel" <noonehome@microsoft.com> wrote in message
>> news:r%ods.11$Ow3.9@viwinnwfe02.internal.bigpond.com...
>>>
>>> "HD" <herpem@bigpond.com> wrote in message
>>> news:yNnds.5$1k5.1@viwinnwfe01.internal.bigpond.com...
>>>>
>>>> "Why are people so cruel" <noonehome@microsoft.com> wrote in message
>>>> news:tJlds.1938$tH2.381@viwinnwfe01.internal.bigpond.com...
>>>>> http://www.abc.net.au/news/2012-10-11/catholic-church-rejects-vic-police-allegations/4306518?s...
>>>>>
>>>>> What the item omits to tell you is that when an abuser was
>>>>> moved interstate the catholic church refused to disclose
>>>>> the abuser's whereabouts. If we needed proof that paedophilia
>>>>> is entrenched in the catholic church then this is it.
>>>>>
>>>>> Wind up the church, dispose of its assets and pay compensation
>>>>> to the victims.
>>>>
>>>> Wind up Australia, sell off everything, pay off the debt and distribute
>>>> the
>>>> rest.
>>>> I'm sure that China would be interested.
>>>>
>>>>
>>> Big problem looming for the catholic congregations - if the church cant
>>> or more likely wont pay compensation, then the congregations may
>>> become liable for their actions/inactions.
>>
>> You are an idiot.
>> The victims are Catholics.
>
> Not true, some victims of catholic abuse did not belong to a congregation

Ah yes, Muslims were in the catholic schools and Baptists were altar boys.


> or were abused by people groomed by catholics, so the net can be
> widened quite substantially. It wont be long before we see paedophiles
> using "I was groomed by a catholic priest" defence and "thought it was
> normal behaviour".

You have been groomede to be a bigoted idiot.

>
>> The Church belongs to the congregation.
>
> And as such the congregation is "equally and severally liable" for their
> joint acts or ommissions. Not reporting or ignoring abusers when it
> became known to even one member of the congregation, makes them
> all equally liable if the church does not have sufficient assets or has
> established a structure specifically to avoid liability. The other issue
> for many congregations will be when the structures to avoid liability
> were established and as is likely it was done specifically to avoid
> liability in the event of child abuse claims. That would indicate a
> criminal
> conspiracy if they knew that the main reson for their structure was to
> avoid paying compensation to victims of abuse.
>
>> Now you want to steal from the victims what belongs to them to pay the
>> victims.
>
> Just like the catholics have stolen so many lives of innocent children.
>
>> Do you have any brains?
>>
>>
> Probably.
>

Well, consider this.
It now has become an offence not to report child abusers.
Therefore, victims when they become adults and parents of child victims can
become
criminals for failing to report abuses,
The same law should be applied to domestic violence and all other violence.
A victim should be required to report an abuser.
EVEN IF THEY CAN"T MAKE MONEY OUT OF IT.








Why are people so cruel

10/11/2012 9:07:00 AM

0


"HD" <herpem@bigpond.com> wrote in message
news:C5sds.18$Ow3.7@viwinnwfe02.internal.bigpond.com...
>
> "Why are people so cruel" <noonehome@microsoft.com> wrote in message
> news:JWqds.13$Ow3.2@viwinnwfe02.internal.bigpond.com...
>>
>> "HD" <herpem@bigpond.com> wrote in message
>> news:egpds.11$1k5.7@viwinnwfe01.internal.bigpond.com...
>>>
>>> "Why are people so cruel" <noonehome@microsoft.com> wrote in message
>>> news:r%ods.11$Ow3.9@viwinnwfe02.internal.bigpond.com...
>>>>
>>>> "HD" <herpem@bigpond.com> wrote in message
>>>> news:yNnds.5$1k5.1@viwinnwfe01.internal.bigpond.com...
>>>>>
>>>>> "Why are people so cruel" <noonehome@microsoft.com> wrote in message
>>>>> news:tJlds.1938$tH2.381@viwinnwfe01.internal.bigpond.com...
>>>>>> http://www.abc.net.au/news/2012-10-11/catholic-church-rejects-vic-police-allegations/4306518?s...
>>>>>>
>>>>>> What the item omits to tell you is that when an abuser was
>>>>>> moved interstate the catholic church refused to disclose
>>>>>> the abuser's whereabouts. If we needed proof that paedophilia
>>>>>> is entrenched in the catholic church then this is it.
>>>>>>
>>>>>> Wind up the church, dispose of its assets and pay compensation
>>>>>> to the victims.
>>>>>
>>>>> Wind up Australia, sell off everything, pay off the debt and
>>>>> distribute the
>>>>> rest.
>>>>> I'm sure that China would be interested.
>>>>>
>>>>>
>>>> Big problem looming for the catholic congregations - if the church cant
>>>> or more likely wont pay compensation, then the congregations may
>>>> become liable for their actions/inactions.
>>>
>>> You are an idiot.
>>> The victims are Catholics.
>>
>> Not true, some victims of catholic abuse did not belong to a congregation
>
> Ah yes, Muslims were in the catholic schools and Baptists were altar boys.
>
>
>> or were abused by people groomed by catholics, so the net can be
>> widened quite substantially. It wont be long before we see paedophiles
>> using "I was groomed by a catholic priest" defence and "thought it was
>> normal behaviour".
>
> You have been groomede to be a bigoted idiot.
>
>>
>>> The Church belongs to the congregation.
>>
>> And as such the congregation is "equally and severally liable" for their
>> joint acts or ommissions. Not reporting or ignoring abusers when it
>> became known to even one member of the congregation, makes them
>> all equally liable if the church does not have sufficient assets or has
>> established a structure specifically to avoid liability. The other issue
>> for many congregations will be when the structures to avoid liability
>> were established and as is likely it was done specifically to avoid
>> liability in the event of child abuse claims. That would indicate a
>> criminal
>> conspiracy if they knew that the main reson for their structure was to
>> avoid paying compensation to victims of abuse.
>>
>>> Now you want to steal from the victims what belongs to them to pay the
>>> victims.
>>
>> Just like the catholics have stolen so many lives of innocent children.
>>
>>> Do you have any brains?
>>>
>>>
>> Probably.
>>
>
> Well, consider this.
> It now has become an offence not to report child abusers.
> Therefore, victims when they become adults and parents of child victims
> can become
> criminals for failing to report abuses,
> The same law should be applied to domestic violence and all other
> violence.
> A victim should be required to report an abuser.
> EVEN IF THEY CAN"T MAKE MONEY OUT OF IT.
>
>
Well done you are starting to see the light. Big problem for
child abuse victims is that the catholic involved usually had a
position of power - "you wont go to heaven" or "your family
will go to purgatory if you tell anyone". When as adults the
victim reports the matter, the church has in most instances
vilified them, they then end up going to the correct authorities,
but often with far worse problems due to their despicable
treatment by the church.

dechucka

10/13/2012 2:38:00 AM

0


snip

>> Well done you are starting to see the light.
>
> But you don't.
> Being abused by mostly gay priests is disgusting,

The gays abused the girls! Now you are trying to vilify a group to take the
pressure off the Catholic Church

dechucka

10/14/2012 8:15:00 PM

0


snip

>> no figures?
> No, just common knowledge.

:-)

dechucka

10/15/2012 7:31:00 PM

0

snip

>>> I don't disagree with you, but for over 250 years in English common law,
>>> a wife does not have to give incriminating evidence against her husband.
>>> The same applies to close members of the family.
>>
>> bullshit
> No.

agree with the wife but lets see the evidence for the rest of the family. Of
course if the wife under that law had any moral values she would give
evidence against her husband for heinous crimes against children