This extends Getting started with Python on Mac OS.
What is conda?
Conda is an open source package and environment management system that runs on Windows, Mac OS and Linux.
Conda = Mini Conda (i.e.
…
This extends Getting started with Python on Mac OS.
What is conda?
Conda is an open source package and environment management system that runs on Windows, Mac OS and Linux.
Conda = Mini Conda (i.e.
…
This extends 01: Getting started with Jenkins on Docker tutorial. In this tutorial we will be using Jenkins to “checkout” an existing Scala project from “GitHub” repository, and then build the project using Maven. … Read more ›...
What is GOPATH?
GOPATH is an environment variable that defines the root of your workspace. You can list all Go env variables with “go env” command. By default, the workspace directory is a directory that is named go within your user home directory (i.e ~/go).
…
This is an extension to the JasperReport step by step tutorial (Part-1) to demonstrate how to generate a Excel file from the Main.java. To generate an Excel file, you need Apache POI as a dependency. Here are the Maven dependency files required.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<!-- Jasper reports --> <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>5.0.1</version> </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>2.1.1</version> </dependency> <dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.1.7</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.7</version> <optional>true</optional> </dependency> |
Now, … Read more ›...
A stream is an infinite sequence of consumable elements (i.e a data structure) for the consumption of an operation or iteration. Any Collection<T> can be exposed as a stream. It looks complex, but once you get it, it is very simple. The operations you perform on a stream can either...
Prerequisite
Uses Java 17 with Maven 3, and ensure they are installed and in the path. For example in mac, the ~/.bash_profile should have:
|
1 2 3 4 5 6 7 8 |
... export JAVA_HOME="$(/usr/libexec/java_home -v 17)" export M3_HOME=/Users/ak/tools/apache-maven-3.9.4 ... export PATH=$SPARK_HOME/bin:$JAVA_HOME/bin:$M3_HOME/bin:${PATH} ..... |
and source it.
1. Create an empty Maven project
|
1 2 |
C:\Temp\Java\projects>mvn archetype:generate -DgroupId=com.mytutorial -DartifactId=simple-grpc-2 |
and import or open into an IDE of your choice.
…
This extends Hadoop MapReduce Basic Tutorial and Apache Hadoop HDFS Tutorial. This could have have been done on the command-line as shown below after running “start-dfs.sh” to start the name and data nodes.
|
1 2 3 |
hadoop fs -copyFromLocal localfile.txt / |
The focus of this tutorial is to do the same via Java and Hadoop APIs.
…
This tutorial extends JAXB Tutorial for XML processing in Java step by step – unmarshall & marshall
When to use JAXB with StAX?
When you want to process large XML files, reading the whole file into memory can cause “OutOfMemoryError” as discussed in Java String &
…
Step 1: pom.xml file with commons-dbcp2 for the connection pooling and abstraction layer for the datasource.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mytutorial</groupId> <artifactId>simple-persistence</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>simple-persistence</name> <url>http://maven.apache.org</url> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <!-- MySQL Driver --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>6.0.6</version> </dependency> <!-- Connection Pool --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-dbcp2</artifactId> <version>2.1.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> |
db.properties for connection details
Step 2: Create a new source folder “src/main/resources”.
Step 3: Define the MySQL database “learnjavadb” connection properties in a new file named “db.properties”
…
This extends Install Kubernetes (i.e. minikube) on Mac. Project Structure Step 1: Create a new “project” folder “minikube-js” under the projects folder. In that folder create minikube-js/server.js file.
|
1 2 3 4 5 6 7 8 9 10 |
var http = require('http'); var handleRequest = function(request, response) { console.log('Received request for URL: ' + request.url); response.writeHead(200); response.end('Hello World!'); }; var www = http.createServer(handleRequest); www.listen(8080); |
Step 2: Create the “ … Read more ›...
These Hadoop tutorials assume that you have installed Cloudera QuickStart, which has the Hadoop eco system like HDFS, Spark, Hive, HBase, YARN, etc. AVRO (i.e row oriented) and Parquet (i.e. column oriented) file formats are HDFS (i.e. Hadoop Distributed File System) friendly binary data formats as they store data compressed...
This extends the Redis tutorial Redis server & cli on Docker tutorial step by step.
1. Redis Docker compose file without password auth
Here is the docker-compose.yml file created under ~/projects folder. The server starts without a password for demonstration purpose only.
…
This tutorial extends the previous tutorial Simple Akka tutorial in Java step by step to use multiple actors. Let’s have two different actors to handle odd and even numbers respectively. We will also print the thread names. Step 1: Actor “ConsumerOfOddNumbers.java” that runs on the “ … Read more ›...
I have a good news, I got job offer. I like to share with you from my bottom of my heart feeling thankful to you.