مطالب
استفاده از لوله‌های یاهو در بلاگر!

داشتم به دنبال راهی برای نمایش محبوب‌ترین پست‌ها در وبلاگ جاری می‌گشتم، این جستجو به لوله‌های یاهو ختم شد!
یکی از پرکاربردترین ویجت‌های بلاگر، ویجت نمایش فید است (با نام "عناوین خبری" ترجمه شده است). برای مثال همین لیست آخرین نظرها در سایت، با استفاده از فید استاندارد کامنت‌های سایت درست شده است. 5 کامنت آخر سایت را نمایش می‌دهد که البته این یک ایراد هم هست و بیشتر از این تعداد را قبول نمی‌کند. یا دقیقا همان زمان ارسال کامنت به روز نمی‌شود. به نظر در ساعات مشخصی از روز این به روز رسانی صورت می‌گیرد.

جهت "نمایش لیست مطالبی با بیشترین کامنت" می‌توانید به آدرس زیر مراجعه کنید:
Popular Posts/Most Commented Widget for Blogger Blogs

آدرس بلاگ خود را وارد کنید (بدون http البته). عدد دلخواهی را که بیانگر تعداد رکورد بازگشت داده شده است نیز وارد نمائید (هر چند بلاگر فقط 5 آیتم را نمایش خواهد داد) و سپس بر روی دکمه run کلیک کنید. در همانجا روی more options کلیک کرده و لینک فید rss آن‌را دریافت کنید. در حقیقت با استفاده از لوله‌های یاهو یک سری پردازش روی فید کامنت‌های سایت صورت گرفته و آمار نهایی به صورت یک فید جدید به شما ارائه خواهد شد که از آن می‌توانید در ویجت مربوط به عناوین خبری یا همان فیدهای بلاگر، استفاده کنید.






و یا نمایش لیست برترین کامنت گذاران!
Top Commentators Widget for Blogger




در اینجا روی لینک clone کلیک کنید تا یک نمونه مخصوص شما کپی شود (بهتر است به اکانت ایمیل خود در یاهو لاگین کرده باشید). اکنون می‌توانید آن را ادیت کرده و بر روی آن تغییرات دلخواه را اعمال کنید (وارد کردن لینک فید کامنت‌های سایت مطابق شکل). سپس بر روی دکمه ذخیره کلیک کرده و نهایتا فید rss آن‌را دریافت کنید.

موارد دیگری هم از همین دست در سایت لوله‌های یاهو موجود است:
http://pipes.yahoo.com/pipes/search?q=blogger&x=6&y=9

بازخوردهای پروژه‌ها
Fill and FillByObject
متود زیر برای تولید عبارت مبتنی بر الگو زمانی که الگو پیچیده‌تر از این است که بشود با string.Format به راحتی پیاده سازی شود ولی چندان هم پیچیده نیست که ابزارهای حرفه ای‌تری مانند T4 یا Razor به کار بیایند، میتواند مورد استفاده قرار گیرد:
        /// <summary>
        /// Insert values from an object into a string pattern. To specify the object's property you have to use the '{propertyName}'.
        /// </summary>
        /// <remarks>
        /// This method is a replacement to String.Format, but it has two differences:
        /// <list type="simple">
        /// <item>It reverese the order you call the functionality, instead of writing String.Format(pattern, args) you write pattern.FillByObject(args). This makes the code look cleaner.</item>
        /// <item>You supply the pattern with an object and specify insertion points by property names.</item>
        /// </list>
        /// <example>
        /// <![CDATA[
        /// "First name:{firstName}, Sur name:{Surname}".FillByObject(new {firstName = "Sam", lastName="Naseri"});
        /// ]]>
        /// </example>
        /// </remarks>
        /// <seealso cref="Fill"/>
        /// <typeparam name="T">Type of bindingValue.</typeparam>
        /// <param name="bindingPattern">The pattern to fill.</param>
        /// <param name="bindingValue">The object providing values to fill in the pattern.</param>
        /// <returns>The pattern filled with values.</returns>
        public static string FillByObject<T>(this string bindingPattern, T bindingValue)
        {
            var properties = GetProperties(typeof(T)).ToList();
            var values = properties.Select(property => property.GetValue(bindingValue, new object[] { })).ToList();
            var result = bindingPattern;
            for (int index = 0; index < properties.Count; index++)
            {
                var property = properties[index];
                var propPattern = "{" + property.Name + "}";
                var old = result;
                result = result.Replace(propPattern, values[index] != null ? values[index].ToString() : "");
            }
            return result;
        }

پیاده سازی فوق یک پیاده سازی بسیار خام و بسیار کند است و جای بهبود زیادی دارد. من فقط برای سناریوهای ساده که کارایی مطرح نیست استفاده از متود فوق را توصیه میکنم.
متودهای جانبی مورد نیاز:
private static IEnumerable<PropertyInfo> GetProperties(Type t)
{
    return t.GetProperties(BindingFlags.Public | BindingFlags.Instance);
}

همچنین متود زیر هم میتواند نوشتن string.Format را یک خرده ساده‌تر کند:
/// <summary>
/// A simple replacement for String.Format which only makes the codes look nicer.
/// </summary>
/// <param name="pattern">The source string that you want to replace insertion points on it.</param>
/// <param name="args">Values to be replaced in the pattern.</param>
/// <returns></returns>
public static string Fill(this string pattern, params object[] args)
{
    return string.Format(pattern, args);
}

اشتراک‌ها
مصاحبه کامل با خالق ++C

Full Interview With the Creator of C++

By popular demand, and a request from the man himself, we’ve decided to release the full interview with esteemed computer scientist Bjarne Stroustrup (aka the creator of C++). We cover a bunch of topics so check the chapters to find what interests you the most! Filmed last year. Enjoy and happy trails!

00:00-02:42 Getting into programming
02:42-03:26 Programming being versatile
03:26-06:07 Industry changes
06:07-10:20 Inventing and maintaining C++
10:20-12:02 Key to making a successful language
12:02-16:04 Greatest lessons
16:14-20:06 Moving to the US
20:06-23:20 Advice to devs 

مصاحبه کامل با خالق ++C
مطالب
مدیریت ساده‌تر امور Async (غیر همزمان) در نسخه‌ی بعدی زبان‌های دات نتی

چندی قبل مطلبی را در این سایت در مورد معرفی الگویی که توسط آن می‌توان اعمال غیر همزمان را به صورت پی در پی انجام داد، مطالعه کردید:

و بحث اصلی مطالب فوق هم این است:
"در برنامه نویسی متداول همیشه عادت داریم که اعمال به صورت A –> B –> C انجام شوند. اما در Async programming ممکن است ابتدا C انجام شود، سپس A و بعد B یا هر حالت دیگری صرفنظر از تقدم و تاخر آن‌ها در حین معرفی متدهای مرتبط در یک قطعه کد. همچنین میزان خوانایی این نوع کدنویسی نیز مطلوب نیست...."

خبر خوش آن است که پشتیبانی از این نوع مدل پی در پی برنامه نویسی در نگارش‌های بعدی سی شارپ و VB.NET اضافه شده است.



لیستی از مقالات منتشر شده در این مورد را در ادامه ملاحظه خواهید کرد:

علاوه بر آن یک سری ویدیوی مرتبط با این بحث نیز منتشر شده است:

اشتراک‌ها
دوره 3 ساعت و نیمه Asp.Net Core SignalR

Asp.Net Core WebSockets Vs SignalR. Which should you use? (Full Course)

In this video we build 2 separate chat applications, one using Asp.Net Core WebSockets and the other using SignalR, allowing you to compare approaches and decide on which one works best for you. In both cases we build them with C#, .NET Core and JavaScript. You’ll also learn about:

- .NET Core Request Pipeline
- Request Delegates
- Asynchronous Programming in .NET (Async / Await)
- Introduction to Dependency Injection  

دوره 3 ساعت و نیمه Asp.Net Core SignalR
اشتراک‌ها
اجرای Blazor WebAssembly بر روی 6 سکوی کاری مختلف

a habit tracker app that is free to use on 6 platforms: Web browser, Windows, Linux, Android, iOS and macOS. Approximately 98% of the programming code is the same for all 6 platforms. There are 3 different projects that use the shared code: - a Blazor WASM project for the PWA - a MAUI Blazor project for Windows, Android, iOS and macOS - a Photino Blazor project for Linux 

اجرای Blazor WebAssembly بر روی 6 سکوی کاری مختلف
اشتراک‌ها
مقایسه کارآیی بین C# Wasm AOT ،C# Wasm Interpreted ،C# Runtime و JavaScript

The conclusion of the analysis:
C# Wasm AOT still has a long way to become a general and performant client side web programming platform. Note: The usage of the Uno.Wasm.Bootstrap toolchain may have affected the performance of some of the benchmarks. Thus, this analysis should not be regarded as a benchmark of the finalized product. However, note that the Uno platform is using ".NET 6 WebAssembly Mixed mode AOT/Interpreter" (source). 

مقایسه کارآیی بین C# Wasm AOT ،C# Wasm Interpreted ،C# Runtime و JavaScript
اشتراک‌ها
10 آموزش برتر پروژه محور برای یادگیری HTML / CSS / Javascript

At The Bit, we understand how overwhelming  it can be to navigate through all the different tutorials online and try to teach yourself programming skills alone.

That’s why we’ve created The Bit — we’ll match you to a peer with similar skills and interests to take the tutorial of your choosing.

Find a tutorial you want to take below? Upload it to our platform to get the support and accountability you need to start building cool shit. 

10 آموزش برتر پروژه محور برای یادگیری HTML / CSS / Javascript
اشتراک‌ها
کتاب رایگان Scala Succinctly

Learning a new programming language can be a daunting task, but Scala Succinctly makes it a simple matter. Author Chris Rose guides readers through the basics of Scala, from installation to syntax shorthand, so that they can get up and running quickly.

Table of Contents
  1. Introduction
  2. Variables and Values
  3. Expressions and Functions
  4. Control Structures
  5. Arrays and Lists
  6. Other Collection Types
  7. Classes and Objects
  8. Pattern Matching
  9. Closures
  10. Conclusion 
کتاب رایگان Scala Succinctly
اشتراک‌ها
نگاهی دقیق به ASP.NET CORE


ASP.NET Core is a completely new web framework for building modern cloud-based web applications. In this presentation learn all about ASP.NET Core and including the latest features and innovations in MVC. You’ll see how you can build applications that run cross-platform on Windows, Mac and Linux via .NET Core. You’ll also see how ASP.NET Core MVC gives you a unified web programming model for building both web UI and web APIs.
 

نگاهی دقیق به ASP.NET CORE