Nice book, it covers really a lot of topics, well worth reading.
Anything about Java, WebLogic, OSB, Linux etc.... this is my logbook of a navigation in the IT Technology ocean.
Very savvy book about AI, worth reading even if it's from 2017

import java.util.stream.IntStream;
public class ConsoleBasedFizzBuzz implements FizzBuzz {
public static void main(String[] args) {
FizzBuzz fizzBuzz = new ConsoleBasedFizzBuzz();
fizzBuzz.print(1, 100);
}
private static void accept(int i) {
StringBuffer result = new StringBuffer();
if (i % 3 == 0) result.append("Fizz");
if (i % 5 == 0) result.append("Buzz");
if (result.length() == 0) result.append(i);
System.out.println(result);
}
@Override
public void print(int from, int to) {
IntStream.range(from, to).forEach(ConsoleBasedFizzBuzz::accept);
}
}
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import java.io.IOException;
public class JunitAssertionsTest {
@Test
public void testException() {
Executable when = () -> pippo();
Assertions.assertThrows(IOException.class, when);
}
private void pippo() throws IOException {
System.out.println("running");
throw new IOException("ciao");
}
}
docker run dockerinaction/hello_world docker help
docker run --detach --name web nginx:latest docker run --interactive --tty --link web:web --name web_test busybox:latest /bin/sh wget -O - http://web:80/ exit (CTRL-P CTRL-Q to run interactively a process and then detach) #this example is WRONG in the book! docker run -d --name mailer dockerinaction/ch2_mailer docker run -it --name agent --link web:insideweb --link mailer:insidemailer dockerinaction/ch2_agent #connect to a running instance in interactive mode docker start -i "CID" docker restart web docker restart mailer docker restart agent docker run -d --name namespaceA busybox:latest /bin/sh -c "sleep 30000" docker run -d --name namespaceB busybox:latest /bin/sh -c "nc -l -p 0.0.0.0:80" docker exec namespaceA ps docker exec namespaceB ps #creating a conflict by NOT using namespaces docker run -d --name webConflict nginx:latest docker logs webConflict docker exec webConflict nginx -g 'daemon off;' #avoiding conflicts by using namespaces docker run -d --name webA nginx:latest docker logs webA docker run -d --name webB nginx:latest docker logs webB docker rename webA webPippo #create is like run, but it's created in stopped state CID=$(docker create nginx) echo $CID docker create --cidfile /tmp/web.cid nginx #running 3 containers linked to each other - in reverse order MAILER_CID=$(docker run -d dockerinaction/ch2_mailer) WEB_CID=$(docker run -d nginx) AGENT_CID=$(docker run -d --link $WEB_CID:insideweb --link $MAILER_CID:insidemailer dockerinaction/ch2_agent) #check status of container docker inspect $CID docker search postgres docker pull busybox:latest docker save -o myfile.tar busybox:latest docker rmi busybox docker load -i myfile.tar