using System;
using Microsoft.Data.Sqlite;
class Program
{
static int Main()
{
try
{Scope touched: Engine/Disk/MemoryCache.cs, Engine/Structures/PageBuffer.cs, LiteDB.Tests/Internals/Cache_Tests.cs
Theme: Make the in-memory page cache tunable (profiles) and keep its free list in check with an on-demand cleaner guarded by a semaphore and per-page eviction flags.
Promising direction: explicit cache “profiles” (Mobile/Desktop/Server) and a safer cleanup handshake (TryBeginEvict/MarkReusable) add real tuning and safety hooks. However, the current implementation wires cleanup into hot paths and repeatedly calls ConcurrentQueue.Count (which is O(n) on .NET). That risks CPU overhead and read-path tail latency. The profile defaults are conservative and may over-trim the free list, increasing LOH churn during bursts. Unit tests don’t verify behavior, only “doesn’t throw”.
| #!/bin/bash | |
| # Parameterizable .NET setup script with parallel execution, smart caching, and tool integration. | |
| # install with eg: curl -sSL ... | bash -s -- -v 7.0 -t "dotnet-ef,dotnet-aspnet-codegenerator,dotnet-try" | |
| set -e | |
| # --- Default Configuration --- | |
| DOTNET_VERSION="8.0" # Default .NET version | |
| APP_DIR="/app" # Default application directory | |
| # Default global tools. If a tool name is passed without a version, | |
| # it will be automatically pinned to the major .NET version being installed (e.g., "dotnet-ef" -> "dotnet-ef:8.*"). |
| #!/usr/bin/env python3 | |
| import json | |
| import os | |
| import shlex | |
| import subprocess | |
| from datetime import datetime, timedelta, timezone | |
| def run(cmd): | |
| # Explicitly pass the environment, which can solve obscure issues on Windows. |
| /** | |
| * This script automates the process of deleting ALL tasks, starting from the last one. | |
| * It is designed to be run in the browser's developer console. | |
| */ | |
| async function deleteAllTasksReverse() { | |
| // 1. Find all task options buttons. | |
| const allOptionsButtons = document.querySelectorAll("swebot-task-tile > swebot-task-options > button"); | |
| if (allOptionsButtons.length === 0) { | |
| console.log("No tasks found to delete."); |
| using System.Reflection; | |
| public class DependencyNode | |
| { | |
| public string ServiceType { get; set; } = string.Empty; | |
| public string? ImplementationType { get; set; } | |
| public string Lifetime { get; set; } = string.Empty; | |
| public string RegistrationMethod { get; set; } = "Unknown"; // e.g., Type, Factory, Instance, Collection | |
| public List<DependencyNode> Dependencies { get; set; } = new List<DependencyNode>(); | |
| public bool IsCycleDetected { get; set; } = false; |
| using System.Diagnostics; | |
| using LiteDB; | |
| namespace LiteDBLoadTest; | |
| internal class Program | |
| { | |
| private static async Task Main(string[] args) | |
| { | |
| var cts = new CancellationTokenSource(); |
| using Microsoft.CodeAnalysis; | |
| using Microsoft.CodeAnalysis.CSharp; | |
| using SourceGeneratorTestHelpers; | |
| namespace Generator.Equals.DynamicGenerationTests; | |
| public class UnitTest1 | |
| { | |
| [Fact] | |
| public void Test1() |
| public record GenericArgumentResult(Type RequestedType, Type DirectSubclass, Type[] GenericArguments); | |
| public static class GenericTypeHelper | |
| { | |
| /// <summary> | |
| /// Returns <see cref="TEntity"/> of <see cref="EntityTypeBuilder{TEntity}"/>, | |
| /// even from <see cref="EntityTypeBuilderOfEntity"/> : <see cref="EntityTypeBuilder{TEntity}"/>. | |
| /// </summary> | |
| /// <param name="concreteType">For e.g EntityTypeBuilderOfEntity.</param> | |
| /// <param name="genericDefinition">for e.g typeof(<see cref="EntityTypeBuilder{}"/>).</param> |
| // ==UserScript== | |
| // @name OpenAI Chat GPT-4o enforce | |
| // @version 1 | |
| // @grant none | |
| // @description This script enforces the GPT-4o model on the OpenAI Chat website | |
| // @match https://chatgpt.com/* | |
| // @run-at document-end | |
| // ==/UserScript== | |
| (function() { |