Sunday, April 2, 2023

Where can i get DDS?

 https://www.dds-foundation.org/where-can-i-get-dds/

 

Twin Oaks Computing, Inc. is a company dedicated to developing and delivering quality software solutions. 

Our full-featured implementation of the Data Distribution Service is measured in Kilobytes not Megabytes. This compact implementation is unique in the middleware industry. With this small library size, low line of code count, and minimal run-time resource requirements, our CoreDX DDS is a lightweight, cross-platform, cross-language IPC solution perfect for the full spectrum of IoT applications. For further information about Twin Oaks Computing, Inc. please visit: http://www.twinoakscomputing.com/

Wednesday, November 24, 2021

JavaFX and GraalVM

 JavaFX in the new era of GraalVM

https://gluonhq.com/javafx-in-the-new-era-of-graalvm/

Gluon Substrate takes away most of the complexity of using GraalVM Native Image. You can create an app in Java, test it on your desktop, and then compile and link the Java bytecode to a native image for a specific platform by defining a profile in Maven. The resulting binary can be deployed to the AppStore or Google Play. For a short intro on how this works, see this video about creating an app for iOS using the Gluon plug-in in Netbeans.

It’s needless to say that GraalVM Native Image opens an abundance of opportunities for JavaFX. Let’s take a look at the impact this evolution could have on the development of mobile applications.

Thursday, February 28, 2019

JavaFX pane for scaling arbitrary content nodes

https://github.com/miho/ScaledFX

JavaFX pane for scaling arbitrary content nodes (used in Vworkflows) by applying scale transformations. The ScalableContentPane scales its content to always fit the container bounds.

Saturday, November 17, 2018

AspectJ tutorials


AspectJ and AOP – The black magic of programming


https://blog.jayway.com/2015/09/03/aspectj-and-aop-the-black-magic-of-programming/

AspectJ – Dictionary

Aspects

The easiest way to describe aspects is as a funky Java Class. An Aspect contains other things than a normal class such as; pointcuts, advice, advice bodies and inner-type declarations. An aspect may also contain regular java classes and methods.

Pointcuts

Defines, in a multitude of different ways, a point in the code. The pointcut defines when an advice should be run.

Advice / Advice Body

Similar to a java method; contains the code that will be run once a pointcut has been triggered.

Annotation – Not AOP specific

Consists of meta-data and can be used at methods, classes, parameters, packages and in variables.
Annotations can contain an optional list of element-value pairs, such as ‘yourProperty = “someValue”‘ in the example above. In AspectJ we can define a pointcut by looking for annotations. The pointcut and advice can then use the element-value pairs from the annotation.

Weaving / Aspect weaving

There are a few different ways to inject the AOP code in our application, but one common denominator is that they all require some type of extra step to be applied to our code. This extra step is called weaving.

Compile-time weaving

If you have both the source code of the aspect and the code that you are using aspects in, you can compile your source-code and the aspect directly with an AspectJ compiler.

Post-compile weaving / Binary weaving

If you can’t, or don’t want to use source-code transforms to weave the aspects into the code, you can take already compiled classes or jars and inject aspects.

Load-time weaving

Acts the same way as post-compile weaving / binary weaving but waits to inject aspects into the code until the class loader loads the class file. This requires one or more weaving class loaders.

Saturday, September 22, 2018

Friday, September 7, 2018

ByteBuffer flip vs rewind

https://stackoverflow.com/questions/16461284/difference-between-bytebuffer-flip-and-bytebuffer-rewind


flip() makes it ready for write() (or for get())
         rewind() makes it ready for read() (or for put())

get() Example;
You might want to read data from the buffer (assuming that you had initially stored it in there)and use it for something else such as converting to a string and manipulate it for further use.
ByteBuffer buf = ByteBuffer.allocateDirect(80);
private String method(){
buf.flip();
byte[] bytes = byte[10]; //creates a byte array where you can place your data 
buf.get(bytes); //reads data from buffer and places it in the byte array created above
return bytes;
}
write() Example; After you have read data from socket channel into the buffer you might want to write it back to socket channel - assuming that you want to implement something like a server that echos same message received from client.
So you will read from channel to buffer and from buffer back to channel
SocketChannel socketChannel = SocketChannel.open();
...

ByteBuffer buf = ByteBuffer.allocateDirect(80);

int data = socketChannel.read(buf); // Reads from channel and places it into the buffer
while(data != -1){ //checks if not end of reading
buf.flip();        //prepares for writing
....
socketChannel.write(buf) // if you had initially placed data into buf and you want to read 
                         //from it so that you can write it back into the channel


  }

Saturday, July 7, 2018

How to build smaller Docker containers

https://www.youtube.com/watch?v=wGz_cbtCiEA

In this episode of Kubernetes Best Practices, Sandeep Dinesh shows how you can build small containers to make your Kubernetes deployments faster and more secure. See the associated article here → https://goo.gl/zjejFj Google Container Registry → https://goo.gl/ilwubv Google Container Builder → https://goo.gl/l1Obc1 Container Registry Vulnerability Scanning → https://goo.gl/5EiyLe Google Kubernetes Engine → https://goo.gl/2V8yah Docker Multistage Builds → https://goo.gl/nQmwW4

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.

Sunday, October 8, 2017

Log analysis with deep/machine learning

https://hackernoon.com/log-analytics-with-deep-learning-and-machine-learning-20a1891ff70e

Need of Deep Learning Neural Network

There are various methods that are introduced for the analysis of log file such as pattern recognition methods like K-N Algorithm, Support Vector Machine, Naive Bayes Algorithm etc. due to the presence of a large amount of log data, these traditional methods are not feasible to produce efficient results.
Deep Learning Neural Network shows excellent performance in analyzing the log data. It consists of excellent computational power and automatically extracts the features required for the solution of the problem. Deep learning is a subpart of Artificial Intelligence. It is a deeply layered learning process of the sensor areas in the brain.

Why is Deep Learning called Deep?

The traditional neural network consists of at most 2 layers and this type of structure of the neural network is not suitable for the computation of larger networks. Therefore, a neural network having more than 10 or even 100 layers are introduced.
This type of structure is meant for Deep Learning. In this, a stack of the layer of neurons is developed. The lowest layer in the stack is responsible for the collection of raw data such as images, videos, text, etc.
Each neuron of the lowest layer will store the information and pass the information further to the next layer of neurons and so on. As the information flows within the neurons of layers hidden information of the data is extracted.
So, we can conclude that as the data moves from lowest layer to highest layer (moving deep inside the neural network) more abstracted information is collected.

Thursday, June 15, 2017

http://fahdshariff.blogspot.com/2016/06/java-8-completablefuture-vs-parallel.html

CompletableFutures provide more control over the size of the thread pool and should be used if your tasks involve I/O. However, if you're doing CPU-intensive operations, there's no point in having more threads than processors, so go for a parallel stream, as it is easier to use.