/* E X A M P L E ----------------------------------------------- $feed = new RSS(); $feed->title = "RSS Feed Title"; ...
PHP RSS Writer Class
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ...
PHP Floating sidebars
This site has usual three c...
/// <summary>
/// Takes HTML and list of all positions of h3 tags and splits them.
/// </summary>
...
C# Split HTML from header tag ...
The HTML is pre-parsed to g...
<html> <head> ...
JavaScript Simple Dropdown Menu I'm Wo...
by Bryan Hadaway,
January 02, 2011 12:42,
2 refactorings, tagged with javascript, html, css, dropdown menu, minimalist
The menu now is CSS/HTML on...
class FormComponents
{
/*
...
PHP HTML Select Menu Template
by letseatfood.myopenid.com,
August 11, 2010 02:28,
27 refactorings, tagged with template, php, html, select_tag
This method outputs a stand...
arr = []
b={:a => "option1", :b => "option2"}
b.each_pair{ |key,value| arr << "#{key}=#{value}" }
...
Ruby HTML query string
by jalapinto.myopenid.com,
April 29, 2010 00:04,
5 refactorings, tagged with ruby, html, query, params
Trying to create the query ...
<?php
function get_title($html_page)
{
...
PHP Get Title of HTML page
Extract and return the bits...
def build_criteria(data_cols, i)
filterHTML = ''
typeObjects = ''
...
Ruby Helper Method could be more...
by Danny Peck,
April 23, 2009 20:53,
5 refactorings, tagged with ruby, html, content_tag, select_tag
Any help is appreciated.
public string CleanHtml(object Html) {
var s = Html.ToString();
var b = new StringBuilder();
...
C# C# HTML Encoding
This is my own attempt at w...
/// <summary>
/// This function actually alters the text and makes the necessary changes.
/// </summary>
...
C# HTML Reprocessing Code
The code below is evil. It'...
<?php
function innerHTML($node){
$doc = new DOMDocument();
...
PHP innerHTML of a DOMElement
The equivalent of the non-s...
private static Regex _namedtags = new Regex
(@"</?(?<tagname>\w+)[^>]*(\s|$|>)",
RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
...
C# Balance HTML Tags
For the subset of HTML tags...
private static Regex _tags = new Regex("<[^>]*(>|$)",
RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
private static Regex _whitelist = new Regex(@"
...
C# Sanitize HTML
Takes a provided HTML strin...
<?php
function fetch($url,$start,$end){
...
PHP Wikipedia API and text form...
by z3ro,
January 09, 2008 18:37,
4 refactorings, tagged with convert, html, plain html, formatting, parser, regex, xml, php, wikimedia, api, wikipedia
I need to add Wikipedia's i...
<%= (@post.category ? @post.category.name : '') + ' ' + link_to(@post.title, post_path(@post)) %>
Ruby Handling nil object
@post.category can be nil, ...
http://www.snippetsmania.com/