active: true derived: false level: 1.5 links:
- REQ004: 94f4db8d1a50ab62ee0edec1e28c0afb normative: true ref: '' reviewed: 98ba42c551fec65d9796fee72d15f844 title: Tutorial Requirement 17
using System; | |
using System.IO; | |
using Nancy; | |
namespace WebService.Extensions | |
{ | |
public static class FormatterExtensions | |
{ | |
public static Response AsPartialFile(this IResponseFormatter formatter, string applicationRelativeFilePath, string contentType) | |
{ |
import {PUSH, REPLACE} from "redux-little-router"; | |
import defaultCreateLocation from "redux-little-router/lib/util/create-location.js"; | |
// Adapted from https://github.com/FormidableLabs/redux-little-router | |
// specifically the Link component (https://github.com/FormidableLabs/redux-little-router/blob/master/src/link.js) | |
const normalizeHref = ({ basename, pathname, search }) => | |
`${basename || ''}${pathname}${search || ''}`; | |
const normalizeLocation = href => { |
"use strict"; | |
/** | |
* | |
* This source code is licensed under the BSD-style license. | |
* Portions of code derived from "babel-jest", copyrighted by | |
* Facebook, Inc. and released under a BSD-style license. | |
* | |
*/ |
using System; | |
using System.Globalization; | |
using NUnit.Framework; | |
namespace UnitTestProject1 | |
{ | |
[TestFixture] | |
public class SQLiteDateRoundTripTests | |
{ | |
private int _optionToStringInSqLite = 1; // Currently implemented in System.Data.SQLite |
using System; | |
using System.Security.Principal; | |
internal static class IdentityExtensions | |
{ | |
internal static string GetNormalizedLogin(this IIdentity identity) | |
{ | |
if (identity == null) | |
{ | |
throw new ArgumentNullException(nameof(identity)); |
active: true derived: false level: 1.5 links:
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Utility | |
{ | |
/// <summary> | |
/// Helper methods for working with <see cref="Guid"/>. | |
/// </summary> |
'use strict'; | |
const util = require('util'); | |
const format = util.format; | |
const http = require('http'); | |
const chalk = require('chalk'); | |
const stream = require('stream'); | |
const _merge = require('lodash/merge'); | |
const _get = require('lodash/get'); |
import {GraphQLExtension, GraphQLResponse} from 'graphql-extensions'; | |
import {formatApolloErrors} from 'apollo-server-errors'; | |
import {GraphQLError, GraphQLFormattedError} from 'graphql'; | |
import Logger from 'bunyan'; | |
import icepick from 'icepick'; | |
const filterOutErrorPaths = [ | |
['extensions', 'exception', 'options', 'auth', 'bearer'], | |
[ | |
'extensions', |
-- Based on https://stackoverflow.com/a/2926213/25182 | |
WITH a AS (SELECT LTRIM(dut_eosonum) AS s, '' AS x, 0 AS n | |
FROM dbo.[dutmast] | |
WHERE LEN(dut_eosonum)>0 | |
UNION ALL | |
SELECT a.s, SUBSTRING(a.s, n+1, 1) AS x, n+1 AS n FROM a WHERE n<LEN(a.s)) | |
SELECT x, COUNT(*) AS c FROM a WHERE n>0 GROUP BY x ORDER BY x | |
OPTION(MAXRECURSION 0); |