This file contains 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 multiplyTwoNumbers(num: number, multiplier: number) { | |
let result = 0; | |
for (let index = 0; index < multiplier; index++) { | |
result += num; | |
} | |
return result; | |
} | |
function multiplyNumbers(...nums: number[]) { | |
let result = 0; |
This file contains 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
using System.Linq; | |
using System.Linq.Expressions; | |
namespace System.Collections.Generic | |
{ | |
public static class ListExtensions | |
{ | |
/// <summary> | |
/// Takes the current list and returns a List of Lists. A.K.A. a batch of lists where each list is no larger than the |
This file contains 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
# | |
# FileChangesForRelease.ps1 | |
# | |
# Gets the list of .rdl files that were added or modified since the previous commit (based on the PR) and copies them to the staging directory | |
# | |
$urlBase = $env:SYSTEM_TEAMFOUNDATIONSERVERURI + $env:SYSTEM_TEAMPROJECT + "/_apis/"; | |
$accessToken = $env:SYSTEM_ACCESSTOKEN; | |
$auth = "Bearer $accessToken"; | |
$accept = "application/json"; |
This file contains 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
# Place for local script to be developed | |
# Please note that all place holders are in all caps | |
$urlBase = "https://{YOUR_VSTS_ACCOUNT}.visualstudio.com/DefaultCollection/{PROJECT_NAME}/_apis/"; | |
# You can leave the username blank | |
$username = ""; | |
$password = "YOUR_PERSONAL_ACCESS_TOKEN"; |
This file contains 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
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Security; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace System | |
{ | |
public static class StringExtensions |
This file contains 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
using System.IO; | |
using System.Text; | |
using Funqy.CSharp; | |
namespace Hallmanac.SqlScriptConcat | |
{ | |
public class BundleSqlScripts | |
{ |
This file contains 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
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
namespace Hallmanac | |
{ | |
public class DatabaseUtils | |
{ | |
public DataTable ConvertToDataTable<T>(IList<T> list) |
This file contains 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
using System.Collections.Generic; | |
using System.Linq; | |
namespace Hallmanac | |
{ | |
public class UsCounties | |
{ | |
public static UsCountyDetails FlAlachua { get; } = new UsCountyDetails("74227e90-7205-4c22-aab0-590bb06b7057", "Alachua", AllUsStates.Florida, 1); | |
public static UsCountyDetails FlBaker { get; } = new UsCountyDetails("cb491b8d-481b-4970-a1d0-a92f1832511e", "Baker", AllUsStates.Florida, 2); | |
public static UsCountyDetails FlBay { get; } = new UsCountyDetails("5b3be6cb-3f04-49c3-a94b-1f260c2688b0", "Bay", AllUsStates.Florida, 3); |
This file contains 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
using System.Collections.Generic; | |
using System.Linq; | |
namespace Hallmanac | |
{ | |
public class AllUsStates | |
{ | |
public static UsState Alabama { get; } = new UsState("a1103958-42c9-4fda-ab46-a04d41a4783b", 1, "Alabama", "AL"); | |
public static UsState Alaska { get; } = new UsState("afa95187-e5a6-44c6-baf2-0dbb3dcc93b1", 2, "Alaska", "AK"); | |
public static UsState Arizona { get; } = new UsState("c090438e-5f7f-427f-a191-d6ea1be8185b", 3, "Arizona", "AZ"); |
This file contains 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
/** @ngInject */ | |
function _getHeaderInterceptor(utils: Nebbia.IUtils) { | |
const interceptor: ng.IHttpInterceptor = { | |
request: (config: ng.IRequestConfig) => { | |
const isGet = utils.stringContains("GET", config.method, false); | |
const hasJsonAcceptType = utils.stringContains("/json", config.headers["Accept"], false); | |
const isHtmlFileRequest = _isHtmlUrl(); | |
if (isGet && isHtmlFileRequest && hasJsonAcceptType) { | |
config.headers["Accept"] = "application/html, text/html, */*"; | |
} |