Currently targeting NET Core
project using System.Text.Json 7.0.0
as a Transitive Package will be flagged as high Severity using
dotnet list package --include-transitive --vulnerable
To circumvent, add the following to the project file.
using System.Numerics; | |
namespace Extensions; | |
public static class GenericINumberExtensions | |
{ | |
public static T[] Merge<T>(this T[] container, T[] T1) where T : INumber<T> | |
=> [.. container, .. T1]; | |
public static T[] Merge<T>(this T[] container, T[] T1, T[] T2) where T : INumber<T> |
using System.Diagnostics; | |
using NewStuffApp.Models; | |
namespace NewStuffApp.Classes; | |
/// <summary> | |
/// Provides a set of static methods for iterating over collections of various types | |
/// (e.g., strings, integers, and Person) and performing operations on them. | |
/// </summary> | |
internal class Params |
public static class Helpers | |
{ | |
/// <summary> | |
/// Retrieves the names of all entities that implement a specified interface type. | |
/// </summary> | |
/// <typeparam name="T"> | |
/// The interface type to search for. Must be a class type and an interface. | |
/// </typeparam> |
var members = MemberOperations.MembersList(); | |
List<GroupedMember> groups = MemberOperations.GroupedMembers(members); | |
foreach (GroupedMember groupMember in groups) | |
{ | |
Console.WriteLine(groupMember); | |
foreach (Member member in groupMember.Lists) | |
{ | |
Console.WriteLine($"\t{member.Id,-3}{member.Active}"); | |
} |
USE tempdb | |
GO | |
-- Prepare the scene | |
CREATE TABLE #ChristmasScene | |
( |
SELECT t.name AS TableName, | |
p.rows AS [RowCount] | |
FROM sys.tables t | |
INNER JOIN sys.partitions p | |
ON t.object_id = p.object_id | |
WHERE p.index_id IN ( 0, 1 ) | |
ORDER BY p.rows DESC, | |
t.name; |
/* | |
* var pastDate = new Date('2014-10-01T02:30'); | |
* var message = fromNow(pastDate); | |
* //=> '2 days ago' | |
* | |
* @param {Date} Native JavaScript Date object | |
* @return {string} | |
*/ | |
function fromNow(date) { | |
var seconds = Math.floor((new Date() - date) / 1000); |
using System.Text.RegularExpressions; | |
namespace Net9Features; | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
const string sentence = "a test to see if"; |
public partial class Demo | |
{ | |
[OverloadResolutionPriority(2)] | |
public static void DisplayInvoice(string invoice ) | |
{ | |
Console.WriteLine($"invoice: {NextValue(invoice)}"); | |
} | |
[OverloadResolutionPriority(-1)] | |
public static void DisplayInvoice(string invoice, int count = 3) |
Currently targeting NET Core
project using System.Text.Json 7.0.0
as a Transitive Package will be flagged as high Severity using
dotnet list package --include-transitive --vulnerable
To circumvent, add the following to the project file.