اشتراک‌ها
DevToys - پکیجی از ابزارهای کاربردی برای برنامه نویسان

The collection includes 14 different tools including a Json to Yaml and Yaml to Json converter, a JWT decoder, a Text compare tool, and more.

The full list includes:

  • Converters
    • Json <> Yaml
    • Number Base
  • Encoders / Decoders
    • HTML
    • URL
    • Base64
    • JWT Decoder
  • Formatters
    • Json
  • Generators
    • Hash (MD5, SHA1, SHA256, SHA512)
    • UUID 1 and 4
    • Lorem Ipsum
  • Text
    • Inspector & Case Converter
    • Regex Tester
    • Text Comparer
    • Markdown Preview
  • Graphic
    • Color Blindness Simulator
    • PNG / JPEG Compressor

Some of the tools will have wider appeal, for example, the text comparison tool would be useful for writers and solicitors alike, while the PNG/JPEG compressor could help webmasters. Expect more utilities to join the bundle in the future.

The collection is free, and can be accessed via GitHub here or free via the Microsoft Store. 

DevToys - پکیجی از ابزارهای کاربردی برای برنامه نویسان
نظرات مطالب
اعتبارسنجی مبتنی بر JWT در ASP.NET Core 2.0 بدون استفاده از سیستم Identity
سلام. وقت بخیر. من سیاست دسترسی پویا رو به jwt اضافه کردم. کلیه Claimها رو  به accesstoken اضافه میکنم و درست هم عملیات دسترسی چک میشود.
{"jti":"26bdfd20-104f-45d4-a4e1-111044808041",
"iss":"http://localhost:5000/",
"iat":1531729854,
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier":"1",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name":"Vahid",
"DisplayName":"وحید",
"http://schemas.microsoft.com/ws/2008/06/identity/claims/serialnumber":"046fb152a7474043952475cfa952cdc9",
"http://schemas.microsoft.com/ws/2008/06/identity/claims/userdata":"1",
"DynamicPermission":[":MyProtectedApi2:Get",
":MyProtectedEditorsApi:Get",
":MyProtectedApi3:Get",
":MyProtectedApi4:Get"],
"http://schemas.microsoft.com/ws/2008/06/identity/claims/role":["Admin",
"Editor",
"User"],
"nbf":1531729855,
"exp":1531729975,
"aud":"Any"}
 فقط این Claimها که در توکن اضافه میشود در سمت سرور از روی توکن ارسالی کاربر چک میشود؟
 public bool CanUserAccess(ClaimsPrincipal user, string area, string controller, string action)
        {
            var currentClaimValue = $"{area}:{controller}:{action}";
            var securedControllerActions = _mvcActionsDiscoveryService.GetAllSecuredControllerActionsWithPolicy(ConstantPolicies.DynamicPermission);
            if (!securedControllerActions.SelectMany(x => x.MvcActions).Any(x => x.ActionId == currentClaimValue))
            {
                throw new KeyNotFoundException($@"The `secured` area={area}/controller={controller}/action={action} with `ConstantPolicies.DynamicPermission` policy not found. Please check you have entered the area/controller/action names correctly and also it's decorated with the correct security policy.");
            }

            if (!user.Identity.IsAuthenticated)
            {
                return false;
            }

            if (user.IsInRole("Admin"))
            {
                // Admin users have access to all of the pages.
                return true;
            }

            // Check for dynamic permissions
            // A user gets its permissions claims from the `ApplicationClaimsPrincipalFactory` class automatically and it includes the role claims too.


            //for check user has claim for access to action
            return user.HasClaim(claim => claim.Type == ConstantPolicies.DynamicPermissionClaimType &&
                                          claim.Value == currentClaimValue);
        }
امکان دستکاری توسط کاربر وجود ندارد؟ اگر اینطور است چطور این دسترسی‌ها رو در سمت سرور بعد از login در حافظه سرور ذخیره کنیم برای دفعات بعد؟
اشتراک‌ها
کتابخانه easystarjs
easystar.js is an asynchronous A* pathfinding API written in Javascript for use in your HTML5 games and interactive projects. The goal of this project is to make it easy and fast to implement performance conscious pathfinding.  Demo
  • Calculates asynchronously for better overall performance
  • Simple API
  • Small. ~5kb
  • Use it with any existing Javascript Framework
کتابخانه easystarjs
اشتراک‌ها
روش‌های مختلف تولید اعداد تصادفی در جاوا‌اسکریپت چقدر با هم متفاوتند؟

Looking at these side-by-side randomly generated visualizations, neither of them seem substantively different from a distribution perspective. All to say, when generating a random color palette, there probably wasn't any need for me to use the Crypto module—I probably should have just stuck with Math. It's much faster and feels to be just as random. I'll leave the Crypto stuff to any client-side cryptography work (which I've never had to do).

روش‌های مختلف تولید اعداد تصادفی در جاوا‌اسکریپت چقدر با هم متفاوتند؟
اشتراک‌ها
کتاب C# Smorgasbord

C# Smorgasbord covers a vast variety of different technologies, patterns and best practices that any C# developer should master.

کتاب C# Smorgasbord
اشتراک‌ها
مقایسه و تفاوت های Stress Test ، Load Test با Performance Test
  • Performance testing is a testing method used to determine the speed of a computer, network or devices.
  • Load testing simulates real-world load on any application or website.
  • Stress testing determines the stability and robustness of the system
  • Performance testing helps to check the performance of website servers, databases, networks.
  • Load testing is used for the Client/Server, Web-based applications.
  • Stress testing is done unexpected test traffic of your website. 
مقایسه و تفاوت های Stress Test ، Load Test با Performance Test
اشتراک‌ها
کتابخانه angular-checkboxes

If you are used to manipulate HTML forms, you probably know that each checkbox is a separate variable (or maybe an ngModel with AngularJS).  Demo

Sometimes, it could be usefull to manipulate all these checkboxes as a unique array.

angular.checkboxes module lets you turn your list of checkboxes into a unique destination array, providing :

  • two-way binding: manipulate the destination array will check/uncheck the checkboxes AND check/uncheck the checkboxes will modify the destination array.
  • no isolated scope for each checkbox: the directive does not create new child scope.
  • a mtCheckboxController: internal controller can be injected to other directives. 
کتابخانه angular-checkboxes