15نکتهی مهم در مورد کروم DevTools
کتابخانه tether
PowerShell 7.1 و استفاده از NET 5.
The preview release of PowerShell 7.1 includes .NET 5 preview 1. Starting with PowerShell 7.0, devs have shifted to align with .NET’s release and support life-cycle more closely. PowerShell 7.1 is expected to become available within a week or two of .NET 5’s release date of winter 2020 and align with their annual release cadence going forward.
اشارهگرها در #C
ردیس ۷ در راه است
گویا ۳ برابر سریعتر از الستیکسرچ است!
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.
کتابخانه Scroll to Style
scrollToStyle is a versatile tool that lets you manage CSS properties of elements using the page scroll.
You will be able to compel the elements move, change their size, color, opacity, background and many other properties.
Features:
- Management absolutely all the properties of a numeric value
- Browser Support depends only on selected properties
- It manages multiple properties of the same element
- Management fractional property values and control the number of decimal places
- Fixing of the screen during an animation
- Animation range control
CoffeeScript #8
اصطلاحات عمومی CoffeeScript
Includes
برای چک کردن وجود یک مقدار در یک آرایه به طور معمول از indexOf استفاده میشود؛ در حالی که تمامی نسخههای IE به طور کامل از آن پشتیبانی نمیکنند.
var included = (array.indexOf("test") != -1)
included = "test" in array
included = "a long test string".indexOf("test") isnt -1
string = "a long test string" included = !~ string.indexOf "test"
تکرار Propertyها
در صورتی که به خصوصیات یک شیء چندین بار نیاز داشته باشید، در جاوااسکریپت باید از کلمهی کلیدی in استفاده کنید:
var object = {one: 1, two: 2} for(var key in object) alert(key + " = " + object[key])
object = {one: 1, two: 2} alert("#{key} = #{value}") for key, value of object
var key, object, value; object = { one: 1, two: 2 }; for (key in object) { value = object[key]; alert(key + " = " + value); }
Min/Max
درست است که این تکنیک مخصوص CoffeeScript نیست، اما اشاره به آن میتواند مفید باشد. تابع Math.max و Max.min میتوانند چندین آرگومان یا یک آرایه را به عنوان ورودی گرفته و بر روی آن محاسبات خود را انجام داده و خروجی را نشان دهند:
Math.max [14, 35, -7, 46, 98]... # 98 Math.min [14, 35, -7, 46, 98]... # -7
Math.max.apply(Math, [14, 35, -7, 46, 98]); Math.min.apply(Math, [14, 35, -7, 46, 98]);