اشتراک‌ها
ردیس ۷ در راه است

گویا ۳ برابر سریع‌تر از الستیک‌سرچ است!

In Redis 7.0, Redis Labs is adding two enhancements to its JSON support. The first is with search. RediSearch 2.0, which itself only became generally available barely a month ago; it now adds JSON as a supported data type. Before this, search was run as a separate feature that sat apart from the nodes housing the data engine. RediSearch 2.0 adds new scale-out capabilities to conduct massively parallel searches across up to billions of JSON documents across multiple nodes, returning results in fractions of a second. As the search engine was optimized for the Redis database, Redis Labs claims it runs up to 3x faster than Elasticsearch. 

ردیس ۷ در راه است
اشتراک‌ها
Bootstrap 5 Beta 2 منتشر شد

Our second beta has arrived for Bootstrap 5! We delayed its release to iron out some issues with third-party libraries and stabilize our major changes. We’ve also once again shipped some awesome updates to our documentation. 

Bootstrap 5 Beta 2 منتشر شد
اشتراک‌ها
Visual Studio 2019 version 16.6.2 منتشر شد

Security Advisory Notice for 16.6.2

CVE-2020-1108 / CVE-2020-1108.NET Core Denial of Service Vulnerability

To comprehensively address CVE-2020-1108, Microsoft has released updates for .NET Core 2.1 and .NET Core 3.1. Customers who use any of these versions of .NET Core should install the latest version of .NET Core. See the Release Notes for the latest version numbers and instructions for updating .NET Core.

CVE-2020-1202 / CVE-2020-1203 Diagnostics Hub Standard Collector Service Elevation of Privilege Vulnerability

An elevation of privilege vulnerability exists when the Diagnostics Hub Standard Collector or the Visual Studio Standard Collector fails to properly handle objects in memory.

CVE-2020-1293 / CVE-2020-1278 / CVE-2020-1257 Diagnostics Hub Standard Collector Service Elevation of Privilege Vulnerability

An elevation of privilege vulnerability exists when the Diagnostics Hub Standard Collector Service improperly handles file operations

Top Issues Fixed in Visual Studio 2019 version 16.6.2

Visual Studio 2019 version 16.6.2 منتشر شد
اشتراک‌ها
مقایسه کارآیی خروجی زبان‌های مختلف برنامه نویسی

Microbenchmark testing Python, Numba, Mojo, Dart, C/gcc, Rust, Go, JavaScript, C#, Java, Kotlin, Pascal, Ruby, Haskell performance in Mandelbrot set generation 

Benchmarking several languages/tools with Mandelbrot set generation. 1-to-1 translation of code from one language to another. No SIMD, no multithreading (except prange() trick with Numba), no tricks (e.g. skipping sqrt), a bare minimum of language specific adjustments to make the code nicer while keeping all loops and operations in place. 

مقایسه کارآیی خروجی زبان‌های مختلف برنامه نویسی
اشتراک‌ها
بی‌جهت لینوکسی‌ها را بخاطر باگ bash شرمنده نکنید

This is a defense of the most prolific and dedicated public servant that has graced the world in my lifetime. One man has added hundreds of billions, if not trillions of dollars of value to the global economy. This man has worked tirelessly for the benefit of everyone around him. It is impossible to name a publicly traded company that has not somehow benefited from his contributions, and many have benefited to the tune of billions. In return for the countless billions of wealth that people made from the fruits of his labor, he was rewarded with poverty and ridicule. Now that the world is done taking from him, they are heading to the next step of vilifying him as incompetent.

بی‌جهت لینوکسی‌ها را بخاطر باگ bash شرمنده نکنید
مطالب
آموزش زبان Rust - قسمت 3 - متغیرها در زبان برنامه نویسی Rust
متغیرها، بخش اساسی برنامه نویسی هستند و به توسعه دهندگان اجازه می‌دهند، داده‌ها را در برنامه‌های خود ذخیره و دستکاری کنند. Rust که یک زبان برنامه نویسی سیستم‌های مدرن است، دارای مجموعه‌ای غنی از ویژگی‌ها برای کار با متغیرها می‌باشد. در این آموزش به بررسی ایجاد، تغییرپذیری و Scope متغیرها در Rust و همچنین مفهوم Shadow می‌پردازیم.


ایجاد متغیرها در Rust

در Rust، متغیرها را می‌توان با استفاده از کلمه کلیدی let و به دنبال آن، نام متغیر و مقدار اختصاص داده شده‌ی به آن ایجاد کرد. مثلا:
let x = 10;
این یک متغیر به نام x را با مقدار 10 ایجاد می‌کند. Rust یک زبان استاتیکی است؛ به این معنا که متغیرها باید با نوع خود در زمان ایجاد، اعلان کنند. مثلا:
let x: i32 = 10;
این یک متغیر به نام x را با نوع i32 (یک عدد صحیح امضاء شده‌ی 32 بیتی) و مقدار 10 ایجاد می‌کند.


متغیرهای تغییرپذیر (Mutable) و تغییرناپذیر (Immutable) در Rust

در Rust، متغیرها به طور پیش فرض تغییر ناپذیر هستند؛ به این معنا که پس از تخصیص، مقدار آنها قابل تغییر نیست؛ مثلا:
let x = 10;
x = 20; //compile-time error
برای ایجاد یک متغیر قابل تغییر در Rust، از کلمه کلیدی mut استفاده می‌شود:
let mut x = 10;
x = 20;
متغیرهای تغییرناپذیر در Rust مفید هستند زیرا می‌توانند به جلوگیری از خطاهای ناشی از تغییرات ناخواسته‌ی در داده‌ها کمک کنند. متغیرهای قابل تغییر، برای زمانیکه داده‌ها نیاز به اصلاح دارند، مانند یک حلقه، مفید هستند.


Scope متغیرها در Rust

متغیرها در Rust دارای دامنه خاصی هستند که توسط curly braces که بیانیه آنها را احاطه کرده‌اند، تعریف می‌شود. مثلا
{
   let x = 10;
} // این متغیر خارج از این محدوده در دسترس نخواهد بود
در Rust، متغیرهایی که خارج از یک تابع یا بلوک، با استفاده از کلمه‌ی کلیدی static اعلام می‌شوند، global scope هستند و از هر نقطه‌ای در برنامه قابل دسترسی هستند. با این حال، متغیرهای global در Rust با ملاحظاتی همراه هستند. از آنجائیکه می‌توان به آنها از هر جایی در برنامه دسترسی داشت، ردیابی مکان و زمان تغییر متغیر ممکن است دشوار باشد که می‌تواند رفتار برنامه را چالش برانگیز کند. این امر به ویژه در برنامه‌های بزرگتر که ممکن است متغیرهای زیادی در آن در حال استفاده باشند، صادق است. علاوه بر این، استفاده از متغیرهای global می‌تواند آزمایش و اشکال‌زدایی کد را سخت‌تر کند؛ زیرا وضعیت آنها می‌تواند توسط هر بخشی از برنامه تغییر کند.

به این دلایل، به طور کلی توصیه می‌شود که از متغیرهای global به مقدار کم در Rust استفاده کنید. در عوض، اغلب بهتر است از متغیرهایی استفاده شود که در تابع یا بلوکی که در آن مورد استفاده قرار می‌گیرند، تعریف و scope شده‌اند. این مورد می‌تواند درک رفتار برنامه را آسان‌تر کند و از عوارض جانبی ناخواسته ناشی از متغیرهای سراسری جلوگیری کند.


Shadowing Variables in Rust

Shadowing یک مفهوم برنامه نویسی است که به شما امکان می‌دهد یک متغیر را در یک scope، دوبار اعلام کنید و به طور موثر متغیر اصلی را با متغیر جدیدی به همین نام shadow کنید. وقتی متغیری را shadow میکنید، متغیر جدید، متغیر قبلی را در scope داخلی، "shadow" می‌کند و هر ارجاعی به این متغیر در آن محدوده، به متغیر جدید اشاره می‌کند.
fn main() {
    let x = 5;
    println!("The value of x is: {}", x); // خروجی برابر 5 است

    let x = "hello";
    println!("The value of x is: {}", x); // خروجی برابر hello
}
در این کد، متغیر x دوبار با مقادیر مختلف اعلان می‌شود؛ اما اعلان دوم، دوباره از کلمه‌ی کلیدی let استفاده می‌کند و عملاً متغیر اول را shadow می‌اندازد. این یعنی println دوم، مقدار متغیر دوم را که یک رشته است، به جای متغیر اول که یک عدد صحیح است، خروجی می‌دهد.
سایه زدن زمانی می‌تواند مفید باشد که بخواهید مقدار، یا نوع یک متغیر را در یک scope، بدون اینکه نام آن را تغییر دهید. همچنین می‌تواند کد را با استفاده‌ی مجدد از یک نام متغیر، برای اهداف مختلف خواناتر کند. با این حال، همچنین می‌تواند کد را پیچیده‌تر و درک آن را سخت‌تر کند؛ بنابراین باید با دقت و با دلیل موجه از آن استفاده کنید . 
اشتراک‌ها
شروع به کار با Visual Studio 2017

Ready to get started with Visual Studio 2017? This is your course! Join the experts and get the details, from installation to debugging, in this practical Visual Studio 2017 deep dive.

See how to download and install Visual Studio in standalone and networked environments, along with some of the configuration options, such as choosing your workloads (types of apps or services, languages, and platforms), customizing the installation, and installing language packs. Then, take a tour of the Visual Studio IDE, including all the basics you need to get started with your development projects. Finally, explore debugging in Visual Studio, and learn how to use its features to investigate problems in your code.

شروع به کار با Visual Studio 2017