A demonstration of how simple it is to create a local server in Node.
This barebones example is here to help you understand how you could serve a simple static directory as a local site.
node .
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
## package.json changes | |
"webpack": "^2.1.0-beta.20", | |
"typescript": "^2.0.0", | |
"webpack-dev-server": "^2.1.0-beta.0", | |
"webpack-hot-middleware": "^2.12.2", | |
"webpack-split-by-path": "^0.1.0-beta.1", <-- struggles, I've removed it | |
https://github.com/BohdanTkachenko/webpack-split-by-path/pull/22#issuecomment-240050461 |
/* | |
WallabyJS React Native Config | |
Works well with Jest + Enzyme | |
*/ | |
/* eslint-disable */ | |
module.exports = function (wallaby) { | |
return { | |
files: [ | |
'src/**/*.js', |
Redux has brought the notion of reducer back into the awareness of many developers for whom they are a novel concept. In fact they are quite simple, and used all the time in such things as SUM
aggregations in databases, where they compute a single value from many.
It's great that Redux has made reducers known to a broader audience, though they are relatively ancient concepts in programming, in fact. But the particular way Redux illustrates a reducer in its documentaion is, in my opinion, with a coding style that is harder to extend and read than it should be. Let's distill reducers down to their essensce, and build up Redux reducers in a way that lowers complexity, and helps separate Redux idioms from your business logic.
A reducer is a pure function that accepts more arguments than it returns. That is to say - one whose "arity" is greater than 1. It 'reduces' the two things you pass it down to a single value. Here are two reducers, in a map
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>bprop</Title> | |
<Author>Microsoft Corporation</Author> | |
<Description>Code snippet for an automatically implemented $name$Property |
namespace YourNamespace | |
{ | |
public interface ITextMeter | |
{ | |
double MeasureTextSize(string text, double width, double fontSize, string fontName = null); | |
} | |
} |
namespace Analogy | |
{ | |
/// <summary> | |
/// This example shows that a library that needs access to target .NET Standard 1.3 | |
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET | |
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library. | |
/// </summary>INetCoreApp10 | |
class Example1 | |
{ | |
public void Net45Application(INetFramework45 platform) |
Install the React Developer Tools Chrome Extension.
Go to the egghead website, i.e. Getting Started with Redux
Click View -> Developer -> Javascript Console
, then the React
tab, then the <NextUpLessonList ...>
tag.
Click back to the Console
tab, then run:
/* | |
WARNING: This MultiBinding implementation only works when it is directly applied to its target property. | |
It will fail if used inside of a setter (such is the case when used within a trigger or style). | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Globalization; | |
using System.Linq; | |
using System.Runtime.CompilerServices; |