This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule USPDistributorWeb.OrderController do | |
use USPDistributorWeb, :controller | |
alias USPDistributor.Orders | |
alias USPDistributor.Orders.Order | |
action_fallback USPDistributorWeb.FallbackController | |
plug Guardian.Permissions.Bitwise, [ensure: %{admin: [:list_orders]}] when action in [:index] | |
plug Guardian.Permissions.Bitwise, [ensure: %{order: [:create]}] when action in [:create] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) | |
{ | |
PunktMaterialny pkt = new PunktMaterialny(); //klasa z konstruktorem domyślnym | |
pkt.setMasa(5); | |
pkt.mombez(); | |
pkt.opis(); | |
PunktMaterialny pkt2 = new PunktMaterialny(8); //klasa z konstruktorem z parametrem | |
pkt2.opis(); | |
pkt.setMasa(3); //zmiana masy w pierwszym obiekcie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use reattach-to-user-namespace so pbcopy/pbpaste work again. | |
# Use 256 color terminal | |
set-option -g default-terminal screen-256color | |
# Use C-t as my tmux prefix key | |
# set-option -g prefix C-t | |
# Other keybindings. | |
bind-key k kill-pane |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selectMaps($()).map { elem => | |
elem.map { jsValue => | |
jsValue.validate[Level].get | |
}: List[Level] | |
}.collect { | |
case (list: List[Level]) => Ok(views.html.levelChooser(list)) | |
} | |
(for ( elem <- selectMaps($()) | |
jsValue <- elem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lightsControls = { | |
red: { | |
value: 0, | |
name: "R", | |
color: "#FF0000", | |
min: 0, | |
max: 255 | |
}, | |
green: { | |
value: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.actor.IO._ | |
import akka.actor.{Props, IO, IOManager, Actor, ActorSystem} | |
import akka.event.Logging | |
import akka.util.ByteString | |
import java.net.InetSocketAddress | |
class TCPEchoServer(port: Int) extends Actor { | |
val log = Logging(context.system, this) | |
val state = IterateeRef.Map.async[IO.Handle]()(context.dispatcher) |