Author Archives: Ajitesh Kumar

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.

ReactJS – How to Think & Program Hello World – Part 1

This article represents Hello World example in ReactJS with explanation on how one could think in component-oriented manner when working with ReactJS. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Hello World Code Sample Thinking & Programming Hello World Hello World Code Sample Paste the code below in an HTML file and open up in a browser. The text, “Hello, Calvin” will get printed. <!DOCTYPE html> <html> <head> <title>Hello ReactJS!</title> <script src=”https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js”></script> <script src=”https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js”></script> </head> <body> <div id=”content”></div> <script type=”text/jsx”> var HelloMessage = React.createClass({ render: function() { return …

Continue reading

Posted in Javascript, Web. Tagged with , .

Docker – How to SSH to Running Container

This article represents instructions on how you could get a docker container connect with other docker container using SSH. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Instructions to Install SSH Techniques to Enable SSH on the Existing Container Techniques to SSH to Running Container Instructions to Install SSH If you already have a running container, and you would like to put SSH on it and allow other docker container to connect via SSH, following is a set of instructions to install SSH: ## ## Install the openssh-server …

Continue reading

Posted in Virtualization. Tagged with , .

AngularJS – Two Different Ways to Bind Model Data to HTML Element

This article represents two different techniques using which application data (model) could be bound to HTML element in AngularJS. Either of the technique is used to replace the text content of the specified HTML element with the value of a given expression, and to update the text content when the value of that expression changes. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Bind data using {{ expression }} syntax Bind data using ng-bind directive Recommended way of binding data Bind Data using {{ expression }} Syntax Following …

Continue reading

Posted in Javascript, Web. Tagged with , .

How to Install Oracle 11g (EE) on Docker

This article represents instructions on how to install & configure Oracle 11g Database (Enterprise Edition) on Docker. Well, I could have lived with installing Oracle 11g express edition, had I have the requirement of testing my application with Oracle database for single user. The primary reason for installing Oracle enterprise edition was to test the high availability using Oracle Data Guard solution. As we may knowing that Oracle Data Guard does not come with Oracle XE Database, thus, it becomes mandatory to work with Oracle EE Database edition which comes bundled with Data Guard solution. The primary challenge in installing Oracle EE database on Docker is the disk space problem …

Continue reading

Posted in Virtualization. Tagged with , , .

Casperjs Hello World in 10 Minutes

This article represents instructions on how to get started with programming casperjs scripts within 10 minutes. In this article, the sample program is written for scraping Amazon.com homepage and printing title of the page. One of the biggest issues or hurdle, I would say, in getting started with any framework is related with downloading the tool/library, installing and configuring the environment in order to execute the program. Thanks to Docker creators, this is taken care in a very neat manner so much so that one could do following to set up the development environment in literally no time. Download the image of the development environment. Create a Docker container using …

Continue reading

Posted in Javascript, Virtualization, Web. Tagged with , .

Dummies Notes – Get Started with Docker Hello World

This article represents instructions to get started with Docker on Windows. For detailed documentation on Docker, access the Dockers Help page. For detailed instructions on installation of boot2docker, refer following page. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: What is Boot2Docker? Download & Install Boot2Docker Docker Hello World Configure Putty Environment   What is Boot2Docker? Docker Engine uses Linux-specific kernel features. Thus, to run docker engine on Windows, Boot2Docker application is developed. This application creates a Linux virtual machine on Windows to run Docker on a Linux …

Continue reading

Posted in Virtualization. Tagged with .

Learn R – How to Define Function in R

This article represents code examples in relation with how to write function in R. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Function Definition Code Examples for Functions   How to Define Function Function in R looks like following: # Function definition funcName <- function( a, b, c ) { return(v) # or simply v } # This is how a function is invoked var1 <- funcName(x,y,x) In above code, funcName is the name of the function. a, b, c are parameters. v is return variable Code Examples …

Continue reading

Posted in Data Science. Tagged with .

Learn R – How to Create Multiple Density Plots using GGPlot

This article represents code samples which could be used to create multiple density curve or plots using ggplot2 package in R programming language. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Multiple Density Curves/Graphs with GGPlot The code samples given below works for “diamonds” dataset which is loaded as part of ggplot2 package. Following are two different types of plots shown below: Density plots with multiple fills Density plot with single fill Density Plots with Multiple Fills:Following code represents density plots with multiple fills. Pay attention to the “fill” parameter passed to “aes” method. # Create density plots for …

Continue reading

Posted in Data Science. Tagged with .

Learn R – How to Create Density Plot over Histogram

This article represents code examples for overlaying or creating density curve on Histogram using ggplot2 package in R programming. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Code Samples to Overlay Density Curve on Histogram In the code examples below, diamonds data set belonging to ggplot2 package is used. One must load the ggplot2 package (require(“ggplot2”)) before executing the code samples given below. # Most simplistic density curve ggplot(diamonds, aes(x=carat)) + geom_histogram(aes(y=..density..)) + geom_density() + labs(title=”Histogram & Density Curve”, x=”Carat”) Following diagram would get displayed by executing the above code. # Density curve with histogram painted using body …

Continue reading

Posted in Data Structure. Tagged with .

Learn R – 3 Commands to Generate Random Numbers

This article represents 3 different commands with code examples which could be used to generate random numbers in R programming language. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Runif command Sample command Rnorm command Difference between runif and rnorm command Runif: Generate Random Numbers based on Uniform Distribution “Runif” command can be used for generating random numbers based on uniform distribution. One can generate one or more random numbers within a range of numbers. One should note that the random numbers generated using runif commands are all …

Continue reading

Posted in Data Science. Tagged with .

Learn R – Extract Data Frame with One Column

This article represents code sample that could be used to create/extract data frame with one column from existing data frame. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Extract Data Frame with One Column In the code sample below, diamonds dataset from ggplot2 package is used. To work with the example below, one needs to load the ggplot2 library using command such as require(“ggplot2”). In the command below, method as.data.frame is used. Make a note of drop=false parameter passed to as.data.frame method. dfn1 <- as.data.frame(diamonds[,c(1)], drop=false)

Posted in Data Science. Tagged with .

Learn R – How to Create Histogram using GGPlot

This article represents techniques (commands samples) which could be used to create histogram using ggplot2 package in R programming. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following is the summary of commands used to create histogram using ggplot: Using simplistic ggplot and geom_histogram method Using ggplot and geon_histogram command with attributes such as col, fill, alpha Using ggplot, geom_histogram and  scale_fill_gradient method Common Techniques to Create Histogram using ggplot2 In the code examples below, diamonds dataset from ggplot2 package is used. To work with examples below, load the ggplot2 library prior to executing the commands given below. …

Continue reading

Posted in Data Science. Tagged with .

Learn R – How to Create Data Frames using Existing Data Frame

This article represents commands that could be used to create data frames using existing data frame. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following is a list of command summary for creating data frames by extracting multiple columns from existing data frame based on following criteria, whose sample is provided later in this article: Column indices Column names Subset command Data.frame command 6 Techniques for Extracting Data Frame from Existing Data Frames Following commands have been based on diamonds data frame which is loaded as part of loading ggplot2 library.   Following is how the diamonds data …

Continue reading

Posted in Data Science. Tagged with .

Learn R – 5 Techniques to Create Empty Data Frames with Column Names

This article represents techniques on how one could create an empty data frame with column names. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. 5 Techniques to Create Empty Data Frames In each of the examples below, the data frame is created with three columns, namely, ‘name’, ‘rating’, ‘relyear’. It represents moview names, ratings, and the release year. # Command data.frame is used df1 <- data.frame(name=””, rating=””, relyear=””, stringsAsFactors=FALSE) # Command data.frame is used df2 <- data.frame(name=character(), rating=character(), relyear=character(), stringsAsFactors=FALSE) # Usage of read.table command to create empty data frame df3 <- read.table(text = “”, colClasses = c(“character”, …

Continue reading

Posted in Data Science. Tagged with .

Learn R – How to Get Data Frames Columns as Vectors

This article represents different ways in which one could get a data frame column as a vector. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. 4 Techniques to Get Data Frame Column as Vector In the examples below, diamonds dataset from ggplot2 package is considered. This is how a diamond dataset looks like: Following are four different technique/method using which one could retrieve a data frame column as a vector. # In the data set shown above, carat represents column name and hence, [[‘carat’]] carat1 <- diamonds[[‘carat’]] # In the data set shown above, carat represents 1st column …

Continue reading

Posted in Big Data. Tagged with .

Dummies Notes – How SAML-based SSO Authentication Works?

This article represents dummies notes on how could one go for SSO implementation using SAML. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: What is SAML? How does SSO authentication happen using SAML? What are Key Components of SSO Design, in general?   What is SAML? For those of you unaware of what is SAML, here is the definition from WIKIPedia page on SAML: Security Assertion Markup Language (SAML, pronounced sam-el[1]) is an XML-based, open-standard data format for exchanging authentication and authorization data between parties, in particular, between …

Continue reading

Posted in Application Security, Software Engg. Tagged with .