This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
class Arbol | |
attr_accessor :carga | |
attr_accessor :nodo_izquierda | |
attr_accessor :nodo_derecha | |
def initialize(carga=nil, izq=nil, der=nil) | |
carga.downcase! if carga.respond_to? "downcase!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import time | |
while True: | |
t = datetime.utcnow() | |
print '%s:%s:%s' % (t.hour, t.minute, t.second) | |
sleeptime = 1 - (t.microsecond/1000000.0) | |
time.sleep(sleeptime) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# creamos una clase, solo por gusto, la verdad... | |
class RubySimpleClock | |
attr_reader :time | |
def initialize(name="Ruby Simple Clock") | |
@name = name.strip.squeeze | |
tick! # iniciamos el campo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct Id<T> | |
{ | |
public readonly int Value; | |
public Id(int value) | |
{ | |
this.value = value; | |
} | |
public static implicit operator Id<T>(int value) |
NewerOlder