(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
@media all and (min-width: 768px) and (max-width: 1024px) { } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import Foundation | |
#if os(iOS) | |
import UIKit | |
#else | |
import AppKit | |
#endif | |
/// Return string value currently on clipboard | |
func getPasteboardContents() -> String? { |
# You need to install scikit-learn: | |
# sudo pip install scikit-learn | |
# | |
# Dataset: Polarity dataset v2.0 | |
# http://www.cs.cornell.edu/people/pabo/movie-review-data/ | |
# | |
# Full discussion: | |
# https://marcobonzanini.wordpress.com/2015/01/19/sentiment-analysis-with-python-and-scikit-learn |
AWS_ACCESS_KEY_ID = "YOUR_KEY_ID" | |
AWS_SECRET_ACCESS_KEY = "YOUR_ACCESS_KEY" | |
AWS_STORAGE_BUCKET_NAME = "BUCKET-NAME" | |
AWS_QUERYSTRING_AUTH = False | |
AWS_S3_SECURE_URLS = True | |
from boto.s3.connection import OrdinaryCallingFormat, S3Connection | |
AWS_S3_CALLING_FORMAT = OrdinaryCallingFormat() | |
S3Connection.DefaultHost = "s3-eu-west-1.amazonaws.com" # Must match your specific region |
// | |
// PasteboardWatcher.swift | |
// PasteboardWatcher | |
// | |
// Created by Devarshi Kulshreshtha on 6/19/15.PasteboardWatcher | |
// Copyright © 2015 Devarshi Kulshreshtha. All rights reserved. | |
// | |
import Cocoa |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g
. Once you're finished, you also won't need to use sudo
to install npm modules globally.
import { Pipe, PipeTransform } from '@angular/core'; | |
// Epochs | |
const epochs: any = [ | |
['year', 31536000], | |
['month', 2592000], | |
['day', 86400], | |
['hour', 3600], | |
['minute', 60], | |
['second', 1] |
Facades are a programming pattern in which a simpler public interface is provided to mask a composition of internal, more-complex, component usages.
When writing a lot of NgRx code - as many enterprises do - developers quickly accumulate large collections of actions and selectors classes. These classes are used to dispatch and query [respectively] the NgRx Store.
Using a Facade - to wrap and blackbox NgRx - simplifies accessing and modifying your NgRx state by masking internal all interactions with the Store
, actions
, reducers
, selectors
, and effects
.
For more introduction, see Better State Management with Ngrx Facades