Here’s where you can download our First Responder Kit complete with:
- Our scripts: sp_Blitz, sp_BlitzCache, sp_BlitzIndex, sp_AskBrent, sp_BlitzRS, sp_BlitzTrace
- Our e-books: SQL Server Setup Guide, AlwaysOn Availability Groups Checklist, the DBA Training Plan, How to Develop Your DBA Career
- Our posters: Table Partitioning, Isolation Levels, Bandwidth Reference
- Our whitepapers: Factors of Cloud Success, Sizing Up Solid State Drives
قوانین مالکیت
- هر مقدار در Rust دارای یک متغیر مرتبط به نام مالک آن است.
- در هر لحظه فقط یک مالک میتواند وجود داشته باشد.
- وقتی مالک از scope خارج میشود، مقدار مرتبط حذف میشود.
مالکیت در Rust به جلوگیری از چندین مشکل مدیریت حافظه کمک میکند، از جمله:
- Memory/resource leaks
- Double free
- Use after free
هر مقدار در Rust دارای یک متغیر مرتبط به نام مالک آن است
به مثال زیر توجه کنید:
let s1 = String::from("Rust");
طبق قوانین مالکیت:
- s1 مالک دادههای ذخیره شدهی در heap است.
- هنگامیکه s1 از scope خارج شود، دادههای آن نیز پاک میشوند.
تلاش برای ارجاع به s1 پس از خارج شدن آن از scope، منجر به خطا میشود؛ زیرا مقدار آن از heap حذف شده و دیگر وجود ندارد.
اگر برای انتقال s1 به s2 از کد زیر استفاده کنید:
let s2 = s1;
Cloning Values
اگر بخواهیم بجای جابجایی مقدار، آن را تولید/نمونهسازی مجدد (cloning) کنیم، میتوانیم با فراخوانی متد ()clone اینکار را انجام دهیم:
let s2 = s1.clone();
Primitive Data و Cloning
در Rust، دادههای اولیه بهطور کامل در stack ذخیره میشوند و بهطور پیش فرض clone میشوند. نمونه سازی مجدد این انواع، ارزان است و تفاوتی بین clone و moving وجود ندارد.
پاس دادن Variables به Functions
ارسال یک متغیر به یک تابع، همان تأثیری را دارد که یک متغیر را به متغیر دیگری اختصاص میدهیم. به عنوان مثال، اگر s1 را به یک تابع ارسال کنیم، مالک جدید رشته p1 است ( p1 نام آرگومان تابع است). برای رفع هرگونه خطایی که ممکن است به این دلیل ایجاد شود، میتوانیم s1 را clone کرده و به تابع ارسال کنیم.
سیستم مالکیت Rust، یک راه قدرتمند را برای مدیریت حافظهی در زمان کامپایل فراهم میکند و از مشکلات رایج مرتبط با حافظه جلوگیری میکند. با درک و پیروی از قوانین مالکیت، میتوانید کد ایمنتر و کارآمدتری را در Rust بنویسید.
کتاب رایگان R Programming Succinctly
The R programming language on its own is a powerful tool that can perform thousands of statistical tasks, but by writing programs in R, you gain tremendous power and flexibility to extend its base functionality. Senior Succinctly series author and editor James McCaffrey shows you how in R Programming Succinctly.
- Getting Started
- Vectors and Functions
- Object-Oriented Programming
- Permutations and Combinations
- Advanced R Programming
کتابخانه Hangfire
An easy way to perform background job processing in your .NET and .NET Core applications. No Windows Service or separate process required. CPU and I/O intensive, long-running and short-running jobs are supported. Backed by Redis, SQL Server, SQL Azure and MSMQ.
PM> Install-Package Hangfire
After installation, update your existing OWIN Startup file with the following lines of code. If you do not have this class in your project or don't know what is it, please read the Quick start guide to learn about how to install Hangfire.
public void Configuration(IAppBuilder app)
{
GlobalConfiguration.Configuration.UseSqlServerStorage("<connection string or its name>");
app.UseHangfireServer();
app.UseHangfireDashboard();
}
کتاب رایگان Java Succinctly Part 2
In this second e-book on Java, Christopher Rose takes readers through some of the more advanced features of the language. Java Succinctly Part 2explores powerful and practical features of Java, such as multithreading, building GUI applications, and 2-D graphics and game programming. Then learn techniques for using these mechanisms in coherent projects by building a calculator app and a simple game with the author.
- Packages and Assert
- Reading and Writing to Files
- Polymorphism
- Anonymous Classes
- Multithreading
- Introduction to GUI Programming
- GUI Windows Builder
- 2-D Game Programming