How to test java project using docker in Travis CI without Maven

Hello People,

This blog is regarding build and test any java project without maven i hope it will help beginner who started learning java course.

First Create a account in github and create a repostory and add .java code in the github.

For example i am testing with below sample java program in the travis ci and github using official java docker.

HelloWorld.java

public class HelloWorld

public class HelloWorld{

public static void main(String h[])

{

System.out.println(“Hello World !”);

}

}

After creating java program and commit in github, visit : https://travis-ci.org and signup/signin with github account, import the github project in travis ci and enable project for build and testing in travis ci.

After enabling in travis ci go to github and create .travis.yml file as below

language: bash

services:
– docker

before_script:
– docker pull java:7

script:

– docker run –rm -v”$PWD”:/usr/src/myapp -w /usr/src/myapp java:7 javac HelloWorld.java
– echo “Listing class files”
– ls -la
– echo “Output of java file”
– docker run –rm -v”$PWD”:/usr/src/myapp -w /usr/src/myapp java:7 java HelloWorld

after_script:
– docker rmi $(docker images -aq)

As soon as above program is committed in github, travis ci will automatically detect new commit in the master branch it will start build and testing based on .travis.yml configuration.

You can find the sample log in link : https://travis-ci.org/hemanth22/First_Java_Helloworld

I have created a sample project in github please visit to below link.

https://github.com/hemanth22/First_Java_Helloworld

If you are patching code and creating a pull request between master and patch branch, it will start building and testing the code parallelly as a checks before merging into master branch as shown below.

This will give you confidence before merging patch branch to master or main branch of program.

MyRepoSnap1

MyRepoSnap2

If you like the post please share and like.

Thanks.

Advertisement

Are you a trader and you are looking for a app which can trigger an alert when amount is above the expected stock price.

Hello all,

If you are looking for app which can you help in trigger alerts for stock price rise or down . Here i have called app name IFTTT app which has applets.

In IFTTT app there is a applet called Finance which is provided by Yahoo! company.

Visit link : https://ifttt.com to download this app for android or iPhone.

After downloading and installation of app, go to search and enter Finance.

IFTTT Setup Finance

and select below Finance icon

Finance Applet Icon

after opening Finance applet you can find some pre-defined applet.

Screenshot_20180422-154705.png

search for trigger name : “Receive a push notification when company stock price above a specified price” to create trigger if stock price rise at specified price.

stock price increase

When you open the pre-defined trigger you will get like below

step1
Select turn on
step2
After selecting it will display this screen

Here you can see Price and Ticker Symbol options.

Price is like amount and Ticker Symbol is company stock Mnemonic.

To get Ticker Symbol visit this website: https://finance.yahoo.com/

For example i will take NSE

  1. First search NSE in yahoo finance website as belowNSE Search
  2. I could see there many stock names registered with name NSE, so i will select NIFTY 50 (.i.e. NSEI )
  3. After select NIFTY 50 then you will get below screen.NSEI
  4. Near NIFTY 50 you have Ticker Symbol in bracket i.e. ^NSEI
  5. Enter the Ticket Symbol and Price as show below as per you target and click on save.
    step up 21
  6. Now you have successfully configured the trigger that if Nifty 50 stock price is greater than Rs. 10570.00 then it will trigger notification.

Similarly you can try below types of trigger as per you requirement.

How to create voip call to remaind your task using IFTTT App

Prerequisite:

  1. IFTTT App
  2. Internet or WiFi connection

IFTTT app is one of the Devops app which trigger notification for many kinds devops application like jenkins, docker, github, slack  by creating applet.

Here i will tell you how to use IFTTT app to get remainder over voice over internet call.

Visit link : https://ifttt.com to download this app for android or iPhone

After download and installing IFTTT app after launch it look as below

Screenshot_20180217-233042.png

Go to My Applets as shown below and select + as highlighted below

Screenshot_20180217-232528.png

After that you will get the screen as below and select on this which is blue colour

Screenshot_20180217-232545.png

and search for date applet as shown below, select date & time applet

Screenshot_20180217-232605.png

After selecting date and time applet you will get screen as below, select your trigger type like every day, every hour, weekly or monthly as you like

Screenshot_20180217-232621.png

For example i am selecting Every day at and you will get below screen here you can setup time ( for example i have setup time at 7:00 AM ) and click on tick mark to redirect next screen

Screenshot_20180217-232727.png

After configuring time you will get screen as below here you see this is replace with date & time applet. Now select that which is blue colour

Screenshot_20180217-232734.png

After selecting that search for voip applet as shown below and select VoIP calls applet

Screenshot_20180217-232757.png

After selecting VoIP Calls applet you will get screen as below and select Call my device

Screenshot_20180217-232806.png

After selecting call my device you will screen as below now enter your message that you want hear over voip call and click on tick mark to redirect to next screen

Screenshot_20180217-232902.png

After configuring voip call applet you get screen as shown below in 1st images.

Now you have to enable Receive notifications when this applet runs as shown below in 2nd image and then click on finish

Screenshot_20180217-232910.png Screenshot_20180217-232921

After selecting finish you will get screen as below it will ON automatically if it not switching ON slide right to ON application.

Screenshot_20180217-232937.png

Now you have successfully configured voip call to get remainder of your important task.

Congrats

 

If you like the post please share and like.

Free Accounting software: GnuCash

money

GnuCash

Hello friends,

Today’s blog is how to use GnuCash a free accounting software for personal accounting purpose.

First visit to website: https://www.gnucash.org/

 

Download the GnuCash software it supports Windows, various Linux distribution, MacOS

gnucashcopy

Note:

Salary amount which I have entered is example don’t think I am earning 50k per month. ”

laugh

After installing software open GnuCash application

location

I am using CentOS so GUI is different for other OS.

After opening software you will get dialog box as below1

then Select New → New File it will display below dialog box

1

Click on Forward go to next

Select your currency as shown below in the dialog box

2

then Click on Forward go to next

For personal Accounting you don’t need to enter anything in New Book Option you can skip it

3.png

then Click on Forward

Select Categories as shown in dialog box

I recommend Common Accounts for personal accounting

You can add Education Loan and Mortgage Loan (optional)

4

and then click on Forward

Enter you amount in Cash in Wallet and Checking Accounting or else you can leave it as 0.00 and click on Forward

5.png

Final finish the setup by selecting Apply in below dialog box screenshot

6.png

and Save it by selecting create folder and save as with filename.

7.png

By default this will save in xml format

After saving it will display dialog box as below

8

and double click on Checking account it will display as below

89

Select date for which date you want to make entry

9

and enter amount as show in below by selecting categories and enter amount respectively and save it.

10

I have created a sample accounting for reference have look on below screen shot

balancesheet

Now after creating accounting if you want to create cash flow report then

Go to Reports → Income & Expenses → Cash Flow it will open in new tab as shown below

11.png

export You can export by selecting this icon in the report screen

print You can even print by select this icon in the report screen

In addition if you want to make budge and compare with monthly accounting

You can do it by creating Budge in GnuCash.

To create budget follow below procedure

Go to Action → Budget → New Budget

It will open in new tab with Budget as below

12

First enter salary in your budget according to your monthly salary as below

13.png

Then double click on each field where you want to fill the expenses and

fill the expense as below and save it.

13

and fill the expense as below and save it

144

14copy using this icon you can give name to the budget filename

For budget flow

select Reports → Budget → Budget Flow

it will open new tab as below

15

Here left flow is budget flow of this month and right flow is current month accounting

here you can compare to know how much is spent according to budget

My Idea

A-good-idea

In future i think this software will do accounting automatically if we are connecting to our banks accounts with this software and it will automatically categorize the transactions we made through banks account.

I wrote this blog in hope that it will be helpful to people in managing there personal accounting.

This software can be used in Small industries or startup company.

If you felt boring with blog reading you can watch video in below youtube link

 youtube     https://www.youtube.com/watch?v=_K_IIrMUnNA

For industrial purpose you can watch videos in below youtube link

youtube     https://www.youtube.com/watch?v=aqAaScYVeRQ&list=PLLuhcl-Y-AM8LD1M7Fe5VfyWxEQL02ZOf

Automate extraction using shell scripting

You can automate extraction using shell script and sql script in four steps

1. Create a sql file

SET LINESIZE 110
SET TERMOUT OFF
SET ECHO OFF
SET PAGESIZE 0
SET HEADING ON
SET FEEDBACK OFF
SET UNDERLINE OFF
SET TRIMSPOOL ON
SET TRIMOUT ON
SET VERIFY OFF
SET ARRAY 500
SET WRAP ON
SPOOL /home/username/DateEx/extraction.dsv
SELECT ‘EMPNO;ENAME;JOB;MGR;HIREDATE;SAL;COMM;DEPTNO’ FROM dual;
select EMPNO||’;’||
ENAME||’;’||
JOB||’;’||
MGR||’;’||
HIREDATE||’;’||
SAL||’;’||
COMM||’;’||
DEPTNO
from emp;
SPOOL OFF

Save this script as filename.sql [Ex. auto.sql]

2. Create a shell script to connect sqlplus and run a script

#!/bin/bash
login=scott/tiger@pdborcl
sqlplus $login <<EOF
@auto.sql
exit;
EOF

Save the script as filename.sh [Ex. oracron.sh]

3. Now create another shell scripting so that we can schedule cron job

#!/bin/bash
. /home/username/oracron.sh 2>&1 > /home/username/DateEx/stderr.log

Save this file as filename.sh [Ex. crons.sh]

4. Configuring cronjob

To configure cronjob

enter below command in command line

$crontab -e

and schedule as per your requirement

Example of cronjob

For every day at 12 am

0  0  *  *  * /path/to/script [Ex. 0 0 * * * /home/username/crons.sh]

For 3rd day of the every month at 12 pm

0 12 3 * * /path/to/script

For weekly job for monday to friday at 12pm

0 12 * * 1-5 /path/to/script

For yearly once in december from 1st 10 days at 11 am

0 11 1-10 12 . /path/to/script

You can download the example file from this link : https://github.com/hemanth22/Cron-automation-extraction

In this blog i have used example table which is available in oracle database

Create a empty file or folder with bash script.

Hello everyone,

If you want to create a empty files or folders with simple bash scripting.

First list the file names or folder names that you want to create in notepad or text edit  and then save the text format (ex .txt)

Download the scripts form link : https://github.com/hemanth22/Creating-Empty-file-or-folder.git

To download from linux terminal type below command

$git clone https://github.com/hemanth22/Creating-Empty-file-or-folder.git

To create empty file run create_empty_file.sh

To create empty folder run create_empty-folder.sh

Learning VIM tutorial easy now

VIM is a clone of Bill Joy’s vi editor for Unix. It was written by Bram Moolenaar based on source for a port of the Stevie editor to the Amiga and first released publicly in 1991. Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface. Vim is free and open source software and is released under a license that includes some charityware clauses, encouraging users who enjoy the software to consider donating to children in Uganda. The license is compatible with the GNU General Public License.

Visit this webpage http://www.openvim.com/tutorial.html which helps in learning VIM editor easy way.

Xilinx ISE Design suite 14.5 Support solution for Windows 8.1 Pro x64 bit

Go to

C:\Xilinx\14.5\ISE_DS\ISE\lib\nt64

 

find libPortability.dll

rename that file to libPortability.dll.orig

find libPortabilityNOSH.dll

and make copy of libPortabilityNOSH.dll

and rename it to libPortability.dll

Similarly Do this

or else copy renamed libPortability.dll

to

C:\Xilinx\14.5\ISE_DS\common\lib\nt64

This turns off SmartHeap.

This will fix ISE and iMPACT crashes on file dialogs.