├── .gitignore ├── LICENSE ├── README.md ├── WCH-01 ├── ForeachChallenge │ ├── ConsoleUI │ │ ├── ConsoleUI.csproj │ │ ├── PersonModel.cs │ │ └── Program.cs │ └── ForeachChallenge.sln └── foreach Challenge Instructions.pdf ├── WCH-02 ├── Text File Challenge Instructions.pdf ├── TextFileChallenge.sln ├── TextFileChallenge │ ├── AdvancedDataSet.csv │ ├── App.config │ ├── Model │ │ ├── IUserRepository.cs │ │ ├── User.cs │ │ └── UserCsvRepository.cs │ ├── Presenter │ │ └── ChallengePresenter.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── StandardDataSet.csv │ ├── TextFileChallenge.csproj │ ├── View │ │ ├── ChallengeForm.Designer.cs │ │ ├── ChallengeForm.cs │ │ ├── ChallengeForm.resx │ │ └── IChallengeView.cs │ └── packages.config └── TextFileChallengeStarterCode.zip ├── WCH-03 ├── Error Handling Challenge Instructions.pdf ├── ErrorHandlingChallengeStarterCode.zip └── ErrorHandlingChallengeStarterCode │ ├── ConsoleUI │ ├── App.config │ ├── ConsoleUI.csproj │ ├── DemoLibrary.dll │ ├── Program.cs │ └── Properties │ │ └── AssemblyInfo.cs │ └── ErrorHandlingChallenge.sln ├── WCH-04 ├── RefactoringChallenge.pdf ├── RefactoringChallengeStarterCode.zip └── RefactoringChallengeStarterCode │ ├── ConsoleApp │ ├── App.config │ ├── ConsoleApp.csproj │ ├── Program.cs │ └── Properties │ │ └── AssemblyInfo.cs │ ├── DapperDemoDB.sln │ ├── DapperDemoDB │ ├── DapperDemoDB.sqlproj │ ├── Post Deploy Scripts │ │ └── Script.PostDeployment.sql │ └── dbo │ │ ├── Stored Procedures │ │ ├── spSystemUser_Create.sql │ │ ├── spSystemUser_Get.sql │ │ └── spSystemUser_GetFiltered.sql │ │ └── Tables │ │ ├── Person.sql │ │ └── SystemUser.sql │ ├── HelperLibrary │ ├── BusinessLogic.cs │ ├── DataAccess.cs │ ├── HelperLibrary.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SystemUserModel.cs │ └── packages.config │ └── WinFormApp │ ├── App.config │ ├── Dashboard.Designer.cs │ ├── Dashboard.cs │ ├── Dashboard.resx │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ └── WinFormApp.csproj ├── WCH-05 ├── Config File Challenge Instructions.pdf ├── ConfigFileChallengeStarterCode.zip └── ConfigFileChallengeStarterCode │ ├── ConfigFileChallenge.sln │ └── ConsoleUI │ ├── App.config │ ├── ConsoleUI.csproj │ ├── Program.cs │ └── Properties │ └── AssemblyInfo.cs ├── WCH-06 ├── DateTime Challenge Instructions.pdf └── DateTimeChallenge │ ├── DateTimeChallenge.sln │ └── DateTimeChallengeUI │ ├── App.config │ ├── DateTimeChallengeUI.csproj │ ├── Program.cs │ └── Properties │ └── AssemblyInfo.cs ├── WCH-07 ├── Pill Reminder Challenge Instructions.pdf ├── PillReminderChallengeStarterCode.zip └── PillReminderChallengeStarterCode │ ├── PillReminderApp.sln │ └── PillReminderUI │ ├── App.config │ ├── PillModel.cs │ ├── PillReminderUI.csproj │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── ReminderWindow.Designer.cs │ ├── ReminderWindow.cs │ └── ReminderWindow.resx ├── WCH-08 ├── Web Deployment Challenge.pdf ├── WebDeploymentChallenge │ ├── Web │ │ ├── App_Start │ │ │ ├── BundleConfig.cs │ │ │ ├── FilterConfig.cs │ │ │ ├── IdentityConfig.cs │ │ │ ├── RouteConfig.cs │ │ │ └── Startup.Auth.cs │ │ ├── Content │ │ │ ├── Site.css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── Controllers │ │ │ ├── AccountController.cs │ │ │ ├── HomeController.cs │ │ │ └── ManageController.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Models │ │ │ ├── AccountViewModels.cs │ │ │ ├── IdentityModels.cs │ │ │ └── ManageViewModels.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Scripts │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── jquery-3.4.1.intellisense.js │ │ │ ├── jquery-3.4.1.js │ │ │ ├── jquery-3.4.1.min.js │ │ │ ├── jquery-3.4.1.min.map │ │ │ ├── jquery-3.4.1.slim.js │ │ │ ├── jquery-3.4.1.slim.min.js │ │ │ ├── jquery-3.4.1.slim.min.map │ │ │ ├── jquery.validate-vsdoc.js │ │ │ ├── jquery.validate.js │ │ │ ├── jquery.validate.min.js │ │ │ ├── jquery.validate.unobtrusive.js │ │ │ ├── jquery.validate.unobtrusive.min.js │ │ │ └── modernizr-2.8.3.js │ │ ├── Startup.cs │ │ ├── Views │ │ │ ├── Account │ │ │ │ ├── ConfirmEmail.cshtml │ │ │ │ ├── ExternalLoginConfirmation.cshtml │ │ │ │ ├── ExternalLoginFailure.cshtml │ │ │ │ ├── ForgotPassword.cshtml │ │ │ │ ├── ForgotPasswordConfirmation.cshtml │ │ │ │ ├── Login.cshtml │ │ │ │ ├── Register.cshtml │ │ │ │ ├── ResetPassword.cshtml │ │ │ │ ├── ResetPasswordConfirmation.cshtml │ │ │ │ ├── SendCode.cshtml │ │ │ │ ├── VerifyCode.cshtml │ │ │ │ └── _ExternalLoginsListPartial.cshtml │ │ │ ├── Home │ │ │ │ ├── About.cshtml │ │ │ │ ├── Contact.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── Manage │ │ │ │ ├── AddPhoneNumber.cshtml │ │ │ │ ├── ChangePassword.cshtml │ │ │ │ ├── Index.cshtml │ │ │ │ ├── ManageLogins.cshtml │ │ │ │ ├── SetPassword.cshtml │ │ │ │ └── VerifyPhoneNumber.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ ├── Lockout.cshtml │ │ │ │ ├── _Layout.cshtml │ │ │ │ └── _LoginPartial.cshtml │ │ │ ├── Web.config │ │ │ └── _ViewStart.cshtml │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ ├── Web.csproj │ │ ├── favicon.ico │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── packages.config │ └── WebDeploymentChallenge.sln └── Website │ ├── Content │ ├── Site.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap-theme.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ └── bootstrap.min.css.map │ ├── Global.asax │ ├── Scripts │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-3.4.1.js │ ├── jquery-3.4.1.min.js │ ├── jquery-3.4.1.min.map │ ├── jquery-3.4.1.slim.js │ ├── jquery-3.4.1.slim.min.js │ ├── jquery-3.4.1.slim.min.map │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ └── modernizr-2.8.3.js │ ├── Views │ ├── Account │ │ ├── ConfirmEmail.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── ForgotPasswordConfirmation.cshtml │ │ ├── Login.cshtml │ │ ├── Register.cshtml │ │ ├── ResetPassword.cshtml │ │ ├── ResetPasswordConfirmation.cshtml │ │ ├── SendCode.cshtml │ │ ├── VerifyCode.cshtml │ │ └── _ExternalLoginsListPartial.cshtml │ ├── Home │ │ ├── About.cshtml │ │ ├── Contact.cshtml │ │ └── Index.cshtml │ ├── Manage │ │ ├── AddPhoneNumber.cshtml │ │ ├── ChangePassword.cshtml │ │ ├── Index.cshtml │ │ ├── ManageLogins.cshtml │ │ ├── SetPassword.cshtml │ │ └── VerifyPhoneNumber.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── Lockout.cshtml │ │ ├── _Layout.cshtml │ │ └── _LoginPartial.cshtml │ ├── Web.config │ └── _ViewStart.cshtml │ ├── Web.config │ ├── favicon.ico │ └── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── WCH-09 ├── Database Design Challenge.pdf └── DatabaseDesignChallenge │ ├── ChristmasListDB │ ├── ChristmasListDB.sqlproj │ └── dbo │ │ ├── StoredProcedures │ │ └── CapturePurchase.sql │ │ ├── Tables │ │ ├── Address.sql │ │ ├── Person.sql │ │ └── Purchase.sql │ │ └── Views │ │ └── PeopleLeftToPurchaseFor.sql │ └── DatabaseDesignChallenge.sln ├── WCH-10 ├── Performance Evaluation Challenge.pdf └── PerformanceEvaluationChallenge │ ├── ConsoleUI │ ├── App.config │ ├── ConsoleUI.csproj │ ├── Program.cs │ └── Properties │ │ └── AssemblyInfo.cs │ └── PerformanceEvaluationChallenge.sln ├── WCH-11 ├── FizzBuzz Challenge Instructions.pdf └── FizzBuzzChallenge │ ├── ConsoleUI │ ├── ConsoleUI.csproj │ └── Program.cs │ └── FizzBuzzChallenge.sln ├── WCH-12 ├── Palindrome Challenge Instructions.pdf └── PalindromeChallenge │ ├── ConsoleUI │ ├── ConsoleUI.csproj │ └── Program.cs │ └── PalindromeChallenge.sln ├── WCH-13 ├── Prime Number Challenge Instructions.pdf └── PrimeNumberChallenge │ ├── ConsoleUI │ ├── ConsoleUI.csproj │ └── Program.cs │ └── PrimeNumberChallenge.sln ├── WCH-14 ├── Change Challenge.pdf └── CorrectChangeChallenge │ ├── ConsoleUI │ ├── ConsoleUI.csproj │ ├── DenominationInfo.cs │ └── Program.cs │ └── CorrectChangeChallenge.sln ├── WCH-15 ├── API Usage Challenge.pdf └── APIUsageChallenge │ ├── APIUsageChallenge.sln │ └── ConsoleUI │ ├── App.config │ ├── ConsoleUI.csproj │ ├── PersonModel.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── WCH-27 ├── Caching Challenge.pdf ├── CachingChallenge │ ├── CachingChallenge.csproj │ ├── DataAccess.cs │ ├── PersonModel.cs │ └── Program.cs ├── CachingChallengeApp.sln └── CachingChallengeStarterCode.zip ├── WCH-28 ├── MongoDB Challenge.pdf └── MongoDBChallenge │ ├── MongoDB.Library │ ├── Models │ │ └── PersonModel.cs │ ├── MongoCRUD.cs │ └── MongoDB.Library.csproj │ ├── MongoDB.UI │ ├── App.config │ ├── Dashboard.Designer.cs │ ├── Dashboard.cs │ ├── Dashboard.resx │ ├── MongoDB.UI.csproj │ ├── Program.cs │ └── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── MongoDBChallenge.sln ├── WCH-29 ├── Unit Test Challenge.pdf ├── UnitTestChallengeStarterCode.zip └── UnitTestChallengeStarterCode │ ├── CalculationsLibrary │ ├── CalculationsLibrary.csproj │ ├── Calculator.cs │ └── TextDataAccess.cs │ ├── CalculatorLibrary.Test │ ├── CalculatorLibrary.Test.csproj │ ├── Calculator_Tests.cs │ └── TextDataAccess_Tests.cs │ └── UnitTestingChallengeApp.sln ├── WCH-30 ├── Razor Pages Challenge.pdf └── RazorPagesChallenge │ ├── RazorPagesChallenge.sln │ └── WebUI │ ├── Areas │ └── Identity │ │ ├── Data │ │ ├── WebUIContext.cs │ │ └── WebUIUser.cs │ │ ├── IdentityHostingStartup.cs │ │ └── Pages │ │ ├── Account │ │ ├── Login.cshtml │ │ ├── Login.cshtml.cs │ │ └── _ViewImports.cshtml │ │ ├── _ValidationScriptsPartial.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ ├── Models │ └── PersonModel.cs │ ├── Pages │ ├── Error.cshtml │ ├── Error.cshtml.cs │ ├── Index.cshtml │ ├── Index.cshtml.cs │ ├── Privacy.cshtml │ ├── Privacy.cshtml.cs │ ├── SayHi.cshtml │ ├── SayHi.cshtml.cs │ ├── Shared │ │ ├── _Layout.cshtml │ │ ├── _LoginPartial.cshtml │ │ └── _ValidationScriptsPartial.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── ScaffoldingReadMe.txt │ ├── Startup.cs │ ├── WebUI.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ ├── css │ └── site.css │ ├── favicon.ico │ ├── js │ └── site.js │ └── lib │ ├── bootstrap │ ├── LICENSE │ └── dist │ │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ ├── jquery-validation-unobtrusive │ ├── LICENSE.txt │ ├── jquery.validate.unobtrusive.js │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ ├── LICENSE.md │ └── dist │ │ ├── additional-methods.js │ │ ├── additional-methods.min.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ └── jquery │ ├── LICENSE.txt │ └── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map ├── WCH-31 ├── Calculation Challenge.pdf └── CalculationChallenge │ ├── CalculationChallenge.sln │ └── ConsoleUI │ ├── ConsoleUI.csproj │ ├── ITemperature.cs │ ├── Program.cs │ └── Temperature.cs ├── WCH-32 ├── LINQChallenge │ ├── ConsoleUI │ │ ├── ConsoleUI.csproj │ │ └── Program.cs │ └── LINQChallenge.sln └── Linq Challenge.pdf ├── WCH-33 ├── Razor Pages Form Challenge.pdf └── RazorPagesFormChallenge │ ├── RazorPagesFormChallenge.sln │ └── Web │ ├── Models │ └── SignUpDataModel.cs │ ├── Pages │ ├── Error.cshtml │ ├── Error.cshtml.cs │ ├── Index.cshtml │ ├── Index.cshtml.cs │ ├── Privacy.cshtml │ ├── Privacy.cshtml.cs │ ├── Shared │ │ ├── _Layout.cshtml │ │ └── _ValidationScriptsPartial.cshtml │ ├── SignUp.cshtml │ ├── SignUp.cshtml.cs │ ├── ThankYou.cshtml │ ├── ThankYou.cshtml.cs │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── Web.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ ├── css │ └── site.css │ ├── favicon.ico │ ├── js │ └── site.js │ └── lib │ ├── bootstrap │ ├── LICENSE │ └── dist │ │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ ├── jquery-validation-unobtrusive │ ├── LICENSE.txt │ ├── jquery.validate.unobtrusive.js │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ ├── LICENSE.md │ └── dist │ │ ├── additional-methods.js │ │ ├── additional-methods.min.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ └── jquery │ ├── LICENSE.txt │ └── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map ├── WCH-34 └── Publishing Web Apps Challenge.pdf ├── WCH-35 ├── String Replacement Challenge.pdf ├── StringReplacementChallenge │ ├── ConsoleUI │ │ ├── ConsoleUI.csproj │ │ └── Program.cs │ └── StringReplacementChallenge.sln ├── bonus.txt └── primary.txt ├── WCH-36 ├── Image Manipulation Challenge.pdf ├── ImageManipulationChallenge │ ├── DesktopUI │ │ ├── App.config │ │ ├── Dashboard.Designer.cs │ │ ├── Dashboard.cs │ │ ├── Dashboard.resx │ │ ├── DesktopUI.csproj │ │ ├── ImageSizeModel.cs │ │ ├── Program.cs │ │ └── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ └── ImageManipulationChallenge.sln ├── Images │ └── wonder-woman.jpg └── wonder-woman.bmp ├── WCH-37 ├── Searching For Data Challenge.pdf ├── SearchingForDataChallenge │ ├── DesktopUI │ │ ├── App.config │ │ ├── Dashboard.Designer.cs │ │ ├── Dashboard.cs │ │ ├── Dashboard.resx │ │ ├── DesktopUI.csproj │ │ ├── Program.cs │ │ └── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ └── SearchingForDataChallenge.sln ├── bonus.txt └── primary.txt ├── WCH-38 ├── Extension Methods Challenge.pdf └── ExtensionMethodsChallenge │ ├── ConsoleUI │ ├── ConsoleUI.csproj │ ├── Extensions.cs │ ├── PersonModel.cs │ └── Program.cs │ ├── ExtensionMethodsChallenge.sln │ └── Extensions.cs ├── WCH-46 └── AspNetCoreWithDockerChallenge.pdf ├── WCH-47 └── GitBranchesChallenge.pdf ├── WCH-48 ├── TestData.txt ├── Web File Uploads Challenge.pdf └── WebFileUploadChallenge │ ├── WebFileUploadChallenge.sln │ └── WebFileUploadSite │ ├── Models │ └── PersonModel.cs │ ├── Pages │ ├── Error.cshtml │ ├── Error.cshtml.cs │ ├── Index.cshtml │ ├── Index.cshtml.cs │ ├── Privacy.cshtml │ ├── Privacy.cshtml.cs │ ├── Shared │ │ ├── _Layout.cshtml │ │ └── _ValidationScriptsPartial.cshtml │ ├── UploadAndParse.cshtml │ ├── UploadAndParse.cshtml.cs │ ├── UploadAndSave.cshtml │ ├── UploadAndSave.cshtml.cs │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WebFileUploadSite.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ ├── css │ └── site.css │ ├── favicon.ico │ ├── js │ └── site.js │ ├── lib │ ├── bootstrap │ │ ├── LICENSE │ │ └── dist │ │ │ ├── css │ │ │ ├── bootstrap-grid.css │ │ │ ├── bootstrap-grid.css.map │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-grid.min.css.map │ │ │ ├── bootstrap-reboot.css │ │ │ ├── bootstrap-reboot.css.map │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ └── bootstrap.min.js.map │ ├── jquery-validation-unobtrusive │ │ ├── LICENSE.txt │ │ ├── jquery.validate.unobtrusive.js │ │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ │ ├── LICENSE.md │ │ └── dist │ │ │ ├── additional-methods.js │ │ │ ├── additional-methods.min.js │ │ │ ├── jquery.validate.js │ │ │ └── jquery.validate.min.js │ └── jquery │ │ ├── LICENSE.txt │ │ └── dist │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── jquery.min.map │ └── uploads │ └── c4a1c1d1-d6ab-4768-9ffe-71b82646defa.txt ├── WCH-49 └── Azure DevOps Challenge.pdf ├── WCH-50 ├── Bulk File Renaming Challenge.pdf ├── BulkFileRenamingChallengeStarterFiles.zip ├── BulkFileRenamingChallengeStarterFiles │ ├── Bonus Challenge Results.PNG │ ├── BonusChallengeFiles │ │ ├── Do Not Call Registry.txt │ │ ├── This is a CSV file.csv │ │ ├── Top Secret Data.txt │ │ └── better test of your system.txt │ ├── Primary Challenge Results.PNG │ └── PrimaryChallengeFiles │ │ ├── First Test File For Fredco.txt │ │ ├── Fredco Bonus File.txt │ │ ├── Fredco By Fredco Inc.txt │ │ ├── Pacmen Are People Too.txt │ │ ├── Payroll For Fredco Corp.txt │ │ └── Test Document For Testing.txt └── BulkRenamingChallenge │ ├── BulkRenamingChallenge.sln │ └── BulkRenamingConsole │ ├── BulkRenamingConsole.csproj │ └── Program.cs ├── WCH-51 ├── Bonus │ ├── TimerFunction │ │ ├── .gitignore │ │ ├── TimerFunction.cs │ │ ├── TimerFunction.csproj │ │ └── host.json │ └── WeeklyChallengeBonusApp.sln ├── Primary │ ├── ChallengeLib │ │ ├── ChallengeLib.csproj │ │ └── Class1.cs │ ├── ChallengeWeb │ │ ├── ChallengeWeb.csproj │ │ ├── Pages │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ ├── Index.cshtml │ │ │ ├── Index.cshtml.cs │ │ │ ├── Privacy.cshtml │ │ │ ├── Privacy.cshtml.cs │ │ │ ├── Shared │ │ │ │ ├── _Layout.cshtml │ │ │ │ └── _ValidationScriptsPartial.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ └── site.css │ │ │ ├── favicon.ico │ │ │ ├── js │ │ │ └── site.js │ │ │ └── lib │ │ │ ├── bootstrap │ │ │ ├── LICENSE │ │ │ └── dist │ │ │ │ ├── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ │ └── js │ │ │ │ ├── bootstrap.bundle.js │ │ │ │ ├── bootstrap.bundle.js.map │ │ │ │ ├── bootstrap.bundle.min.js │ │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.js.map │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── bootstrap.min.js.map │ │ │ ├── jquery-validation-unobtrusive │ │ │ ├── LICENSE.txt │ │ │ ├── jquery.validate.unobtrusive.js │ │ │ └── jquery.validate.unobtrusive.min.js │ │ │ ├── jquery-validation │ │ │ ├── LICENSE.md │ │ │ └── dist │ │ │ │ ├── additional-methods.js │ │ │ │ ├── additional-methods.min.js │ │ │ │ ├── jquery.validate.js │ │ │ │ └── jquery.validate.min.js │ │ │ └── jquery │ │ │ ├── LICENSE.txt │ │ │ └── dist │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ └── jquery.min.map │ └── WeeklyChallengeApp.sln ├── README.md └── dotnet Command Line Challenge.pdf └── WCH-52 ├── FirstNames.txt ├── LastNames.txt ├── Sample Data Challenge.pdf └── SampleDataChallenge ├── ConsoleUI ├── ConsoleUI.csproj └── Program.cs ├── SampleDataChallenge.sln └── SampleDataLibrary ├── Sample.cs └── SampleDataLibrary.csproj /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Fred James 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /WCH-01/ForeachChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-01/ForeachChallenge/ConsoleUI/PersonModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ConsoleUI 6 | { 7 | class PersonModel 8 | { 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WCH-01/ForeachChallenge/ConsoleUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace ConsoleUI 5 | { 6 | class Program 7 | { 8 | static void Main(string[] args) 9 | { 10 | var people = GetPeopleStrings(); 11 | 12 | foreach (var person in people) 13 | { 14 | Console.WriteLine($"Hello {person}"); 15 | } 16 | 17 | Console.ReadLine(); 18 | 19 | foreach (var personModel in GetPersonModels()) 20 | { 21 | Console.WriteLine($"Hello {personModel.FirstName} {personModel.LastName}"); 22 | } 23 | 24 | Console.ReadLine(); 25 | } 26 | 27 | private static List GetPersonModels() => 28 | new List() 29 | { 30 | new PersonModel { FirstName="Tim", LastName="Corey" }, 31 | new PersonModel { FirstName="Bill", LastName="McCoy" }, 32 | new PersonModel { FirstName="Mary", LastName="Jones" }, 33 | new PersonModel { FirstName="Sue", LastName="Smith" }, 34 | }; 35 | 36 | private static List GetPeopleStrings() => 37 | new List() 38 | { 39 | "John", 40 | "Mary", 41 | "Sue", 42 | "Greg", 43 | "Yolanda", 44 | "Jose", 45 | "Will", 46 | }; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /WCH-01/ForeachChallenge/ForeachChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29728.190 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{90C7EB1B-70DF-47F0-B79B-0B3144CAEF84}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {90C7EB1B-70DF-47F0-B79B-0B3144CAEF84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {90C7EB1B-70DF-47F0-B79B-0B3144CAEF84}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {90C7EB1B-70DF-47F0-B79B-0B3144CAEF84}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {90C7EB1B-70DF-47F0-B79B-0B3144CAEF84}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E91AC71F-480C-49C3-A6C4-B3494F8F56EC} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-01/foreach Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-01/foreach Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-02/Text File Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-02/Text File Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2048 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextFileChallenge", "TextFileChallenge\TextFileChallenge.csproj", "{E8F410AB-862F-4A71-A460-672DC547C756}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E8F410AB-862F-4A71-A460-672DC547C756}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {E8F410AB-862F-4A71-A460-672DC547C756}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {E8F410AB-862F-4A71-A460-672DC547C756}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {E8F410AB-862F-4A71-A460-672DC547C756}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {DC141D37-09E3-4442-8EFB-D649A6F1D6B1} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/AdvancedDataSet.csv: -------------------------------------------------------------------------------- 1 | Age,LastName,IsAlive,FirstName 2 | 31,Flynn,0,Dean 3 | 86,Frost,1,Bradley 4 | 67,Smith,0,Carl 5 | 56,Barrett,1,Steel 6 | 80,Mccoy,1,Keelie 7 | 88,Campos,1,Leslie 8 | 62,Sampson,0,Jermaine 9 | 76,Ellis,1,Warren 10 | 41,Jones,1,Jordan 11 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/Model/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace TextFileChallenge.Model 4 | { 5 | public interface IUserRepository 6 | { 7 | IEnumerable GetAllUsers(); 8 | 9 | User GetsUser(int id); 10 | 11 | void SaveUser(int id, User user); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/Model/UserCsvRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.IO; 5 | using System.Linq; 6 | using CsvHelper; 7 | 8 | namespace TextFileChallenge.Model 9 | { 10 | public class UserCsvRepository : IUserRepository 11 | { 12 | private readonly string _csvFilePath; 13 | private readonly Lazy> _users; 14 | 15 | public UserCsvRepository(string fullPath) 16 | { 17 | _csvFilePath = fullPath + @"\AdvancedDataSet.csv"; 18 | 19 | if (!File.Exists(_csvFilePath)) 20 | throw new IOException(); 21 | 22 | _users = new Lazy>(() => 23 | { 24 | using (var reader = new StreamReader(_csvFilePath)) 25 | using (var csvReader = new CsvReader(reader, CultureInfo.InvariantCulture)) 26 | { 27 | return csvReader.GetRecords().ToList(); 28 | } 29 | }); 30 | } 31 | 32 | private void SaveUserList(List users) 33 | { 34 | using (var writer = new StreamWriter(_csvFilePath)) 35 | using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture)) 36 | { 37 | csv.WriteRecords(users); 38 | } 39 | } 40 | 41 | public IEnumerable GetAllUsers() 42 | { 43 | return _users.Value; 44 | } 45 | 46 | public User GetsUser(int id) 47 | { 48 | return _users.Value[id]; 49 | } 50 | 51 | public void SaveUser(int id, User user) 52 | { 53 | _users.Value[id] = user; 54 | SaveUserList(_users.Value); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/Presenter/ChallengePresenter.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using TextFileChallenge.Model; 3 | using TextFileChallenge.View; 4 | 5 | namespace TextFileChallenge.Presenter 6 | { 7 | public class ChallengePresenter 8 | { 9 | private readonly IChallengeView _view; 10 | private readonly IUserRepository _repository; 11 | 12 | public ChallengePresenter(IChallengeView view, IUserRepository repository) 13 | { 14 | _view = view; 15 | view.Presenter = this; 16 | _repository = repository; 17 | 18 | UpdateUserListView(); 19 | } 20 | 21 | private void UpdateUserListView() 22 | { 23 | var userDisplayText = _repository.GetAllUsers().Select(users => users.DisplayText); 24 | int selectedUser = _view.SelectedUser >= 0 ? _view.SelectedUser : 0; 25 | _view.UserList = userDisplayText.ToList(); 26 | _view.SelectedUser = selectedUser; 27 | } 28 | 29 | public void UpdateUserView(int id) 30 | { 31 | User user = _repository.GetsUser(id); 32 | _view.FirstName = user.FirstName; 33 | _view.LastName = user.LastName; 34 | _view.Age = user.Age; 35 | _view.IsAlive = user.IsAlive; 36 | } 37 | 38 | public void SaveUser() 39 | { 40 | User user = new User 41 | { 42 | FirstName = _view.FirstName, 43 | LastName = _view.LastName, 44 | Age = _view.Age, 45 | IsAlive = _view.IsAlive 46 | }; 47 | _repository.SaveUser(_view.SelectedUser, user); 48 | UpdateUserListView(); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace TextFileChallenge 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(true); 16 | 17 | var repository = new Model.UserCsvRepository(Application.StartupPath); 18 | var view = new View.ChallengeForm(); 19 | 20 | // Poor Man's Dependency Injection/Pure Dependency Injection, Main() is the Composition Root. 21 | var presenter = new Presenter.ChallengePresenter(view, repository); 22 | 23 | Application.Run(view); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TextFileChallenge.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/StandardDataSet.csv: -------------------------------------------------------------------------------- 1 | FirstName,LastName,Age,IsAlive 2 | Dean,Flynn,31,0 3 | Bradley,Frost,86,1 4 | Carl,Smith,67,0 5 | Steel,Barrett,56,1 6 | Keelie,Mccoy,80,1 7 | Leslie,Campos,88,1 8 | Jermaine,Sampson,62,0 9 | Warren,Ellis,76,1 10 | Jordan,Jones,41,1 11 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/View/IChallengeView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace TextFileChallenge.View 4 | { 5 | public interface IChallengeView 6 | { 7 | IList UserList { get; set; } 8 | int SelectedUser { get; set; } 9 | string FirstName { get; set; } 10 | string LastName { get; set; } 11 | int Age { get; set; } 12 | bool IsAlive { get; set; } 13 | Presenter.ChallengePresenter Presenter { set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallenge/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /WCH-02/TextFileChallengeStarterCode.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-02/TextFileChallengeStarterCode.zip -------------------------------------------------------------------------------- /WCH-03/Error Handling Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-03/Error Handling Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-03/ErrorHandlingChallengeStarterCode.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-03/ErrorHandlingChallengeStarterCode.zip -------------------------------------------------------------------------------- /WCH-03/ErrorHandlingChallengeStarterCode/ConsoleUI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WCH-03/ErrorHandlingChallengeStarterCode/ConsoleUI/DemoLibrary.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-03/ErrorHandlingChallengeStarterCode/ConsoleUI/DemoLibrary.dll -------------------------------------------------------------------------------- /WCH-03/ErrorHandlingChallengeStarterCode/ErrorHandlingChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2048 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{EF9ABB75-1887-4D79-860D-2BC24E06A289}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {EF9ABB75-1887-4D79-860D-2BC24E06A289}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {EF9ABB75-1887-4D79-860D-2BC24E06A289}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {EF9ABB75-1887-4D79-860D-2BC24E06A289}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {EF9ABB75-1887-4D79-860D-2BC24E06A289}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {30C40524-6F20-4009-8486-791B8E313D2F} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-04/RefactoringChallenge.pdf -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-04/RefactoringChallengeStarterCode.zip -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/ConsoleApp/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/DapperDemoDB/Post Deploy Scripts/Script.PostDeployment.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Post-Deployment Script Template 3 | -------------------------------------------------------------------------------------- 4 | This file contains SQL statements that will be appended to the build script. 5 | Use SQLCMD syntax to include a file in the post-deployment script. 6 | Example: :r .\myfile.sql 7 | Use SQLCMD syntax to reference a variable in the post-deployment script. 8 | Example: :setvar TableName MyTable 9 | SELECT * FROM [$(TableName)] 10 | -------------------------------------------------------------------------------------- 11 | */ 12 | IF NOT EXISTS (SELECT 1 FROM dbo.SystemUser) 13 | BEGIN 14 | INSERT INTO dbo.SystemUser (FirstName, LastName) 15 | VALUES ('Tim', 'Corey'), 16 | ('Mary', 'Smith'), 17 | ('Jill', 'Bower'), 18 | ('Matt', 'Stone'); 19 | end -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/DapperDemoDB/dbo/Stored Procedures/spSystemUser_Create.sql: -------------------------------------------------------------------------------- 1 | CREATE PROCEDURE [dbo].[spSystemUser_Create] 2 | @FirstName VARCHAR(50), 3 | @LastName VARCHAR(50) 4 | AS 5 | begin 6 | insert into dbo.SystemUser (FirstName, LastName) 7 | values (@FirstName, @LastName); 8 | end 9 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/DapperDemoDB/dbo/Stored Procedures/spSystemUser_Get.sql: -------------------------------------------------------------------------------- 1 | CREATE PROCEDURE [dbo].[spSystemUser_Get] 2 | AS 3 | begin 4 | select [Id], [FirstName], [LastName] 5 | from dbo.SystemUser; 6 | end 7 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/DapperDemoDB/dbo/Stored Procedures/spSystemUser_GetFiltered.sql: -------------------------------------------------------------------------------- 1 | CREATE PROCEDURE [dbo].[spSystemUser_GetFiltered] 2 | @Filter VARCHAR(50) 3 | AS 4 | begin 5 | select [Id], [FirstName], [LastName] 6 | from dbo.SystemUser 7 | WHERE FirstName LIKE @Filter 8 | OR LastName LIKE @Filter; 9 | end 10 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/DapperDemoDB/dbo/Tables/Person.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[Person] 2 | ( 3 | [Id] INT NOT NULL PRIMARY KEY IDENTITY 4 | ) 5 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/DapperDemoDB/dbo/Tables/SystemUser.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[SystemUser] 2 | ( 3 | [Id] INT NOT NULL PRIMARY KEY IDENTITY, 4 | [FirstName] VARCHAR(50) NOT NULL, 5 | [LastName] VARCHAR(50) NOT NULL 6 | ) 7 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/HelperLibrary/BusinessLogic.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace HelperLibrary 4 | { 5 | public static class BusinessLogic 6 | { 7 | public static List GetAllUsers() 8 | { 9 | return DataAccess.ReadData("[dbo].[spSystemUser_Get]", new { }); 10 | } 11 | 12 | public static List GetAllUsers_Filtered(string filter) 13 | { 14 | var p = new 15 | { 16 | Filter = filter 17 | }; 18 | 19 | return DataAccess.ReadData("[dbo].[spSystemUser_GetFiltered]", p); 20 | } 21 | 22 | public static void CreateUser(string firstName, string lastName) 23 | { 24 | var p = new 25 | { 26 | FirstName = firstName, 27 | LastName = lastName 28 | }; 29 | 30 | DataAccess.WriteData("[dbo].[spSystemUser_Create]", p); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/HelperLibrary/DataAccess.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Data.SqlClient; 6 | using System.Linq; 7 | 8 | namespace HelperLibrary 9 | { 10 | public static class DataAccess 11 | { 12 | public static string GetConnectionString(string name = "DapperDemoDB") 13 | { 14 | return ConfigurationManager.ConnectionStrings[name].ConnectionString; 15 | } 16 | 17 | public static List ReadData(string sql, object p) 18 | { 19 | using (IDbConnection cnn = new SqlConnection(GetConnectionString())) 20 | { 21 | var output = cnn.Query(sql, p, commandType: CommandType.StoredProcedure).ToList(); 22 | 23 | return output; 24 | } 25 | } 26 | 27 | public static void WriteData(string sql, object p) 28 | { 29 | using (IDbConnection cnn = new SqlConnection(GetConnectionString())) 30 | { 31 | cnn.Execute(sql, p, commandType: CommandType.StoredProcedure); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/HelperLibrary/SystemUserModel.cs: -------------------------------------------------------------------------------- 1 | namespace HelperLibrary 2 | { 3 | public class SystemUserModel 4 | { 5 | public int Id { get; set; } 6 | public string FirstName { get; set; } 7 | public string LastName { get; set; } 8 | 9 | public string FullName 10 | { 11 | get 12 | { 13 | return $"{ FirstName } { LastName }"; 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/HelperLibrary/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/WinFormApp/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/WinFormApp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace WinFormApp 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Dashboard()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/WinFormApp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WinFormApp.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WCH-04/RefactoringChallengeStarterCode/WinFormApp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WCH-05/Config File Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-05/Config File Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-05/ConfigFileChallengeStarterCode.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-05/ConfigFileChallengeStarterCode.zip -------------------------------------------------------------------------------- /WCH-05/ConfigFileChallengeStarterCode/ConfigFileChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.106 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{09D92018-2186-4F30-816B-7CC2180AFFCE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {09D92018-2186-4F30-816B-7CC2180AFFCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {09D92018-2186-4F30-816B-7CC2180AFFCE}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {09D92018-2186-4F30-816B-7CC2180AFFCE}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {09D92018-2186-4F30-816B-7CC2180AFFCE}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E8043B7E-31D9-4967-81B9-25E09D8EC83B} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-05/ConfigFileChallengeStarterCode/ConsoleUI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /WCH-06/DateTime Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-06/DateTime Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-06/DateTimeChallenge/DateTimeChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29806.167 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DateTimeChallengeUI", "DateTimeChallengeUI\DateTimeChallengeUI.csproj", "{24B8E3C5-A692-443C-B92F-83804B272DD8}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {24B8E3C5-A692-443C-B92F-83804B272DD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {24B8E3C5-A692-443C-B92F-83804B272DD8}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {24B8E3C5-A692-443C-B92F-83804B272DD8}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {24B8E3C5-A692-443C-B92F-83804B272DD8}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {C0FFF40A-DE3E-4304-9582-B0CA8AF71BA8} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-06/DateTimeChallenge/DateTimeChallengeUI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WCH-07/Pill Reminder Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-07/Pill Reminder Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-07/PillReminderChallengeStarterCode.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-07/PillReminderChallengeStarterCode.zip -------------------------------------------------------------------------------- /WCH-07/PillReminderChallengeStarterCode/PillReminderApp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.106 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PillReminderUI", "PillReminderUI\PillReminderUI.csproj", "{99935DFC-B5F0-4095-BA04-D6FA87B13B8C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {99935DFC-B5F0-4095-BA04-D6FA87B13B8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {99935DFC-B5F0-4095-BA04-D6FA87B13B8C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {99935DFC-B5F0-4095-BA04-D6FA87B13B8C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {99935DFC-B5F0-4095-BA04-D6FA87B13B8C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {8AB4AA33-09E2-4DFA-9BD4-A2F86BAE3A0E} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-07/PillReminderChallengeStarterCode/PillReminderUI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WCH-07/PillReminderChallengeStarterCode/PillReminderUI/PillModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PillReminderUI 8 | { 9 | public class PillModel 10 | { 11 | public string PillName { get; set; } 12 | public DateTime TimeToTake { get; set; } 13 | public DateTime LastTaken { get; set; } 14 | 15 | public string PillInfo 16 | { 17 | get 18 | { 19 | return $"{ PillName } at { TimeToTake.ToString("h:mm tt") }"; 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WCH-07/PillReminderChallengeStarterCode/PillReminderUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace PillReminderUI 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new ReminderWindow()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WCH-07/PillReminderChallengeStarterCode/PillReminderUI/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PillReminderUI.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WCH-07/PillReminderChallengeStarterCode/PillReminderUI/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WCH-08/Web Deployment Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/Web Deployment Challenge.pdf -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace Web 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/Scripts/jquery-{version}.js")); 13 | 14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( 15 | "~/Scripts/jquery.validate*")); 16 | 17 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 18 | // ready for production, use the build tool at https://modernizr.com to pick only the tests you need. 19 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 20 | "~/Scripts/modernizr-*")); 21 | 22 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 23 | "~/Scripts/bootstrap.js")); 24 | 25 | bundles.Add(new StyleBundle("~/Content/css").Include( 26 | "~/Content/bootstrap.css", 27 | "~/Content/site.css")); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace Web 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace Web 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | input, 21 | select, 22 | textarea { 23 | max-width: 280px; 24 | } 25 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace Web.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() 17 | { 18 | ViewBag.Message = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public ActionResult Contact() 24 | { 25 | ViewBag.Message = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Web.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | 9 | namespace Web 10 | { 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | AreaRegistration.RegisterAllAreas(); 16 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 17 | RouteConfig.RegisterRoutes(RouteTable.Routes); 18 | BundleConfig.RegisterBundles(BundleTable.Bundles); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using System.Security.Claims; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNet.Identity; 5 | using Microsoft.AspNet.Identity.EntityFramework; 6 | 7 | namespace Web.Models 8 | { 9 | // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit https://go.microsoft.com/fwlink/?LinkID=317594 to learn more. 10 | public class ApplicationUser : IdentityUser 11 | { 12 | public async Task GenerateUserIdentityAsync(UserManager manager) 13 | { 14 | // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType 15 | var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie); 16 | // Add custom user claims here 17 | return userIdentity; 18 | } 19 | } 20 | 21 | public class ApplicationDbContext : IdentityDbContext 22 | { 23 | public ApplicationDbContext() 24 | : base("DefaultConnection", throwIfV1Schema: false) 25 | { 26 | } 27 | 28 | public static ApplicationDbContext Create() 29 | { 30 | return new ApplicationDbContext(); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Owin; 3 | 4 | [assembly: OwinStartupAttribute(typeof(Web.Startup))] 5 | namespace Web 6 | { 7 | public partial class Startup 8 | { 9 | public void Configuration(IAppBuilder app) 10 | { 11 | ConfigureAuth(app); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Confirm Email"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |
7 |

8 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 9 |

10 |
11 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.ForgotPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Forgot your password?"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Enter your email.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Please check your email to reset your password. 11 |

12 |
13 | 14 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 11 |

12 |
13 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("rememberMe", @Model.RememberMe) 11 |

Send verification code

12 |
13 |
14 |
15 | Select Two-Factor Authentication Provider: 16 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) 17 | 18 |
19 |
20 | } 21 | 22 | @section Scripts { 23 | @Scripts.Render("~/bundles/jqueryval") 24 | } 25 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Account/VerifyCode.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.VerifyCodeViewModel 2 | @{ 3 | ViewBag.Title = "Verify"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("provider", @Model.Provider) 11 | @Html.Hidden("rememberMe", @Model.RememberMe) 12 |

Enter verification code

13 |
14 | @Html.ValidationSummary("", new { @class = "text-danger" }) 15 |
16 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 19 |
20 |
21 |
22 |
23 |
24 | @Html.CheckBoxFor(m => m.RememberBrowser) 25 | @Html.LabelFor(m => m.RememberBrowser) 26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 | } 35 | 36 | @section Scripts { 37 | @Scripts.Render("~/bundles/jqueryval") 38 | } 39 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.ExternalLoginListViewModel 2 | @using Microsoft.Owin.Security 3 | 4 |

Use another service to log in.

5 |
6 | @{ 7 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); 8 | if (loginProviders.Count() == 0) { 9 |
10 |

11 | There are no external authentication services configured. See this article 12 | for details on setting up this ASP.NET application to support logging in via external services. 13 |

14 |
15 | } 16 | else { 17 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) { 18 | @Html.AntiForgeryToken() 19 |
20 |

21 | @foreach (AuthenticationDescription p in loginProviders) { 22 | 23 | } 24 |

25 |
26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.AddPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Add a phone number

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Number, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Number, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.SetPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Create Password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 |

8 | You do not have a local username/password for this site. Add a local 9 | account so you can log in without an external login. 10 |

11 | 12 | @using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 13 | { 14 | @Html.AntiForgeryToken() 15 | 16 |

Create Local Login

17 |
18 | @Html.ValidationSummary("", new { @class = "text-danger" }) 19 |
20 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 21 |
22 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 23 |
24 |
25 |
26 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 27 |
28 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 | } 37 | @section Scripts { 38 | @Scripts.Render("~/bundles/jqueryval") 39 | } -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.VerifyPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Verify Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | @Html.Hidden("phoneNumber", @Model.PhoneNumber) 12 |

Enter verification code

13 |
@ViewBag.Status
14 |
15 | @Html.ValidationSummary("", new { @class = "text-danger" }) 16 |
17 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 18 |
19 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 | } 28 | 29 | @section Scripts { 30 | @Scripts.Render("~/bundles/jqueryval") 31 | } 32 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Locked Out"; 5 | } 6 | 7 |
8 |

Locked out.

9 |

This account has been locked out, please try again later.

10 |
11 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 14 | } 15 | } 16 | else 17 | { 18 | 22 | } 23 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/WebDeploymentChallenge/Web/favicon.ico -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/WebDeploymentChallenge/Web/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/WebDeploymentChallenge/Web/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/WebDeploymentChallenge/Web/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/Web/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/WebDeploymentChallenge/Web/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /WCH-08/WebDeploymentChallenge/WebDeploymentChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29926.136 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web", "Web\Web.csproj", "{0E71E4B9-5060-43E6-B894-C59A977E72AA}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {0E71E4B9-5060-43E6-B894-C59A977E72AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {0E71E4B9-5060-43E6-B894-C59A977E72AA}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {0E71E4B9-5060-43E6-B894-C59A977E72AA}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {0E71E4B9-5060-43E6-B894-C59A977E72AA}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {BC9B14B5-EBF9-4BA0-9845-FCAF113D0B61} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-08/Website/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | input, 21 | select, 22 | textarea { 23 | max-width: 280px; 24 | } 25 | -------------------------------------------------------------------------------- /WCH-08/Website/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Web.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Confirm Email"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |
7 |

8 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 9 |

10 |
11 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.ExternalLoginConfirmationViewModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 |

@ViewBag.Title.

6 |

Associate your @ViewBag.LoginProvider account.

7 | 8 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | 12 |

Association Form

13 |
14 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 15 |

16 | You've successfully authenticated with @ViewBag.LoginProvider. 17 | Please enter a user name for this site below and click the Register button to finish 18 | logging in. 19 |

20 |
21 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 24 | @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | } 33 | 34 | @section Scripts { 35 | @Scripts.Render("~/bundles/jqueryval") 36 | } 37 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.ForgotPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Forgot your password?"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Enter your email.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Please check your email to reset your password. 11 |

12 |
13 | 14 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 11 |

12 |
13 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("rememberMe", @Model.RememberMe) 11 |

Send verification code

12 |
13 |
14 |
15 | Select Two-Factor Authentication Provider: 16 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) 17 | 18 |
19 |
20 | } 21 | 22 | @section Scripts { 23 | @Scripts.Render("~/bundles/jqueryval") 24 | } 25 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/VerifyCode.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.VerifyCodeViewModel 2 | @{ 3 | ViewBag.Title = "Verify"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("provider", @Model.Provider) 11 | @Html.Hidden("rememberMe", @Model.RememberMe) 12 |

Enter verification code

13 |
14 | @Html.ValidationSummary("", new { @class = "text-danger" }) 15 |
16 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 19 |
20 |
21 |
22 |
23 |
24 | @Html.CheckBoxFor(m => m.RememberBrowser) 25 | @Html.LabelFor(m => m.RememberBrowser) 26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 | } 35 | 36 | @section Scripts { 37 | @Scripts.Render("~/bundles/jqueryval") 38 | } 39 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.ExternalLoginListViewModel 2 | @using Microsoft.Owin.Security 3 | 4 |

Use another service to log in.

5 |
6 | @{ 7 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); 8 | if (loginProviders.Count() == 0) { 9 |
10 |

11 | There are no external authentication services configured. See this article 12 | for details on setting up this ASP.NET application to support logging in via external services. 13 |

14 |
15 | } 16 | else { 17 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) { 18 | @Html.AntiForgeryToken() 19 |
20 |

21 | @foreach (AuthenticationDescription p in loginProviders) { 22 | 23 | } 24 |

25 |
26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /WCH-08/Website/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.AddPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Add a phone number

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Number, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Number, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.SetPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Create Password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 |

8 | You do not have a local username/password for this site. Add a local 9 | account so you can log in without an external login. 10 |

11 | 12 | @using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 13 | { 14 | @Html.AntiForgeryToken() 15 | 16 |

Create Local Login

17 |
18 | @Html.ValidationSummary("", new { @class = "text-danger" }) 19 |
20 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 21 |
22 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 23 |
24 |
25 |
26 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 27 |
28 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 | } 37 | @section Scripts { 38 | @Scripts.Render("~/bundles/jqueryval") 39 | } -------------------------------------------------------------------------------- /WCH-08/Website/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model Web.Models.VerifyPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Verify Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | @Html.Hidden("phoneNumber", @Model.PhoneNumber) 12 |

Enter verification code

13 |
@ViewBag.Status
14 |
15 | @Html.ValidationSummary("", new { @class = "text-danger" }) 16 |
17 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 18 |
19 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 | } 28 | 29 | @section Scripts { 30 | @Scripts.Render("~/bundles/jqueryval") 31 | } 32 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Locked Out"; 5 | } 6 | 7 |
8 |

Locked out.

9 |

This account has been locked out, please try again later.

10 |
11 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 14 | } 15 | } 16 | else 17 | { 18 | 22 | } 23 | -------------------------------------------------------------------------------- /WCH-08/Website/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /WCH-08/Website/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/Website/favicon.ico -------------------------------------------------------------------------------- /WCH-08/Website/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/Website/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WCH-08/Website/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/Website/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WCH-08/Website/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/Website/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WCH-08/Website/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-08/Website/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /WCH-09/Database Design Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-09/Database Design Challenge.pdf -------------------------------------------------------------------------------- /WCH-09/DatabaseDesignChallenge/ChristmasListDB/dbo/StoredProcedures/CapturePurchase.sql: -------------------------------------------------------------------------------- 1 | CREATE PROCEDURE [dbo].[CapturePurchase] 2 | @ItemName varchar(50), 3 | @Price money, 4 | @PurchaseForId int 5 | AS 6 | BEGIN 7 | SET NOCOUNT ON; 8 | 9 | INSERT INTO [dbo].[Purchase] (ItemName, Price, PurchaseForId) 10 | VALUES (@ItemName, @Price, @PurchaseForId); 11 | 12 | END -------------------------------------------------------------------------------- /WCH-09/DatabaseDesignChallenge/ChristmasListDB/dbo/Tables/Address.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[Address] 2 | ( 3 | [Id] INT NOT NULL PRIMARY KEY IDENTITY, 4 | [StreetAddress] VARCHAR(50) NOT NULL, 5 | [City] VARCHAR(50) NOT NULL, 6 | [State] VARCHAR(2) NOT NULL, 7 | [ZipCode] VARCHAR(10) NOT NULL 8 | ) 9 | -------------------------------------------------------------------------------- /WCH-09/DatabaseDesignChallenge/ChristmasListDB/dbo/Tables/Person.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[Person] 2 | ( 3 | [Id] INT NOT NULL PRIMARY KEY IDENTITY, 4 | [FirstName] VARCHAR(50) NOT NULL, 5 | [LastName] VARCHAR(50) NOT NULL, 6 | [BudgetAmount] MONEY NOT NULL DEFAULT 0, 7 | [AddressId] INT NOT NULL 8 | ) 9 | -------------------------------------------------------------------------------- /WCH-09/DatabaseDesignChallenge/ChristmasListDB/dbo/Tables/Purchase.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[Purchase] 2 | ( 3 | [Id] INT NOT NULL PRIMARY KEY IDENTITY, 4 | [ItemName] VARCHAR(50) NOT NULL, 5 | [Price] MONEY NOT NULL, 6 | [PurchaseForId] INT NOT NULL 7 | ) 8 | -------------------------------------------------------------------------------- /WCH-09/DatabaseDesignChallenge/ChristmasListDB/dbo/Views/PeopleLeftToPurchaseFor.sql: -------------------------------------------------------------------------------- 1 | CREATE VIEW [dbo].[PeopleLeftToPurchaseFor] 2 | AS 3 | SELECT Person.FirstName, 4 | Person.LastName, 5 | Person.BudgetAmount, 6 | PurchaseSubQuery.TotalSpend, 7 | (Person.BudgetAmount - COALESCE(PurchaseSubQuery.TotalSpend, 0)) AS [AmountLeftToSpend] 8 | FROM [dbo].[Person] 9 | LEFT JOIN ( 10 | SELECT Purchase.PurchaseForId, SUM(Purchase.Price) AS [TotalSpend] 11 | FROM [dbo].[Purchase] 12 | GROUP BY Purchase.PurchaseForId 13 | ) 14 | AS PurchaseSubQuery 15 | ON PurchaseSubQuery.PurchaseForId = Person.Id 16 | WHERE Person.BudgetAmount - COALESCE(PurchaseSubQuery.TotalSpend, 0) > 0; 17 | -------------------------------------------------------------------------------- /WCH-09/DatabaseDesignChallenge/DatabaseDesignChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29926.136 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "ChristmasListDB", "ChristmasListDB\ChristmasListDB.sqlproj", "{A2407861-D21E-4407-9DB4-A4E25B77DD85}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {A2407861-D21E-4407-9DB4-A4E25B77DD85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {A2407861-D21E-4407-9DB4-A4E25B77DD85}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {A2407861-D21E-4407-9DB4-A4E25B77DD85}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 17 | {A2407861-D21E-4407-9DB4-A4E25B77DD85}.Release|Any CPU.ActiveCfg = Release|Any CPU 18 | {A2407861-D21E-4407-9DB4-A4E25B77DD85}.Release|Any CPU.Build.0 = Release|Any CPU 19 | {A2407861-D21E-4407-9DB4-A4E25B77DD85}.Release|Any CPU.Deploy.0 = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(SolutionProperties) = preSolution 22 | HideSolutionNode = FALSE 23 | EndGlobalSection 24 | GlobalSection(ExtensibilityGlobals) = postSolution 25 | SolutionGuid = {75ABB518-40FB-4D6E-AF5F-BAD7859A33B4} 26 | EndGlobalSection 27 | EndGlobal 28 | -------------------------------------------------------------------------------- /WCH-10/Performance Evaluation Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-10/Performance Evaluation Challenge.pdf -------------------------------------------------------------------------------- /WCH-10/PerformanceEvaluationChallenge/ConsoleUI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WCH-10/PerformanceEvaluationChallenge/PerformanceEvaluationChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29926.136 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{BD1AF032-EAB2-45F6-8239-275E3784FF40}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {BD1AF032-EAB2-45F6-8239-275E3784FF40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {BD1AF032-EAB2-45F6-8239-275E3784FF40}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {BD1AF032-EAB2-45F6-8239-275E3784FF40}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {BD1AF032-EAB2-45F6-8239-275E3784FF40}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {704662A0-7AC6-4123-9F4A-4AE86144A21A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-11/FizzBuzz Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-11/FizzBuzz Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-11/FizzBuzzChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-11/FizzBuzzChallenge/FizzBuzzChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29926.136 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{978D977B-7154-4AEF-B7EA-63326E931879}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {978D977B-7154-4AEF-B7EA-63326E931879}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {978D977B-7154-4AEF-B7EA-63326E931879}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {978D977B-7154-4AEF-B7EA-63326E931879}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {978D977B-7154-4AEF-B7EA-63326E931879}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {EEF81CF3-1F89-4ED4-9134-04C96B22AE04} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-12/Palindrome Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-12/Palindrome Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-12/PalindromeChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-12/PalindromeChallenge/PalindromeChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30002.166 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{0C2E2314-26B6-4BAE-9DC3-6B376AA01F7E}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {0C2E2314-26B6-4BAE-9DC3-6B376AA01F7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {0C2E2314-26B6-4BAE-9DC3-6B376AA01F7E}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {0C2E2314-26B6-4BAE-9DC3-6B376AA01F7E}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {0C2E2314-26B6-4BAE-9DC3-6B376AA01F7E}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {6ABA7E53-FB94-4FCC-80C4-F2B8A2270A31} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-13/Prime Number Challenge Instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-13/Prime Number Challenge Instructions.pdf -------------------------------------------------------------------------------- /WCH-13/PrimeNumberChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-13/PrimeNumberChallenge/PrimeNumberChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30002.166 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{7EFA0D42-5028-47B4-A696-6C594E03919E}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {7EFA0D42-5028-47B4-A696-6C594E03919E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {7EFA0D42-5028-47B4-A696-6C594E03919E}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {7EFA0D42-5028-47B4-A696-6C594E03919E}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {7EFA0D42-5028-47B4-A696-6C594E03919E}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E8B9B355-431B-46E6-B07D-B43E92D3B225} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-14/Change Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-14/Change Challenge.pdf -------------------------------------------------------------------------------- /WCH-14/CorrectChangeChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-14/CorrectChangeChallenge/ConsoleUI/DenominationInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ConsoleUI 2 | { 3 | public class DenominationInfo 4 | { 5 | public decimal Amount { get; set; } 6 | public string Name { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /WCH-14/CorrectChangeChallenge/CorrectChangeChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30002.166 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{D27E5E28-18F1-4D93-BDF8-278E1F7FCB9F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D27E5E28-18F1-4D93-BDF8-278E1F7FCB9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D27E5E28-18F1-4D93-BDF8-278E1F7FCB9F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D27E5E28-18F1-4D93-BDF8-278E1F7FCB9F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D27E5E28-18F1-4D93-BDF8-278E1F7FCB9F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {3E5FAA2B-45A7-4893-8F08-F9AB1A53912F} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-15/API Usage Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-15/API Usage Challenge.pdf -------------------------------------------------------------------------------- /WCH-15/APIUsageChallenge/APIUsageChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30002.166 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{38197EF2-20B8-4144-8746-14A4A743FB1D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {38197EF2-20B8-4144-8746-14A4A743FB1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {38197EF2-20B8-4144-8746-14A4A743FB1D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {38197EF2-20B8-4144-8746-14A4A743FB1D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {38197EF2-20B8-4144-8746-14A4A743FB1D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {D53E8BCD-0756-4BBB-ACBE-C1AC30EE5BFC} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-15/APIUsageChallenge/ConsoleUI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /WCH-15/APIUsageChallenge/ConsoleUI/PersonModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace ConsoleUI 5 | { 6 | [DataContract] 7 | public class PersonModel 8 | { 9 | public string Id { get; set; } 10 | [DataMember(Name = "name")] 11 | public string FullName { get; set; } 12 | [DataMember] 13 | public string height { get; set; } 14 | [DataMember] 15 | public string mass { get; set; } 16 | [DataMember] 17 | public string hair_color { get; set; } 18 | [DataMember] 19 | public string skin_color { get; set; } 20 | [DataMember] 21 | public string eye_color { get; set; } 22 | [DataMember] 23 | public string birth_year { get; set; } 24 | [DataMember(Name = "gender")] 25 | public string Gender { get; set; } 26 | [DataMember] 27 | public string homeworld { get; set; } 28 | [DataMember] 29 | public string[] films { get; set; } 30 | [DataMember] 31 | public string[] species { get; set; } 32 | [DataMember] 33 | public string[] vechicles { get; set; } 34 | [DataMember] 35 | public string[] starships { get; set; } 36 | [DataMember] 37 | public DateTime created { get; set; } 38 | [DataMember] 39 | public DateTime edited { get; set; } 40 | [DataMember] 41 | public string url { get; set; } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /WCH-15/APIUsageChallenge/ConsoleUI/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /WCH-27/Caching Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-27/Caching Challenge.pdf -------------------------------------------------------------------------------- /WCH-27/CachingChallenge/CachingChallenge.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-27/CachingChallenge/PersonModel.cs: -------------------------------------------------------------------------------- 1 | namespace CachingChallenge 2 | { 3 | public class PersonModel 4 | { 5 | public int Id { get; set; } 6 | public string FirstName { get; set; } 7 | public string LastName { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WCH-27/CachingChallenge/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace CachingChallenge 5 | { 6 | class Program 7 | { 8 | static void Main(string[] args) 9 | { 10 | //DataAccess db = new DataAccess(); 11 | DataAccessCache db = new DataAccessCache(); 12 | 13 | //var people = db.SimulatedPersonListLookup(); 14 | ////people.ForEach(x => Console.WriteLine(x.FirstName)); 15 | 16 | //people = db.SimulatedPersonListLookup(); 17 | 18 | //people = db.SimulatedPersonListLookup(); 19 | 20 | //db.SimulatedPersonById(3); 21 | //db.SimulatedPersonById(3); 22 | //db.SimulatedPersonById(5); 23 | //db.SimulatedPersonById(5); 24 | //db.SimulatedPersonById(5); 25 | 26 | db.SimulatedPersonListByLastName("Corey"); 27 | db.SimulatedPersonListByLastName("Corey"); 28 | db.SimulatedPersonListByLastName("Jones"); 29 | db.SimulatedPersonListByLastName("Corey"); 30 | db.SimulatedPersonListByLastName("Jones"); 31 | 32 | Console.ReadLine(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /WCH-27/CachingChallengeApp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28822.285 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CachingChallenge", "CachingChallenge\CachingChallenge.csproj", "{4889737E-4CB6-46E0-8EC8-A71A1EA46D2A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {4889737E-4CB6-46E0-8EC8-A71A1EA46D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {4889737E-4CB6-46E0-8EC8-A71A1EA46D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {4889737E-4CB6-46E0-8EC8-A71A1EA46D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {4889737E-4CB6-46E0-8EC8-A71A1EA46D2A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {82E4820E-EAB3-4A00-8855-8258A06C5C95} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-27/CachingChallengeStarterCode.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-27/CachingChallengeStarterCode.zip -------------------------------------------------------------------------------- /WCH-28/MongoDB Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-28/MongoDB Challenge.pdf -------------------------------------------------------------------------------- /WCH-28/MongoDBChallenge/MongoDB.Library/Models/PersonModel.cs: -------------------------------------------------------------------------------- 1 | using MongoDB.Bson.Serialization.Attributes; 2 | using System; 3 | 4 | namespace MongoDB.Library.Models 5 | { 6 | public class PersonModel 7 | { 8 | [BsonId] 9 | public Guid Id { get; set; } 10 | public string FirstName { get; set; } 11 | public string LastName { get; set; } 12 | public string EmailAddress { get; set; } 13 | public string PhoneNumber { get; set; } 14 | 15 | public override string ToString() 16 | { 17 | return $" { FirstName } { LastName }"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WCH-28/MongoDBChallenge/MongoDB.Library/MongoDB.Library.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /WCH-28/MongoDBChallenge/MongoDB.UI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WCH-28/MongoDBChallenge/MongoDB.UI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace MongoDB.UI 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Dashboard()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WCH-28/MongoDBChallenge/MongoDB.UI/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MongoDB.UI.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WCH-28/MongoDBChallenge/MongoDB.UI/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WCH-29/Unit Test Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-29/Unit Test Challenge.pdf -------------------------------------------------------------------------------- /WCH-29/UnitTestChallengeStarterCode.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-29/UnitTestChallengeStarterCode.zip -------------------------------------------------------------------------------- /WCH-29/UnitTestChallengeStarterCode/CalculationsLibrary/CalculationsLibrary.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WCH-29/UnitTestChallengeStarterCode/CalculationsLibrary/Calculator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace CalculationsLibrary 6 | { 7 | public static class Calculator 8 | { 9 | public static double Add(double x, double y) 10 | { 11 | return x + y; 12 | } 13 | 14 | public static double Divide(double x, double y) 15 | { 16 | if (y == 0) 17 | { 18 | throw new ArgumentException("Cannot divide by zero"); 19 | } 20 | return x / y; 21 | } 22 | 23 | public static double LimitedAdd(double x, double y, double minValue, double maxValue) 24 | { 25 | if (x > maxValue || x < minValue) 26 | { 27 | throw new ArgumentOutOfRangeException("x", $"x is outside the specified bounds"); 28 | } 29 | 30 | if (y > maxValue || y < minValue) 31 | { 32 | throw new ArgumentOutOfRangeException("y", $"y is outside the specified bounds"); 33 | } 34 | 35 | return x + y; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /WCH-29/UnitTestChallengeStarterCode/CalculationsLibrary/TextDataAccess.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace CalculationsLibrary 8 | { 9 | public class TextDataAccess 10 | { 11 | public void SaveText(string filePath, List lines, IWriteToText textWriter) 12 | { 13 | if (filePath.Length > 260) 14 | { 15 | throw new PathTooLongException("The path needs to be less than 261 characters long."); 16 | } 17 | 18 | string fileName = Path.GetFileName(filePath); 19 | 20 | textWriter.WriteToFile(fileName, lines); 21 | } 22 | } 23 | 24 | public class WriteToText : IWriteToText 25 | { 26 | public void WriteToFile(string filePath, List lines) 27 | { 28 | File.WriteAllLines(filePath, lines); 29 | } 30 | } 31 | 32 | public interface IWriteToText 33 | { 34 | void WriteToFile(string filePath, List lines); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /WCH-29/UnitTestChallengeStarterCode/CalculatorLibrary.Test/CalculatorLibrary.Test.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /WCH-30/Razor Pages Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-30/Razor Pages Challenge.pdf -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/RazorPagesChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29905.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebUI", "WebUI\WebUI.csproj", "{1BB12E98-C623-4793-B8D2-725011F283E9}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {1BB12E98-C623-4793-B8D2-725011F283E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {1BB12E98-C623-4793-B8D2-725011F283E9}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {1BB12E98-C623-4793-B8D2-725011F283E9}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {1BB12E98-C623-4793-B8D2-725011F283E9}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {86805489-7769-4B11-8944-A2C3B59C81A4} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Areas/Identity/Data/WebUIContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Identity; 6 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 7 | using Microsoft.EntityFrameworkCore; 8 | using WebUI.Areas.Identity.Data; 9 | 10 | namespace WebUI.Data 11 | { 12 | public class WebUIContext : IdentityDbContext 13 | { 14 | public WebUIContext(DbContextOptions options) 15 | : base(options) 16 | { 17 | } 18 | 19 | protected override void OnModelCreating(ModelBuilder builder) 20 | { 21 | base.OnModelCreating(builder); 22 | // Customize the ASP.NET Identity model and override the defaults if needed. 23 | // For example, you can rename the ASP.NET Identity table names and more. 24 | // Add your customizations after calling base.OnModelCreating(builder); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Areas/Identity/Data/WebUIUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Identity; 6 | 7 | namespace WebUI.Areas.Identity.Data 8 | { 9 | // Add profile data for application users by adding properties to the WebUIUser class 10 | public class WebUIUser : IdentityUser 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Areas/Identity/IdentityHostingStartup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.AspNetCore.Identity; 4 | using Microsoft.AspNetCore.Identity.UI; 5 | using Microsoft.EntityFrameworkCore; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.DependencyInjection; 8 | using WebUI.Areas.Identity.Data; 9 | using WebUI.Data; 10 | 11 | [assembly: HostingStartup(typeof(WebUI.Areas.Identity.IdentityHostingStartup))] 12 | namespace WebUI.Areas.Identity 13 | { 14 | public class IdentityHostingStartup : IHostingStartup 15 | { 16 | public void Configure(IWebHostBuilder builder) 17 | { 18 | builder.ConfigureServices((context, services) => { 19 | services.AddDbContext(options => 20 | options.UseSqlite( 21 | context.Configuration.GetConnectionString("WebUIContextConnection"))); 22 | 23 | services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) 24 | .AddEntityFrameworkStores(); 25 | }); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Areas/Identity/Pages/Account/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebUI.Areas.Identity.Pages.Account -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Areas/Identity/Pages/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Areas/Identity/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @using WebUI.Areas.Identity 3 | @using WebUI.Areas.Identity.Pages 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | @using WebUI.Areas.Identity.Data 6 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @{ 3 | Layout = "/Pages/Shared/_Layout.cshtml"; 4 | } 5 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Models/PersonModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebUI.Models 2 | { 3 | public class PersonModel 4 | { 5 | public string FullName { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace WebUI.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | public class ErrorModel : PageModel 14 | { 15 | public string RequestId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILogger _logger; 20 | 21 | public ErrorModel(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Home page"; 5 | } 6 | 7 |
8 |

Welcome

9 |

Learn about building Web apps with ASP.NET Core.

10 |
11 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace WebUI.Pages 10 | { 11 | public class IndexModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public IndexModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

@ViewData["Title"]

7 | 8 |

Use this page to detail your site's privacy policy.

9 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace WebUI.Pages 10 | { 11 | public class PrivacyModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public PrivacyModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/SayHi.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model WebUI.Pages.SayHiModel 3 | @{ 4 | ViewData["Title"] = "SayHi"; 5 | } 6 | 7 |

Say Hi Demo Page

8 | 9 | @if (string.IsNullOrWhiteSpace(Model.Person.FullName) == false) 10 | { 11 |

Hello @Model.Person.FullName

12 | } 13 | 14 |
15 |
16 | 17 | 18 |
19 |
20 | 21 |
22 |
-------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/SayHi.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using WebUI.Models; 8 | 9 | namespace WebUI.Pages 10 | { 11 | public class SayHiModel : PageModel 12 | { 13 | [BindProperty] 14 | public PersonModel Person { get; set; } = new PersonModel(); 15 | 16 | public void OnGet() 17 | { 18 | 19 | } 20 | 21 | public void OnPost() 22 | { 23 | 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @using WebUI.Areas.Identity.Data 3 | 4 | @inject SignInManager SignInManager 5 | @inject UserManager UserManager 6 | 7 | 29 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebUI 2 | @namespace WebUI.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace WebUI 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/WebUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | all 14 | runtime; build; native; contentfiles; analyzers; buildtransitive 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*", 10 | "ConnectionStrings": { 11 | "WebUIContextConnection": "Data Source=WebUI.db" 12 | } 13 | } -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-30/RazorPagesChallenge/WebUI/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /WCH-30/RazorPagesChallenge/WebUI/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WCH-31/Calculation Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-31/Calculation Challenge.pdf -------------------------------------------------------------------------------- /WCH-31/CalculationChallenge/CalculationChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29905.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{4B396D2B-4FA9-43C9-BB4D-E5B012A62BDE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {4B396D2B-4FA9-43C9-BB4D-E5B012A62BDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {4B396D2B-4FA9-43C9-BB4D-E5B012A62BDE}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {4B396D2B-4FA9-43C9-BB4D-E5B012A62BDE}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {4B396D2B-4FA9-43C9-BB4D-E5B012A62BDE}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {4C6472DA-9068-45E6-A74E-CD91C8649C21} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-31/CalculationChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-31/CalculationChallenge/ConsoleUI/ITemperature.cs: -------------------------------------------------------------------------------- 1 | namespace ConsoleUI 2 | { 3 | public interface ITemperature 4 | { 5 | double AverageTemperature { get; } 6 | int MaximumTemperature { get; } 7 | int MinimumTemperature { get; } 8 | 9 | void Insert(int temperature); 10 | void Insert(string temperature); 11 | } 12 | } -------------------------------------------------------------------------------- /WCH-31/CalculationChallenge/ConsoleUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ConsoleUI 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Random rnd = new Random(); 10 | ITemperature temperature = new Temperature(); 11 | string[] words = new string[] { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"}; 12 | 13 | //for (int i = 0; i < 100; i++) 14 | //{ 15 | // temperature.Insert(rnd.Next(1, 101)); 16 | //} 17 | 18 | for (int i = 0; i < 100; i++) 19 | { 20 | temperature.Insert(words[rnd.Next(0, 10)]); 21 | } 22 | 23 | Console.WriteLine($"Min Temp: { temperature.MinimumTemperature }"); 24 | Console.WriteLine($"Max Temp: { temperature.MaximumTemperature }"); 25 | Console.WriteLine($"Average Temp: { temperature.AverageTemperature }"); 26 | 27 | Console.ReadLine(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WCH-31/CalculationChallenge/ConsoleUI/Temperature.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace ConsoleUI 5 | { 6 | public class Temperature : ITemperature 7 | { 8 | private List temperatures = new List(); 9 | private Dictionary words = new Dictionary(); 10 | 11 | public int MinimumTemperature 12 | { 13 | get 14 | { 15 | return temperatures.Min(); 16 | } 17 | } 18 | 19 | public int MaximumTemperature 20 | { 21 | get 22 | { 23 | return temperatures.Max(); 24 | } 25 | } 26 | 27 | public double AverageTemperature 28 | { 29 | get 30 | { 31 | return temperatures.Average(); 32 | } 33 | } 34 | 35 | public Temperature() 36 | { 37 | words.Add("one", 1); 38 | words.Add("two", 2); 39 | words.Add("three", 3); 40 | words.Add("four", 4); 41 | words.Add("five", 5); 42 | words.Add("six", 6); 43 | words.Add("seven", 7); 44 | words.Add("eight", 8); 45 | words.Add("nine", 9); 46 | words.Add("ten", 10); 47 | } 48 | 49 | public void Insert(int temperature) 50 | { 51 | temperatures.Add(temperature); 52 | } 53 | 54 | public void Insert(string temperature) 55 | { 56 | temperature = temperature.ToLower(); 57 | Insert(words[temperature]); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /WCH-32/LINQChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-32/LINQChallenge/ConsoleUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Text; 4 | 5 | namespace ConsoleUI 6 | { 7 | class Program 8 | { 9 | static void Main(string[] args) 10 | { 11 | string input = "Hello World"; 12 | 13 | //var letters = from x in input 14 | // orderby x.ToString() 15 | // select x; 16 | 17 | //foreach (var letter in letters) 18 | //{ 19 | // Console.WriteLine(letter); 20 | //} 21 | 22 | //Console.WriteLine(input.OrderBy(x => Char.ToLower(x)).Aggregate(new StringBuilder(), (x, y) => x.Append(y))); 23 | 24 | var letters = from x in input 25 | group x by x.ToString().ToLower() into y 26 | orderby y.Count() descending, y.Key.ToString() 27 | select (new { letter = y.Key, Count = y.Count() }); 28 | 29 | foreach (var letter in letters) 30 | { 31 | Console.WriteLine($"Letter: { letter.letter }, count: { letter.Count }"); 32 | } 33 | 34 | Console.ReadLine(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /WCH-32/LINQChallenge/LINQChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29905.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{911A491A-5513-486C-860B-F5BBA64611A6}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {911A491A-5513-486C-860B-F5BBA64611A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {911A491A-5513-486C-860B-F5BBA64611A6}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {911A491A-5513-486C-860B-F5BBA64611A6}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {911A491A-5513-486C-860B-F5BBA64611A6}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {2DB51657-E691-46B5-AFBA-60E87EB36E12} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-32/Linq Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-32/Linq Challenge.pdf -------------------------------------------------------------------------------- /WCH-33/Razor Pages Form Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-33/Razor Pages Form Challenge.pdf -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/RazorPagesFormChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29905.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web", "Web\Web.csproj", "{A41B2E7B-3B37-4801-BB68-E59E1955B144}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {A41B2E7B-3B37-4801-BB68-E59E1955B144}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {A41B2E7B-3B37-4801-BB68-E59E1955B144}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {A41B2E7B-3B37-4801-BB68-E59E1955B144}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {A41B2E7B-3B37-4801-BB68-E59E1955B144}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {8873F46D-9649-4B1A-BE57-2B16E6DDB9BC} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Models/SignUpDataModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Web.Models 4 | { 5 | public class SignUpDataModel 6 | { 7 | [Required] 8 | public string FirstName { get; set; } 9 | [Required] 10 | public string LastName { get; set; } 11 | [Required] 12 | public string EmailAddress { get; set; } 13 | [Required] 14 | public string Password { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace Web.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | public class ErrorModel : PageModel 14 | { 15 | public string RequestId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILogger _logger; 20 | 21 | public ErrorModel(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Home page"; 5 | } 6 | 7 |
8 |

Welcome

9 |

Learn about building Web apps with ASP.NET Core.

10 |
11 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace Web.Pages 10 | { 11 | public class IndexModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public IndexModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

@ViewData["Title"]

7 | 8 |

Use this page to detail your site's privacy policy.

9 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace Web.Pages 10 | { 11 | public class PrivacyModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public PrivacyModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/SignUp.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model Web.Pages.SignUpModel 3 | @{ 4 | ViewData["Title"] = "SignUp"; 5 | } 6 | 7 |

Sign Up Form

8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | @if (Model.Mode.ToLower() == "light") 18 | { 19 |

You are in Light Mode

20 | } 21 | else 22 | { 23 |

You are in Dark Mode

24 | } -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/SignUp.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Web.Models; 8 | 9 | namespace Web.Pages 10 | { 11 | public class SignUpModel : PageModel 12 | { 13 | [BindProperty(SupportsGet = true)] 14 | public string Mode { get; set; } = "Light"; 15 | 16 | [BindProperty] 17 | public SignUpDataModel SignUpData { get; set; } = new SignUpDataModel(); 18 | 19 | public void OnGet() 20 | { 21 | 22 | } 23 | 24 | public IActionResult OnPost() 25 | { 26 | if (ModelState.IsValid == false) 27 | { 28 | return Page(); 29 | } 30 | 31 | return RedirectToPage("./ThankYou", new { id = 15 }); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/ThankYou.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model Web.Pages.ThankYouModel 3 | @{ 4 | ViewData["Title"] = "ThankYou"; 5 | } 6 | 7 |

ThankYou

8 | 9 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/ThankYou.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace Web.Pages 9 | { 10 | public class ThankYouModel : PageModel 11 | { 12 | public void OnGet(int id = 0) 13 | { 14 | 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Web 2 | @namespace Web.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace Web 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-33/RazorPagesFormChallenge/Web/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /WCH-33/RazorPagesFormChallenge/Web/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WCH-34/Publishing Web Apps Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-34/Publishing Web Apps Challenge.pdf -------------------------------------------------------------------------------- /WCH-35/String Replacement Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-35/String Replacement Challenge.pdf -------------------------------------------------------------------------------- /WCH-35/StringReplacementChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-35/StringReplacementChallenge/StringReplacementChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29920.165 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{5B1F345D-2B21-4D40-B513-92A48074BCFD}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {5B1F345D-2B21-4D40-B513-92A48074BCFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {5B1F345D-2B21-4D40-B513-92A48074BCFD}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {5B1F345D-2B21-4D40-B513-92A48074BCFD}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {5B1F345D-2B21-4D40-B513-92A48074BCFD}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {02619240-70FC-46D0-AA9F-476E6B04A845} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-35/bonus.txt: -------------------------------------------------------------------------------- 1 | Fred and Bill were walking down the road when Pickle met them at the end of his driveway. "Come join us" said Fred. And so, Pickle joined Fred and Bill and the three of them continued down the road. 2 | 3 | After walking for almost five minutes in complete silence, Pickle finally had had enough. "Why isn't anyone saying anything?" 4 | 5 | "Well", said Bill, "we weren't sure what to say. I mean, we couldn't continue the conversation we were having before you joined us." 6 | 7 | "Yeah", said Fred, "that would spoil the surprise." -------------------------------------------------------------------------------- /WCH-35/primary.txt: -------------------------------------------------------------------------------- 1 | Jim and Diane were walking down the street when Billy met them at the end of his driveway. "Come join us" said Jim. And so, Billy joined Jim and Diane and the three of them continued down the street. 2 | 3 | After walking for almost five minutes in complete silence, Billy finally had had enough. "Why isn't anyone saying anything?" 4 | 5 | "Well", said Diane, "we weren't sure what to say. I mean, we couldn't continue the conversation we were having before you joined us." 6 | 7 | "Yeah", said Jim, "that would spoil the surprise." 8 | -------------------------------------------------------------------------------- /WCH-36/Image Manipulation Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-36/Image Manipulation Challenge.pdf -------------------------------------------------------------------------------- /WCH-36/ImageManipulationChallenge/DesktopUI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WCH-36/ImageManipulationChallenge/DesktopUI/ImageSizeModel.cs: -------------------------------------------------------------------------------- 1 | namespace DesktopUI 2 | { 3 | public class ImageSizeModel 4 | { 5 | public string ImageSizeText { get; set; } 6 | public int Height { get; set; } 7 | public int Width { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WCH-36/ImageManipulationChallenge/DesktopUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace DesktopUI 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Dashboard()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WCH-36/ImageManipulationChallenge/DesktopUI/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DesktopUI.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WCH-36/ImageManipulationChallenge/DesktopUI/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WCH-36/ImageManipulationChallenge/ImageManipulationChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29920.165 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesktopUI", "DesktopUI\DesktopUI.csproj", "{56F3B322-1378-4ED5-937E-51CEF9621221}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {56F3B322-1378-4ED5-937E-51CEF9621221}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {56F3B322-1378-4ED5-937E-51CEF9621221}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {56F3B322-1378-4ED5-937E-51CEF9621221}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {56F3B322-1378-4ED5-937E-51CEF9621221}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {7E0B3502-F749-480A-AA37-212F4C3C1988} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-36/Images/wonder-woman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-36/Images/wonder-woman.jpg -------------------------------------------------------------------------------- /WCH-36/wonder-woman.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-36/wonder-woman.bmp -------------------------------------------------------------------------------- /WCH-37/Searching For Data Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-37/Searching For Data Challenge.pdf -------------------------------------------------------------------------------- /WCH-37/SearchingForDataChallenge/DesktopUI/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WCH-37/SearchingForDataChallenge/DesktopUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace DesktopUI 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Dashboard()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WCH-37/SearchingForDataChallenge/DesktopUI/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DesktopUI.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WCH-37/SearchingForDataChallenge/DesktopUI/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WCH-37/SearchingForDataChallenge/SearchingForDataChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29920.165 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesktopUI", "DesktopUI\DesktopUI.csproj", "{B6F9D627-B7C9-4DE1-95A6-76F6235D494F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B6F9D627-B7C9-4DE1-95A6-76F6235D494F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B6F9D627-B7C9-4DE1-95A6-76F6235D494F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B6F9D627-B7C9-4DE1-95A6-76F6235D494F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B6F9D627-B7C9-4DE1-95A6-76F6235D494F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E9E56F77-CC84-4A76-8142-83E56F75D059} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-38/Extension Methods Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-38/Extension Methods Challenge.pdf -------------------------------------------------------------------------------- /WCH-38/ExtensionMethodsChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-38/ExtensionMethodsChallenge/ConsoleUI/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ConsoleUI 4 | { 5 | public static class Extensions 6 | { 7 | public static void Print(this string input) 8 | { 9 | Console.WriteLine(input); 10 | } 11 | 12 | public static string Excite(this string input) 13 | { 14 | return input.Replace('.', '!'); 15 | } 16 | 17 | public static PersonModel Fill(this PersonModel input) 18 | { 19 | Console.Write("Please enter your first name: "); 20 | input.FirstName = Console.ReadLine(); 21 | 22 | Console.Write("Please enter your last name: "); 23 | input.LastName = Console.ReadLine(); 24 | 25 | Console.Write("Please enter your age: "); 26 | string ageText = Console.ReadLine(); 27 | 28 | input.Age = int.Parse(ageText); 29 | 30 | return input; 31 | } 32 | 33 | public static PersonModel Print(this PersonModel input) 34 | { 35 | Console.WriteLine($"{ input.FirstName } { input.LastName } is { input.Age } years old."); 36 | 37 | return input; 38 | } 39 | 40 | public static double Add(this double input, double x) 41 | { 42 | return input + x; 43 | } 44 | 45 | public static double Subtract(this double input, double x) 46 | { 47 | return input - x; 48 | } 49 | 50 | public static double MultiplyBy(this double input, double x) 51 | { 52 | return input * x; 53 | } 54 | 55 | public static double DivideBy(this double input, double x) 56 | { 57 | return input / x; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /WCH-38/ExtensionMethodsChallenge/ConsoleUI/PersonModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ConsoleUI 6 | { 7 | public class PersonModel 8 | { 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public int Age { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WCH-38/ExtensionMethodsChallenge/ConsoleUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ConsoleUI 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | //string myName = "Frederick James."; 10 | //"Hello World".Print(); 11 | //myName.Print(); 12 | 13 | //myName.Excite().Print(); 14 | 15 | //PersonModel person = new PersonModel(); 16 | 17 | //person.Fill().Print(); 18 | 19 | Console.WriteLine(4.15.Add(5).Subtract(2).MultiplyBy(8).DivideBy(3).Add(34)); 20 | 21 | Console.ReadLine(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WCH-38/ExtensionMethodsChallenge/ExtensionMethodsChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29920.165 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleUI", "ConsoleUI\ConsoleUI.csproj", "{2647F2B5-C6C0-4E6B-8983-5EC307957C68}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2647F2B5-C6C0-4E6B-8983-5EC307957C68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2647F2B5-C6C0-4E6B-8983-5EC307957C68}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2647F2B5-C6C0-4E6B-8983-5EC307957C68}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2647F2B5-C6C0-4E6B-8983-5EC307957C68}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {9D3CCB7A-137B-471B-A76F-B8A477E7FCE7} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-38/ExtensionMethodsChallenge/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class Class1 4 | { 5 | public Class1() 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /WCH-46/AspNetCoreWithDockerChallenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-46/AspNetCoreWithDockerChallenge.pdf -------------------------------------------------------------------------------- /WCH-47/GitBranchesChallenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-47/GitBranchesChallenge.pdf -------------------------------------------------------------------------------- /WCH-48/TestData.txt: -------------------------------------------------------------------------------- 1 | Tim,Corey,tim@iamtimcorey.com 2 | Sue,Storm,sue@stormy.net 3 | Robert,Smith,robby@smithy.org -------------------------------------------------------------------------------- /WCH-48/Web File Uploads Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-48/Web File Uploads Challenge.pdf -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29911.84 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebFileUploadSite", "WebFileUploadSite\WebFileUploadSite.csproj", "{074BE25D-DEB3-4F3E-BE51-9F38B9427BEF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {074BE25D-DEB3-4F3E-BE51-9F38B9427BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {074BE25D-DEB3-4F3E-BE51-9F38B9427BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {074BE25D-DEB3-4F3E-BE51-9F38B9427BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {074BE25D-DEB3-4F3E-BE51-9F38B9427BEF}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {0A2D70FC-2500-44A2-81E1-1BD7353639D6} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Models/PersonModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebFileUploadSite.Models 2 | { 3 | public class PersonModel 4 | { 5 | public string FirstName { get; set; } 6 | public string LastName { get; set; } 7 | public string EmailAddress { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace WebFileUploadSite.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | public class ErrorModel : PageModel 14 | { 15 | public string RequestId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILogger _logger; 20 | 21 | public ErrorModel(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Home page"; 5 | } 6 | 7 |
8 |

Welcome

9 |

Learn about building Web apps with ASP.NET Core.

10 |
11 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace WebFileUploadSite.Pages 10 | { 11 | public class IndexModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public IndexModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

@ViewData["Title"]

7 | 8 |

Use this page to detail your site's privacy policy.

9 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace WebFileUploadSite.Pages 10 | { 11 | public class PrivacyModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public PrivacyModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/UploadAndParse.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model WebFileUploadSite.Pages.UploadAndParseModel 3 | @{ 4 | ViewData["Title"] = "UploadAndParse"; 5 | } 6 | 7 |

Upload and Parse

8 | 9 |
10 |
11 | 12 | 13 |
14 | 15 |
-------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/UploadAndSave.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model WebFileUploadSite.Pages.UploadAndSaveModel 3 | @{ 4 | ViewData["Title"] = "UploadAndSave"; 5 | } 6 | 7 |

Upload and Save

8 | 9 |
10 |
11 | 12 | 13 |
14 | 15 |
-------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebFileUploadSite 2 | @namespace WebFileUploadSite.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace WebFileUploadSite 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/WebFileUploadSite.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-48/WebFileUploadChallenge/WebFileUploadSite/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WCH-48/WebFileUploadChallenge/WebFileUploadSite/wwwroot/uploads/c4a1c1d1-d6ab-4768-9ffe-71b82646defa.txt: -------------------------------------------------------------------------------- 1 | Tim,Corey,tim@iamtimcorey.com 2 | Sue,Storm,sue@stormy.net 3 | Robert,Smith,robby@smithy.org -------------------------------------------------------------------------------- /WCH-49/Azure DevOps Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-49/Azure DevOps Challenge.pdf -------------------------------------------------------------------------------- /WCH-50/Bulk File Renaming Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/Bulk File Renaming Challenge.pdf -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles.zip -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/Bonus Challenge Results.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles/Bonus Challenge Results.PNG -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/BonusChallengeFiles/Do Not Call Registry.txt: -------------------------------------------------------------------------------- 1 | Do Not Call Registry 2 | It doesn't matter what is in here, everyone will still ignore it. -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/BonusChallengeFiles/This is a CSV file.csv: -------------------------------------------------------------------------------- 1 | This is a CSV file 2 | Did you get it right? 3 | Note that this is actually a well-formed file. -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/BonusChallengeFiles/Top Secret Data.txt: -------------------------------------------------------------------------------- 1 | Top Secret Data 2 | Don't let anyone know what it is. -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/BonusChallengeFiles/better test of your system.txt: -------------------------------------------------------------------------------- 1 | better test of your system 2 | Did this work? Did you include the extra spaces? -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/Primary Challenge Results.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles/Primary Challenge Results.PNG -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/First Test File For Fredco.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/First Test File For Fredco.txt -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Fredco Bonus File.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Fredco Bonus File.txt -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Fredco By Fredco Inc.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Fredco By Fredco Inc.txt -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Pacmen Are People Too.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Pacmen Are People Too.txt -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Payroll For Fredco Corp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Payroll For Fredco Corp.txt -------------------------------------------------------------------------------- /WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Test Document For Testing.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-50/BulkFileRenamingChallengeStarterFiles/PrimaryChallengeFiles/Test Document For Testing.txt -------------------------------------------------------------------------------- /WCH-50/BulkRenamingChallenge/BulkRenamingChallenge.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29911.84 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BulkRenamingConsole", "BulkRenamingConsole\BulkRenamingConsole.csproj", "{13982CF0-73B9-4E90-B163-0251D5836750}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {13982CF0-73B9-4E90-B163-0251D5836750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {13982CF0-73B9-4E90-B163-0251D5836750}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {13982CF0-73B9-4E90-B163-0251D5836750}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {13982CF0-73B9-4E90-B163-0251D5836750}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {EDBC5BB7-F031-4EAE-9B27-A0B5EF0622FC} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WCH-50/BulkRenamingChallenge/BulkRenamingConsole/BulkRenamingConsole.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WCH-51/Bonus/TimerFunction/TimerFunction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Azure.WebJobs; 3 | using Microsoft.Azure.WebJobs.Host; 4 | using Microsoft.Extensions.Logging; 5 | 6 | namespace Company.Function 7 | { 8 | public static class TimerFunction 9 | { 10 | [FunctionName("TimerFunction")] 11 | public static void Run([TimerTrigger("0 */5 * * * *")]TimerInfo myTimer, ILogger log) 12 | { 13 | log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}"); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WCH-51/Bonus/TimerFunction/TimerFunction.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netcoreapp3.0 4 | V3 5 | 6 | 7 | 8 | 9 | 10 | 11 | PreserveNewest 12 | 13 | 14 | PreserveNewest 15 | Never 16 | 17 | 18 | -------------------------------------------------------------------------------- /WCH-51/Bonus/TimerFunction/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0" 3 | } -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeLib/ChallengeLib.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeLib/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ChallengeLib 4 | { 5 | public class Class1 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/ChallengeWeb.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | netcoreapp3.1 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace ChallengeWeb.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | public class ErrorModel : PageModel 14 | { 15 | public string RequestId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILogger _logger; 20 | 21 | public ErrorModel(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Home page"; 5 | } 6 | 7 |
8 |

Welcome

9 |

Learn about building Web apps with ASP.NET Core.

10 |
11 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace ChallengeWeb.Pages 10 | { 11 | public class IndexModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public IndexModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

@ViewData["Title"]

7 | 8 |

Use this page to detail your site's privacy policy.

9 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace ChallengeWeb.Pages 10 | { 11 | public class PrivacyModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public PrivacyModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using ChallengeWeb 2 | @namespace ChallengeWeb.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace ChallengeWeb 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-51/Primary/ChallengeWeb/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /WCH-51/Primary/ChallengeWeb/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WCH-51/dotnet Command Line Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-51/dotnet Command Line Challenge.pdf -------------------------------------------------------------------------------- /WCH-52/FirstNames.txt: -------------------------------------------------------------------------------- 1 | Tim 2 | Bill 3 | Frank 4 | George 5 | Mary 6 | Sue 7 | Greg 8 | Billbo 9 | Sarah -------------------------------------------------------------------------------- /WCH-52/LastNames.txt: -------------------------------------------------------------------------------- 1 | Smith 2 | Jones 3 | Storm 4 | Baggins 5 | Corey 6 | Martin -------------------------------------------------------------------------------- /WCH-52/Sample Data Challenge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freddie2025/WeeklyChallenge/5ad75834a569a860019ebad4620ac973ac849e82/WCH-52/Sample Data Challenge.pdf -------------------------------------------------------------------------------- /WCH-52/SampleDataChallenge/ConsoleUI/ConsoleUI.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /WCH-52/SampleDataChallenge/ConsoleUI/Program.cs: -------------------------------------------------------------------------------- 1 | using SampleDataLibrary; 2 | using System; 3 | 4 | namespace ConsoleUI 5 | { 6 | class Program 7 | { 8 | static void Main(string[] args) 9 | { 10 | Sample sample = new Sample(); 11 | 12 | for (int i = 0; i < 10; i++) 13 | { 14 | Console.WriteLine(sample.GenerateRandomNumberMatch("(xxx) xxx-xxxx")); 15 | } 16 | 17 | Console.ReadLine(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WCH-52/SampleDataChallenge/SampleDataLibrary/SampleDataLibrary.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | --------------------------------------------------------------------------------