scala

How to fire Mac OS X notifications with AppleScript (and Scala) alvin July 11, 2017 - 1:09pm
Table of Contents1 - A “Hello, world” MacOS AppleScript notification2 - AppleScript: Mac notification with a sound3 - How to add a title and subtitle to your notification4 - Running from Scala or Java5 - See also6 - Summary

Summary: This tutorial demonstrates how to fire MacOS system notifications with AppleScript (and Scala or Java).

In this article I assume that you already know at least a little bit about how to use AppleScript, and just want to know how to trigger a MacOS notification. At the end of the tutorial I show how to invoke the AppleScript code using Scala and Java.

“Why I don’t regret moving our Android app to Scala” alvin July 11, 2017 - 9:23am

The image is from an article titled, Why I don’t regret moving our Android app to Scala.

How to build a Scala project with Apache Ant alvin July 10, 2017 - 6:48pm

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.18, “Building a Scala Project with Apache Ant.”

Problem

You want to use Apache Ant to build your Scala project.

How to use a Maven repository library with SBT alvin July 10, 2017 - 6:34pm

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.17, “Using a Maven Repository Library with SBT.”

Problem

When working on a Scala project built with SBT, you want to use a Java library that’s in a Maven repository, but the library doesn’t include information about how to use it with Scala and SBT.

SBT: How to get started using the Build.scala file (instead of build.sbt) alvin July 10, 2017 - 4:49pm

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.16, “Using Build.scala Instead of build.sbt.”

Problem

In an SBT project, you want to use the project/Build.scala file instead of build.sbt to define your Scala project, or you need some examples of how to use Build.scala to solve build problems that can’t be handled in build.sbt.

How to “publish” a Scala/SBT library alvin July 10, 2017 - 4:38pm

20.15. Publishing Your Library

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.15, “Publishing an SBT Library.”

Problem

You’ve created a Scala project or library with SBT that you want to share with other users, creating all the files you need for an Ivy repository.

How to resolve SBT problems by generating a stack trace alvin July 10, 2017 - 4:28pm

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.12, “Resolving Problems by Getting an SBT Stack Trace.”

Problem

In a Scala project, you’re trying to use SBT to compile, run, or package a project, and it’s failing, and you need to be able to see the stack trace to understand why it’s failing.

How to configure SBT to find a repository (working with resolvers) alvin July 10, 2017 - 4:21pm

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.11, “Telling SBT How to Find a Repository (Working with Resolvers).”

Problem

In a Scala SBT project, you want to add a managed dependency to your project from an Ivy repository that SBT doesn’t know about by default.

Scala/SBT: How to specify a main method/class to run alvin July 10, 2017 - 4:11pm

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.9, “Specifying a Main Class to Run with SBT.”

Problem

In a Scala SBT project, you have multiple main methods in objects in your project, and you want to specify which main method should be run when you type sbt run, or specify the main method that should be invoked when your project is packaged as a JAR file.

Scala/SBT: How to generate project API documentation alvin July 10, 2017 - 4:00pm

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.8, “Generating SBT Project API Documentation.”

Problem

In an SBT project, you’ve marked up your Scala source code with Scaladoc comments, and want to generate the API documentation for your project.

Solution

Use any of the SBT commands listed in the following table, depending on your needs.