(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.
# Solution 1 | |
# original solution proposed in the PR | |
# pro: easy declaration | |
# cons: instanciation is a little bit hard to write | |
# possible method conflict with multiple protocols | |
class MyObjcDelegate: | |
def connection_didFailWithError_(self, connection, error): | |
print("Protocol method got called!!", connection, error) | |
(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.
echo master shard_{0,1,2,3} | xargs -n1 /usr/local/bin/dropdb -p 6432 -h /tmp -U postgres | |
echo master shard_{0,1,2,3} | xargs -n1 /usr/local/bin/createdb -p 6432 -h /tmp -U postgres | |
for a in {0..3}; do | |
echo " | |
CREATE TABLE users (id serial PRIMARY KEY, username TEXT NOT NULL); | |
ALTER SEQUENCE users_id_seq INCREMENT BY 4 RESTART WITH $a; | |
" | /usr/local/bin/psql -p 6432 -h /tmp -U postgres -d shard_$a; | |
done |