Dockers Containers only to shine more with Kubernetes
A year back, I got started with Dockers Containers. 2-3 months down the road and I realized that thankfully I learnt a revolutionary technology because of some of the following reasons: Quick Learning: Docker containers were used to spin up my exploratory learning environment, on-demand demand, for any tool/ framework/Programming language I wanted to learn On-demand Self-service Environments: Docker containers were used to setup on-demand self-service dev/test environments. This was a huge productivity booster for developers and test engineers. Automated Deployments: With Docker containers, Jenkins, Repository etc, I saw the automated deployments getting created in dev/testing/UAT servers. Following are some of the areas where I felt the need for some …
Springboot Web Hello World with a Java & Pom.xml file
This blog presents instructions on how to quickly get started with Springboot Hello World with just one Java file and a Pom.xml. Before getting set up with files, make sure you have installed and configured following Java; Setup Java_Home as it is required by maven Maven; Maven would be used to package our app. Java Code Sample Following is the code for Java file. Make sure to create hello/HelloController.java file within src/main/java. This is required for maven to package it correctly. package hello; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.boot.*; import org.springframework.boot.autoconfigure.*; import org.springframework.web.bind.annotation.*; @RestController @SpringBootApplication public class HelloController { @RequestMapping(“/”) String home() { return “Hello World!”; } public static …
How to Upload CSV Files using Apache FileUpload/CSV
This article represents code samples on how to use Apache Commons FileUpload and Apache Commons CSV libraries to upload CSV file using Java Servlet. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Code Samples – Java Code Following is the code for Java Servlet. package com.vitalflux.core; import java.io.IOException; import java.io.StringReader; import java.util.List; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVRecord; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; public class FileIOController extends HttpServlet { private static final long serialVersionUID = 1L; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (ServletFileUpload.isMultipartContent(request)) …
5 Reasons to Choose Ionic Framework over Xamarin
Are you one of them wondering about which framework to use out of Xamarin or Ionic Framework for developing your next mobile app? Well, rightfully so. You could get some opinions on this stackoverflow page. For a person like me who does not have much knowledge on C# although I could get started with it fast, I would choose Ionic framework as all it requires is a good knowledge of HTML/CSS & Javascript (AngularJS). Checking out quick google trends, here is what it looked like: From above picture, one could quickly figure out that Xamarin (blue) is the clear winner. However, here are the 5 reasons why you would want …
Ethereum Installation Issue – Missing MSVCR120.dll
This blog represents tips to fix the “missing MSVCR120.dll from your computer” when one tries to start the just installed Ethereum MIX IDE from this page. All that one requires to do is download and install Visual C++ redistributable packages for Visual Studio 2013 from this link: https://www.microsoft.com/en-us/download/details.aspx?id=40784 and you should be all set. After installation, try starting MIX by clicking on AlethZero and you should be all set.
Docker – Install & Access Docker Compose from Putty Client
If you are one of them who access the docker machine using putty client, and you want to work with docker-compose, here is what you need to do: Open a putty client accessing the docker machine. Log in as root using command “sudo -i” Execute the following commands to download and install the docker-compose curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose Once done, execute the command “docker-compose –version” to check whether version number is printed. You could read about Docker-compose on this page.
Ionic – How to do Check All with Ion-Checkbox
This blog represents code sample to achieve “Check all” or “Select all” using ION-Checkbox. AngularJS/Ionic Controller Code to Check All Say, you have a list of contacts (name) with check boxes. What you want is to achieve “check all” when you check one checkbox. $scope.allcontacts is a temporary object to capture the checkbox checked value. $scope.allcontacts = {}; $scope.allcontacts.checked = false; $scope.checkAll = function() { if ($scope.allcontacts.checked) { $scope.allcontacts.checked = true; } else { $scope.allcontacts.checked = false; } for (var i=0; i < $scope.contacts.length; i++) { $scope.contacts[i].checked = $scope.allcontacts.checked; }; }; HTML Code including Ion-Checkbox to Achieve “Check All” <ion-list> <ion-checkbox class=”item-checkbox-right” ng-model=”allcontacts.checked” ng-checked=”allcontacts.checked” ng-click=”checkAll()”> All Contacts </ion-checkbox> <ion-checkbox ng-repeat=”contact …
Android – ADB Shell Batch Scripting – Automate SQLite Database Copy
This is a quick blog to represent tips on how one could run multiple adb shell commands as part of one windows batch script or automate SQLite database copy to local filesystem. Say, you have got to copy the SQLite database from within your app to your local filesystem. The commands could be found on one of my earlier blog: http://vitalflux.com/ionic-how-to-copy-sqlite-database/ Copy following commands in a text file, say, commands.txt run-as package-name-of-the-app chmod 666 databases/database_name exit cp /data/data/package-name-of-app/databases/database_name /sdcard/ run-as package-name-of-the-app chmod 600 databases/database_name exit exit Write following set of commands in another batch script (.bat file) and name it as, say, adb.bat. del database_name cmd /c adb shell < commands.txt cmd …
Ionic – How to Access or Browse SQLite Database
The blog represents instructions on how could you access or browse SQLite database embedded in your android app. The way that works for me is to copy the database on to my system and access the same. Make sure you connected your mobile phone to your laptop/desktop. Check with command “adb devices” to see that your device (phone) is listed. Following commands can be used to get the Cordova SQLite database on your hard-disk filesystem: adb shell run-as package-name-of-the-app chmod 666 databases/database_name exit cp /data/data/package-name-of-app/databases/database_name /sdcard/ run-as package-name-of-the-app chmod 600 databases/database_name exit; exit Once you are on system command prompt, execute following command to copy the database file to current directory …
Blockchain – Ethereum Hello World with Visual Studio
This article represents tips on how to get started with Ethereum Hello World program with Visual Studio. 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 steps: Download Visual Studio community version from Visual Studio Download page. This is a very small file. However, once you click on this file, it starts downloading and installing the Visual Studio IDE which is 8 GB large file. So, have patience. Once completed, it will be installed. Start the Visual studio. For the first time, it takes considerable file to start. So, have patience. Download the extension from …
10 Definitions to Understand BlockChain Better
This article represents 10 definitions of BlockChain that I gathered from several pages. The idea is to understand BlockChain in different words. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the 10 definitions of BlockChain: The block chain consists of blocks that hold timestamped batches of recent valid transactions. Each block includes the hash of the prior block, linking the blocks together. The linked blocks form a chain, with each additional block reinforcing those before it, thus giving the database type its name. The original definition was written by Satoshi Nakamoto and found in the original …
Top 6 BlockChain Peer-to-Peer Digital Currency
This article represents top 6 peer-to-peer digital currency which is based on BlockChain technology. In case, you quickly wanted to understand what is BlockChain, do check my other article, Hello BlockChain – Glad You Arrived in IT World. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Bitcoin remaining the most popular one, following is a list of other four peer-to-peer digital currencies: BitCoin (https://blockchain.info/): Goes without saying, it is the most popular P2P digital currency. It is BitCoin which started BlockChain platform. Ethereum (https://www.ethereum.org/): Built on the BlockChain technology, Ethereum is seen as the rival to BitCoin. Most recently, it …
Hello BlockChain – Glad You Arrived in IT World
This article represents a very high level concept around what is BlockChain Technology. From the time I have latched on to this technology, trust me, I am glad I am investing my time into it. Whether it will live up to hype or not is something I do not care about. What I care is the cool manner it accomplishes transactions in decentralized manner thereby removing the need for third-party centralized system. Its truly amazing and fascinating technology. 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 …
Java – How to Download Existing Google App Engine Project
This article represents tips on how to download existing google app engine project including its source code (HTML/JSP files).. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are steps that need to be taken: Make sure you have JDK installed. Access this page for downloading Java Download Google App Engine SDK for Java. The download file could be found on this page. Unzip the App engine SDK and go to the bin folder using command prompt. Go to your http://appengine.google.com account and get the information such as your app_name and your_app_version. On Windows, execute the command as …
SonarLint for Eclipse – Do Proactive Code Quality Check
This blog talks about SonarLint tool for Eclipse IDE which could be used by developers to get on-the-fly feedback for code quality issues when they are writing the code. This feature was always one of the most awaited feature of Sonar and thankfully, it’s out there for Java, Javascript, PHP developers to try it out for themselves. Following is how one could get started: One needs to download and install SonarLint for eclipse within Eclipse IDE. All one needs to do is go to this page (http://www.sonarlint.org/eclipse/ ), click on “Marketplace” button which takes you to install page. Drag and drop “install” button in your eclipse workspace and it would …
Docker – How to Install Mean Environment
This blog represents tips and code samples in relation with how to install MEAN Docker Container for working with MEAN web app.
I found it very helpful. However the differences are not too understandable for me