Skip to content

Commit

Permalink
Revert "BAEL-4134"
Browse files Browse the repository at this point in the history
  • Loading branch information
lor6 authored Jul 7, 2020
1 parent dffa1f6 commit 485b4e3
Show file tree
Hide file tree
Showing 2,492 changed files with 10,370 additions and 515,690 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,5 @@ transaction.log
*-shell.log

apache-cxf/cxf-aegis/baeldung.xml
apache-fop/src/test/resources/input.xml
apache-fop/src/test/resources/output_herold.pdf
apache-fop/src/test/resources/output_html2fo.pdf
apache-fop/src/test/resources/output_jtidy.pdf

libraries-2/*.db
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
package com.baeldung.jgrapht;

import static org.junit.Assert.assertTrue;

import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

import org.jgrapht.ext.JGraphXAdapter;
import org.jgrapht.graph.DefaultDirectedGraph;
import org.jgrapht.graph.DefaultEdge;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.mxgraph.layout.mxCircleLayout;
import com.mxgraph.layout.mxIGraphLayout;
import com.mxgraph.util.mxCellRenderer;
Expand All @@ -20,7 +25,7 @@ public class GraphImageGenerationUnitTest {

@Before
public void createGraph() throws IOException {
File imgFile = new File("src/test/resources/graph.png");
File imgFile = new File("src/test/resources/graph1.png");
imgFile.createNewFile();
g = new DefaultDirectedGraph<String, DefaultEdge>(DefaultEdge.class);
String x1 = "x1";
Expand All @@ -34,12 +39,18 @@ public void createGraph() throws IOException {
g.addEdge(x3, x1);
}

@After
public void cleanup() {
File imgFile = new File("src/test/resources/graph1.png");
imgFile.deleteOnExit();
}

@Test
public void givenAdaptedGraph_whenWriteBufferedImage_ThenFileShouldExist() throws IOException {
JGraphXAdapter<String, DefaultEdge> graphAdapter = new JGraphXAdapter<String, DefaultEdge>(g);
mxIGraphLayout layout = new mxCircleLayout(graphAdapter);
layout.execute(graphAdapter.getDefaultParent());
File imgFile = new File("src/test/resources/graph.png");
File imgFile = new File("src/test/resources/graph1.png");
BufferedImage image = mxCellRenderer.createBufferedImage(graphAdapter, null, 2, Color.WHITE, true, null);
ImageIO.write(image, "PNG", imgFile);
assertTrue(imgFile.exists());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.baeldung.algorithms.play2048;

public class Play2048 {
private static final int SIZE = 3;
private static final int SIZE = 4;
private static final int INITIAL_NUMBERS = 2;

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@

public class DutchNationalFlagPartioning {

public static Partition partition(int[] a, int begin, int end) {
public static Partition partition(int[] input, int begin, int end) {
int lt = begin, current = begin, gt = end;
int partitioningValue = a[begin];
int partitioningValue = input[begin];

while (current <= gt) {
int compareCurrent = compare(a[current], partitioningValue);
int compareCurrent = compare(input[current], partitioningValue);
switch (compareCurrent) {
case -1:
swap(a, current++, lt++);
swap(input, current++, lt++);
break;
case 0:
current++;
break;
case 1:
swap(a, current, gt--);
swap(input, current, gt--);
break;
}
}
Expand Down
6 changes: 0 additions & 6 deletions apache-avro/README.md

This file was deleted.

72 changes: 0 additions & 72 deletions apache-avro/pom.xml

This file was deleted.

3 changes: 0 additions & 3 deletions apache-beam/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions apache-beam/pom.xml

This file was deleted.

7 changes: 0 additions & 7 deletions apache-bval/README.md

This file was deleted.

40 changes: 0 additions & 40 deletions apache-bval/pom.xml

This file was deleted.

7 changes: 0 additions & 7 deletions apache-curator/README.md

This file was deleted.

70 changes: 0 additions & 70 deletions apache-curator/pom.xml

This file was deleted.

15 changes: 0 additions & 15 deletions apache-fop/.gitignore

This file was deleted.

Loading

0 comments on commit 485b4e3

Please sign in to comment.