|
|
Mr. Cthulhu, please pick up a white courtesy phone in the Lounge.
Sooo... as part of my problem dealing with a "bad" internal web site (PHP donthaknow) -- Ignoring certificate errors with HTTPS[^] -- I spent much of the last week Parsing Html The Cthulhu Way[^] .
It turned out that by using a System.Windows.Forms.WebBrowser and retrieving the Document, I was actually getting a sanitized version of the HTML (and only the body). This is a problem, because when common sense breaks out, there will be no certificate error, no reason to use the System.Windows.Forms.WebBrowser , and I expect that I will then receive the entire nasty pile of HTML in its raw form (fingers crossed).
So, this week I looked into accessing the raw HTML from the System.Windows.Forms.WebBrowser ... I accessed its privates, and grabbed it by the primary Interop assembly. And, by gum, it worked.
"What did you find?" I hear you ask. It's more what I didn't find. The page contains most of a TABLE (as expected), but a few start tags are missing -- unimportant ones, like THEAD, TR, and TH.
Can you then fault me for summoning Cthulhu? What self-respecting HTML parser will deal with such a mess? (Other than IE, of course).
(Deep breath.) I spent today wrestling with HtmlAgilityPack , which dealt pretty well with the errors (TagNotOpened ) and I managed to use the errors to insert the missing start tags where they logically belong. Nifty. Perfect effort for the last day before a week off.
So, provided I can deploy HtmlAgilityPack to the server, I may be able to cancel my summons. In the meantime, I have the RegEx version on the server.
Now, at the risk of asking a Programming Question... does anyone know how to get HtmlAgilityPack to report TagNotClosed errors as well? It has an error type for it, but I haven't gotten it to report any.
|
|
|
|
|
upvoted for eloquent expression of misery
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
...so that anything that contains an emoticon in the subject line gets automatically trashed - period.
That would get rid of most of the junk that still ends up in my Hotmail account these days.
I don't know why the spammers have adopted this lately...they just have, it seems. Nobody I care for includes an emoticon in a subject line.
|
|
|
|
|
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
Haven't seen that yet, but would make it easier to identify.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
...I read code and, well, that's it, I see the code I read.
I just had the bizarre experience of reading some code and realizing, wow, someone actually typed this, character by character, with thought about why they were writing this code.
A somewhat disturbing experience, as now I can't stop.
The code, BTW, that triggered this experience was LookAheadEnumerator: Implement Backtracking in Your Parsers[^]
|
|
|
|
|
You've been bewitched!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Forogar wrote: You've been bewitched!
Yup!
|
|
|
|
|
Not so disturbing; you're achieving enlightenment.
Zen suggests the same thing when eating (visualizing): from where, by who, how … field to table. One chew at a time.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Quote:
WARNING: Choking hazard
This device may contain small parts that may be a choking hazard to children under 3 years. Keep small parts away from children.
Good advice. Except this is the H&S info for ... A Microsoft Surface ... Just how big are America children's mouths?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'd be more worried on the implication that small parts (regularly?) fall out of surfaces.
<< Signature removed due to multiple copyright violations >>
|
|
|
|
|
I'd be amazed - the biggest hole on it is the USB3 socket ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: the biggest hole on it is the USB3 socket ... ... Which is the perfect size for a poison dart array!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Quote: This device may contain small parts that may be a choking hazard to children under 3 years. Keep small parts away from children.
There's not enough may 's.
This device may contain small parts that may be a choking hazard to children who may be under 3 years. You may want to keep small parts away from people who may be children...
...may you be silly enough to buy a Microsoft Surface, let alone have children...
...whom you may have allowed to play with the surface.
Next incarnation, Mr Clifton, Esquire!
|
|
|
|
|
Marc Clifton wrote: may you be silly enough to buy a Microsoft Surface
I'm quite surprised with it - at full price it's an expensive option but mine was second hand - after the XBox 360 debacle I wasn't expecting any MS hardware to be any good, but it's surprisingly solid and works really well with Win10. A lot more "together" than my WookieTab was, and with a much more responsive digitiser.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Don't all these devices come with a pen?
|
|
|
|
|
No, you have to pay extra for that! Give away profits? Never!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Well, mine did, but that was a first-gen unit.
|
|
|
|
|
By the time they got around to gen 2, all the free pens had probably been eaten.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Our grandson was around 4 when he got hold of an old (disused) computer keyboard, and without anyone noticing started prying loose the keys, re-inserting them in random places. Using that keyboard would have been quite a challenge afterwards! But the point is that he could have choked on one of the keys.
|
|
|
|
|
Does Christmas have you feeling Santamental?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You're really sleighing it with these treemendous puns.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You take the naughty with the nice: it's a package deal.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|