Skip to content

Instantly share code, notes, and snippets.

@hvitorino
hvitorino / gist:3794103
Created September 27, 2012 13:48
Strategy Pattern
using System;
namespace Bolar
{
class Program
{
static void Main(string[] args)
{
Bora.BolarUmBong.MandaVer();
Bora.BolarUmFino.MandaVer();
@hvitorino
hvitorino / gist:3794123
Created September 27, 2012 13:52
Strategy Pattern com dicionário
using System;
using System.Collections.Generic;
namespace Bolar
{
class Program
{
static void Main(string[] args)
{
Bora.BolarUmBong.MandaVer();
@hvitorino
hvitorino / gist:4154345
Created November 27, 2012 13:57
frontend_pub

#Produtividade (5-5-4-3)

  • NLib (3-3-4-3)
  • Componentes de terceiros (4-3-4-4)
  • Flex (4-4-4-5)
  • .Net (5-5-5-5)

#Customização (3-3-4-2)

  • NLib (5-4-4-4)
@hvitorino
hvitorino / gist:4154361
Created November 27, 2012 14:01
resultado

#Produtividade 4,5

  • NLib - 3 => 13,5
  • 3os - 4 => 18
  • Flex - 4 => 18
  • .Net - 5 => 22,5

#Customizabilidade 3

  • NLib - 4 => 12
(function (n) {
n.Ajax = n.Ajax || {};
n.Ajax.Request = function () {
this.url = "/";
this.requestDataType = "application/json";
this.responseDataType = "application/json";
this.successCallback = null;
this.internalErrorCallback = null;
this.notFoundCallback = null;
using System.IO;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Restfulie.Server.Marshalling.Serializers;
namespace NLib.Web.Configuracao.Restfulie
{
public abstract class NLSerializer : IResourceSerializer
{
private readonly JsonSerializer jsonSerializer;

O Yahoo convocou todos os seus trabalhadores remotos. Em junho, estarão todos sentados em suas mesas no Vale do Silício ou estarão procurando outro emprego.

Eu estaria procurando outro emprego. Não por precisar ir ao escritório todos os dias, mas por estarem tentando resolver o problema errado. É como se acreditassem que forçando as pessoas a cumprir uma agenda, trabalhando num ambiente onde poderão ser controladas, tudo se resolverá naturalmente.

Onde trabalho, as pessoas fazem suas próprias agendas. Trabalhando em um escritório ou em casa. Sem horários pré-definidos, sem controles, sem micro-gerenciamento. Ainda assim, funciona. E funciona devido a dois valores culturais primários: respeito e cuidado.

##Respeitando o indivíduo. Cuidando do indivíduo.

Respeito não é limitado a tratar as pessoas polidamente. É respeitando a eles como indivíduos, é entendendo que cada pessoa é diferente, que trabalha de maneira diferente, possui desafios diferentes ou circunstâncias diferentes com as quais precisam lidar.

App.Graficos.Pizza = function (elementoHtml) {
var self = this;
self.Opcoes = {
title : { text: 'Demitir funcionário?' },
legend: {
labelFormatter: function () {
return this.name + ": " + this.y;
}
},
//http://www.ivyishere.org/
var songs = new Array($(".module-row-cell.artist").length);
for(var i = 0; i < songs.length; i++)
songs[i] = { name: "", artist: "" };
$.each($(".module-row-cell.artist"), function(index, item) {
songs[index].artist = $(item).text();
});
@hvitorino
hvitorino / baixar anexo ie8
Created October 11, 2013 15:10
Obrigado IE8 por dificultar minha vida sempre que possível ! \o/
public class ArquivoAnexoResult : FileContentResult
{
public ArquivoAnexoResult(byte[] data)
: base(data, "application/octet-stream")
{
}
public ArquivoAnexoResult(byte[] data, string fileName)
: this(data)
{