Tired of seeing that 500 Bad gateway error while deploying a Springboot application in AWS...?
By default, Spring Boot applications will listen on port 8080. Elastic Beanstalk assumes that the application will listen on port 5000. There are two ways to fix this discrepancy: change the port Elastic Beanstalk is configured to use, or change the port the Spring Boot application listens on.
Java 8 - Default Methods
Before Java 8, it was virtually impossible to change an interface once published. Any change e.g. addition of a new method would have broken all clients.
Fast boot the Android emulator in less than 15s
The default emulator is annoyingly slow. Read on this post to boot your emulator in 15s 1) You HAVE to have an Intel CPU, anything else (AMD) will NOT work.
Examples of GOF Design Patterns
Original @Author BalusC. Re-post from Stackoverflow. Creational patterns Abstract factory (recognizeable by creational methods returning the factory itself which in turn can be used to create another abstract/interface type) javax.xml.parsers.DocumentBuilderFactory#newInstance() javax.xml.transform.
NoSQL databases
NoSQL databases have been getting lot of attention over the last few years for their performance, scalability, schema flexibility and analytics capabilities.
1lambdaj - Express Business Rules in Psuedo English Syntax
I came across this framework called 'lambdaj' when I was looking for ways to manipulate a collection without writing loops. lambdaj is a library that makes easier to address this issue by allowing to manipulate collections in a pseudo-functional and statically typed way.
Mahout - Non Hadoop implementation for Collaborative Filtering
It's been a week with some serious learning stuff. I stumbled upon this technique called 'Collaborative Filtering' and found it very interesting. Though the concept is been there for ages, time and again there has been new implementations around it.
1Abstract Classes Vs Interfaces
Say, we are trying to implement a new behavior 'whistle', to a group of unrelated things. For e.g.) Assume we are trying to add whistling behavior to parrots, humans, aliens, cookers and a steam engine.
Jquery fundas
This week was all about Jquery...! Though I've been using it in bits and pieces, did not get a chance to do something so exhaustive in jquery till now. So here are few things, which I learned this week..I'll keep updating this post every now and then..
Designing and Developing Interoperable Services
SOAP SOAP is a simple XML-based protocol to let applications exchange information over HTTP. Specification for exchanging structured information in the implementation of Web Services in computer networks.
Ignorance makes you more ignorant!
I was working on a personal project for creating an online post-it like application using Jquery, JSF and google Apps.. The idea was to have a text area where user can type and notes will be saved automatically through ajax calls..
Multithreaded Programming to JavaScript
Let me talk about Concurrent.Thread, a library that allows JavaScript to use multiple threads, since this greatly eases the difficulty associated with asynchronous communication in the AJAX development mentioned above.
4Conversation State on the Client using Applets
The ProblemWeb applications often require a large amount of data to be stored to maintain the session state of the clients, spanning multiple requests.
JAVA KERNEL
The basic idea was that the current Java Runtime Environment is simply too big, and most programs require only a small subset of the functionality. From Ethan Nicholas's Blog Building a minimal JREThe first thing I have to do is establish that this project is feasible.
JAVAFx
The Java revolution, which started more than a decade ago, gains even more momentum with today's announcement of JavaFX, a new Java innovation targeted at the billions of consumer devices and computers powered by Java technology.
JFugue - Music Notepad!
The aim of this open source project is to provide a simple standalone application for composing music and generating MIDI files. The underlying functionality provided by this application comes from its reliance on the JFugue API.
1The Pitfalls of Inheritance
In Object Oriented Programming, inheritance is a commonly used mechanism to model the relationship between two types. However, modelling such relationship without realizing the impact on the overall application may result in unexpected problems.
1Java HotSpot VM Options
Java HotSpot VM OptionsStandard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows, Solaris and Linux.
1Google Gulp!
Quench your thirst for knowledge.At Google our mission is to organize the world's information and make it useful and accessible to our users. But any piece of information's usefulness derives, to a depressing degree, from the cognitive ability of the user who's using it.
Unique Package Name...?
By convention, the first part of the package name is the Internet domain name of the class creator, reversed. And thatz why we see many packages starting with com and org...!Since the Internet domain names are unigue you should follow this agreement.
Threadophobia
I'am sure that in my program I create 100 new threads and when I use isAlive method it shows often less than 100 threads... I have not killed even one of them!Good, short and clear explanation I found in Java tutorial on SUN's site:"The API for the Thread class includes a method called isAlive.
ShiFter
I have written lines of code with mathematical operators...but i always wonder about shiFters (Shift Operators...Bingo!)...Why do we need it...? watz the use...? Read on...1.
Which4J
Which4J is a simple utility app that helps you determine where classes are being loaded from. This can be especially helpful in debugging classpath and classloader problems.
2404 - Error Page...
Are these self explanatory to someone whoz new to computers?if no read on...We understand what 404 means: Page Not Found. But the average internet user has no idea what 404 means or what to do about it. To them, it's yet another unintelligible error message from the computer.
Tiger Provided option for getting various Thread States
Prior to Java 5, isAlive() was commonly used to test a threads state. If isAlive() returned false the thread was either new or terminated but there was simply no way to differentiate between the two.
JPC Project
JPC is a pure Java emulation of an x86 PC with fully virtual peripherals. It runs anywhere you have a JVM, whether x86, RISC, mobile phone, set-top box, possibly even your refrigerator! All this, with the bulletproof security and stability of Java technology.
Faster Deep Copies of Java Objects ( Shallow Copy and Deep Copy )
Faster Deep Copies of Java Objects The java.lang.Object root superclass defines a clone() method that will, assuming the subclass implements the java.lang.Cloneable interface, return a copy of the object.
1Comparing Arrays, Lists, and Maps
Generally when we tend to use either Arryalist/ Vector based on the basic requirement if that has to be synchronized or not. Other than that we minimally consider the responsiveness of the algorithmic implementation for each at the requirements.
1XML as database
Here is how you can connect to the database: try { //Load the DB2 JDBC Type 2 Driver with DriverManager Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); }catch (ClassNotFoundException e) { e.printStackTrace(); }Getting connection:connection = DriverManager.getConnection(url, user, pass);the prepare
2DWR - Easy AJAX for JAVA
DWR is a Java open source library which allows you to write Ajax web sites.It allows code in a browser to use Java functions running on a web server just as if it was in the browser.DWR consists of two main parts:A Java Servlet running on the server that processes requests and sends responses back t
Generics FAQ
Know more about Generics....You have a good article that explains generics on a case to case basis Generics FAQ ...
Tomcat Vs OC4J
Couple of differences between Tomcat and Oracle Application Server (OC4J)...There could be more...org.w3c.dom.Document:getElementsByTagName() Tomcat (Xerces): doc.getElementsByTagName("SOAP-ENV:Envelope") is valid. It treats the namespace as if it were just part of the tag name.
Are generics fully functional...?
Consider the snippet,Vector <String>strObject = new Vector <String>(); strObject.add("STR1");strObject.add("STR2"); Now adding an int or any other type of object into this collection would throw a compile time error, which sounds good...!//strObject.add(12) -- Compilation error On the other hand,Vec
View comments