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
private static string GenerateVersionId(Guid extensionId, string version, string? targetPlatform) | |
{ | |
StringBuilder builder = new(); | |
builder.Append(extensionId.ToString("D")); // use default string format | |
builder.Append('|'); // extension ID cannot contain '|' | |
builder.Append(version.ToLowerInvariant()); // SQL collation is case insensitive | |
if (targetPlatform is not null) | |
{ |
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; | |
using System.Linq; | |
using Azure.Core; | |
using Azure.Identity; | |
using Microsoft.WindowsAzure.Storage.Auth; | |
using Microsoft.WindowsAzure.Storage.Blob; | |
internal class Program | |
{ | |
private static void Main(string[] args) |
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
---------------------------------------- | |
at Knapcode.FactorioTools.OilField.LocationIntSet..ctor(Int32 width, Int32 height) | |
at Knapcode.FactorioTools.OilField.Context.GetLocationSet() | |
at Knapcode.FactorioTools.SetHandling.ToSet(IEnumerable`1 items, Context context) | |
at Knapcode.FactorioTools.OilField.AddElectricPoles.GetElectricPoleGroups(Context context, Dictionary`2 electricPoles) | |
at Knapcode.FactorioTools.OilField.AddElectricPoles.ConnectElectricPoles(Context context, Dictionary`2 electricPoles) | |
at Knapcode.FactorioTools.OilField.AddElectricPoles.Execute(Context context, LocationIntSet avoid, Boolean allowRetries) | |
at Knapcode.FactorioTools.OilField.Planner.Execute(OilFieldOptions options, Blueprint blueprint, LocationIntSet electricPolesAvoid, EletricPolesMode electricPolesMode) | |
at Knapcode.FactorioTools.OilField.Planner.Execute(OilFieldOptions options, Blueprint inputBlueprint) | |
Total: 6775 |
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.Concurrent; | |
using System.Diagnostics; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
using Xunit; | |
Console.WriteLine("Starting..."); | |
var indexUrl = "https://api.nuget.org/v3/catalog0/index.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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net7.0</TargetFramework> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<Nullable>enable</Nullable> | |
</PropertyGroup> | |
<ItemGroup> |
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.Net.Http.Headers; | |
using Azure.Core.Pipeline; | |
using Azure.Data.Tables; | |
using Azure.Storage.Blobs; | |
using Azure.Storage.Queues; | |
var connectionString = "UseDevelopmentStorage=true"; | |
// var connectionString = "DefaultEndpointsProtocol=https;AccountName=REDACTED;AccountKey=REDACTED;EndpointSuffix=core.windows.net"; | |
var pipeline = new HttpClientTransport(new TestHandler { InnerHandler = new HttpClientHandler() }); |
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 Azure.Data.Tables; | |
using Azure.Storage.Blobs; | |
using Azure.Storage.Queues; | |
using Azure.Storage.Queues.Models; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Extensions; | |
using System.Diagnostics; | |
using System.Net; | |
using System.Text; |
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.Diagnostics.CodeAnalysis; | |
using System.Net; | |
using System.Text.Json; | |
using Azure; | |
using Azure.Core; | |
using Azure.Core.Pipeline; | |
using Azure.Data.Tables; | |
var messageHandler = new TestHandler { InnerHandler = new SocketsHttpHandler() }; | |
var serviceClient = new TableServiceClient( |
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
let since = ago(1d); | |
let bucket = 5m; | |
let dt = datatable(table: string)[]; | |
dt | |
| union (availabilityResults | where timestamp > since | summarize sum(estimate_data_size(*)) by bin(timestamp, bucket), cloud_RoleName | extend table = "availabilityResults") | |
| union (browserTimings | where timestamp > since | summarize sum(estimate_data_size(*)) by bin(timestamp, bucket), cloud_RoleName | extend table = "browserTimings") | |
| union (customEvents | where timestamp > since | summarize sum(estimate_data_size(*)) by bin(timestamp, bucket), cloud_RoleName | extend table = "customEvents") | |
| union (customMetrics | where timestamp > since | summarize sum(estimate_data_size(*)) by bin(timestamp, bucket), cloud_RoleName | extend table = "customMetrics") | |
| union (dependencies | where timestamp > since | summarize sum(estimate_data_size(*)) by bin(timestamp, bucket), cloud_RoleName | extend table = "dependencies") | |
| union (exceptions | where timestamp > since | summarize sum(estimate_data_size(*)) by bin(timestamp, bucket), clou |
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
-- Marks all caged, trainable creatures for training. | |
-- Author: Joel Verhagen (@joelverhagen on GitHub) | |
local utils = require('utils') | |
function getTrainingAssignment(unit) | |
local training_assignment, _, _ = utils.binsearch( | |
df.global.plotinfo.equipment.training_assignments, | |
unit.id, | |
'animal_id') |
NewerOlder