... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
#!/usr/bin/env python | |
def curry(func): | |
""" | |
Decorator to curry a function, typical usage: | |
>>> @curry | |
... def foo(a, b, c): | |
... return a + b + c |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
#traduzido e adaptado de http://blog.trinket.io/writing-poetry-in-python/ | |
from random import choice, randint | |
adjetivos = '''compreensivo temperamental confiável confiável honesto desonesto | |
interessante chato carinhoso simpático amigável generoso ciumento invejoso | |
inseguro ambicioso ansioso bondoso sensato sensível teimoso preguiçoso | |
trabalhador calmo paciente inteligente esperto espirituoso astuto neurótico | |
ousado apático cínico sarcástico irônico cético alegre conservador pessimista | |
otimista tolerante corajoso educado mal-educado determinado sociável | |
solidário arrogante maldoso desajeitado burro independente confiável dependente |
# -*- encoding:utf-8 -*- | |
from __future__ import print_function | |
class BSTNode(object): | |
def __init__(self, key, value=None, left=None, right=None): | |
self.key = key | |
self.value = value | |
self.left = left |
var Comment = {] | |
Comment.create = function (attrs) { | |
return m.request({ method: 'POST', url: '/comments', data: attrs }) | |
} | |
// A view-model is basically a temporary, disposable copy of a model. | |
// It allows the user can either commit or cancel the changes they make. | |
Comment.vm = function (attrs) { | |
attrs = attrs || {} |
""" | |
Test Driven Learning Project. | |
Desenvolva TDD e programação com TDD e programação! | |
Módulo novice. | |
The MIT License (MIT) | |
Copyright (c) 2016 Paulo Henrique Rodrigues Pinheiro <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
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
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
use std::thread; | |
use std::sync::{Arc, RwLock}; | |
// Represents a reference to a node. | |
// This makes the code less repetitive to write and easier to read. | |
type NodeRef<T> = Arc<RwLock<_Node<T>>>; | |
// The private representation of a node. | |
struct _Node<T> { | |
inner_value: T, |
Edit: This list is now maintained in the rust-anthology repo.