Tuesday, June 26, 2018

Lambda expression performance


https://stackoverflow.com/questions/22637900/java8-lambdas-vs-anonymous-classes

An anonymous inner class (AIC) is a class, which means that it has scope for variable defined inside the inner class.
Whereas,lambda expression is not a scope of its own, but is part of the enclosing scope.
 At runtime anonymous inner classes (AIC) require class loading, memory allocation and object initialization and invocation of a non-static method while lambda expression is pure compile time activity and don’t incur extra cost during runtime. So performance of lambda expression is better as compare to anonymous inner classes.**

Monday, June 25, 2018

Proper proxy setting for Docker



https://stackoverflow.com/questions/50148644/what-is-the-proper-proxy-settings-for-docker-and-kubernetes



We always include the scheme in our environment variables.

/etc/profile.d/proxy.sh:

#!/bin/bash
export http_proxy=http://:3128
export https_proxy=$http_proxy
export no_proxy=169.254.169.254,localhost,127.0.0.1
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
export NO_PROXY=$no_proxy

/etc/systemd/system/docker.service.d/proxy.conf:


[Service]
Environment="HTTPS_PROXY=https://:3128/" "HTTP_PROXY=http://:3128/"

 

Monday, June 11, 2018

TortoiseSVN not save the password

https://stackoverflow.com/questions/27797593/tortoisesvn-not-save-the-password?rq=1

1) When Tortoise SVN was not saving my user/password credentials I solved the problem by going to TortoiseSVN settings -> Saved Data -> Clear Authentication data (see image below). Also check AllowAuthSave is set to true in TortoiseSVN settings -> Advanced.

 - or -


2) Whether or not to store passwords is set by the Subversion configuration file.
  • Right click on your desktop, so you see the TortoiseSVN menu. Go to TortoiseSVN->Settings.
  • In the General section, click on the Edit button for the Subversion Configuration File.
  • Two items you wan to change:
    • Make sure that password-stores = windows-cryptoapi is enabled. (I believe this is the default anyway) by removing the # in front of the line.
    • Look for the lines that say store-passwords = no and store-auth-creds = no. Change the no to a yes, and remove the # at the beginning of the line.
Save the changes, and close the initial settings box by clicking on Ok. Next time, when Subversion asks for the password, it will store it.
 

Saturday, June 9, 2018

Spring @AutoWired explained

https://www.youtube.com/watch?v=xTGkWSZkyNg
https://www.youtube.com/watch?v=K43qyHJXmWI

Very good Git introduction

https://www.youtube.com/watch?v=NqF7Y7hdeBA
https://www.youtube.com/watch?v=8KCQe9Pm1kg

Spring Boot meets AKKA

http://kimrudolph.de/blog/spring-boot-meets-akka
https://akka.io/docs/


Spring Boot Meets Akka

Reading something about Java and the Actor model will sooner or later lead to Akka. There is a great documentation for the Scala and Java API to get started with the Akka toolkit. This application is an experiment to create a small example of the Java API in combination with the Spring Framework.
The application should spawn some actors to asynchronously write several messages in a database and shut down after all messages are processed.
Spring Boot is used to simplify the test application configuration, including packaging and startup/shutdown behaviour. See the repository for class imports and more code comments.

Sourcecode

The full application can be found at the akkaflow repository.