کتابخانه Philter
Philter is a jQuery plugin giving you the power to control CSS filters with HTML attributes. Demo
Here's a list of filters that you can use and their limitations in Philter.
- blur
- grayscale
- hue-rotate
- saturate
- sepia
- contrast
- invert
- opacity
- brightness
- drop-shadow - Supports only black color. Requires 4 values. The 4th value instead of color is opacity 0 to 100%.
- svg - Custom SVG filter. Requires 1 value - filter ID.
- color - Requires 2 values. Color and opacity. Doesn't support transitions.
- vintage - Requires an integer from 1 to 6. Doesn't support transitions or opacity.
گپ و گفتی با مهندسان طراح دات نت در مورد آینده این فریم ورک
بررسی تغییرات C# 11
Exploring the Features of C# 11: The Modern Capabilities of a Vibrant Language [Webinar]
C# has evolved long since its introduction about 20 years ago. In this live-coding presentation, learn about the fascinating features of the most recent version of the language. We will explore the most interesting features, their power, and how we can benefit from them to create concise, expressive, and maintainable code.
زبان D برای برنامه نویسهای سیشارپ
ایا معمار نرم افزار هستید؟
....
Becoming a software architect isn't something that simply happens overnight or with a promotion. It's a role , not a rank . It's an evolutionary process where you'll gradually gain the experience and confidence that you need to undertake the role.
Microbenchmark testing Python, Numba, Mojo, Dart, C/gcc, Rust, Go, JavaScript, C#, Java, Kotlin, Pascal, Ruby, Haskell performance in Mandelbrot set generation
Benchmarking several languages/tools with Mandelbrot set generation. 1-to-1 translation of code from one language to another. No SIMD, no multithreading (except prange() trick with Numba), no tricks (e.g. skipping sqrt), a bare minimum of language specific adjustments to make the code nicer while keeping all loops and operations in place.
جنریک چگونه به دات نت اضافه شد ؟
Before we dive into the technical details, let’s start with a quick history lesson, courtesy of Don Syme who worked on adding generics to .NET and then went on to design and implement F#, which is a pretty impressive set of achievements!!
Background and History
- 1999 Initial research, design and planning
- 1999 First ‘white paper’ published
- 2001 C# Language Design Specification created
- 2001 Research paper published
- 2004 Work completed and all bugs fixed
مفهوم عملگر شیفت در #C
عملگر شیفت به سمت راست و یا <<، عددی را به تعداد بیت مشخص شده (x >> count)، به سمت راست منتقل میکند و دو نوع دارد:
الف) شیفت به راست منطقی
برای مثال اگر عدد 12 را به صورت باینری نمایش دهیم، به صورت زیر خواهد بود:
00000000 00000000 00000000 00001100
00000000 00000000 00000000 00000110
در این حالت همواره فرض میشود که عدد مدنظر، unsigned است.
ب) شیفت به راست ریاضی
شیفت به راست ریاضی، دقیقا مانند شیفت به راست منطقی است؛ مانند مثال زیر که عدد 1001 باینری را دو بیت به سمت راست منتقل میکند:
uint e = 0b_1001; Console.WriteLine($"Before: {Convert.ToString(e, toBase: 2),4}"); // Before: 1001 uint f = e >> 2; Console.WriteLine($"After: {Convert.ToString(f, toBase: 2).PadLeft(4, '0'),4}"); // After: 0010
برای مثال نمایش باینری عدد منفی 2,147,483,552- به صورت زیر است:
10000000 00000000 00000000 01100000
11111000 00000000 00000000 00000110
int x = -8; Console.WriteLine($"Before: {x,11}, hex: {x,8:x}, binary: {Convert.ToString(x, toBase: 2),32}"); // Before: -8, hex: fffffff8, binary: 11111111111111111111111111111000 int y = x >> 2; Console.WriteLine($"After >>: {y,11}, hex: {y,8:x}, binary: {Convert.ToString(y, toBase: 2),32}"); // After >>: -2, hex: fffffffe, binary: 11111111111111111111111111111110 int z = x >>> 2; Console.WriteLine($"After >>>: {z,11}, hex: {z,8:x}, binary: {Convert.ToString(z, toBase: 2).PadLeft(32, '0'),32}"); // After >>>: 1073741822, hex: 3ffffffe, binary: 00111111111111111111111111111110
سؤال: در زبان جاوا، عملگر <<< به معنای unsigned right shift است؛ اما چنین عملگری در زبان #C تا نگارش 11 آن وجود ندارد؛ چرا؟!
تا پیش از C# 11 اگر نیاز به کار بر روی signed types جهت رسیدن به نتیجهی عملگر <<< وجود داشته باشد (انجام شیفت منطقی؛ یعنی صرفنظر کردن از نوع علامت عدد)، میتوان از متدهای الحاقی زیر استفاده کرد که ابتدا آنها را به نمونههای unsigned تبدیل میکند و کار شیفت را انجام میدهد و سپس نوع اصلی را بازیابی میکند:
public static int UnsignedRightShift(this int signed, int places) { unchecked { var unsigned = (uint)signed; unsigned >>= places; return (int)unsigned; } } public static long UnsignedRightShift(this long signed, int places) { unchecked { var unsigned = (ulong)signed; unsigned >>= places; return (long)unsigned; } }