1
2
3
Declare @Index varchar(128)
...

C# Drop all Indexes in SQL Server

by GateKiller, October 07, 2008 10:48, 3 refactorings, tagged with sql, Index

The below is some code I re...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
public static void Capitalize()
{
    TextInfo oTextInfo = CultureInfo.CurrentCulture.TextInfo;
...

C# Capitalize directory name w...

by Moonshield, October 02, 2008 01:31, No refactoring, tagged with C#, LINQ, Capitalize, Directory

I wrote a method to capital...

72f36daa501cf8f5bb861210edd9232d Talk
1
2
3
4
    public class Timer
    {

...

C# Timer Class

by McDole, September 25, 2008 06:06, 2 refactorings, tagged with C#

This is a quick timer class...

503dc458e66746c5ac681e7057d209dd Talk
1
2
3
4
public static string ToRelativeDate(DateTime input)
{
    string suffix = "ago";
...

C# Twitter-esque Relative Dates

by Foxx, September 16, 2008 00:41, 2 refactorings, tagged with date C#

Given an input date, this m...

Ed581b36edb9fa8f4c46e7ebef6b2fc5 Talk
1
2
3
Use Master

...

C# Backup All MS SQL Server Da...

by GateKiller, September 19, 2008 15:19, 2 refactorings, tagged with sql

I've recently blogged about...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
    class RelativeDateParser
    {
        
...

C# Parse Relative Date

by Larsenal, September 11, 2008 00:33, 1 refactoring, tagged with date time, parser

I'd like to build up someth...

61fcda6377c3941f33130902c15ba27e Talk
1
2
3
4
private string getMD5String(string PlainText)
{
   System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create();
...

C# Cryptography with MD5

by acidmind, September 01, 2008 13:19, 2 refactorings, tagged with MD5;C#;

This is a simple example of...

78f078ded4ae388e490c240c038c7f28 Talk
1
2
3
4
using System.Security.Cryptography;

public class CryptographyRSA()
...

C# Cryptography with RSA and B...

by acidmind, August 29, 2008 12:20, 2 refactorings, tagged with Cryptography;RSA;Base64

This is a simple example of...

78f078ded4ae388e490c240c038c7f28 Talk
1
2
3
4
namespace Utilities
{
    using System;
...

C# StringExt.cs (String Extens...

by snafu918, August 06, 2008 16:46, 3 refactorings, tagged with C#, Extension, string, coldfusion

Ok take it easy on me, I ju...

95fd293467e8e89e44701d09eead51d4 Talk
1
2
3
4
private static Regex _namedtags = new Regex
    (@"</?(?<tagname>\w+)[^>]*(\s|$|>)",
    RegexOptions.Singleline | RegexOptions.ExplicitCapture);
...

C# Balance HTML Tags

by Jeff Atwood, July 11, 2008 08:40, 25 refactorings, tagged with html, balance, tags, unbalanced

For the subset of HTML tags...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
4
class Item
{
...

C# Traversing a List and colle...

by arjang.assadi.myopenid.com, July 09, 2008 04:48, 6 refactorings, tagged with generics

I like to to traverse a lis...

68225315200a9e0f0b949b7aec9b3b11 Talk
1
2
3
4
namespace DataSetTableAdapters {

    partial class MyTableAdapter {
...

C# TableAdapter and CommandTim...

by Auron, July 02, 2008 10:19, 8 refactorings, tagged with tableadapter, commandtimeout, dataset, ado, C#, .net

As TableAdapters are are au...

C2953d47b6de83f3217b48c3584fab1c Talk
1
2
3
Declare @Name varchar(128)
Declare @Cursor Cursor
...

C# Cache SQL Server Views

by GateKiller, July 02, 2008 15:07, 7 refactorings, tagged with sql query unoptimized

Question: Is there anyway t...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
public static List<T> MergeListCollections<T>(List<T> firstList, List<T> secondList)
{
    List<T> mergedList = new List<T>();
...

C# Merge generic lists

by nkirkes.myopenid.com, June 30, 2008 18:42, 5 refactorings, tagged with C#, List<T>, generics

Toying with some utility me...

9661a8802c6d6f7e876c6fc7bae6721b Talk
1
2
3
4
private static Regex _tags = new Regex("<[^>]*(>|$)", RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled);
private static Regex _whitelist = new Regex(@"
    ^</?(a|b(lockquote)?|code|em|h(1|2|3)|i|li|ol|p(re)?|s(ub|up|trong|trike)?|ul)>$
...

C# Sanitize HTML

by Jeff Atwood, June 20, 2008 08:24, 47 refactorings, tagged with xss, sanitize, html

Takes a provided HTML strin...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
4
// ***** Encryption and Decryption ***** //

byte[] Key(string sText) {
...

C# Encryption and Decryption

by GateKiller, June 20, 2008 14:00, 2 refactorings, tagged with Encrypt, Decrypt, C#

This is my first attempt at...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
using System;
using System.Collections.Generic;
using System.Linq;
...

C# Pointers in C#

by Andre Steenveld, May 06, 2008 10:39, 1 refactoring, tagged with Unsafe, C#, pointers, unmanaged

I am trying to work out how...

Avatar Talk
1
2
3
4
void CopySourceTables(List<TableNameResult> tables, int id)
{
    // Execute the "Copy" Command on the Server for Each Table.
...

C# Common StProc Code

by robzyc, April 02, 2008 12:53, 12 refactorings, tagged with C#

Hi guys, following my previ...

C290d3851c7837081d05b3491cbc331b Talk
1
2
3
4
bool Do_People_Still_Read_This
{
     // Not sure what to put here? "return true;" or "return false;" ?
...

C# Since I Cannot Message Peop...

by robzyc, March 31, 2008 11:03, 4 refactorings, tagged with question

Didn't/couldn't see how to ...

C290d3851c7837081d05b3491cbc331b Talk
1
2
3
4
public List<double> GenerateLogNormalDistribution(int numberOfTimes, double mean, double standardDeviation)
{
    Random randomGenerator = new Random();
...

C# Lognormal Distribution

by Jonathan, January 26, 2008 02:07, 1 refactoring, tagged with C#, Lognormal distribution, Finance

Is there a better way to do...

Avatar Talk
1
2
3
def filename
  self.uri.split('/').last
...

C# Get the Filename segment o...

by jwmittag, January 01, 2008 15:04, 10 refactorings, tagged with ruby, rails, Ruby on Rails, RoR, C#, CSharp, C-Sharp, .net, DotNET, asp.net, Scott Porad, Comparison

On his Blog "Progress vs. P...

4bae3f603d397647c273dfa49ef8050c Talk
1
2
3
4
private string CodiceControllo(string codice_fiscale)
{
	int somma = 0;
...

C# Code to Simplify

by Squall77it, December 19, 2007 16:26, 6 refactorings

Hi, I am new on c#...
ther...

6ea4797d26c05b3d44e49b989f1a393c Talk
1
2
3
4
using System;

namespace FizzBuzz
...

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

by nibbles&bits, October 24, 2007 15:13, 12 refactorings

Let the battle begin!

326e4b379fafa37c9483d6f8e8eb9826 Talk
1
2
3
4
    static class SqlExec
    {
        public static void ExecCommandBatch(System.Data.Common.DbConnection conn, System.Data.IsolationLevel isolation, ExceptionFailSafeEventHandler<System.Exception> failSafe, params System.Data.Common.DbCommand[] cmds)
...

C# ExecuteCommandBatch

by nibbles&bits, October 21, 2007 02:34, 1 refactoring

It's rather large, but also...

326e4b379fafa37c9483d6f8e8eb9826 Talk
1
2
3
public static class BusyIndicator
{
...

C# .NET BusyIndicator

by D_Guidi, September 26, 2007 23:40, 9 refactorings

Show a BusyIndicator during...

D257aa96373ab45e0ef15cfdb60efe33 Talk