C# On I hate to do this, but...

by Chris Jester-Young, July 18, 2008 01:45

@Wolfbyte: Haha, nice. Very...

729442eea8d8548842a6e0947e333c7b Talk
1
2
3
        /// <summary>
...

C# On I hate to do this, but...

by Wolfbyte, July 17, 2008 01:40 Star_fullStar_full

I can't resist posting the ...

861f311cc4a077c439099d0e5d251e73 Talk
1
2
3
my %fbmap = (3 => 'Fizz', 5 => 'Buzz');
my $fizzbuzz = sub {
...

C# On I hate to do this, but...

by Chris Jester-Young, July 16, 2008 10:20 Star_full

Implementation in Perl. :-P...

729442eea8d8548842a6e0947e333c7b Talk
1
2
3
4
    static class ExtensionsMethods
    {
        public static bool IsMultipleOf(this int number, int num)
...

C# On I hate to do this, but...

by dcadenas.blogspot.com, July 16, 2008 02:04 Star_fullStar_fullStar_fullStar_full
Acad2552784135c09b17c00853f5a6f8 Talk
1
string descriptions = String.Join(",", GetItems().ConvertAll(new Converter<Item, string>(delegate(Item item) { return item.Description; })).ToArray());

C# On Traversing a List and colle...

by TheSun, July 14, 2008 19:17

.NET 2.0

3b147eb349748f5a1e50f75e8c4a7867 Talk

C# On Balance HTML Tags

by Chris Jester-Young, July 14, 2008 11:52

@Konrad: on your suggestion...

729442eea8d8548842a6e0947e333c7b Talk

C# On Balance HTML Tags

by Chris Jester-Young, July 14, 2008 10:45

Hats off to Corbin for an e...

729442eea8d8548842a6e0947e333c7b Talk

C# On Balance HTML Tags

by Konrad, July 13, 2008 09:53

> As to why the List<>.Cont...

F9401202ab73e624cc82800b0fff1489 Talk

C# On Balance HTML Tags

by Jeff Atwood, July 13, 2008 07:37

It doesn't break Corbin's c...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
4
tagname = tag.Groups["tagname"].ToString();

if (!ignoredtags.Contains("<" + tagname))
...

C# On Balance HTML Tags

by Paul Celi, July 12, 2008 18:09

Hi jeff, maybe a stupid que...

Avatar Talk
1
2
3
4
// ** DO NOT USE **
// THIS IS BAD BROKEN CODE, ONLY DISPLAYED FOR BENCHMARKING PURPOSES!
if (!tagpaired[i] && !ignoredtags.Contains(tagname))
...

C# On Balance HTML Tags

by Jeff Atwood, July 12, 2008 00:46

> Another problem is the co...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
4
var ignoredtags = new List<String> { "p", "img", "br" };

if (!tagpaired[i] && !ignoredtags.Contains(tagname))
...

C# On Balance HTML Tags

by Jeff Atwood, July 12, 2008 00:39

> I would think that a list...

51d623f33f8b83095db84ff35e15dbe8 Talk

C# On Balance HTML Tags

by Jeff Atwood, July 12, 2008 00:30

Wow, Corbin, thank you. Tha...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
4
public static string BalanceTags(string html)
{
	MatchCollection tags = _namedtags.Matches(html);
...

C# On Balance HTML Tags

by Corbin March, July 11, 2008 21:07 Star_fullStar_fullStar_fullStar_fullStar_full

Is leaving incorrect nestin...

F17131c7feaf9a92fe35323f6ec48429 Talk

C# On Balance HTML Tags

by Peter Hosey, July 11, 2008 11:47

> The simple String.Contain...

63e8a7ad46b1e491d2e8dfd9efc042de Talk

C# On Balance HTML Tags

by Jeff Atwood, July 11, 2008 10:44

> What's wrong with a list ...

51d623f33f8b83095db84ff35e15dbe8 Talk

C# On Sanitize HTML

by Jeff Atwood, July 11, 2008 10:28

> your overall approach is ...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
HtmlDocument doc = new HtmlDocument();
...

C# On Balance HTML Tags

by Duncan Smart, July 11, 2008 10:06 Star_fullStar_fullStar_full

Example that actually fixes...

13ead10356c893aead42be91b5cdcc01 Talk
1
2
if (!tagpaired[i] && !ignoredtags.Contains("<" + tagname))
    continue;

C# On Balance HTML Tags

by Ian Potter, July 11, 2008 10:02

I liked your article on fla...

Ce0162e9224181d6b9eadbe5c629b2ba Talk

C# On Balance HTML Tags

by Duncan Smart, July 11, 2008 09:52

IMHO forget the Regex-ing. ...

13ead10356c893aead42be91b5cdcc01 Talk

C# On Balance HTML Tags

by Peter Hosey, July 11, 2008 09:42

> var ignoredtags = "<p<img...

63e8a7ad46b1e491d2e8dfd9efc042de Talk

C# On Balance HTML Tags

by Jeff Atwood, July 11, 2008 09:25

> p isn't self closing

Wel...

51d623f33f8b83095db84ff35e15dbe8 Talk

C# On Balance HTML Tags

by Konrad, July 11, 2008 08:58

Hi Jeff,

just two quick qu...

F9401202ab73e624cc82800b0fff1489 Talk
1
2
3
4
public static string AsCommaSeparatedValues<T>(this IEnumerable<T> items, Func<T, string> translator)
{
  return items.Select(translator).AsCommaSeparatedValues();
...

C# On Traversing a List and colle...

by Wolfbyte, July 10, 2008 08:22 Star_fullStar_fullStar_fullStar_fullStar_full

Curses! I wasn't logged in ...

861f311cc4a077c439099d0e5d251e73 Talk
1
2
3
static void Main(string[] args)
{
...

C# On Traversing a List and colle...

by Mike Minutillo, July 10, 2008 05:37 Star_fullStar_fullStar_fullStar_fullStar_full

I'd consider making it more...

861f311cc4a077c439099d0e5d251e73 Talk