Tag Archives: html

Using Parallel LINQ in C#

The snippets below illustrate Parallel LINQ in C# by crawling a web page in parallel. The Crawler class is responsible for crawling a web page (only one level deep) and returning a list of documents. The Document class represents an HTML document.

Posted in C# | Also tagged , , , , , , , , , | Leave a comment

Parsing (X)HTML into a DOM tree in C#

As a quick alternative to the Html Agility Pack, HTML can be parsed into a DOM tree using the built-in XmlDocument class. The following snippets illustrate HTML parsing in C#.

Posted in C# | Also tagged , , , , , , , , , | Leave a comment

(C++) Nasdaq IPOs Scrape

This is a C++ program that scrapes IPO data from Nasdaq.com using libcurl for downloading the data and htmlcxx for parsing the html code.

Posted in C++ | Also tagged , , , , , | Leave a comment

(XSLT) How to embed javascript and html inside xslt

Place the following inside a “ block

Posted in Uncategorized | Also tagged , , , , | Leave a comment

(JavaScript) Basic jQuery form validation

CSS: .error style the error class Form HTML: class=”required” makes the input field required minlength=”2″ makes the field require at least 2 characters

Posted in JavaScript | Also tagged , , , , , , | Leave a comment

(jQuery) Simple jQuery Rotator

The code is in three parts, a HTML layout (with some requirements I’ll go over below), some CSS code (again, requirements below) and the actual jQuery code. I go over all the code in detail at the link, but I’ll give a quick rundown od the jQuery as well. The HTML: The button that control [...]

Posted in JavaScript | Also tagged , , , , | Leave a comment

(HTML) Make Google +1 Work in IE6

Ok – so it doesn’t make it work. But it does stop it from crashing in IE6.

Posted in JavaScript | Also tagged , , | Leave a comment

Doctype declaration (Zend Framework)

The following snippet will add a doctype declaration to your views. Modify Bootstrap.php . protected function _initDoctype() { $this->bootstrap(‘view’); $view = $this->getResource(‘view’); $view->doctype(‘XHTML1_STRICT’); }

Posted in PHP | Also tagged , , , , | Leave a comment

HTML5 speech-based input

HTML5 supports speech-based input via your microphone. Append the following line to your input tags. x-webkit-speech speech <input id=”search” name=”search” type=”text” x-webkit-speech speech> On a side note, it is currently only supported by Google Chrome.

Posted in Uncategorized | Also tagged , , , , , , , | Leave a comment

Persistent local storage with HTML5 Web Storage

HTML5 supports local storage with key-value pairs. The specification for local storage in HTML5 is called “Web Storage“. Storage is demonstrated in the example below by storing and retrieving an array of actors.

Posted in JavaScript | Also tagged , , , , , , , , , , | Leave a comment