Abstract Class

package coding;

public abstract class Automobile {
	
	public void retailPrice(int price) {
		System.out.println("The retail price of this vehicle is " + price);
	}
	public abstract void wheelDrive();
	
	public abstract void passengerCapacity();
	
	public abstract void propulsionType();
	
	public abstract void efficiencyRate();

}
package coding;

public class Avalanche extends Automobile {

	@Override
	public void wheelDrive() {
		// TODO Auto-generated method stub
		System.out.println("Wheel Drive options: 2WH,Auto,4WH,4WL");
	}

	@Override
	public void passengerCapacity() {
		// TODO Auto-generated method stub
		System.out.println("Passenger capacity: 5 adults");
		
	}

	@Override
	public void propulsionType() {
		// TODO Auto-generated method stub
		System.out.println("Propulsion system:  5.3Litre V8");
	}

	@Override
	public void efficiencyRate() {
		// TODO Auto-generated method stub
		System.out.println("Efficiency rate:  15 MPG City/18 MPG Hwy");
		
	}

}

Posted in Java | Comments Off on Abstract Class

Keys to describe yourself

1. Communicative
2. Reliable
3. Driven
4. Meticulous
5. Impactful
6. Persistent
7. Flexible
8. Team player

Posted in Career growth | Comments Off on Keys to describe yourself

Requirement Mgmt Scope

Fast track:  Definition, Trace-ability, Delivery

  1. Stakeholders
  2. Requirements Pre Planning  (Project Charter)
  3. Requirements Responsibilities and Collaboration
  4. Requirement Definition Process
  5. Requirement Mgmt Tool
  6. Requirements Review and Approval Process
  7. Requirements Change Mgmt Process
  8. Requirements Mgmt Plan Approval
  9. Template Revision History
Posted in industry practice, Uncategorized | Comments Off on Requirement Mgmt Scope

Microservice Architecture

Microservice architecture is an approach to developing a single application as a suite of small services.   Divide and conquer again.

 

Posted in Uncategorized | Comments Off on Microservice Architecture

List wireless networks for Windows

  • Using the following command to get wifi details.
    netsh wlan show network mode=bssid
Posted in Windows 10, Windows 7, Windows 8 | Comments Off on List wireless networks for Windows

Free Udacity cource covers Deep Learning

I read an article about Deep Learning during a recent flight and thought it was worth learning more about.  Machine learning is one of the fastest-growing and most exciting fields out there, and deep learning represents its true bleeding edge. In this course, you’ll develop a clear understanding of the motivation for deep learning, and design intelligent systems that learn from complex and/or large-scale datasets.

https://www.udacity.com/course/deep-learning–ud730

Posted in Deep Learning | Comments Off on Free Udacity cource covers Deep Learning

java.lang.NoClassDefFoundError: javax/mail/Authenticator

OS: Fefora 21
Container: apache-tomcat-8.0.23

javamail related jar files: /usr/share/java/javax.mail/javax.mail.jar
/usr/share/java/javamail/mail.jar
/usr/share/java/javamail/javax.mail.jar

Also had my own mail.jar in the $TOMCAT_HOME/lib.

One workaround suggested adding the necessary mail.jar to the war file build.   I went ahead and added the mail.jar to the application war.   I also removed the mail.jar from the $TOMCAT_HOME/lib.  All seems to be working fine with the changes.

Posted in Apache Tomcat, Java, Uncategorized | Comments Off on java.lang.NoClassDefFoundError: javax/mail/Authenticator

Prepare SQL query example

//===========================================================
// Prepare a SQL query to insert a row into the breed table.
//===========================================================
query = “INSERT INTO breed ”
+ “(thekey,”
+ “species_key,”
+ “breed_name,”
+ “breed_ext_id,”
+ “create_user,”
+ “create_stamp,”
+ “update_user,”
+ “update_stamp) ”
+ “VALUES(?,?,?,?,”
+ “?,CURRENT_TIMESTAMP,?,CURRENT_TIMESTAMP)”;
ps = conn.prepareStatement(query);
ps.setInt(1, brdKey);
ps.setInt(2, formDO.getSpeciesKey());
ps.setString(3, formDO.getBreedName());
ps.setString(4, formDO.getBreedExtId().toUpperCase());
ps.setString(5, request.getSession().getAttribute(“USERNAME”).toString());
ps.setString(6, request.getSession().getAttribute(“USERNAME”).toString());
ps.executeUpdate();

Posted in Java | Comments Off on Prepare SQL query example

Android OkHttpClient with cache and cookie support

Instantiate the CustomOkClientImpl and call configureOkClientImpl to get the OkClient as shown in the following example.  The okhttp-1.3.0-jar-with-dependencies.jar and retrofit-1.4.1.jar packages are required.

    Log.i(“ResetResults”, “call for new OkHttpClient()”);
    CustomOkClientImpl custHttpClient = new CustomOkClientImpl();
    OkClient okClient = custHttpClient.configureOkClientImpl(LoginActivity.this, true, true);

CustomOkClientImpl.java

package com.wolmerica.example;
 
import android.content.Context;
import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.net.CookieHandler;
import java.net.CookieManager;
import java.net.CookiePolicy;
import com.squareup.okhttp.HttpResponseCache;
import com.squareup.okhttp.OkHttpClient;
import retrofit.client.OkClient;
 
public class CustomOkClientImpl {
 
    public OkClient configureOkClientImpl(Context connContext,Boolean withCache,                                                                               Boolean withCookie) {
 
        // Define an HttpClient to be used by RestAdapter.
Log.i(“OkClient”, “create a new OkHttpClient()”);
OkHttpClient okHttpClient = new OkHttpClient();
 
        if (withCache) {
Log.i(“OkClient”, “withCache logic”);
File cacheDir = connContext.getCacheDir();
HttpResponseCache cache = null;
 
            try {
cache = new HttpResponseCache(cacheDir, 1024);
} catch (IOException e) {
e.printStackTrace();
Log.i(“OkClient”, “IOException: ” + e.getMessage());
}
 
            okHttpClient.setResponseCache(cache);
}
 
        if (withCookie) {
Log.i(“OkClient”, “withCookie logic”);
CookieManager cm = new CookieManager();
cm.setCookiePolicy(CookiePolicy.ACCEPT_ALL);
okHttpClient.setCookieHandler(cm);
}
 
        return (new OkClient(okHttpClient));
}
Posted in Android, Apache httpd, Java | Comments Off on Android OkHttpClient with cache and cookie support

Android SDK

Contains everything you need to start created Android mobile apps.  So far I’ve heard nothing but good things about the Android SDK.  After developing several web applications in Java I’m interested in trying out mobile apps.

Posted in Android | Comments Off on Android SDK