اشتراک‌ها
نکات جالبی درباره Breakpoints

Have you ever found a bug in your code and wanted to pause code execution to inspect the problem? If you are a developer, there’s a strong chance you have experienced or will experience this issue many, many times. While the short and sweet answer to this problem is to use a breakpoint, the longer answer is that Visual Studio actually provides multiple kinds of breakpoints and methods that let you pause your code depending on the context! Based on the different scenarios you may experience while debugging, here are some of the various ways to pause your code and set or manage a breakpoint in Visual Studio 2017 

نکات جالبی درباره Breakpoints
اشتراک‌ها
آموزش JavaScript توسط Bob Tabor

NOTE: This popular course was recently updated with all new videos and content. Check it out!

01 | IntroductionGet an introduction from Bob, as he kicks off the course, sets expectations, and gives you a little guidance for the road ahead.

02 | Setting Up the Development Environment

03 | Basic JavaScript Syntax

04 | Variables

05 | Data Types

06 | Type Coercion and Conversion

07 | Expressions and Operators

08 | Arrays

09 | Function Declaration

10 | Function Expressions

11 | Decision Statements

12 | Iteration Statements

13 | Basics of Scope

14 | Returning Functions from Functions

15 | Object Literals

16 | Module Pattern and Revealing Module Pattern

17 | Closures

18 | this Keyword

19 | Destructuring

20 | String Template Literals

21 | Regular Expressions

22 | Built-In Natives

23 | Constructor Function Calls with the new Keyword

24 | Objects and the Prototype Chain

25 | JavaScript Classes

26 | Arrow Functions

27 | Truthy and Falsy Values

28 | null Type

29 | Date Objects

30 | String Methods

31 | Array Methods

32 | Error Handling with Try Catch

33 | Understanding the Document Object Model

34 | Working with DOM Nodes

35 | Course Conclusion 

آموزش JavaScript توسط Bob Tabor
مطالب
رسم گراف

کتابخانه‌های زیادی برای رسم گراف وجود دارند منجمله mxGraph که برای استفاده غیرتجاری رایگان و سورس باز است. mxGraph نگارش‌های PHP ، Java‌ و JavaScript ایی نیز دارد که به همراه بسته مربوطه ارائه می‌شوند.
پس از دریافت آن، در فولدری به نام dotnet می‌توانید سورس کتابخانه مربوط به دات نت فریم ورک آن‌را دریافت کنید.
فایل پروژه‌ی VS.Net را در آن فولدر نخواهید یافت. حتی آن‌را کامپایل هم نکرده‌اند. (احتمالا به این دلیل که کسی نپرسد این پروژه با چه محصولی تولید شده و آیا لایسنس استفاده از آن را دارید یا خیر. این هم یک روش است ...)
برای کامپایل آن، یک پروژه library جدید را در VS.Net آغاز کرده و پوشه‌های موجود در پوشه‌ی dotnet را به آن افزوده و سپس آن‌را کامپایل کنید تا فایل mxGraph.dll تولید شود.

یک مثال ساده از نحوه‌ی استفاده‌ی آن به صورت زیر است که فایل test.png را تولید خواهد کرد.
using System;
using System.Drawing;
using System.Windows.Forms;
using com.mxgraph;
using System.Drawing.Imaging;

void Test1()
{
// Creates graph with model
mxGraph graph = new mxGraph();
Object parent = graph.GetDefaultParent();

// Adds cells into the graph
graph.Model.BeginUpdate();
try
{
Object v1 = graph.InsertVertex(parent, null, "سلام", 20, 20, 80, 30, "strokeColor=#FFCF8A;fillColor=#FFCF8A;gradientColor=white;fontBold=true;fontFamily=tahoma;rounded=true;shadow=true;shape=ellipse");
Object v2 = graph.InsertVertex(parent, null, "!دنیای ظالم", 200, 150, 80, 30, "rounded=true;shadow=true;fontFamily=tahoma");
Object e1 = graph.InsertEdge(parent, null, "e1", v1, v2, "fontFamily=tahoma");
}
finally
{
graph.Model.EndUpdate();
}

mxCellRenderer.CreateImage(graph, null, 1,
Color.White, true, null).Save("test.png", ImageFormat.Png);
}




و یا اگر قصد داشته باشید که از آن در ASP.Net استفاده کنید، یک generic handler را به پروژه خود افزوده (مثلا ImageHandler.ashx) و کد آن‌را برای مثال به صورت زیر تغییر دهید:

using System;
using System.Web;
using com.mxgraph;
using System.Drawing;
using System.Web.Services;
using System.IO;
using System.Drawing.Imaging;

namespace test
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class ImageHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
// Creates graph with model
mxGraph graph = new mxGraph();
Object parent = graph.GetDefaultParent();

// Adds cells into the graph
graph.Model.BeginUpdate();
try
{
Object v1 = graph.InsertVertex(parent, null, "سلام", 20, 20, 80, 30, "strokeColor=#FFCF8A;fillColor=#FFCF8A;gradientColor=white;fontBold=true;fontFamily=tahoma;rounded=true;shadow=true;shape=ellipse");
Object v2 = graph.InsertVertex(parent, null, "!دنیای ظالم", 200, 150, 80, 30, "rounded=true;shadow=true;fontFamily=tahoma");
Object e1 = graph.InsertEdge(parent, null, "e1", v1, v2, "fontFamily=tahoma");
}
finally
{
graph.Model.EndUpdate();
}

Image image = mxCellRenderer.CreateImage(graph, null, 1, Color.White, true, null);

// Render BitMap Stream Back To Client
MemoryStream memStream = new MemoryStream();
image.Save(memStream, ImageFormat.Png);

memStream.WriteTo(context.Response.OutputStream);
}

public bool IsReusable
{
get
{
return false;
}
}
}

}
اکنون نحوه استفاده از این handler در یک صفحه وب به صورت زیر است:
<img src="ImageHandler.ashx" />

اشتراک‌ها
سخت افزار Nick Craver از برنامه نویسان ارشد Stack Overflow

Stack Overflow Developer Desktop Build - 2017

One of the things we're big on at Stack Exchange is hardware - we love it. More importantly, we love not waiting on it. With that in mind, we upgrade our developer machines every 2 years. In case it helps anyone else, I'm posting our current parts list here. This isn't set in stone, we review and update it to the latest tech every time we build a machine. We also customize the build for each developer if needed - for example those needing extra space or specific display connections, etc. I'll try and keep this page updated as we make changes

 

سخت افزار Nick Craver از برنامه نویسان ارشد  Stack Overflow
اشتراک‌ها
تزریق وابستگی در ASP.NET 5 - یک گام عمیق تر
In this post I will dive a little bit deeper than this MSDN post; here we will examine the main interfaces involved, have a small peek inside on how things are running, and explain what it means really to switch to your IoC container of choice
تزریق وابستگی در ASP.NET 5 - یک گام عمیق تر
اشتراک‌ها
ساخت یک بلیط فروشی آنلاین با Blazor WebAssembly

Building an Online Ticket Store with Blazor WebAssembly
Webinar agenda:

0:00 Welcome
2:47 Introduction
4:00 New Blazor WebAssembly Application
5:00 Adding dotnet watch and Hot Reload
7:20 Components and routing
15:29 Making API calls
28:13 CSS Isolation
38:38 Testing components
48:40 State management
1:07:50 State management with cascading parameters
1:18:48 Questions and Wrap-Up 

ساخت یک بلیط فروشی آنلاین با Blazor WebAssembly
اشتراک‌ها
با DotVVM، برنامه‌های ASP.NET Web Forms خود را بر فراز NET Core. اجرا کنید!

Did you know that DotVVM can be used to incrementally modernize old ASP.NET Web Forms applications and lift them to .NET Core? It is much easier than doing a full rewrite, and the application can be deployed at any time during the entire process.

  • Install DotVVM NuGet package in your Web Forms site
  • Create a DotVVM master page using the same CSS
  • Start converting ASPX pages to DotHTML syntax, one at a time
  • When all the Web Forms pages are gone, change your CSPROJ to use .NET Core 
با DotVVM، برنامه‌های ASP.NET Web Forms خود را بر فراز NET Core. اجرا کنید!
اشتراک‌ها
با سی شارپ 8 از دست NullReferenceExceptions ها خلاص شوید

A .NET guideline specifies that an application should never throw a NullReferenceException. However, many applications and libraries do. The NullReferenceException is the most common exception happening. That’s why C# 8 tries to get rid of it. With C# 8, reference types are not null be default. This is a big change, and a great feature. However, what about all the legacy code? Can old libraries be used with C# 8 applications, and can C# 7 applications make use of C# 8 libraries?

This article demonstrates how C# 8 allows mixing old and new assemblies. 

با سی شارپ 8 از دست NullReferenceExceptions ها خلاص شوید