How to run single Test using Maven
If you want to run the whole test in maven then
mvn test
will do the trick, but how about if you want to run single test
mvn -Dtest=SomeTest test
Where SomeTest is the name of the test you want to run
If you want to run the whole test in maven then
mvn test
will do the trick, but how about if you want to run single test
mvn -Dtest=SomeTest test
Where SomeTest is the name of the test you want to run
The algorithm problem goes something like this:
If you are given a character and its possible substitution set, then write a function that would print all the permutation of its characters.
Eg.
Given word “java”
Substitution Set =>
j [“J”, “7”]
a [“@”, “J”, “9”]
v [“V”, “^”]
Based on this, the possible permutations could be: J@V@, 7JV9..
Here is my approach using java
Continue reading String Ordered Permutation Algorithm Problem
Setting java_home
as environment variable might be almost required especially when you use frameworks. Frameworks like axis2
web server and others. Also some code editors require that too.
Those are variables that would allow you to execute command line actions from any directory, basically from everywhere.
The simplest example is using java -version
. In this case, if you don’t have explicit environment variable on where to look for, it requires you to either be in the java folder or to fully list the whole path till bin folder.
The first part is to make sure you have java installed in your machine.
java -version
If this is giving you an output with the version, then it means java is installed, otherwise, you should first install it.
The following task will be to find out where the binary files are located.
Click the apple icon on the left top corner of your mac and select system preferences..
system preference
And from there click Java and you will get the path information from there.
Once you got where the java is located, usually on /Library/Java/JavaVirtualMachines/jdk1.***/Contents/Home
Open the bash properties file
vi ~/.bash_profile
And add the java path here
export JAVA_HOME=export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
The above would be what it would look like fro jkd 1.8 on my El Capitan macbook pro.
Playing with react for the mobile development and getting this error?
There are a number of reasons for this to happen.
Give attention to the line you have something like this
AppRegistry.registerComponent('YOUR-COMPONENT', () => YOUR-COMPONENT);
The name of the component you will be referring as ‘YOUR-COMPONENT’ should align with the main class you refer.
If other instance of the node process is running make sure to kill it and have clear for the current application you are working on.
ps aux | grep react-native
Kill the processes that you see on the ps and start the application again.
To kill the process just use kill
Then do the react-native run-ios
There are lots of application servers for java and oracle weblogic is one of them. As of this writing the current and latest weblogic server is 12c
I will show a simple hello world tutorial on weblogic. The tutorial is for beginners of weblogic server.
This hello world weblogic tutorial assumes you have java skill already.
First thing first, lets install and configure weblogic server
Continue reading hello world weblogic – hello world tutorial on weblogic
These days we are all surrounded by heavy frameworks that make life easier for us. Like maven, spring and hibernate and more. But how can we create a simple servlet website without the need of all those.
The main idea of servlet lies around very simple and intuitive files and structures. Knowing those only is good enough to built a good web app and that is what I will be showing here.
The main parts of the java web app are the following.
1. The Servlet – the java class that is handling the POST and GET http verbs
2. the deployment descriptor – web.xml. File telling how the webapp should be interacted like the url pattern
3. Servlet jar file – This is the jar handling the magic of interaction with the web for the servlet.
SOAP, Simple Object Access Protocol, is older and still usable protocol for exchanging messages between systems.
Since soap is xml based, it is language and operating system independent. You can publish a soap service through your wsdl using Java on Linux and you can consume it through PHP application running on windows.
These days, SOAP is a bit lagging behind RESTful services which are rather more of architectural approaches than being protocol by themselves.
This is a tutorial showing how to consume an existing SOAP service using java language.
For this example, I will use a WSDL published on http://www.webservicex.com/globalweather.asmx?WSDL
In this one, I use already established wsdl for weather related tasks.
Eclipse has a nice tool to make life easier to consume SOAP related messages and I will show you here step by step.
1. Go ahead and create a new dynamic java project on your Eclipse
java project
dynamic web project
What is SFTP
When to use SFTP
Automating SFTP
What to consider when automating
SFTP download using php code
SFTP upload using php code
List all files on SFTP Server
SFTP, Secure File Transfer Protocol, is more applicable these days where cyber security is at its peak. Whenever possible, one has to use SFTP as the communications are encrypted.
Most of tools that are used for FTP like filezilla allows using SFTP with minor adjustment. SFTP has to be supported by the server that is providing the FTP server and usually uses different port than that of the FTP.
SFTP is pretty much like FTP as far the connection and usage is concerned. It has just another layer of security to make it more secure while uploading and downloading the file.
Basic server address, username, password and port are still necessary to connect and interact with SFTP server.
Continue reading connect to sftp from php
jQuery select option tutorial will show how you can glue together the following terms together
* You might ask isn’t jQuery javascript? Yes indeed you are right, but jQuery is a framework making javascript programming a lot easier.
When I say plain javascript, or as some are calling it old school javascript, I meant to use the same task without using jQuery.
Select box is one of the most used HTML element along with text input, radio option and the like.
Select box will allow you to provide dropdown options where you can select one or more items from it. You can make the select box to allow multiple selection using multiple attribute
In this tutorial, I will try to show how to pass composite object as a parameter to jersey’s endpoint java application.
It seems like you are working on RESTful API based java application. In that case, chances are high that you are working with jersey.
If you are not familiar with jersey, jersey is an implementation of JAX-RS APIs. Hence, it is a seamless framework by which API based java projects can be implemented.
As of this writing, the current version of jersey is 2.23.
Continue reading Passing composite object parameter to jersey in Restful Java web