... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
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, |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
import Component from './component'; | |
class Widget extends Component { | |
init(ctrl) { | |
var props = this.props; | |
ctrl.counter = props.initialValue; | |
ctrl.increment = function() { | |
ctrl.counter++; |
var BatchStream = require('batch-stream2') | |
var gulp = require('gulp') | |
var coffee = require('gulp-coffee') | |
var uglify = require('gulp-uglify') | |
var cssmin = require('gulp-minify-css') | |
var bower = require('gulp-bower-files') | |
var stylus = require('gulp-stylus') | |
var livereload = require('gulp-livereload') | |
var include = require('gulp-include') | |
var concat = require('gulp-concat') |
""" | |
Test Driven Learning Project. | |
Desenvolva TDD e programação com TDD e programação! | |
Módulo novice. | |
>>> __name__ | |
'__main__' | |
""" | |
# Precisa de algum módulo? importe aqui: |
.text | |
main: lui $8, 0x1001 | |
addi $9, $0, 0x00ff00 | |
addi $10, $0, 0xffff | |
addi $10, $10, 0xfff0 | |
addi $11, $0, 0 | |
sw $9, 0($8) | |
Porting an application across platforms is never particularly easy, nor very interesting. In fact, it's usually a terrible idea: in general, if it ain't broke, don't fix it. But sometimes you have to do it. Maybe a new platform has a feature you believe you can't live without, or the project scope is expanding in directions that make you feel like your original platform choice might not have been the best, or maybe it's just necessary to port for political reasons. Whatever.
""" | |
========================================================= | |
Classe ObjetoJS: imitação simples de um objeto JavaScript | |
========================================================= | |
Uma instância é construída passando argumentos nomeados: | |
>>> o = ObjetoJS(z=33, x=11, y=22) | |
A representação textual de uma instância parece a chamada do |
# Update System | |
sudo apt-get update && sudo apt-get dist-upgrade | |
# Install prerequisites | |
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev libncurses5-dev zlib1g zlib1g-dev sqlite3 libxslt-dev libxml2-dev libsqlite3-dev python-software-properties postfix curl libcurl3 libcurl3-gnutls libcurl4-openssl-dev | |
# Misc Utilities | |
sudo apt-get install ssh tmux vim git-core wget zip unzip mcrypt imagemagick libmagickwand-dev htop whois dnsutils powertop gparted zenmap terminator | |
# Set up git config |
vids |