Update it all, VisualStudio Changes

This commit is contained in:
Brian Buller 2016-08-23 12:33:06 -05:00
parent 2a0c6f9e45
commit b8814259b5
136 changed files with 180080 additions and 66 deletions

BIN
.vs/Exercism/v14/.suo Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
Exercism.VC.db Normal file

Binary file not shown.

96
Exercism.sln Normal file
View File

@ -0,0 +1,96 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exercism.csharp", "csharp\Exercism.csharp.csproj", "{FEF69435-D885-45DD-A446-04FD3BD3F593}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49E23A58-0B98-4EA8-B09F-B0E0046858C6}"
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
.gitignore = .gitignore
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exercism.coffeescript", "coffeescript\Exercism.coffeescript.csproj", "{E312906C-B57F-4D93-9A55-540D2D0ABBB1}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Exercism.fsharp", "fsharp\Exercism.fsharp.fsproj", "{F7E8E67C-3CFA-4B46-A2B6-956263649501}"
EndProject
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "Exercism.python", "python\Exercism.python.pyproj", "{1B5FBA75-26DD-4737-9104-5B485DB26457}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Exercism.cpp", "cpp\Exercism.cpp.vcxproj", "{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exercism.javascript", "javascript\Exercism.javascript.csproj", "{E312906C-B57F-4D93-9A55-540D2D0ABBB2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Debug|Win32.ActiveCfg = Debug|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Any CPU.Build.0 = Release|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{FEF69435-D885-45DD-A446-04FD3BD3F593}.Release|Win32.ActiveCfg = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Debug|Win32.ActiveCfg = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Any CPU.Build.0 = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB1}.Release|Win32.ActiveCfg = Release|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Debug|Win32.ActiveCfg = Debug|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Any CPU.Build.0 = Release|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F7E8E67C-3CFA-4B46-A2B6-956263649501}.Release|Win32.ActiveCfg = Release|Any CPU
{1B5FBA75-26DD-4737-9104-5B485DB26457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B5FBA75-26DD-4737-9104-5B485DB26457}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1B5FBA75-26DD-4737-9104-5B485DB26457}.Debug|Win32.ActiveCfg = Debug|Any CPU
{1B5FBA75-26DD-4737-9104-5B485DB26457}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B5FBA75-26DD-4737-9104-5B485DB26457}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1B5FBA75-26DD-4737-9104-5B485DB26457}.Release|Win32.ActiveCfg = Release|Any CPU
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Any CPU.ActiveCfg = Debug|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Win32.ActiveCfg = Debug|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Debug|Win32.Build.0 = Debug|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Any CPU.ActiveCfg = Release|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Mixed Platforms.Build.0 = Release|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Win32.ActiveCfg = Release|Win32
{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}.Release|Win32.Build.0 = Release|Win32
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Debug|Win32.ActiveCfg = Debug|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Any CPU.Build.0 = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E312906C-B57F-4D93-9A55-540D2D0ABBB2}.Release|Win32.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

BIN
UpgradeLog.htm Normal file

Binary file not shown.

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E312906C-B57F-4D93-9A55-540D2D0ABBB1}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Exercism.coffeescript</RootNamespace>
<AssemblyName>Exercism.coffeescript</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Content Include="example\example.coffee" />
<Content Include="example\example.js">
<DependentUpon>example.coffee</DependentUpon>
</Content>
<Content Include="example\example.min.js">
<DependentUpon>example.js</DependentUpon>
</Content>
<Content Include="example\example_test.spec.coffee" />
<Content Include="example\example_test.spec.js">
<DependentUpon>example_test.spec.coffee</DependentUpon>
</Content>
<Content Include="example\example_test.spec.min.js">
<DependentUpon>example_test.spec.js</DependentUpon>
</Content>
<Content Include="test.bat" />
<Content Include="example\example.js.map">
<DependentUpon>example.js</DependentUpon>
</Content>
<Content Include="example\example.min.js.map">
<DependentUpon>example.min.js</DependentUpon>
</Content>
<Content Include="example\example_test.spec.js.map">
<DependentUpon>example_test.spec.js</DependentUpon>
</Content>
<Content Include="example\example_test.spec.min.js.map">
<DependentUpon>example_test.spec.min.js</DependentUpon>
</Content>
<Content Include="packages.config" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>61433</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:61433/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Exercism.coffeescript")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Exercism.coffeescript")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

11
coffeescript/Web.config Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>

Binary file not shown.

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
class Example
add: (x, y) -> x + y
module.exports = Example

View File

@ -0,0 +1,18 @@
Example = require "./example"
describe "Example", ->
example = new Example()
it "add 2 and 2", ->
result = example.add 2, 2
expect(result).toEqual 4
it "add 12 and 24", ->
result = example.add 12, 24
expect(result).toEqual 36
it "add 100 and 1", ->
result = example.add 100, 1
expect(result).toEqual 101
it "add 2 and -2", ->
result = example.add 2, -2
expect(result).toEqual 0

View File

@ -0,0 +1,8 @@
C:\Users\brbuller\Development\exercism\coffeescript\bin\Exercism.coffeescript.dll.config
C:\Users\brbuller\Development\exercism\coffeescript\bin\Exercism.coffeescript.dll
C:\Users\brbuller\Development\exercism\coffeescript\bin\Exercism.coffeescript.pdb
C:\Users\brbuller\Development\exercism\coffeescript\obj\Debug\Exercism.coffeescript.csprojResolveAssemblyReference.cache
C:\Users\brbuller\Development\exercism\coffeescript\obj\Debug\Exercism.coffeescript.dll
C:\Users\brbuller\Development\exercism\coffeescript\obj\Debug\Exercism.coffeescript.pdb
C:\Users\brbuller\Development\exercism\coffeescript\bin\nunit.framework.dll
C:\Users\brbuller\Development\exercism\coffeescript\bin\nunit.framework.xml

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.3" targetFramework="net45" />
</packages>

3
coffeescript/test.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
jasmine-node --coffee %1

View File

@ -0,0 +1 @@
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".

5
cpp/Exercism.cpp Normal file
View File

@ -0,0 +1,5 @@
// Exercism.cpp : Defines the entry point for the console application.
#include "targetver.h"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>

96
cpp/Exercism.cpp.vcxproj Normal file
View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{21FA5FBF-7C7D-4F21-B9CF-4BF918BEBD5B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Exercismcpp</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(BOOST_ROOT);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(BOOST_ROOT)\stage\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(BOOST_ROOT);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(BOOST_ROOT)\stage\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="example\example.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="example\example_test.cpp" />
<ClCompile Include="Exercism.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="example\example.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Exercism.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="example\example_test.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>

10
cpp/example/example.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
class example
{
public:
static int add( int x, int y )
{
return x + y;
}
};

View File

@ -0,0 +1,22 @@
#include "example.h"
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE(add_2_and_2)
{
BOOST_REQUIRE_EQUAL(4, example::add(2, 2));
}
BOOST_AUTO_TEST_CASE( add_12_and_24 )
{
BOOST_REQUIRE_EQUAL( 36, example::add( 12, 24 ) );
}
BOOST_AUTO_TEST_CASE( add_100_and_1 )
{
BOOST_REQUIRE_EQUAL( 101, example::add( 100, 1 ) );
}
BOOST_AUTO_TEST_CASE( add_2_and_minus_2 )
{
BOOST_REQUIRE_EQUAL( 0, example::add( 2, -2 ) );
}

4
cpp/packages.config Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.3" targetFramework="native" />
</packages>

8
cpp/targetver.h Normal file
View File

@ -0,0 +1,8 @@
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#include <SDKDDKVer.h>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{FEF69435-D885-45DD-A446-04FD3BD3F593}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Exercism</RootNamespace>
<AssemblyName>Exercism.csharp</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="anagram\Anagram.cs" />
<Compile Include="anagram\AnagramTest.cs" />
<Compile Include="bob\Bob.cs" />
<Compile Include="bob\BobTest.cs" />
<Compile Include="etl\ETL.cs" />
<Compile Include="etl\ETLTest.cs" />
<Compile Include="grade-school\GradeSchoolTest.cs" />
<Compile Include="hamming\Hamming.cs" />
<Compile Include="hamming\HammingTest.cs" />
<Compile Include="leap\leap.cs" />
<Compile Include="leap\LeapTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="word-count\Phrase.cs" />
<Compile Include="word-count\WordCountTest.cs" />
</ItemGroup>
<ItemGroup>
<None Include="anagram\README.md" />
<None Include="bob\README.md" />
<None Include="etl\README.md" />
<None Include="grade-school\README.md" />
<None Include="hamming\README.md" />
<None Include="leap\README.md" />
<None Include="packages.config" />
<None Include="word-count\README.md" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Exercism")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Exercism")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("6ffaaf65-a0b4-4ff5-b2eb-e275df05cc6e")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

40
csharp/anagram/Anagram.cs Normal file
View File

@ -0,0 +1,40 @@
using System.Collections.Generic;
internal class Anagram {
private string v;
// Anagram is initialized with a string to test other strings against
public Anagram(string v) {
this.v = v.ToLower();
}
// Match takes an array of strings and returns an array that contains
// All anagrams of this.v
public string[] Match(string[] inp) {
List<string> ret = new List<string>();
foreach(string val in inp) {
if(this.v.Length != val.Length) {
continue;
}
string valTest = val.ToLower();
bool isAnagram = true;
if(this.v == valTest) {
continue;
}
for(int i = 0; i < this.v.Length; i++) {
int idx = valTest.IndexOf(this.v[i]);
if(idx == -1) {
isAnagram = false;
}
if(!isAnagram) {
break;
}
valTest = valTest.Substring(0, idx)+valTest.Substring(idx+1);
}
if(isAnagram) {
ret.Add(val);
}
}
return ret.ToArray();
}
}

View File

@ -0,0 +1,96 @@
using NUnit.Framework;
[TestFixture]
public class AnagramTest
{
[Ignore]
[Test]
public void No_matches()
{
var detector = new Anagram("diaper");
var words = new[] { "hello", "world", "zombies", "pants" };
var results = new string[0];
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
[Ignore]
[Test]
public void Detect_simple_anagram()
{
var detector = new Anagram("ant");
var words = new[] { "tan", "stand", "at" };
var results = new[] { "tan" };
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
[Ignore]
[Test]
public void Detect_multiple_anagrams()
{
var detector = new Anagram("master");
var words = new[] { "stream", "pigeon", "maters" };
var results = new[] { "maters", "stream" };
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
[Ignore]
[Test]
public void Does_not_confuse_different_duplicates()
{
var detector = new Anagram("galea");
var words = new[] { "eagle" };
var results = new string[0];
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
[Ignore]
[Test]
public void Identical_word_is_not_anagram()
{
var detector = new Anagram("corn");
var words = new[] { "corn", "dark", "Corn", "rank", "CORN", "cron", "park" };
var results = new[] { "cron" };
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
[Ignore]
[Test]
public void Eliminate_anagrams_with_same_checksum()
{
var detector = new Anagram("mass");
var words = new[] { "last" };
var results = new string[0];
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
[Ignore]
[Test]
public void Eliminate_anagram_subsets()
{
var detector = new Anagram("good");
var words = new[] { "dog", "goody" };
var results = new string[0];
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
[Ignore]
[Test]
public void Detect_anagrams()
{
var detector = new Anagram("allergy");
var words = new[] { "gallery", "ballerina", "regally", "clergy", "largely", "leading" };
var results = new[] { "gallery", "largely", "regally" };
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
[Ignore]
[Test]
public void Anagrams_are_case_insensitive()
{
var detector = new Anagram("Orchestra");
var words = new[] { "cashregister", "Carthorse", "radishes" };
var results = new[] { "Carthorse" };
Assert.That(detector.Match(words), Is.EquivalentTo(results));
}
}

21
csharp/anagram/README.md Normal file
View File

@ -0,0 +1,21 @@
# Anagram
Write a program that, given a word and a list of possible anagrams, selects the correct sublist.
Given `"listen"` and a list of candidates like `"enlists" "google"
"inlets" "banana"` the program should return a list containing
`"inlets"`.
### Submitting Exercises
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source
Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup)
## Submitting Incomplete Problems
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

15
csharp/bob/Bob.cs Normal file
View File

@ -0,0 +1,15 @@
internal class Bob {
public static string Hey(string inp) {
inp = inp.Trim();
if(inp == "") {
return "Fine. Be that way!";
}
if(inp == inp.ToUpper() && inp != inp.ToLower()) {
return "Whoa, chill out!";
}
if(inp[inp.Length-1] == '?') {
return "Sure.";
}
return "Whatever.";
}
}

131
csharp/bob/BobTest.cs Normal file
View File

@ -0,0 +1,131 @@
using NUnit.Framework;
[TestFixture]
public class BobTest
{
[Ignore]
[Test]
public void Stating_something ()
{
Assert.That(Bob.Hey("Tom-ay-to, tom-aaaah-to."), Is.EqualTo("Whatever."));
}
[Ignore]
[Test]
public void Shouting ()
{
Assert.That(Bob.Hey("WATCH OUT!"), Is.EqualTo("Whoa, chill out!"));
}
[Ignore]
[Test]
public void Asking_a_question ()
{
Assert.That(Bob.Hey("Does this cryogenic chamber make me look fat?"), Is.EqualTo("Sure."));
}
[Ignore]
[Test]
public void Asking_a_question_with_a_trailing_space()
{
Assert.That(Bob.Hey("Do I like my spacebar too much? "), Is.EqualTo("Sure."));
}
[Ignore]
[Test]
public void Asking_a_numeric_question ()
{
Assert.That(Bob.Hey("You are, what, like 15?"), Is.EqualTo("Sure."));
}
[Ignore]
[Test]
public void Talking_forcefully ()
{
Assert.That(Bob.Hey("Let's go make out behind the gym!"), Is.EqualTo("Whatever."));
}
[Ignore]
[Test]
public void Using_acronyms_in_regular_search ()
{
Assert.That(Bob.Hey("It's OK if you don't want to go to the DMV."), Is.EqualTo("Whatever."));
}
[Ignore]
[Test]
public void Forceful_questions ()
{
Assert.That(Bob.Hey("WHAT THE HELL WERE YOU THINKING?"), Is.EqualTo("Whoa, chill out!"));
}
[Ignore]
[Test]
public void Shouting_numbers ()
{
Assert.That(Bob.Hey("1, 2, 3 GO!"), Is.EqualTo("Whoa, chill out!"));
}
[Ignore]
[Test]
public void Only_numbers ()
{
Assert.That(Bob.Hey("1, 2, 3"), Is.EqualTo("Whatever."));
}
[Ignore]
[Test]
public void Question_with_only_numbers ()
{
Assert.That(Bob.Hey("4?"), Is.EqualTo("Sure."));
}
[Ignore]
[Test]
public void Shouting_with_special_characters ()
{
Assert.That(Bob.Hey("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"), Is.EqualTo("Whoa, chill out!"));
}
[Ignore]
[Test]
public void Shouting_with_no_exclamation_mark ()
{
Assert.That(Bob.Hey("I HATE YOU"), Is.EqualTo("Whoa, chill out!"));
}
[Ignore]
[Test]
public void Statement_containing_question_mark ()
{
Assert.That(Bob.Hey("Ending with ? means a question."), Is.EqualTo("Whatever."));
}
[Ignore]
[Test]
public void Prattling_on ()
{
Assert.That(Bob.Hey("Wait! Hang on. Are you going to be OK?"), Is.EqualTo("Sure."));
}
[Ignore]
[Test]
public void Silence ()
{
Assert.That(Bob.Hey(""), Is.EqualTo("Fine. Be that way!"));
}
[Ignore]
[Test]
public void Prolonged_silence ()
{
Assert.That(Bob.Hey(" "), Is.EqualTo("Fine. Be that way!"));
}
[Ignore]
[Test]
public void Multiple_line_question ()
{
Assert.That(Bob.Hey("Does this cryogenic chamber make me look fat?\nno"), Is.EqualTo("Whatever."));
}
}

44
csharp/bob/README.md Normal file
View File

@ -0,0 +1,44 @@
# Bob
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
Bob answers 'Sure.' if you ask him a question.
He answers 'Whoa, chill out!' if you yell at him.
He says 'Fine. Be that way!' if you address him without actually saying
anything.
He answers 'Whatever.' to anything else.
## Instructions
Run the test file, and fix each of the errors in turn. When you get the
first test to pass, go to the first pending or skipped test, and make
that pass as well. When all of the tests are passing, feel free to
submit.
Remember that passing code is just the first step. The goal is to work
towards a solution that is as readable and expressive as you can make
it.
Please make your solution as general as possible. Good code doesn't just
pass the test suite, it works with any input that fits the
specification.
Have fun!
### Submitting Exercises
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source
Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06)
## Submitting Incomplete Problems
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

View File

@ -1 +0,0 @@
leap

18
csharp/etl/ETL.cs Normal file
View File

@ -0,0 +1,18 @@
using System.IO;
using System;
using System.Collections.Generic;
class ETL {
public static Dictionary<string, int> Transform(Dictionary<int, IList<string>> inp) {
Dictionary<string, int> ret = new Dictionary<string, int>();
foreach(KeyValuePair<int, IList<string>> entry in inp) {
foreach(string val in entry.Value) {
string v = val.ToLower();
if(!ret.ContainsKey(v)) {
ret.Add(v, entry.Key);
}
}
}
return ret;
}
}

56
csharp/etl/ETLTest.cs Normal file
View File

@ -0,0 +1,56 @@
using System.Collections.Generic;
using NUnit.Framework;
[TestFixture]
public class ETLTest
{
[Ignore]
[Test]
public void Transforms_one_value()
{
var old = new Dictionary<int, IList<string>> { { 1, new List<string> { "A" } } };
var expected = new Dictionary<string, int> { { "a", 1 } };
Assert.That(ETL.Transform(old), Is.EqualTo(expected));
}
[Ignore]
[Test]
public void Transforms_multiple_values()
{
var old = new Dictionary<int, IList<string>> { { 1, new List<string> { "A", "E", "I", "O", "U" } } };
var expected = new Dictionary<string, int> { { "a", 1 }, { "e", 1 }, { "i", 1 }, { "o", 1 }, { "u", 1 } };
Assert.That(ETL.Transform(old), Is.EqualTo(expected));
}
[Ignore]
[Test]
public void Transforms_multiple_keys()
{
var old = new Dictionary<int, IList<string>> { { 1, new List<string> { "A", "E" } }, { 2, new List<string> { "D", "G" } } };
var expected = new Dictionary<string, int> { { "a", 1 }, { "e", 1 }, { "d", 2 }, { "g", 2 } };
Assert.That(ETL.Transform(old), Is.EqualTo(expected));
}
[Ignore]
[Test]
public void Transforms_a_full_dataset()
{
var old = new Dictionary<int, IList<string>>
{
{ 1, new List<string> { "A", "E", "I", "O", "U", "L", "N", "R", "S", "T" } },
{ 2, new List<string> { "D", "G" } },
{ 3, new List<string> { "B", "C", "M", "P" } },
{ 4, new List<string> { "F", "H", "V", "W", "Y" } },
{ 5, new List<string> { "K" } },
{ 8, new List<string> { "J", "X" } },
{ 10, new List<string> { "Q", "Z" } },
};
var expected = new Dictionary<string, int>
{
{ "a", 1 }, { "b", 3 }, { "c", 3 }, { "d", 2 }, { "e", 1 }, { "f", 4 }, { "g", 2 }, { "h", 4 }, { "i", 1 },
{ "j", 8 }, { "k", 5 }, { "l", 1 }, { "m", 3 }, { "n", 1 }, { "o", 1 }, { "p", 3 }, { "q", 10 }, { "r", 1 },
{ "s", 1 }, { "t", 1 }, { "u", 1 }, { "v", 4 }, { "w", 4 }, { "x", 8 }, { "y", 4 }, { "z", 10 }
};
Assert.That(ETL.Transform(old), Is.EqualTo(expected));
}
}

59
csharp/etl/README.md Normal file
View File

@ -0,0 +1,59 @@
# Etl
We are going to do the `Transform` step of an Extract-Transform-Load.
### ETL
Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so
we're going to migrate this."
(Typically, this is followed by, "We're only going to need to run this
once." That's then typically followed by much forehead slapping and
moaning about how stupid we could possibly be.)
### The goal
We're going to extract some scrabble scores from a legacy system.
The old system stored a list of letters per score:
- 1 point: "A", "E", "I", "O", "U", "L", "N", "R", "S", "T",
- 2 points: "D", "G",
- 3 points: "B", "C", "M", "P",
- 4 points: "F", "H", "V", "W", "Y",
- 5 points: "K",
- 8 points: "J", "X",
- 10 points: "Q", "Z",
The shiny new scrabble system instead stores the score per letter, which
makes it much faster and easier to calculate the score for a word. It
also stores the letters in lower-case regardless of the case of the
input letters:
- "a" is worth 1 point.
- "b" is worth 3 points.
- "c" is worth 3 points.
- "d" is worth 2 points.
- Etc.
Your mission, should you choose to accept it, is to write a program that
transforms the legacy data format to the shiny new format.
### Notes
A final note about scoring, Scrabble is played around the world in a
variety of languages, each with its own unique scoring table. For
example, an "E" is scored at 2 in the Māori-language version of the
game while being scored at 4 in the Hawaiian-language version.
### Submitting Exercises
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source
The Jumpstart Lab team [http://jumpstartlab.com](http://jumpstartlab.com)
## Submitting Incomplete Problems
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

View File

@ -0,0 +1,81 @@
using System.Collections.Generic;
using NUnit.Framework;
[TestFixture]
public class GradeSchoolTest
{
private School school;
[SetUp]
public void Setup()
{
school = new School();
}
[Test]
public void New_school_has_an_empty_roster()
{
Assert.That(school.Roster, Has.Count.EqualTo(0));
}
[Ignore("Remove to run test")]
[Test]
public void Adding_a_student_adds_them_to_the_roster_for_the_given_grade()
{
school.Add("Aimee", 2);
var expected = new List<string> { "Aimee" };
Assert.That(school.Roster[2], Is.EqualTo(expected));
}
[Ignore("Remove to run test")]
[Test]
public void Adding_more_students_to_the_same_grade_adds_them_to_the_roster()
{
school.Add("Blair", 2);
school.Add("James", 2);
school.Add("Paul", 2);
var expected = new List<string> { "Blair", "James", "Paul" };
Assert.That(school.Roster[2], Is.EqualTo(expected));
}
[Ignore("Remove to run test")]
[Test]
public void Adding_students_to_different_grades_adds_them_to_the_roster()
{
school.Add("Chelsea", 3);
school.Add("Logan", 7);
Assert.That(school.Roster[3], Is.EqualTo(new List<string> { "Chelsea" }));
Assert.That(school.Roster[7], Is.EqualTo(new List<string> { "Logan" }));
}
[Ignore("Remove to run test")]
[Test]
public void Grade_returns_the_students_in_that_grade_in_alphabetical_order()
{
school.Add("Franklin", 5);
school.Add("Bradley", 5);
school.Add("Jeff", 1);
var expected = new List<string> { "Bradley", "Franklin" };
Assert.That(school.Grade(5), Is.EqualTo(expected));
}
[Ignore("Remove to run test")]
[Test]
public void Grade_returns_an_empty_list_if_there_are_no_students_in_that_grade()
{
Assert.That(school.Grade(1), Is.EqualTo(new List<string>()));
}
[Ignore("Remove to run test")]
[Test]
public void Student_names_in_each_grade_in_roster_are_sorted()
{
school.Add("Jennifer", 4);
school.Add("Kareem", 6);
school.Add("Christopher", 4);
school.Add("Kyle", 3);
Assert.That(school.Roster[3], Is.EqualTo(new List<string> { "Kyle" }));
Assert.That(school.Roster[4], Is.EqualTo(new List<string> { "Christopher", "Jennifer" }));
Assert.That(school.Roster[6], Is.EqualTo(new List<string> { "Kareem" }));
}
}

View File

@ -0,0 +1,49 @@
# Grade School
Write a small archiving program that stores students' names along with the grade that they are in.
In the end, you should be able to:
- Add a student's name to the roster for a grade
- "Add Jim to grade 2."
- "OK."
- Get a list of all students enrolled in a grade
- "Which students are in grade 2?"
- "We've only got Jim just now."
- Get a sorted list of all students in all grades. Grades should sort
as 1, 2, 3, etc., and students within a grade should be sorted
alphabetically by name.
- "Who all is enrolled in school right now?"
- "Grade 1: Anna, Barb, and Charlie. Grade 2: Alex, Peter, and Zoe.
Grade 3…"
Note that all our students only have one name. (It's a small town, what
do you want?)
## For bonus points
Did you get the tests passing and the code clean? If you want to, these
are some additional things you could try:
- If you're working in a language with mutable data structures and your
implementation allows outside code to mutate the school's internal DB
directly, see if you can prevent this. Feel free to introduce additional
tests.
Then please share your thoughts in a comment on the submission. Did this
experiment make the code better? Worse? Did you learn anything from it?
### Submitting Exercises
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source
A pairing session with Phil Battos at gSchool [http://gschool.it](http://gschool.it)
## Submitting Incomplete Problems
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

14
csharp/hamming/Hamming.cs Normal file
View File

@ -0,0 +1,14 @@
internal class Hamming {
public static int Compute(string strand1, string strand2) {
int ret = 0;
if(strand1.Length != strand2.Length) {
throw new System.ArgumentException("Strands must be same length");
}
for(int i = 0; i < strand1.Length; i++) {
if(strand1[i] != strand2[i]) {
ret++;
}
}
return ret;
}
}

View File

@ -0,0 +1,47 @@
using NUnit.Framework;
[TestFixture]
public class HammingTest
{
[Ignore]
[Test]
public void No_difference_between_empty_strands()
{
Assert.That(Hamming.Compute("",""), Is.EqualTo(0));
}
[Ignore]
[Test]
public void No_difference_between_identical_strands()
{
Assert.That(Hamming.Compute("GGACTGA","GGACTGA"), Is.EqualTo(0));
}
[Ignore]
[Test]
public void Complete_hamming_distance_in_small_strand()
{
Assert.That(Hamming.Compute("ACT","GGA"), Is.EqualTo(3));
}
[Ignore]
[Test]
public void Hamming_distance_is_off_by_one_strand()
{
Assert.That(Hamming.Compute("GGACGGATTCTG","AGGACGGATTCT"), Is.EqualTo(9));
}
[Ignore]
[Test]
public void Smalling_hamming_distance_in_middle_somewhere()
{
Assert.That(Hamming.Compute("GGACG","GGTCG"), Is.EqualTo(1));
}
[Ignore]
[Test]
public void Larger_distance()
{
Assert.That(Hamming.Compute("ACCAGGG","ACTATGG"), Is.EqualTo(2));
}
}

50
csharp/hamming/README.md Normal file
View File

@ -0,0 +1,50 @@
# Hamming
Write a program that can calculate the Hamming difference between two DNA strands.
A mutation is simply a mistake that occurs during the creation or
copying of a nucleic acid, in particular DNA. Because nucleic acids are
vital to cellular functions, mutations tend to cause a ripple effect
throughout the cell. Although mutations are technically mistakes, a very
rare mutation may equip the cell with a beneficial attribute. In fact,
the macro effects of evolution are attributable by the accumulated
result of beneficial microscopic mutations over many generations.
The simplest and most common type of nucleic acid mutation is a point
mutation, which replaces one base with another at a single nucleotide.
By counting the number of differences between two homologous DNA strands
taken from different genomes with a common ancestor, we get a measure of
the minimum number of point mutations that could have occurred on the
evolutionary path between the two strands.
This is called the 'Hamming distance'.
It is found by comparing two DNA strands and counting how many of the
nucleotides are different from their equivalent in the other string.
GAGCCTACTAACGGGAT
CATCGTAATGACGGCCT
^ ^ ^ ^ ^ ^^
The Hamming distance between these two DNA strands is 7.
# Implementation notes
The Hamming distance is only defined for sequences of equal length. This means
that based on the definition, each language could deal with getting sequences
of equal length differently.
### Submitting Exercises
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source
The Calculating Point Mutations problem at Rosalind [http://rosalind.info/problems/hamm/](http://rosalind.info/problems/hamm/)
## Submitting Incomplete Problems
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

View File

@ -3,6 +3,7 @@ using NUnit.Framework;
[TestFixture] [TestFixture]
public class LeapTest public class LeapTest
{ {
[Ignore]
[Test] [Test]
public void Valid_leap_year() public void Valid_leap_year()
{ {
@ -16,15 +17,13 @@ public class LeapTest
Assert.That(Year.IsLeap(1997), Is.False); Assert.That(Year.IsLeap(1997), Is.False);
} }
[Ignore] [Ignore("Remove to run test")]
[Test]
public void Turn_of_the_20th_century_is_not_a_leap_year() public void Turn_of_the_20th_century_is_not_a_leap_year()
{ {
Assert.That(Year.IsLeap(1900), Is.False); Assert.That(Year.IsLeap(1900), Is.False);
} }
[Ignore] [Ignore("Remove to run test")]
[Test]
public void Turn_of_the_25th_century_is_a_leap_year() public void Turn_of_the_25th_century_is_a_leap_year()
{ {
Assert.That(Year.IsLeap(2400), Is.True); Assert.That(Year.IsLeap(2400), Is.True);

View File

@ -2,7 +2,7 @@
Write a program that will take a year and report if it is a leap year. Write a program that will take a year and report if it is a leap year.
The tricky thing here is that a leap year occurs: The tricky thing here is that a leap year in the Gregorian calendar occurs:
```plain ```plain
on every year that is evenly divisible by 4 on every year that is evenly divisible by 4
@ -18,6 +18,9 @@ this look-up, pretend it doesn't exist and implement it yourself.
## Notes ## Notes
Though our exercise adopts some very simple rules, there is more to
learn!
For a delightful, four minute explanation of the whole leap year For a delightful, four minute explanation of the whole leap year
phenomenon, go watch [this youtube video][video]. phenomenon, go watch [this youtube video][video].
@ -28,6 +31,7 @@ phenomenon, go watch [this youtube video][video].
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory. Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`. For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source ## Source
JavaRanch Cattle Drive, exercise 3 [view source](http://www.javaranch.com/leap.jsp) JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp)

13
csharp/leap/leap.cs Normal file
View File

@ -0,0 +1,13 @@
class Year {
public static bool IsLeap(int i) {
if(i % 4 == 0) {
if(i % 100 == 0) {
if (i % 400 != 0) {
return false;
}
}
return true;
}
return false;
}
}

View File

@ -0,0 +1,7 @@
C:\Users\brbuller\Development\exercism\csharp\obj\Debug\Exercism.csharp.csprojResolveAssemblyReference.cache
C:\Users\brbuller\Development\exercism\csharp\bin\Debug\Exercism.csharp.dll
C:\Users\brbuller\Development\exercism\csharp\bin\Debug\Exercism.csharp.pdb
C:\Users\brbuller\Development\exercism\csharp\bin\Debug\nunit.framework.dll
C:\Users\brbuller\Development\exercism\csharp\bin\Debug\nunit.framework.xml
C:\Users\brbuller\Development\exercism\csharp\obj\Debug\Exercism.csharp.dll
C:\Users\brbuller\Development\exercism\csharp\obj\Debug\Exercism.csharp.pdb

Binary file not shown.

Binary file not shown.

4
csharp/packages.config Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.3" targetFramework="net45" />
</packages>

View File

@ -0,0 +1,27 @@
using System.Text.RegularExpressions;
using System.Collections.Generic;
class Phrase {
public static Dictionary<string,int> WordCount(string phrase) {
Dictionary<string,int> ret = new Dictionary<string,int>();
Regex rgx = new Regex("[^a-zA-Z0-9 ,']");
phrase = rgx.Replace(phrase, "");
string[] words = Regex.Split(phrase, @"[\s,]");
char[] trimChars = new char[2];
trimChars[0] = ' ';
trimChars[1] = '\'';
foreach(string wrd in words) {
string normWrd = wrd.ToLower().Trim(trimChars);
if(normWrd != "") {
int num = 0;
if(ret.ContainsKey(normWrd)) {
ret.TryGetValue(normWrd, out num);
ret.Remove(normWrd);
}
num++;
ret.Add(normWrd, num);
}
}
return ret;
}
}

View File

@ -0,0 +1,27 @@
# Word Count
Write a program that given a phrase can count the occurrences of each word in that phrase.
For example for the input `"olly olly in come free"`
```plain
olly: 2
in: 1
come: 1
free: 1
```
### Submitting Exercises
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source
This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour.
## Submitting Incomplete Problems
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

View File

@ -0,0 +1,157 @@
using System.Collections.Generic;
using NUnit.Framework;
[TestFixture]
public class WordCountTest
{
[Ignore]
[Test]
public void Count_one_word()
{
var counts = new Dictionary<string,int> {
{ "word", 1 }
};
Assert.That(Phrase.WordCount("word"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void Count_one_of_each()
{
var counts = new Dictionary<string,int> {
{ "one", 1 },
{ "of", 1 },
{ "each", 1 }
};
Assert.That(Phrase.WordCount("one of each"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void Count_multiple_occurrences()
{
var counts = new Dictionary<string,int> {
{ "one", 1 },
{ "fish", 4 },
{ "two", 1 },
{ "red", 1 },
{ "blue", 1 },
};
Assert.That(Phrase.WordCount("one fish two fish red fish blue fish"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void Count_everything_just_once()
{
var counts = new Dictionary<string,int> {
{ "all", 2 },
{ "the", 2 },
{ "kings", 2 },
{ "horses", 1 },
{ "and", 1 },
{ "men", 1 },
};
Assert.That(Phrase.WordCount("all the kings horses and all the kings men"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void Ignore_punctuation()
{
var counts = new Dictionary<string,int> {
{ "car", 1 },
{ "carpet", 1 },
{ "as", 1 },
{ "java", 1 },
{ "javascript", 1 },
};
Assert.That(Phrase.WordCount("car : carpet as java : javascript!!&@$%^&"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void Handles_cramped_list()
{
var counts = new Dictionary<string,int> {
{ "one", 1 },
{ "two", 1 },
{ "three", 1 },
};
Assert.That(Phrase.WordCount("one,two,three"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void Include_numbers()
{
var counts = new Dictionary<string,int> {
{ "testing", 2 },
{ "1", 1 },
{ "2", 1 },
};
Assert.That(Phrase.WordCount("testing, 1, 2 testing"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void Normalize_case()
{
var counts = new Dictionary<string,int> {
{ "go", 3 },
};
Assert.That(Phrase.WordCount("go Go GO"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void With_apostrophes()
{
var counts = new Dictionary<string,int> {
{ "first", 1 },
{ "don't", 2 },
{ "laugh", 1 },
{ "then", 1 },
{ "cry", 1 },
};
Assert.That(Phrase.WordCount("First: don't laugh. Then: don't cry."), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void With_free_standing_apostrophes()
{
var counts = new Dictionary<string, int> {
{ "go", 3 },
};
Assert.That(Phrase.WordCount("go ' Go '' GO"), Is.EqualTo(counts));
}
[Ignore]
[Test]
public void With_apostrophes_as_quotes()
{
var counts = new Dictionary<string, int> {
{ "she", 1 },
{ "said", 1 },
{ "let's", 1 },
{ "meet", 1 },
{ "at", 1 },
{ "twelve", 1 },
{ "o'clock", 1 },
};
Assert.That(Phrase.WordCount("She said, 'let's meet at twelve o'clock'"), Is.EqualTo(counts));
}
}

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>f7e8e67c-3cfa-4b46-a2b6-956263649501</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>fsharp</RootNamespace>
<AssemblyName>Exercism.fsharp</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFSharpCoreVersion>4.3.1.0</TargetFSharpCoreVersion>
<Name>Exercism.fsharp</Name>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Debug\fsharp.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Release\fsharp.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" />
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<Compile Include="example\Example.fs" />
<Compile Include="example\ExampleTest.fs" />
</ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<doc>
<assembly><name>Exercism.fsharp</name></assembly>
<members>
</members>
</doc>

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
module Example
type Example() =
member this.Add(x, y) = x + y

View File

@ -0,0 +1,16 @@
module SumOfMultiplesTest
open NUnit.Framework
open Example
[<TestFixture>]
type ExampleTest() =
let mutable example = Example()
[<Test>]
[<TestCase(2, 2, 4)>]
[<TestCase(12, 24, 36)>]
[<TestCase(100, 1, 101)>]
[<TestCase(2, -2, 0)>]
member tc.Can_add(x, y, expected) =
Assert.That(example.Add(x, y), Is.EqualTo(expected))

Binary file not shown.

View File

@ -0,0 +1,10 @@
C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\fsharp.XML
C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\Exercism.fsharp.dll
C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\Exercism.fsharp.pdb
C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\FSharp.Core.dll
C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\nunit.framework.dll
C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\FSharp.Core.xml
C:\Users\brbuller\Development\exercism\fsharp\bin\Debug\nunit.framework.xml
C:\Users\brbuller\Development\exercism\fsharp\obj\Debug\Exercism.fsharp.fsprojResolveAssemblyReference.cache
C:\Users\brbuller\Development\exercism\fsharp\obj\Debug\Exercism.fsharp.dll
C:\Users\brbuller\Development\exercism\fsharp\obj\Debug\Exercism.fsharp.pdb

Binary file not shown.

4
fsharp/packages.config Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.3" targetFramework="net45" />
</packages>

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E312906C-B57F-4D93-9A55-540D2D0ABBB2}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Exercism.javascript</RootNamespace>
<AssemblyName>Exercism.javascript</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Content Include="example\example.js" />
<Content Include="example\example_test.spec.js" />
<Content Include="test.bat" />
<Content Include="packages.config" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>61434</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:61434/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Exercism.javascript")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Exercism.javascript")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

11
javascript/Web.config Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>

Binary file not shown.

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
var Example = function () {
'use strict';
this.add = function (x, y) {
return x + y;
};
};
module.exports = Example;

Some files were not shown because too many files have changed in this diff Show More