اشتراک‌ها
کاهش علاقه‌ی Oracle به Java

From the apparent dismissal of Java evangelists to an email alleging a shrugged-shoulders attitude about Java, Oracle’s commitment to the platform has come into question.

کاهش علاقه‌ی Oracle به Java
اشتراک‌ها
Visual Studio 2017 version 15.3.2 منتشر شد

These are the customer-reported issues addressed in this version:

Visual Studio crashes when you open a solution with a test project.
Visual Studio Freezes in Debug with Chrome.
Failure to install HelpViewer.
UI delay while typing R code.
C# 7.0 Regression in Tuples.
Xamarin - Dynamic Type Platform not supported exception.
Xamarin – Dynamic object is not supported.
Xamarin - Xamarin.iOS: ArgumentNullException for instruction parameter in Mono.Linker's MarkException() method.

Visual Studio 2017 version 15.3.2 منتشر شد
اشتراک‌ها
9 کتابخانه جاوااسکریپتی جهت ایجاد نمودار
 So you have in your hand tons of data, with a number of variables, that you have to somehow relay to somebody else. Raw, unorganized data is going to be difficult for them to understand. This is why you need help from charts. In web design, charts are one of the best tools for data visualization. It is easy to read, easy on the eyes and relatively easy to set up. 
9 کتابخانه جاوااسکریپتی جهت ایجاد نمودار
اشتراک‌ها
Visual Studio 2019 version 16.1.6 منتشر شد

Security Advisory Notices

CVE-2019-1077 Visual Studio Extension Auto Update Vulnerability

An elevation of privilege vulnerability exists when the Visual Studio Extension auto-update process improperly performs certain file operations. An attacker who successfully exploited this vulnerability could delete files in arbitrary locations. To exploit this vulnerability, an attacker would require unprivileged access to a vulnerable system. The security update addresses the vulnerability by securing locations the Visual Studio Extension auto-update performs file operations in.

CVE-2019-1075 ASP.NET Core Spoofing Vulnerability

A spoofing vulnerability exists in ASP.NET Core that could lead to an open redirect. An attacker who successfully exploited the vulnerability could redirect a targeted user to a malicious website. To exploit the vulnerability, an attacker could send a link that has a specially crafted URL and convince the user to click the link.

The security update addresses the vulnerability by correcting how ASP.NET Core parses URLs. Details can be found in the .NET Core release notes.

CVE-2019-1113 WorkflowDesigner XOML deserialization allows code execution

A XOML file referencing certain types could cause random code to be executed when the XOML file is opened in Visual Studio. There is now a restriction on what types are allowed to be used in XOML files. If a XOML file containing one of the newly unauthorized types is opened, a message is displayed explaining that the type is unauthorized.

For further information, please refer to https://support.microsoft.com/en-us/help/4512190/remote-code-execution-vulnerability-if-types-are-specified-in-xoml.

Visual Studio 2019 version 16.1.6 منتشر شد
مطالب
آموزش زبان Rust - قسمت 6 - Fuctions
توابع یکی از اجزای اساسی برنامه نویسی Rust هستند. آنها به شما این امکان را می‌دهند که یک بلوک کد را کپسوله کنید که می‌تواند بارها و بارها با ورودی‌های مختلفی فراخوانی شود. در اینجا یک مثال از یک تابع در Rust آمده‌است:
fn main() {
    println!("The sum of 2 and 3 is {}", sum(2, 3));
}

fn sum(a: i32, b: i32) -> i32 {
    a + b
}
در این مثال، تابعی را به نام sum تعریف می‌کنیم که دو آرگومان i32 را می‌گیرد و مجموع آنها را برمی گرداند. سپس تابع sum را با آرگومان‌های 2 و 3 فراخوانی می‌کنیم و نتیجه را با استفاده از println در کنسول چاپ می‌کنیم.

Function Declaration

توابع در Rust با استفاده از کلمه‌ی کلیدی fn و به دنبال آن نام تابع، پارامترها و نوع بازگشت (در صورت وجود) اعلام می‌شوند. در اینجا دستور کلی برای اعلان یک تابع در Rust آمده‌است:
fn function_name(parameter1: type1, parameter2: type2) -> return_type {
    // بدنه تابع
    // استفاده از مقادیر یارگشتی در صورت لزوم
}
در مثال بالا، تابع sum دو پارامتر، هر دو از نوع i32 را می‌گیرد و مقدار i32 را برمی گرداند.
 
Function Parameters
توابع در Rust می‌توانند صفر یا چند پارامتر را داشته باشند. پارامترها در امضای تابع، داخل پرانتز قرار گرفته و با کاما از هم جدا می‌شوند. در اینجا یک مثال، از یک تابع، با دو پارامتر آورده شده‌است:
fn greet(name: &str, age: i32) {
    println!("Hello, {}! You are {} years old.", name, age);
}
در این مثال، تابع greet دو پارامتر دارد: a &str (اشاره به یک رشته) و i32 (یک عدد صحیح). در داخل بدنه تابع، از مقادیر پارامترها برای چاپ پیام تبریک استفاده می‌کنیم.

Function Return Values
توابع در Rust می‌توانند با استفاده از کلمه‌ی کلیدی return و سپس مقدار بازگشتی، مقداری را برگردانند. یک مثال:
fn square(x: i32) -> i32 {
    return x * x;
}
در این مثال، تابع square، آرگومان i32 را می‌گیرد و square آن آرگومان را برمی‌گرداند. برای برگرداندن نتیجه، از کلمه کلیدی بازگشت استفاده می‌کنیم.
با این حال، Rust یک سینتکس مختصر را نیز برای برگرداندن مقادیر، از توابع دارد که در آن می‌توانید کلمه‌ی کلیدی return را حذف کنید و به سادگی مقداری را که باید در انتهای بدنه‌ی تابع برگردانده شود، مشخص کنید. در اینجا همان مثال، با استفاده از سینتکس کوتاه آمده‌است:
fn square(x: i32) -> i32 {
    x * x
}
در این مثال، کلمه‌ی کلیدی return را حذف کرده‌ایم و به‌سادگی مقداری را که باید به عنوان آخرین خط بدنه تابع برگردانده شود، مشخص کرده‌ایم.

Functions with Multiple Return Values
Rust همچنین از توابعی با مقادیر بازگشتی چندگانه پشتیبانی می‌کند که به آنها 'tuples' نیز می‌گویند. یک مثال:
fn swap(a: i32, b: i32) -> (i32, i32) {
    (b, a)
}
این تابع دو پارامتر i32 را می‌گیرد و یک tuple  از همان نوع را برمی‌گرداند. tuple، شامل دو مقدار ورودی مبادله شده‌است.
برای استفاده از مقادیر بازگشتی یک تابع tuple، می‌توانید tuple  را destructure کنید یا از عملگر '.' برای دسترسی به عناصر آن استفاده کنید. در این مثال هر دو روش وجود دارند: 
let (b, a) = swap(1, 2);
println!("a is {} and b is {}", a, b);

let tuple = swap(1, 2);
println!("a is {} and b is {}", tuple.1, tuple.0);
روش اول تاپل را مستقیماً به متغیرهای a و b تجزیه می‌کند؛ در حالیکه روش دوم با استفاده از عملگر نقطه، به داده‌ها دسترسی پیدا میکند.
اشتراک‌ها
بهترین فریم ورک جاوا اسکریپتی برای یادگیری در سال 2021

Based on the above observations, we can conclude that React will be the best framework to learn in 2021, followed by Vue. But there is a high chance of Angular defending second place since it has been there for a longer period of time than Vue, and surely 2021 is not the end of that. So if you are an Angular developer, I suggest you learn React in the upcoming days.

بهترین فریم ورک جاوا اسکریپتی برای یادگیری در سال 2021