export default class Area extends Bus
Bus’i extend etmek yerine; bus statik bir nesne olsa ve icerde dogrudan bus’u kullansan daha iyi. Yani
// bunun yerine
this.subscribe(this.handleEvents);
// I find myself using this utility function frequently. | |
// I don’t know if this pattern has a name, yet I’d like | |
// to call it the “switching reducer”. | |
// Here’s how you define it: | |
// ######################## | |
// The Library | |
// ######################## |
// Assume `dispatch` and `fetchFromNetwork` are defined elsewhere. | |
// ## 1. CPS With Nodebacks | |
// This is the old-school-style fetch. Mostly here for | |
// historical reasons. | |
// | |
// Yet, contrary to the arguments against using it, | |
// it‘s not that hard to maintain this code when you are | |
// careful and know what you are doing. |
// Assume `fetch` and `notify` are defined elsewhere. | |
// ## 1. CPS With Nodebacks | |
function fetchAppState() { | |
return function(dispatch) { | |
fetch(function(err, data) { | |
if (err) { | |
console.error('Poop', err); | |
return; |
export default class Area extends Bus
Bus’i extend etmek yerine; bus statik bir nesne olsa ve icerde dogrudan bus’u kullansan daha iyi. Yani
// bunun yerine
this.subscribe(this.handleEvents);
docker run -i -t --name nodejs ubuntu:latest /bin/bash
So here, -i
stands for interactive mode and -t
will allocate a pseudo terminal for us.
Some more trivia about these flags.
Looking for workshop teachers to teach on the following topics!
For introductions please tweet @frontendmasters, @1marc or email: marc at FrontendMasters.com. Thanks!
You can propose other topics too.
Published blog post detailing topics and allowed people to vote on priority: 2016 Frontend Masters topic poll
Bolded topics are very highly requested.
/** | |
* Invalidates the current `ServiceWorker` running on the page. | |
* Why? Because managing a cache is damn hard; and sometimes due to race conditions | |
* your assets might get out-of-sync. | |
* | |
* This mini snippet checks the version of the app against an uncached resource and | |
* invalidates the workers if it finds a mismatch. | |
*/ | |
if ( navigator.serviceWorker && navigator.serviceWorker.getRegistrations ) { |
# | |
# Needless to say, I (Volkan Ozcelik) take no responsibility, whatsoever, | |
# about what will happen to your NAS when you try these. | |
# When did it to mine, I observed *ENORMOUS* performance gain and a zen-like silence. | |
# | |
# +----------------------------------------------------------+ | |
# | WHAT YOU ARE GOING TO DO CAN LIKELY VOID YOUR WARRANTY | | |
# | SO PROCEED WITH CAUTION | | |
# +----------------------------------------------------------+ | |
# |
<% | |
' Microsoft ADO | |
' | |
' (c) 1996 Microsoft Corporation. All Rights Reserved. | |
' | |
' ADO constants include file for VBScript | |
'---- CursorTypeEnum Values ---- | |
Const adOpenForwardOnly = 0 | |
Const adOpenKeyset = 1 |
λ help | |
λ 5 + 12 | |
17 | |
:: Num a => a | |
λ "volkan" | |
"volkan" | |
:: [Char] | |
λ [1,2,3,4] | |
[1,2,3,4] | |
:: Num t => [t] |