Scala

Integrate Github Repo with Travis CI For Scala Play2.0 and MongoDB Project

Travis CI is a hosted, distributed  continuous integration service used to build and test projects hosted at  GitHub for the open source community. It supports building software in numerous languages, including Ruby, JavaScript, Java, Scala, PHP, Haskell and Erlang. A Travis worker comes with a good amount of services you might depend on, including MySQL, PostgreSQL, MongoDB, Redis, CouchDB, RabbitMQ, memcached and others. Hosting your project Continue Reading

Akka Actor And Futures

This presentation was presented at Knolx session. It was presented before my last post on Akka Futures with a simple example. It focusses on Akka 2.0 and Akka Futures. Please note that in latest Akka version which is for scala 2.10, Scala Future and Akka Future has combined. This presentation caters to Akka 2.0.5 version. This talk is inspired by Viktor Klang talk on Akka Continue Reading

ATDD, Cucumber and Scala

Acceptance Test Driven Development (ATDD) is a practice in which the whole team collaboratively discusses acceptance criteria, with examples, and then distills them into a set of concrete acceptance tests before development begins. If you notice the keywords here then they are whole team discussion acceptance criteria with examples concrete acceptance tests before development begins Hence, just like we do TDD for development, ATDD is Continue Reading

Design Forms In Play2.0 using Scala and Mongodb

The play.api.data package contains several helpers to handle HTTP form data submission and validation. In This blog we would learn how to design forms with validations in play2.0 using scala and how to communicate  with database using mongodb. Step 1: Create New Project in play2.0 lets say FormDemoInPlay Step 2: Dependency for Mongodb In Build.scala [sourcecode language=”scala” wraplines=”false” collapse=”false”] "com.novus" %% "salat" % "1.9.1" [/sourcecode] Step 3: Continue Reading

Scala Liftweb : Use Forgot Password Inbuilt Functionality to send Email with Unique Token

If you are implementing Forgot password functionality in your web application using Liftweb and you have such a scenario where you have to send redirect URL with unique token in Email , Liftweb with Scala provides a wonderful functionality to handle this . 1) Write a function to send URL with unique token in Email . def sendLoginToken(user: User): Unit = { import net.liftweb.util.Mailer._ val Continue Reading

Akka Futures In Scala With A Simple Example

We use Akka Futures extensively for a product built to handle huge load of streaming data. We have been early adopters of Akka and been using it right from its Akka 1.1.X days. We found Futures as simple yet powerful tool to add concurrent behavior in our application. This post emphasizes importance of Akka Futures with a short and easy to understand example application. Please Continue Reading

Quick Tip : Streams in Scala

There are cases where one has to use the first n numbers of an infinite sequence of numbers (like the Fibonacci numbers for example) but, unfortunately, there is no way to determine how many members of the sequence will be actually needed. Scala offers an better solution for the same – the ability to define infinite sized data structures  whose elements are computed on demand.These data Continue Reading

Knoldus’ ScalaJobz on First Paragraph of Typesafe’s Year End Blog

It was a New Year gift for all of us at Knoldus to be featured on the year end blog of Typesafe and that too in the first paragraph. The mention was for ScalaJobz, the community initiative which aggregates all scala related jobs and aspires to be the single source of information to all Scala job seekers. The community feedback has been very inspiring as Continue Reading

Scalajobz : Community Initiative By Knoldus

Knoldus is pleased to announce the public availability of ScalaJobz.com www.scalajobz.com ScalaJobz is a community initiative to aggregate and present ScalaJobz across the world for all Scala enthusiasts. It follows the following subset of functionalities. Scalajobz is a community driven job portal for Scala jobs.  It is specifically focussed on the Scala ecosystem. Scalajobz Aggregate from various Job Portals like Indeed, Simply Hired ,Career Builder Continue Reading

OOPs concepts and Scala

Recently Knoldus delivered a training at a huge bank in Singapore and Mumbai, India to get them started with Scala. The team mostly coming from the imperative background was first updated on the best way to develop software in an object oriented way and then for 3 days were immersed in the Scala sessions. What follows is the part one where the team was reinforced Continue Reading

Communicating with Twitter via Twitter4J using Scala

Twitter4J is a Java library for the Twitter API. With Twitter4J, you can easily integrate your Scala application with the Twitter service. Twitter4J is featuring: – Easy to use with Scala (as it works on any Java Platform version 5 or later) – Support via a single jar file. – Built-in OAuth support. Here is the tutorial to use Twitter4J in Scala. 1. Download the Continue Reading

Getting a preview image of a PDF file in Scala

In order to have an preview image of an PDF file you can use PDFBox. Here is the simple tutorial to extracting an preview image of an PDF file. Firstly you need to get the pdfbox-jar file & you can get it here. 1. You need to have these following imports. import java.io.FileInputStream import javax.imageio.ImageIO import org.dopdf.document.model.PageDetail import org.dopdf.document.read.pdf.PDFDocumentReader import java.io.ByteArrayInputStream import utils.AmazonUpload import java.io.InputStream Continue Reading

ScalaKnol: Understanding Traits as Stackable Modifications

Traits can be used to modify the methods of a class. The way such modifications are carried out is such that they can stack modifications with each other. Let us take an example. Say, there is a class called ImageProcessor which processes images. Now there are a few modifications required before the image is actually uploaded to your server. If you are using Facebook then Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!