اشتراک‌ها
بانک‌اطلاعاتی رایگان موقعیت مکانی IPها
Name Size in MB Num Networks Last Updated Description Download
IPv4 Geolocation Database 262M 2,599,907 September 14, 2023

The full geolocation database for all IPv4 addresses as CSV (Documentation)


IPv6 Geolocation Database 50M 486,938 September 14, 2023 The full geolocation database for all IPv6 addresses as CSV (Documentation)
بانک‌اطلاعاتی رایگان موقعیت مکانی IPها
اشتراک‌ها
Duende IdentityServer v6 منتشر شد
  • Performance and stability improvements.
  • Optimization and testing for .NET 6.
  • All UIs and templates have been updated for “.NET 6” style, which means they now use the new hosting API, and all UIs have been converted to Razor pages.
  • Added support for CIBA, which was the last missing piece for full FAPI compliance. 
Duende IdentityServer v6 منتشر شد
اشتراک‌ها
سایت BlazorGames

Welcome Players! On this site we make games with ASP.NET Core and Blazor and have some fun while learning how to do it ourselves.

This site will be updated with new examples as they are made. In the meantime, check out the existing games below. 

سایت BlazorGames
اشتراک‌ها
نگارش‌های 5.0.7 و 3.1.16 دات نت و NET Core. منتشر شدند

Today, we are releasing the .NET June 2021 Updates. These updates contains reliability and security improvements. See the individual release notes for details on updated packages.

You can download 5.0.7 , 3.1.16 versions for Windows, macOS, and Linux, for x86, x64, Arm32, and Arm64. 

نگارش‌های 5.0.7 و 3.1.16 دات نت و NET Core. منتشر شدند
اشتراک‌ها
NET 5.0.5. منتشر شد

Today, we are releasing the .NET April 2021 Updates. These updates contains reliability and other non-security improvements. See the individual release notes for details on updated packages.

You can download 5.0.5 versions for Windows, macOS, and Linux, for x86, x64, Arm32, and Arm64.

NET 5.0.5. منتشر شد
اشتراک‌ها
بررسی imageهای مختلف NET. در Docker

.NET and .NET Core (and Windows!) have been getting better and better with Docker. I run Docker for Windows as it supports both Linux Containers and Windows Containers. They have both a Stable and Edge channel. The Edge (Beta) channel is regularly updated and, as a rule, gets better and better in the year I've been running it. 

بررسی imageهای مختلف NET. در Docker
اشتراک‌ها
راهنمای نصب TFS 2017

I’ve updated my Team Foundation Server 2017 install guide to add new chapters for installing build servers. This new version (v1.1) now has a chapter for installing the TFS2017 build agent on Windows and a chapter for installing the build agent on Ubuntu Linux 16.04. 

راهنمای نصب TFS 2017
اشتراک‌ها
Qt 5.7 منتشر شد

The latest version of the Qt GUI has been released just three months after the previous update. Despite the short interval there's quite a lot of changes, including support for the Raspberry Pi 3. 

Qt 5.7 منتشر شد
مطالب
متدهای کمکی مفید در پروژه های asp.net mvc
ابتدا در پروژه‌ی mvc خود یک پوشه با نامی دلخواه (مثلا MyHelpers) بسازید و سپس کلاسی با محتویات زیر را به آن اضافه کنید(نام کلاس به دلخواه Helpers گذاشته شده است) : 
public static class Helpers
{
       //در اینجا متدها ی کمکی قرار میگیرند
}
1- تبدیل تاریخ میلادی به شمسی با استفاده از کتابخانه ی Persia :
public static MvcHtmlString FarsiDate(this HtmlHelper html, DateTime dateTime)
        {
            var tag = new TagBuilder("span");
            tag.MergeAttribute("dir", "ltr");
            tag.AddCssClass("farsi-date");
            tag.SetInnerText(Calendar.ConvertToPersian(dateTime).ToString("W"));
            return MvcHtmlString.Create(tag.ToString(TagRenderMode.Normal));
        }
مثال استفاده : 
@Html.FarsiDate(news.DateTimeCreated)
2- زمان فارسی : 
public static MvcHtmlString FarsiTime(this HtmlHelper html, DateTime dateTime)
        {
            var tag = new TagBuilder("span");
            tag.MergeAttribute("dir", "ltr");
            tag.AddCssClass("farsi-time");
            tag.SetInnerText(Calendar.ConvertToPersian(dateTime).ToString("R"));
            return MvcHtmlString.Create(tag.ToString(TagRenderMode.Normal));
        }
مثال استفاده : 
@Html.FarsiTime(news.DateTimeCreated)
3- تاریخ و زمان فارسی : 
public static MvcHtmlString FarsiDateAndTime(this HtmlHelper html, DateTime dateTime)
        {
            return MvcHtmlString.Create(FarsiTime(html, dateTime).ToHtmlString() + "  ,  " + FarsiDate(html, dateTime).ToHtmlString());
        }
مثال استفاده : 
@Html.FarsiDateAndTime(news.DateTimeCreated)
4- زمان گذشته : 
public static MvcHtmlString FarsiRemaining(this HtmlHelper html, DateTime dateTime)
        {
            var tag = new TagBuilder("span");
            tag.MergeAttribute("dir", "rtl");
            tag.AddCssClass("farsi-remaining");
            tag.SetInnerText(Calendar.ConvertToPersian(dateTime).ToRelativeDateString("TY"));
            return MvcHtmlString.Create(tag.ToString(TagRenderMode.Normal));
        }
مثال استفاده : 
@Html.FarsiRemaining(news.DateTimeCreated)
 
5- خلاصه‌ی مطلب با استفاده از کتابخانه ی Html Agility Pack   (تعداد کلمات از کلمه‌ی اول یک متن به اندازه‌ی max )
public static string GetSummary(this HtmlHelper html, string text, int max)
        {
            string summaryHtml = string.Empty;
            // load our html document
            var htmlDoc = new HtmlDocument();
            htmlDoc.LoadHtml(text);
            int wordCount = 0;
            foreach (var element in htmlDoc.DocumentNode.ChildNodes)
            {
                // inner text will strip out all html, and give us plain text
                string elementText = element.InnerText;

                // we split by space to get all the words in this element
                string[] elementWords = elementText.Split(new char[] { ' ' });

                // and if we haven't used too many words ...
                if (wordCount <= max)
                {
                    // add the *outer* HTML (which will have proper 
                    // html formatting for this fragment) to the summary
                    summaryHtml += element.OuterHtml;
                    wordCount += elementWords.Count() + 1;
                }
                else
                {
                    break;
                }
            }
            return summaryHtml;
        }
مثال استفاده : 
@Html.Raw(Html.GetSummary(news.Content, 60))
6- گرفتن لیست Validation Error‌ها در ModelState : 
        public  static List<string> GetListOfErrors(this ModelStateDictionary modelState)
        {
            var list = modelState.ToList();
            var listErrors = new List<string>();
            foreach (var keyValuePair in list)
            {
                listErrors.AddRange(keyValuePair.Value.Errors.Select(error => error.ErrorMessage));
            }
            return listErrors;
        }
مثال استفاده (در کنترلر):
var listErrors = ModelState.GetListOfErrors();
از دوستان عزیز خواهشمندم متدهای کمکی مورد استفاده در پروژه‌های خود را در قسمت نظرات قرار دهند.