Skip to main content

Posts

Showing posts from 2014

Accessing R script from Java

R is powerful language for statistical analysis and Machine Learning. Java is best suited to develop enterprise applications. Integrating both could lead to developing powerful analytic applications. In this tutorial we are going to call a R script from java, then pass the parameters from java to R and fetch back the results from R to Java. Problem Statement: In this tutorial we have a csv file 'data.csv' having 4 columns and we need to calculate mean of few user defined columns. To calculate the mean we will be using and then we will pass the calculated mean back to Java. Pre-requisites:  1. You should know how to integrate R with Java. For that you could consult the tutorial http://rajeev0401.blogspot.in/2013/10/using-r-programming-language-inside-java.html Code Files: We will be needing following files: 1. data.csv: file having data that will be used in R script. 2. config.R: this file contains the configuration (vector having column index) to be used in 'test

Configuring SSL in MongoDB on Windows Platform

Hi, Recently I had a situation where in I was required to create a secure connection between mongodb server (mongod) and mongodb client (mongo). In order to establish the secure connection there is a need to start Mongodb in the following manner: mongod --sslOnNormalPorts --sslPEMKeyFile <Location of PEM file of mongod> If the above command is run is run on the free version of Mongodb then following error is generated: error command line: unknown option sslOnNormalPorts use --help for help The main cause of this error is due to the fact that the normal free version of Mongodb does not support SSL functionality by default. In order to use SSL functionality following two methods could be used: 1.     Build Mongodb from its source using SSL option. 2.     Use Enterprise version of mongodb. If you a looking forward to use the Enterprise version then there is no need to worry about SSL as this option will be by default present in the Enterprise v