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
# Permutations without Repetition | |
# | |
# n! | |
# -------- | |
# (n-r)! | |
def permutations(total) | |
(total-1).downto(1) do |i| | |
total = total * i unless i == 0 |
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
diff --git a/Gemfile.lock b/Gemfile.lock | |
index d2b6ae1..4514854 100644 | |
--- a/Gemfile.lock | |
+++ b/Gemfile.lock | |
@@ -56,6 +56,7 @@ GEM | |
chronic_duration (0.9.4) | |
numerizer (~> 0.1.1) | |
closure-compiler (1.1.1) | |
+ columnize (0.3.3) | |
crack (0.1.8) |
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
Building native extensions. This could take a while... | |
ERROR: Error installing mysql2: | |
ERROR: Failed to build gem native extension. | |
/Users/simeon/.rbenv/versions/ree-1.8.7-2011.03/bin/ruby extconf.rb | |
checking for rb_thread_blocking_region()... no | |
checking for mysql.h... no | |
checking for mysql/mysql.h... no | |
----- | |
mysql.h is missing. please check your installation of mysql and try again. |
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
Building native extensions. This could take a while... | |
ERROR: Error installing mysql2: | |
ERROR: Failed to build gem native extension. | |
/Users/simeon/.rbenv/versions/ree-1.8.7-2011.03/bin/ruby extconf.rb --with-mysql-config=/usr/local/bin/mysql_config | |
checking for rb_thread_blocking_region()... no | |
checking for mysql.h... no | |
checking for mysql/mysql.h... no | |
----- | |
mysql.h is missing. please check your installation of mysql and try again. |
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
Building native extensions. This could take a while... | |
ERROR: Error installing mysql2: | |
ERROR: Failed to build gem native extension. | |
/Users/simeon/.rbenv/versions/ree-1.8.7-2011.03/bin/ruby extconf.rb --with-mysql-dir=/usr/local | |
checking for rb_thread_blocking_region()... no | |
checking for mysql.h... no | |
checking for mysql/mysql.h... no | |
----- | |
mysql.h is missing. please check your installation of mysql and try again. |
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
Usage: /usr/local/bin/mysql_config [OPTIONS] | |
Options: | |
--cflags [-I/usr/local/Cellar/mysql/5.5.14/include -g -arch i386 -arch x86_64] | |
--include [-I/usr/local/Cellar/mysql/5.5.14/include] | |
--libs [-L/usr/local/Cellar/mysql/5.5.14/lib -lmysqlclient -lpthread -lz -lssl -lcrypto] | |
--libs_r [-L/usr/local/Cellar/mysql/5.5.14/lib -lmysqlclient_r -lpthread -lz -lssl -lcrypto] | |
--plugindir [/usr/local/Cellar/mysql/5.5.14/lib/plugin] | |
--socket [/tmp/mysql.sock] | |
--port [0] | |
--version [5.5.14] |
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
lrwxr-xr-x 1 simeon wheel 32 Aug 18 17:06 /usr/local/bin/mysql -> ../Cellar/mysql/5.5.14/bin/mysql | |
lrwxr-xr-x 1 simeon wheel 39 Aug 18 17:06 /usr/local/bin/mysql.server -> ../Cellar/mysql/5.5.14/bin/mysql.server | |
lrwxr-xr-x 1 simeon wheel 44 Aug 18 17:06 /usr/local/bin/mysql_client_test -> ../Cellar/mysql/5.5.14/bin/mysql_client_test | |
lrwxr-xr-x 1 simeon wheel 39 Aug 18 17:06 /usr/local/bin/mysql_config -> ../Cellar/mysql/5.5.14/bin/mysql_config | |
lrwxr-xr-x 1 simeon wheel 53 Aug 18 17:06 /usr/local/bin/mysql_convert_table_format -> ../Cellar/mysql/5.5.14/bin/mysql_convert_table_format | |
lrwxr-xr-x 1 simeon wheel 42 Aug 18 17:06 /usr/local/bin/mysql_find_rows -> ../Cellar/mysql/5.5.14/bin/mysql_find_rows | |
lrwxr-xr-x 1 simeon wheel 47 Aug 18 17:06 /usr/local/bin/mysql_fix_extensions -> ../Cellar/mysql/5.5.14/bin/mysql_fix_extensions | |
lrwxr-xr-x 1 simeon wheel 43 Aug 18 17:06 /usr/local/bin/mysql_install_db -> ../Cellar/mysql/5.5.14/bin/mysql_install_db | |
lrwxr-xr-x 1 simeon wheel 52 Aug 18 17: |
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
Building native extensions. This could take a while... | |
ERROR: Error installing mysql2: | |
ERROR: Failed to build gem native extension. | |
/Users/simeon/.rbenv/versions/ree-1.8.7-2011.03/bin/ruby extconf.rb --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/bin/mysql_config | |
checking for rb_thread_blocking_region()... no | |
checking for mysql.h... no | |
checking for mysql/mysql.h... no | |
----- | |
mysql.h is missing. please check your installation of mysql and try again. |