// IO: A Monad for side-effects. | |
import $ivy.`org.typelevel::cats-effect:1.3.1` | |
import cats.effect.IO | |
import scala.concurrent.ExecutionContext | |
implicit val IOTimer = IO.timer(ExecutionContext.global) | |
implicit val IOShift = IO.contextShift(ExecutionContext.global) | |
// ---------------------------------------------- |
For every developer, terminal is their weapon, so why don't you customize it to become a powerful, and a beautiful weapon?
Powerline style refers to a terminal style that helps developer to keep track of their workflow easily, allows them to have perfect visual on current directories and new changes. It is also git recognizable, and failure detector that will help your development process becomes more interact and much faster.
In this guideline, I will introduce you with 2 smart shells: Zsh
and Fishshell
. Both are perfect for the development jobs due to its rich of resources, and user-friendly.
package com.codersbistro.controllers | |
import akka.actor.ActorSystem | |
import akka.event.Logging | |
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport | |
import akka.http.scaladsl.model.{StatusCodes} | |
import akka.http.scaladsl.server.Route | |
import akka.http.scaladsl.server.Directives._ | |
import com.codersbistro.controllers.EmployeeController.QueryEmployee | |
import com.codersbistro.repository.EmployeeRepository |
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!
Also see this SO answer.
Table of Contents
(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.
object Algebra { | |
// Build up increasingly complex algebras | |
trait Magma[T] { | |
def add(x : T, y : T) : T | |
} | |
trait Monoid[T] extends Magma[T] { | |
def zero : T | |
} |
SELECT | |
SUBSTRING_INDEX(number, '.', 1) AS FIRST_INT, | |
SUBSTRING_INDEX(SUBSTRING_INDEX(number, '.', 2), '.', -1) AS SECOND_INT, | |
SUBSTRING_INDEX(number, '.', -1) AS THIRD_INT, | |
number as VERSION, | |
description as TITLE | |
FROM _version | |
ORDER BY | |
LENGTH(SUBSTRING_INDEX(number, '.', 1)) DESC, | |
SUBSTRING_INDEX(number, '.', 1) DESC, |
# Scala Installation | |
wget https://downloads.lightbend.com/scala/2.12.2/scala-2.12.2.deb | |
sudo dpkg -i scala-2.12.2.deb | |
# sbt Installation | |
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 | |
sudo apt-get update | |
sudo apt-get install sbt |