Advertisement
Guest User

no me leas xDD

a guest
Sep 29th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.18 KB | None | 0 0
  1. # encoding:utf-8
  2.  
  3. # caracteres compatibles:
  4. # abcdefghijklmnopqrstuvwxyzABCDEFGHJIKLMNOPQRSTUVWXYZ<>;,:.-_^[]{}'+!"$%&/()=?\|@#~`*0123456789
  5.  
  6. threexfive = '
  7.    #         #      ##     #    #   #  #    #                               #                           #  ##   ## ##  ### ###  ## # #  ## ### # # #   # # ###  #  ##   #  ##   ## ### # # # # # # # # # # ###   # #                            #   ## ##   ## ##    #      #  # #  ## # #  #    #   # #       ### #    #  ### # #   # #    #  ###  #  ### ### # # ### ### ### ### ###
  8. ## ### ### ### ###  #  ### ###         # #  #  ### ##  ### ### ### ###  ## ### # # # # # # # # # # ##  # # # # #   # # #   #   #   # #   #  #  # # #   ### # # # # # # # # # # #    #  # # # # # # # # # #   #  #   #   #       #              # #  #   #   #   #   #   #   #  # # ##    # #     #  #   #  ###   # #    #  # # ### ###  #  ### # # ##    #   # # # #   #     # # # # #
  9. # # # # #   # # ##  ### # # # #  #   #  ##   #  ### # # # # # # # # #    #   #  # # # # ###  #  ###  #  ### ##  #   # # ##  ##  # # ###   #  #  ##  #   ### # # # # ##  # # ##   #   #  # # # # ###  #   #   #  #     #                 ###          #   #  ##   ## #   ###  #      ###  #   ##  #   #   #       ##  #   #  #   # # #     #  #  # #  #  ###  ## ### ### ###   # ### ###
  10. ### ### ### ### ###  #   ## # #  ##  #  # #  ## # # # # ### ### ### #   ##   ## ###  #  ### # #   #  ## # # # # #   # # #   #   # # # # # #  #  # # #   # # # # # # #    ## # #   #  #  # # # # ### # #  #  #    #   #   #   #   #                   #   #   #   #       #           ## #   # # #    #   #  ###       #  #  ### ###         ### # #  #  #     #   #   # # #   # # #   #
  11.                    ##  ###         #                       #     #                             ###     # # ##   ## ##  ### #    ## # #  #  ### # # ### # # # #  #  #     # # # ##   #  ###  #  # # # #  #  ###   # #   #   #        #      ###      ## ##   ## ##           #      ##  # # ### #     # #        #    #  #      # #          #  ### ### ### ###   # ### ###   # ### ###
  12. '
  13. char_pos = {
  14.   :' ' => ' ',
  15.   :a => 0..3,
  16.   :b => 4..7,
  17.   :c => 8..11,
  18.   :d => 12..15,
  19.   :e => 16..19,
  20.   :f => 20..23,
  21.   :g => 24..27,
  22.   :h => 28..31,
  23.   :i => 33..35,
  24.   :j => 36..38,
  25.   :k => 40..43,
  26.   :l => 45..47,
  27.   :m => 48..51,
  28.   :n => 52..55,
  29.   :o => 56..59,
  30.   :p => 60..63,
  31.   :q => 64..67,
  32.   :r => 68..71,
  33.   :s => 72..75,
  34.   :t => 76..79,
  35.   :u => 80..83,
  36.   :v => 84..87,
  37.   :w => 88..91,
  38.   :x => 92..95,
  39.   :y => 96..99,
  40.   :z => 100..103,
  41.   :A => 104..107,
  42.   :B => 108..111,
  43.   :C => 112..115,
  44.   :D => 116..119,
  45.   :E => 120..123,
  46.   :F => 124..127,
  47.   :G => 128..131,
  48.   :H => 132..135,
  49.   :I => 136..139,
  50.   :J => 140..143,
  51.   :K => 144..147,
  52.   :L => 148..151,
  53.   :M => 152..155,
  54.   :N => 156..159,
  55.   :O => 160..163,
  56.   :P => 164..167,
  57.   :Q => 168..171,
  58.   :R => 172..175,
  59.   :S => 176..179,
  60.   :T => 180..183,
  61.   :U => 184..187,
  62.   :V => 188..191,
  63.   :W => 192..195,
  64.   :X => 196..199,
  65.   :Y => 200..203,
  66.   :Z => 204..206,
  67.   :< => 207..210,
  68.   :> => 211..214,
  69.   :';' => 215..218,
  70.   :',' => 219..222,
  71.   :':' => 223..226,
  72.   :'.' => 227..230,
  73.   :- => 231..234,
  74.   :_ => 235..238,
  75.   :'^' => 239..242,
  76.   :'[' => 244..246,
  77.   :']' => 248..250,
  78.   :'{' => 251..254,
  79.   :'}' => 255..258,
  80.   :'\'' => 259..262,
  81.   :+ => 263..266,
  82.   :'!' => 268..270,
  83.   :'"' => 271..274,
  84.   :'$' => 275..278,
  85.   :% => 279..282,
  86.   :& => 283..286,
  87.   :/ => 287..290,
  88.   :'(' => 292..295,
  89.   :')' => 296..298,
  90.   :'=' => 300..302,
  91.   :'?' => 303..306,
  92.   :'\\' => 307..310,
  93.   :| => 312..314,
  94.   :'@' => 316..319,
  95.   :'#' => 320..323,
  96.   :~ => 324..327,
  97.   :` => 328..331,
  98.  :* => 332..335,
  99.  :'0' => 336..339,
  100.  :'1' => 340..343,
  101.  :'2' => 344..347,
  102.  :'3' => 348..351,
  103.  :'4' => 352..355,
  104.  :'5' => 356..359,
  105.  :'6' => 360..363,
  106.  :'7' => 364..367,
  107.  :'8' => 368..371,
  108.  :'9' => 372..375,
  109. }
  110.  
  111. word = 'TESTEANDO'
  112.  
  113. result = Array.new(threexfive.lines.count){''}    
  114. word.each_char do |char|
  115.  pos = char_pos[char.to_sym]                      
  116.  threexfive.lines.each_with_index do |line,index|
  117.    next if index == 0                            
  118.    result[index] << line[pos]                    
  119.  end
  120. end
  121. result = result.join("\n")                        
  122.  
  123. puts result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement