Insights and perspectives to keep you updated.

Play with Lift’s Autocomplete Widget using Scala-One of the Best Feature of LiftWeb Framework

The AutoComplete widget provides a flexible and accessible way to offer suggestions or some kind of filtering information as a user type text information in an input field . If you have used Google , you might see that Google starts providing autocomplete suggestion with entries depending on user’s current input . Lift provides a very easy way to implement Autocomplete using Scala . Here Continue Reading

Empower Scala with Apache Solr

Solr is ready to use enterprise search server. Here I am going to show you how we can use both of them together to empower your scala application with solr. Solr is able to achieve fast search responses because, instead of searching the text directly, it searches an index instead. This is like retrieving pages in a book related to a keyword by scanning the index Continue Reading

Annotations in Scala

In this session, we will learn about annotations. Firstly, we will see the definition of annotation, standard annotations and then we will learn to write our own annotations. As of now, with Scala we can create compile time annotations (could we create runtime ones without resorting to Java?). For example, if you look at the @tailrec annotation in Scala then it would verify that the Continue Reading

SOLID Principles with Scala

It is quite evident what SOLID principles mean for class typed object oriented languages like Java. However, what do they mean for hybrid languages like Scala which merge the Object oriented and functional approaches. In this KnolX session, we tried to decipher what SOLID principles meant for Scala. Though much of what we know about them can be applied to Scala if we code in Continue Reading

Knolx Session : Modular Programming Using Object in Scala

This session was presented at Knoldus knowledge session. In this Session, we’ll learn  how  Scala’s object-oriented features can be use to make a program more modular. We’ll first show how a simple singleton object can be used as a module, and then we’ll show how  traits and classes can be used as abstractions over modules.

Quick Tip : Compressing an image file on server using Scala

Here is the simple approach for compressing an image file on server using Scala. import java.io.FileInputStream import javax.imageio.ImageIO import java.io.File import java.io.FileOutputStream import javax.imageio.ImageWriter import java.awt.image.BufferedImage import javax.imageio.ImageWriteParam import javax.imageio.stream.ImageOutputStream import java.io.OutputStream import java.io.InputStream import javax.imageio.IIOImage import java.util.Iterator import java.io.ByteArrayOutputStream import java.io.ByteArrayInputStream object CompressFile extends App { val imageFile = new File("/home/neelkanth/Desktop/image1.JPG") def compressImage(file: File, filename: String, qualityOfOutPutImage: Float): InputStream = { val inputStream = Continue Reading

Knolx Session : Built-In Control Structures in Scala

In this session , I will explain about built-in control structures in SCALA . Knolx Session : Built-In Control Structures in Scala from ayushmishra2005

Re Render HTML Template using Scala and Lift

In this section , I will explain how to re-render HTML Template without loading the browser . You can refresh HTML template without loading browser via AJAX using Scala and Ltft . Lift provides SHtml.memoize which memoize the NodeSeq used in apply() and then call applyAgain() in an Ajax call . You can re render a particular template part of HTML page or complete page Continue Reading

Knolx Session: Category Theory In Scala

This session was presented at Knoldus knowledge session. There is a wonderful post on Category Theory by Debashish Ghosh. This presentation is inspired by his post here. Here is the presentation.

Implement Geolocation using Scala and Lift

In this section , I will explain how to implement Geolocation using Scala and Lift . You can easily fetch user’s current location or near by location by his IP address . 1) You will need API key to be able to use . To get API key , just Go to IPInfoDB . 2) Get user’s IP address var ipAddress: String = "" S.containerRequest.map(r Continue Reading

Play with Cookies using Scala and Lift

As we know , Cookie is a small piece of data which is sent from a website and stored in a user’s web browser while a user is browsing a website. Next time , when user browses , cookie can be retrieved . Cookies are essentially a token of string data that is stored on the user’s machine. In this section , I will explain Continue Reading

Knoldus Pune Careers - Hiring Freshers

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