Skip to content

Instantly share code, notes, and snippets.

@fidelisrafael
Created September 12, 2012 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fidelisrafael/3707087 to your computer and use it in GitHub Desktop.
Save fidelisrafael/3707087 to your computer and use it in GitHub Desktop.
Happy Programmer's Day!
// Ruby
[72, 97, 112, 112, 121, 32, 80, 114, 111, 103, 114, 97, 109, 109, 101, 114, 39, 115, 32, 68, 97, 121, 33].map(&:chr).join
// php
join(array_map("chr" , array(72, 97, 112, 112, 121, 32, 80, 114, 111, 103, 114, 97, 109, 109, 101, 114, 39, 115, 32, 68, 97, 121, 33)));
// JS
String.fromCharCode(72, 97, 112, 112, 121, 32, 80, 114, 111, 103, 114, 97, 109, 109, 101, 114, 39, 115, 32, 68, 97, 121, 33);
// C++
#include <iostream>
#define NUM_CHARS 23
int main() {
int i =0 , chars_codes[NUM_CHARS] = { 72, 97, 112, 112, 121, 32, 80, 114, 111, 103, 114, 97, 109, 109, 101, 114, 39, 115, 32, 68, 97, 121, 33 };
char message[NUM_CHARS];
for(i=0;i<=NUM_CHARS;i++) { message[i] = char(chars_codes[i]); }
printf("%s\n", message);
return 1 ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment