Skip to content

Instantly share code, notes, and snippets.

Tests run: 279, Failures: 2, Errors: 0, Skipped: 236, Time elapsed: 17.924 sec <<< FAILURE! - in TestSuite
setUp(com.github.shyiko.mysql.binlog.BinaryLogClientGTIDIntegrationTest) Time elapsed: 0.759 sec <<< FAILURE!
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
@ahmedahamid
ahmedahamid / find-median-sorted-arrays.cs
Last active March 10, 2019 17:41
Median of Two Sorted Arrays | General Approach
public double FindMedianSortedArrays(int[] A, int[] B)
{
// TODO: Check for corner cases
int aLen = A.Length;
int bLen = B.Length;
int leftHalfLen = GetLeftHalfLength(aLen + bLen);
// aMinCount and aMaxCount are the min and max number
// of values A can contribute to the left half of A ∪ B,
@ahmedahamid
ahmedahamid / find-median-sorted-arrays-improved.cs
Last active March 10, 2019 17:01
Median of Two Sorted Arrays | Improved Solution
public class Solution
{
public double FindMedianSortedArrays(int[] A, int[] B)
{
if (Object.ReferenceEquals(A, null) || Object.ReferenceEquals(B, null))
{
throw new ArgumentNullException();
}
int aLen = A.Length;
@ahmedahamid
ahmedahamid / find-median-sorted-arrays-improved-no-nullables.cs
Last active March 12, 2021 13:52
Median of Two Sorted Arrays | Improved Solution | No Nullables
public class Solution
{
public double FindMedianSortedArrays(int[] A, int[] B)
{
if (Object.ReferenceEquals(A, null) || Object.ReferenceEquals(B, null))
{
throw new ArgumentNullException();
}
int aLen = A.Length;