Program.cs
using BenchmarkDotNet.Running;
namespace Benchmarks
{
class Program
{
static void Main()
{
Program.cs
using BenchmarkDotNet.Running;
namespace Benchmarks
{
class Program
{
static void Main()
{
const glob = require("glob"); | |
const fs = require('fs'); | |
const mainDir = 'angular-cli-demo'; | |
const dups = {}; | |
const packageJsons = glob.sync(`${mainDir}/node_modules/**/package.json`); | |
for (const packageJson of packageJsons) { | |
try { | |
const json = require(packageJson); | |
if(!json.name || !json.version) { |
[ | |
"https://registry.npmjs.org/1to2/-/1to2-1.0.0.tgz", | |
"https://registry.npmjs.org/7zip-bin/-/7zip-bin-0.0.3.tgz", | |
"https://registry.npmjs.org/7zip-bin-win/-/7zip-bin-win-2.1.0.tgz", | |
"https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-2.2.3.tgz", | |
"https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-2.4.1.tgz", | |
"https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-2.4.10.tgz", | |
"https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-2.4.6.tgz", | |
"https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-2.4.7.tgz", | |
"https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-4.0.0.tgz", |
{"1to2":["1.0.0"],"7zip-bin":["0.0.3"],"7zip-bin-win":["2.1.0"],"@angular/compiler-cli":["2.2.3","2.4.1","2.4.10","2.4.6","2.4.7","4.0.0","4.0.2","4.0.3","4.1.1","4.1.3","4.2.4","4.2.5","4.3.5","4.3.6","4.4.6","5.0.0","5.0.5","5.2.1","5.2.2"],"Base64":["0.2.1"],"CSSselect":["0.4.1"],"CSSwhat":["0.4.7"],"JSONStream":["0.10.0","0.4.3","0.6.4","0.7.4","0.8.4","1.0.3","1.0.6","1.0.7","1.1.1","1.2.1","1.3.0","1.3.1","1.3.2"],"JSV":["4.0.2"],"MD5":["1.3.0"],"NodObjC":["1.0.0"],"Swan":["1.0.0","1.0.1","1.0.2","1.0.3"],"URIjs":["1.16.1"],"a":["1.0.0"],"aabb-3d":["0.0.0"],"abab":["1.0.3","1.0.4"],"abbrev":["1.0.3","1.0.5","1.0.7","1.0.9","1.1.0","1.1.1"],"absolute":["0.0.1"],"absolute-path":["0.0.0"],"abstract-leveldown":["0.12.3","0.12.4","2.4.1","2.6.0","2.6.1"],"accept":["1.0.0","2.1.0","2.1.1"],"accepts":["1.0.0","1.0.6","1.0.7","1.1.4","1.2.13","1.2.7","1.3.2","1.3.3","1.3.4","1.3.6"],"access-control":["0.0.8"],"accessibility-developer-tools":["2.10.0"],"accessory":["1.0.1"],"accord":["0.20.5","0.22.3","0.23.0"," |
const { existSync, writeFileSync, mkdirSync } = require('fs'); | |
const { execSync } = require('child_process'); | |
if (!existsSync('package.json')) { | |
writeFileSync('package.json', JSON.stringify({ dependencies: {} }, null, 2)); | |
} | |
function saferequire(name) { | |
try { | |
return require(name); |
namespace Playground.Tests | |
{ | |
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] | |
public class FlakyTestMethodAttribute : TestMethodAttribute | |
{ | |
public int RetryCount { get; set; } | |
public override TestResult[] Execute(ITestMethod testMethod) | |
{ | |
TestResult result = testMethod.Invoke(new object[0]); |
using Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.Diagnostics; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.CodeFixes; | |
using System.Collections.Generic; | |
using System.Collections.Immutable; | |
using System.Threading.Tasks; | |
using System.Threading; | |
using System.Linq; |
const extensions = document.querySelectorAll('.carousel-item'); | |
extensions.forEach(e => { | |
const image = e.querySelector('img'); | |
if (image === null) return; | |
addDownloadLink(image); | |
}); | |
/** | |
* @param image {HTMLImageElement} |