Crystal Source Code:
def factorial(n)
n < 2 ? 1 : n * factorial(n - 1)
end
if ARGV.size > 0
n = ARGV.first.to_u64
puts factorial(n)
Crystal Source Code:
def factorial(n)
n < 2 ? 1 : n * factorial(n - 1)
end
if ARGV.size > 0
n = ARGV.first.to_u64
puts factorial(n)
I started using React Native in September 2018. I always forget some things when I build new apps, so I'll keep track of the gotchas on this post.
Some topics, such as navigation, will be fundamental to how I think about apps. Others, will be one-line helpers that make apps work more smoothly.
It's gotten to the point where I find my own answers from 6 months before on certain Github issues.
I'll keep adding over time as I think of more. If anyone thinks these topics would be useful, let me know and I'll elaborate.
I have made libraries to address a number of the topics here, from navigation to design.
From the comments: "These exact instructions are not working on Ubuntu 24.04. Ubuntu has changed the naming of ZFS partitions, partition 2 and 3 are switched around, and the boot/efi folder is now different."
I don't have my dual-disk test system any longer, and so can't adjust these steps myself.
Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04