Question: I've created some utilities that help me at generating HTML and I reference them in my views as `@div( "class" -> "well" ){ Hello Well. }`. Until now those classes were subclassing `NodeSeq` because they [aren't escaped](https://github.com/playframework/playframework/blob/702d48bf4d9d24b58f247546b0cd0cb893659dc0/framework/src/templates/src/main/scala/play/api/templates/ScalaTemplate.scala#L71) then. But I need to get rid off the `NodeSeq` in the top of my class hierarchy because Scala's xml is flawed and makes my code hacky and because I could switch to Traits then.

So I tried to find out how to prevent Play from escaping my `Tag`-objects. But unfortunately the only valid solution that I found is to override the template compiler and have the user specify my compiler in his `Build.scala` settings.

But I hopefully have overlooked a way more simple approach?

Answer: 
If the PID is stored in a variable called `x`, then the last digit can be found as `x % 10`.
Use [modulo](http://en.wikipedia.org/wiki/Modulo_operation)

`int lastDigit = pid % 10;`

Be careful though, if that last digit is a 0, you'll get problems!