Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 PROGRAMMING


  Fix 'this authentication plugin is not supported' issue while using Go to connect MySQL 8

MySQL 8 has changed its default authentication plugin from mysql_native_password to caching_sha2_password to improve its security. However many third party libraries seem act slowly to catch up with this change. This causes some compatible issues with their connection to MySQL. One of the issues is seen in Go libraries while it's trying to connect to MySQL 8.The specific error has been observed is "this authentication plugin is not supported". The root cause of this issue is that the go-sql-driver didn't support the new default authentication plugin. This bug has been reported a coup...

14,660 4       GO MYSQL 8 AUTHENTICATION PLUGIN MYSQL


  Why Use Java?

 Java was developed by Sun Micro-systems back in 1995 to function as high level programming language and serve as a computing platform. This gets regularly updated with new features and better compatibility. The latest version is Java SE 8.0 which released in 2014, March. Java has gained immense popularity while there have been various platforms to match up with the Java configurations like Java SE for Macintosh, Windows and UNIX, Java ME for Mobile Applications and Java EE for Enterprise Applications. Java is nowadays used in most of the enterprises and business units in networked a...

1,961 0       JAVA APPLICATION DEVELOPMENT JAVA WEB DEVELOPMENT JAVA OUTSOURCING COMPANY


  Why exception would be thrown when deleting element while looping through HashMap in Java

HashMap and other Collection types are frequently used in Java application programming. This post will explain why exception would be thrown when deleting element with Map.remove() while looping through a Map using Iterator. This issue would also occur to other Collection types such as Set, List.Below is a sample code snippet demonstrating the exception thrown.Map<String,String> map = Collections.synchronizedMap(new TreeMap<String,String>()); map.put("key1","value1");map.put("key2","value2");map.put("key3","value3"); Set<Entry<String,String>> entries = map.entrySet(); I...

3,422 0       JAVA HASHMAP CONCURRENTMODIFICATIONEXCEPTION


  Python Disrupts the Programming Language World- Gets Hot and Popular

Python is one of the fastest growing languages currently. It is undeniable that more and more programmers use Python and deploy it to the best of their use. Everyone, from the freelancer and startups to giant corporations and even governments, is using Python. Let us have a look at the reasons that make it so popular. Training:According to research, 8 out of 10 tech schools in the US teach Python over JAVA. Even the three major MOOC platforms, edX, Coursera, and Udacity have a similar approach and have introductory programmes before anything else and promote it on a massive level. &n...

9,336 1       TEAM DEVELOPMENT PYTHON


  Java Concurrency Basics: CountDownLatch and CyclicBarrier

CountDownLatchCountDownLatch can be used in synchronizing behavior among threads, it makes one or more threads wait for some actions in other threads to be completed. It has a property count which defines how many countDown() need to be called before other threads which called await() to be waked up. When a thread calls CountDownLatch.await(), the thread will be blocked until the value of count becomes 0. The initial value of count can be specified when creating the CountDownLatch instance. Every time when CountDownLatch.countDown() is called, the value of count will decrease by 1 until t...

6,495 0       JAVA CONCURRENCY JAVA COUNTDOWNLATCH CYCLICBARRIER


  Stream API in Java 8

OverviewIn this lesson on Stream API in Java, we will study how we can put Streams to use to write efficient and much more maintainable code. We will also write code with and without Streams so that we are able to compare the two versions.Before doing all this, we must know how to create a Stream and process it and that is what we will get started with.Introduction to StreamsWe will be starting with creating Streams. Let us get started with the Stream<T> API which enables us to play with Stream processing.Creating StreamsStreams can be created from any source like a Collection or an arra...

3,721 0       DEVELOPMENT TEAM JAVA 8 STREAM API


  What will the value of Integer.valueOf(127) == Integer.valueOf(127) be in Java?

Do you really understand how Java does the integer comparison? OK, ignore the statements in the post title. What we are interested in is another set of comparison statements. Let's first see below code snippet.public class IntegerComparison { public static void main(String[] args) { Integer a = 127, b = 127; Integer c = 128, d = 128; System.out.println(a == b); System.out.println(c == d); }}What do you think the output will be? Are they both displaying true? You will find out the answer after reading through how Java optimizes some of the integer comparison logic.First, you need to un...

11,294 3       JAVA == EQUALSTO


  How to check which Ohai plugin hangs in chef client run

Ohai plugins are very important components in chef client which aims to provide resource management automation on a server. The data discovered by Ohai plugins are describing the current state of the server and they will be used to maintain the server in a desired state. Each Ohai plugin discovers a specific pierce of information about the server such as cpu, memory, middleware etc.However, there are rare occasions(well I am a bit optimistic here) someone may find that the chef client run is hanging and it hangs at Ohai plugin discovery stage. Given every server has its own unique co...

4,940 0       HOW TO CHEF-CLIENT OHAI UPTIME HANG