Install TypeScript declarations from npm
lessonDuration 1m 31sFree
This lesson shows you how to acquire type declaration files for your TypeScript projects directly from npm.
Browse
Find courses, lessons, articles, talks, and podcasts.
7,176 resources
Showing 5,977–6,000 · Page 250 of 299
lessonDuration 1m 31sFree
This lesson shows you how to acquire type declaration files for your TypeScript projects directly from npm.
lessonDuration 1m 13sFree
micro is a small module that makes it easy to write high performance and asynchronous microservices in Node.js. This video will introduce you to micro by building a tiny service that responds to all requests.
lessonDuration 3m 51s
Learn one way to render SVG icons as a React component. You’ll learn about the dynamic nature of SVG by passing props to a component that modify the icons properties such as colors and size. You'll learn how to set up a stateless functional component, set up prop types and add a set of default props. One benefit to building an individual icon component is that only the SVG markup needed for that icon will be rendered, instead of having to load an entire set of icons and only using one of them. Also, different attributes can be overridden using props, making theming and integration simple.
lessonDuration 4m 12s
n this lesson, you’ll learn how to write a SCSS mixin to generate styles for variations of background-images. We’ll look at using SCSS lists to interpolate dynamic class names and property attributes and output icons at different sizes. If you need the ability to add or edit icons on a regular basis, having a SCSS mixin do the heavy lifting of calculating `background-position`, `background-size` and creating selectors will save you lots of time and manual work. _Note:_ this lesson assumes you have an understanding of SCSS, mixins and already have a process to compile SCSS.
lessonDuration 5m 48s
We can write reusable styles with the SCSS @extend or @mixin directives. Which one is better? It depends. A better question is, how do they differ? Extends: change the source order, mixins don’t. maintain relationships, mixins don’t. share inherited traits, mixins don’t. can extend multiple classes, mixins don’t. can create multiple class declarations in the compiled CSS, mixins don’t. can use the placeholder selector, mixins don’t. Mixins: can accept arguments, extends don’t. can pass additional content, extends don’t. repeat code when compiled, extends group class names together. work well wIth media queries, extends have a limited interaction wIth media queries. In this lesson we learn about writing reusable styles with the @extend directive and how it compares to the @mixin directive.
lessonDuration 3m 13s
It’s possible to position a grid item anywhere on a grid track. To do this, let’s specify some `grid-template-columns` and `grid-template-rows`, and to the grid items, we’ll pass `grid-column` and `grid-row` some numeric values.
lessonDuration 4m 11s
Learn how to use an SVG sprite to display your icons. Sprites are great because they add only a single HTTP request, are easy to add to markup and can be sized easily with the help of the `background-size` property. This is a good option if you know the icons aren’t going to change much and you don’t mind manually editing the SVG sprite. However, adding/editing icons once a sprite is created is cumbersome to do by hand, because you have to know the size and position of each icon and modify accordingly.
lessonDuration 1m 49s
In this lesson, we’ll learn how to embed an SVG sprite into markup and reference it throughout the page using the SVG “use” tag and fragment identifiers. This has become the standard way of displaying SVG icons because of the ability to dynamically style individual parts (especially interaction states). Also, because the SVG is just markup embedded on the page, it creates no extra HTTP requests. However, the block of SVG needs repeating on every page where icons are used.
lessonDuration 1m 4sFree
`this` is probably the most tricky thing to use in JavaScript and therefore TypeScript. Fortunately there is a TypeScript compiler flag `noImplicit` `this` that can help catch unsafe usages so beginners don't get caught off guard.
lessonDuration 2m 52s
Learn how to set an elements background image to embedded SVG. This method has an added benefit of not incurring any HTTP requests, as the SVG is simply embedded into the CSS. They can also be resized by changing the `width` and `height` of the element containing background image, so it’s easy to create multiple sizes of the same icon using this approach. If you’re looking for the ability to display icons at different sizes and want to modify the SVG interaction styles (such as on `:hover`), this is could be a good option. One negative to adding the interaction styles is that it requires you to duplicate selectors and the SVG markup; the more icons you have, the larger your stylesheets will become.
lessonDuration 1m 38s
Learn how to load a single SVG icon set from an external URL in order to take advantage of caching. This has the added benefit of not needing to include the same chunk of SVG on every page where icons are displayed. Since it’s the same resource being requested for each icon, the browser can cache the file as well. _Note:_ The SVG must be hosted on the same domain as the requested page. Some older/less feature complete browsers don’t support this functionality. If you only care about the latest browsers, you can get away with not using a JavaScript polyfill (but you should still provide some sort of fallback). However, the [svgxuse polyfill](https://github.com/Keyamoon/svgxuse) can help provide a cross browser experience, with the added necessity of a JavaScript dependency.
lessonDuration 1m 31s
In this lesson, we’ll explore the process of combining all of your SVG icons into one SVG sprite, to be included directly into markup. We’ll use the command line, along with the `svgo` and `svg-sprite-generator` npm packages to automate the process of compressing the SVGs and creating the sprite. _Note:_ This lesson assumes you have `npm` installed.
lessonDuration 1m 32s
Learn how to set an SVG as the background image of an element. Background images can be resized by changing the `width` and `height` of the element containing background image, so it’s easy to create multiple sizes of the same icon. However, each background image creates an HTTP request, so be aware of your page load speed. With this approach, you are unable to change attributes on the SVG such as fill or stroke. If you want the ability to display icons at different sizes and don’t need to change their appearance or their interaction styles (such as on `:hover`), this could be a good option for you.
lessonDuration 1m 6s
Since an SVG is really just an image, it can be included on a page just like any other image, using an `img` tag. This is simple to implement, easy to resize and has the benefit of being cacheable. There are a couple downsides to this approach, however. You can’t modify the SVG attributes such as fill or stroke; once the icon is included, there isn’t much you can do to change its appearance. Also, each icon you include creates an HTTP request, potentially impacting page load speed. If you’re looking for an easy way to implement just a couple of icons that don’t need to change, this is a viable option.
lessonDuration 3m 17s
In this lesson, you’ll learn how to create interactive and multi-colored SVG icons using only CSS. You’ll also see how the same familiar rules of inheritance and specificity apply when working with SVG. We’ll style icons on hover, change their size and style individual parts of an icon. When implementing SVG icons with the `use` tag, the browser renders the SVG inside something called the "shadow dom". Unfortunately, most browsers do not support accessing child elements of the shadow dom via CSS. In order to target elements inside a `use` tag, such as a `path`, you can target it at the global CSS level, like so: ``` path#rain { /* styles */ } ``` Instead of: ``` .Icon--umbrella path#rain { /* styles */ } ```
lessonDuration 2m 5sFree
Let's see how to use the `vue-axios` NPM package to make a request to an API, and make use of the data returned.
lessonDuration 7m 27sFree
Learn how to add a simple Redux-backed React component to a new Rails 5 app using React on Rails.
lessonDuration 2m 3s
Just like a bitmap image, you can compress an SVG by removing various pieces of code that aren’t necessary to it rendering properly. This reduces file size & download time, ultimately leading to a faster page load speed. You’ll learn how to automate the process of compressing your SVGs using `svgo` in the command line. For a full list of options and plugins available to use with `svgo`, [check out their documentation](https://github.com/svg/svgo). Note: This lesson assumes you have `npm` installed.
lessonDuration 3m 38s
Individual window functions are useful, but sometimes you’ll need to combine them to answer complex questions. For instance, which 10 star movies were released in the year that had the most 10 star movies released?
lessonDuration 2m 16s
If you have a list of competitors and their finishing times, how do you determine how much time separated each competitor? Lag and lead allow you to compare rows in order -- for instance, comparing the 1st and 2nd place finishers and the 2nd and 3rd place finishers.
lessonDuration 4m 26s
You have a table of movies and a table of directors; how can you see which director created each movie? An inner join will link related records so that you can answer questions like these. Inner joins are the most commonly used SQL join, because they only return data that is common in both tables.
lessonDuration 1m 6s
How could your Kickstarter-type site list the running total for each contribution next to it? Using window functions of course! The default behavior for aggregations under window functions is to create running totals.
lessonDuration 2m
What if you want aggregations that aren’t running totals? What if you want the sum total for the whole frame? Or the minimum value across the frame? Unbounded preceding, unbounded following, and current row help you define your frame of reference.
lessonDuration 1m 44s
What scores do the 90th percentile of students receive? How long does the 99th percentile web request take? Percentiles and arbitrary ntiles provider a richer understanding of underlying data and outliers.