Simulating refreshing receiving a 'real-time' (constantly updating) data feed. Adheare's to D3's general update pattern. When the end of the data feed is reached, intra-day data updates will be simulated
| /* regular */ | |
| font-family: "HelveticaNeue", "Helvetica Neue", "HelveticaNeueRoman", "HelveticaNeue-Roman", "Helvetica Neue Roman", 'TeXGyreHerosRegular', "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; | |
| font-weight:400; | |
| font-stretch:normal; | |
| /* condensed */ | |
| font-family: "HelveticaNeueCondensed", "HelveticaNeue-Condensed", "Helvetica Neue Condensed", "HelveticaNeueRomanCondensed", "HelveticaNeue-Roman-Condensed", "Helvetica Neue Roman Condensed", "HelveticaNeue", "Helvetica Neue", "HelveticaNeueRoman", "HelveticaNeue-Roman", "Helvetica Neue Roman", 'TeXGyreHerosCnRegular', "Helvetica", "Tahoma", "Geneva", "Arial Narrow", "Arial", sans-serif; | |
| font-weight:400; | |
| font-stretch:condensed; |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <video></video> | |
| <br/> | |
| <input type="file" name="file" id="fileItem" onchange="onChange()" > |
I would recommend @acdlite's redux-actions over the methods suggested in this Gist.
The methods below can break hot-reloading and don't support Promise-based actions.
Even though 'redux-actions' still uses constants, I've come to terms with the fact that constants can be good, especially in bigger projects. You can reduce boilerplate in different places, as described in the redux docs here: http://gaearon.github.io/redux/docs/recipes/ReducingBoilerplate.html
| // Example for lukaseichler.de/how-to-test-dispatch-request/ | |
| import dispatch.{HttpExecutor, _} | |
| import dispatch.Defaults._ | |
| val httpMock = mock[HttpExecutor] | |
| (httpMock.apply(_: (Request, AsyncHandler[String]))(_: ExecutionContext)) | |
| .expects(*, *) | |
| .returning(Future[String] { | |
| "Hello World" |
##Погодное одностраничное веб-приложение
(!) Данные можно взять с сайта openweathermap.org или с любого другого сервиса.
(!) Обязательно использовать react.js и redux.
Приложение должно уметь:
- Добавлять/удалять города
- Сохранять локально данные
I’m amazed by React and how it’s bringing happiness to our developer lives. I specially like the workflow that integrates Webpack + React + CSS Modules + Babel among other tools and preprocessors. That’s why Javier Jiménez and I are working together in a library called React Toolbox that we would like to show in a lightning talk at Reactive Conference.
The main idea is to create a set of React components implementing Material Design guidelines. There are already some libraries that solve a similar problem but our project is mostly focused on the workflow and best practices to create a tool everybody would want to use. Also, we are sticking to the design guidelines proposed by Google and embracing minimalism by generating the minimum possible amount of HTML and styles to get the best result. Our workflow includes among others:
- Webpack.
- ES6 with Babel
- Unit t
| import java.util.concurrent.ArrayBlockingQueue | |
| import scala.concurrent.{ExecutionContext, Future} | |
| /** | |
| * Rick's implementation of ghetto back-pressure algo | |
| * Implement this trait and pass it off to ProducerConsumer.Runner to run it | |
| * | |
| * @tparam R Type of result to be crunched | |
| * @tparam S State to iterate on |
| //@flow | |
| declare export function curry3<A, B, C, D>(fn: (a: A, b: B, c: C) => D): ( | |
| & ((a: A, nob: void, noc: void) => ( | |
| & ((b: B, noc: void) => ((c: C) => D)) | |
| & ((b: B, c: C) => D) | |
| )) | |
| & ((a: A, b: B, noc: void) => ((c: C) => D)) | |
| & ((a: A, b: B, c: C) => D) | |
| ) |