This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static Color FromHexa(string hexaColor) | |
| { | |
| return Color.FromArgb( | |
| Convert.ToByte(hexaColor.Substring(1, 2), 16), | |
| Convert.ToByte(hexaColor.Substring(3, 2), 16), | |
| Convert.ToByte(hexaColor.Substring(5, 2), 16), | |
| Convert.ToByte(hexaColor.Substring(7, 2), 16) | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function CompanyViewModel (data) { | |
| var companyMapping = { | |
| 'ignore': ['address', 'website'], | |
| 'name': { | |
| 'create': function (options) { | |
| return ko.observable(options.data.toUpperCase()); | |
| } | |
| }, | |
| 'employees': { | |
| key: 'peronsId', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| set msbuild="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" | |
| set /p configChoice=Choose your build configuration (Debug = d, Release = r? (d, r) | |
| if /i "%configChoice:~,1%" EQU "D" set config=Debug | |
| if /i "%configChoice:~,1%" EQU "R" set config=Release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- The Clean Target --> | |
| <ItemGroup> | |
| <ProjectFiles Include="**\*.csproj" /> | |
| </ItemGroup> | |
| <Target Name="Clean"> | |
| <Message Importance="high" Text="Cleaning folders"/> | |
| <RemoveDir Directories="$(ReportsPath)" Condition="Exists('$(ReportsPath)')" /> | |
| <MakeDir Directories = "$(ReportsPath);$(ReportsPath)\MSpec;$(ReportsPath)\Coverage" /> | |
| <!-- Clean the source code projects --> | |
| <MSBuild Projects="@(ProjectFiles)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <PropertyGroup> | |
| <!-- OpenCover --> | |
| <!-- The tools path for OpenCover --> | |
| <OpenCoverPath>$(Packages)\OpenCover.4.5.1403</OpenCoverPath> | |
| <OpenCoverExe>OpenCover.Console.exe</OpenCoverExe> | |
| <OpenCoverFilter>-[*Specs*]* +[*]*</OpenCoverFilter> | |
| <ReportGeneratorPath>$(Packages)\ReportGenerator.1.8.1.0</ReportGeneratorPath> | |
| <ReportGeneratorExe>ReportGenerator.exe</ReportGeneratorExe> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Target Name="CI" DependsOnTargets="LoadNuGetPackages;Clean;Compile;CodeCoverage;Specs"></Target> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var colors = require('colors'); | |
| console.log('Hello '.red + 'Node.js'.green); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| 'use strict'; | |
| var currentDate = new Date(), | |
| christmas = Date.parse('Dec 25, ' + currentDate.getFullYear()), | |
| newYear = Date.parse('Jan 1, ' + currentDate.getFullYear() + 1), | |
| daysToChristmas = Math.round((christmas-today) / (1000 * 60 * 60 * 24)), | |
| daysToNewYear = Math.round((newYear-today) / (1000 * 60 * 60 * 24)); | |
| if (daysToChristmas === 0) { | |
| alert('Merry Christmas!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grunt.registerTask('ci', ['jshint', 'concat', 'uglify', 'less', 'cssmin']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "flag" | |
| ) | |
| var ( | |
| listenAddr string | |
| ) |