Scala does not have checked exceptions like Java, so you can't do soemthing like this to force a programmer to deal with an exception:
public void stringToInt(String str) throws NumberFormatException {
Integer.parseInt(str)
}| README.txt - DIY Scala Enumeration | |
| Copyright (C) 2014-2016 Jim O'Flaherty | |
| Overview: | |
| Provide in Scala the closest equivalent to Java Enum | |
| - includes decorating each declared Enum member with extended information | |
| - guarantees pattern matching exhaustiveness checking | |
| - this is not available with scala.Enumeration | |
| ScalaOlio library (GPLv3) which contains more up-to-date versions of both `org.scalaolio.util.Enumeration` and `org.scalaolio.util.EnumerationDecorated`: |
This guide sets up a non-clustered Nutch crawler, which stores its data via HBase. We will not learn how to setup Hadoop et al., but just the bare minimum to crawl and index websites on a single machine.
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
This is my attempt to give Scala newcomers a quick-and-easy rundown to the prerequisite steps they need to a) try Scala, and b) get a standard project up and running on their machine. I'm not going to talk about the language at all; there are plenty of better resources a google search away. This is just focused on the prerequisite tooling and machine setup. I will not be assuming you have any background in JVM languages. So if you're coming from Python, Ruby, JavaScript, Haskell, or anywhere… I hope to present the information you need without assuming anything.
Disclaimer It has been over a decade since I was new to Scala, and when I was new to Scala, I was coming from a Java and Ruby background. This has probably caused me to unknowingly make some assumptions. Please feel free to call me out in comments/tweets!
One assumption I'm knowingly making is that you're on a Unix-like platform. Sorry, Windows users.
| openssl genrsa -out CAroot.key 2048 | |
| openssl req -new -key CAroot.key -out CAroot.csr # CN should be different from the certificates below | |
| openssl req -x509 -days 1825 -key CAroot.key -in CAroot.csr -out CAroot.crt | |
| cat CAroot.crt CAroot.key > CAroot.pem | |
| openssl genrsa -out mongod.key 2048 | |
| openssl req -new -key mongod.key -out mongod.csr | |
| openssl x509 -req -days 1825 -in mongod.csr -CA CAroot.pem -CAkey CAroot.key -CAcreateserial -out mongod.crt | |
| cat mongod.crt mongod.key > mongod.pem |