I hereby claim:
- I am foliveira on github.
- I am foliveira (https://keybase.io/foliveira) on keybase.
- I have a public key whose fingerprint is F11E 0B4B D7C8 643E 0611 0AC5 D1C6 57CB 6E5B 48DD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
{ | |
"path": "fabio+oliveira", | |
"firstName": "Fábio", | |
"lastName": "Oliveira", | |
"role": "Node.js", | |
"longRole": "Node.js Consultant", | |
"location": "Lisbon, Portugal", | |
"organization": "YLD Limited", | |
"bio": "Fábio is a professional Node.js developer, with a huge appetite for learning. Always curious and eager to learn more, he considers himself a full-stack developer and has worked on projects ranging from augmented reality frameworks to realtime analytics products. In his list of interests one can find diverse subjects such has photography, Star Wars, cats and reading 'out-of-the-ordinary' literature.", | |
"twitter": "fanoliveira", |
defmodule Fun do | |
def max([x]), do: x | |
def max([ head | tail ]), do: Kernel.max(head, max(tail)) | |
end |
public static IEnumerable<T> LazyQsort<T>(IEnumerable<T> seq, Func<T, T, bool> comp) | |
{ | |
if (seq.Any() == false) | |
{ | |
return Enumerable.Empty<T>(); | |
} | |
var pivot = seq.First(); | |
var xs = seq.Skip(1); | |
return LazyQsort(xs.Where(x => comp (x, pivot)), comp) |
function Process(num, h) { | |
var first_num = num.charAt(0) | |
var following_nums = num.slice(1) | |
var first_num_hash_hit = h[first_num] | |
var following_nums_lookahead = following_nums.charAt(0) | |
if(!first_num_hash_hit.hasOwnProperty(following_nums_lookahead)) | |
return null | |
if(following_nums.length === 0) |
Counting unique elements of a finite set usually requires linear time/space; this means the bigger the set of unique elements the more time/space it will take us to keep an exact count of unique elements.
A good example of this is the usage of an HashSet - we add an element to a Set (to ensure uniqueness), it gets hashed and stored:
In case it's the first one, it is added and that's it;
In case it isn't (in case of an hash collision, duplicate value, etc) various things can happen; most common implementations use [Linear Probing][1]
#!/bin/sh | |
ykpersonalize -S 06050a0e08170b0f1c11180d16090c1986858a8e88978b8f9c91988d96898c99271e1f202122232425262b9e28 |
(function () { | |
var root = angular.element(document.getElementsByTagName('body')); | |
var countWatchers_ = function(element, scopes, count) { | |
var scope; | |
scope = element.data().$scope; | |
if (scope && !(scope.$id in scopes)) { | |
scopes[scope.$id] = true; | |
if (scope.$$watchers) { |
#!/bin/bash | |
pacman-mirrors | |
pacman -Syy | |
pacman -S archlinux-keyring manjaro-keyring | |
pacman-key --init | |
pacman-key --populate archlinux manjaro | |
pacman-key --refresh-keys | |
pacman -Syu |