Advertisement

Sound of Code

Agency: 
Published/Aired: 
September 2010
To Like please login or register
7
27

Also From This Campaign (1 items)

Description: 

Go to http://www.microsoft.com/click/soundofcode/ and use the code samples below to test the Sound of Code music generator. Paste the code below into the Sound of Code music generator and then click “Generate.” Click “preview” to hear the results.

Sample #1
public static object ConvertParameter(string parameterValue, Type type)
{
if (type == typeof(LetterPosition))
return TranslationEngine.GetLetterPositionFromString(type, parameterValue);
else if (type == typeof(TaglineInsertType))
return TranslationEngine.GetTaglineInsertTypeFromString(type,parameterValue);
else return System.Convert.ChangeType(parameterValue, type);
}

Sample #2
private static bool ExecuteRandomRule(int seed)
{
System.Random intital = new Random();
int input = intital.Next(1000000);
System.Random random = new Random(input);
int rand = random.Next(0, seed);
if (rand == 0)
return true;
else
return false;
}

Advertising Agency: Wunderman, Seattle, USA

Comments (2)

Log in or register to post comments

Highest Rated

clayology com's picture
clayology com
245 Activity Scores

hmmmmm.....nice!

Ads u create needs Attention!! http://www.claycardstudio.com

Advertisement

20% Off Sale at iStock until Sept 30, 2016