install this: https://github.com/parkr/ruby-build-github
And then install the ruby version 2.1.7 rbenv install 2.1.7-github
go in the folder of your website. Run:
rbenv local 2.1.7-github
This will set the ruby version of your project to 2.1.7.
install this: https://github.com/parkr/ruby-build-github
And then install the ruby version 2.1.7 rbenv install 2.1.7-github
go in the folder of your website. Run:
rbenv local 2.1.7-github
This will set the ruby version of your project to 2.1.7.
func isImage(filename string) bool { | |
is_img, _ := regexp.MatchString("(?i)\\.(png|jpg|jpeg|gif)$", filename) | |
return is_img | |
} |
def qsort(l) | |
return l if l.length <= 1 | |
pivot = l.sample | |
lft, rgt = l.partition {|e| e < pivot} | |
qsort(lft).concat(qsort(rgt)) | |
end |