Skip to content

Instantly share code, notes, and snippets.

// Newbie programmer
int factorial_newbie(int n) {
if (n == 0) {
return 1
} else {
return n * factorial_newbie(n - 1)
}
}
println factorial_newbie(6)
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
</web-app>
@axiak
axiak / hmm.rb
Created June 15, 2012 04:00 — forked from offby1/hmm.rb
class String
def my_reverse
reversed = []
self.each_char do |char|
reversed.unshift(char)
end
reversed.join('')
end
end