Quivr, your second brain, utilizes the power of GenerativeAI to store and retrieve unstructured information. Think of it as Obsidian, but turbocharged with AI capabilities.
Enumهای دات نت با [Flags] attribute, ویژگی قدرتمندی است که امکان ذخیره و ترکیب چندین گزینه یا Feature را تنها به صورت یک مقدار ثابت فراهم میکند که از طریق Bitwise operatorها میتوانیم به ترکیب چندین Enum بپردازیم و یا از طریق این مقدار ثابت به تک تک اعضای تشکیل دهنده آن برسیم. ولی مشکل بزرگی این این ویژگی دارد محدودیت آن است که برای Enum هایی از نوع int تنها 32 آیتم و از نوع long تنها 64 مورد را پشتیبانی میکند. این مشکل سبب میشود در اکثر سناریوها به سراغ این ویژگی نرویم,
به طور مثال برای تعریف دسترسیهای یک نرم افزار به صورت Strongly Type به احتمال زیاد با بزرگتر شدن برنامه در آینده به مشکل برخورد میکنیم.
InfiniteEnumFlags کتابخانه کوچکی است که تمام امکانات [Flags] را در اختیار ما میگذارد و میتواند حدود 2.1 میلیارد آیتم را پشتیبانی کند.
public class Permission : InfiniteEnum<Permission> { public static readonly Flag<Permission> None = new(-1); public static readonly Flag<Permission> ViewRoles = new(0); public static readonly Flag<Permission> ManageRoles = new(1); public static readonly Flag<Permission> ViewUsers = new(2); public static readonly Flag<Permission> ManageUsers = new(3); public static readonly Flag<Permission> ConfigureAccessControl = new(4); public static readonly Flag<Permission> Counter = new(5); public static readonly Flag<Permission> Forecast = new(6); public static readonly Flag<Permission> ViewAccessControl = new(7); // We can support up to 2,147,483,647 items }
مثال استفاده از آن برای تعریف سطح دسترسیها در برنامههای Asp.net core در فولدر Example این مخزن میتوانید پیدا کنید.
git clone --recurse-submodules https://github.com/alirezanet/InfiniteEnumFlags.git
If you maintain an open-source project in the range of 10k-200k lines of code, I strongly encourage you to add an ARCHITECTURE document next to README and CONTRIBUTING. Before going into the details of why and how, I want to emphasize that this is not another “docs are good, write more docs” advice. I am pretty sloppy about documentation, and, eg, I often use just “simplify” as a commit message. Nonetheless, I feel strongly about the issue, even to the point of pestering you:-)
jq is a lightweight and flexible command-line JSON processor.
You can also try it online at jqplay.org
Major changes since Orleans 2.0
A new scheduler, which alone increased performance by over 30% in some cases
A new code generator based on Roslyn code analysis
Rewritten cluster membership for improved recovery speed
Co-hosting support
Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows. https://kodi.tv/