Linux Self-Extracting Script

While developing a web application - certified for Linux only - I wanted an easy way to deploy it.
The classical RPM (good guide) and DEB (simple guide) packages were an option and, as I write this, the DEB package is actually finished but the RPM is considerable more complex and I'm still not convinced that it is worth the work for what is required, though, it may not be included in the final version.

Since I do not wish to create nor maintain lots of distribution packages, the obvious choice was to have an installation package that could be executed in any Linux distribution.

In the past, around 2003 or so, I've already had a similar problem and the solution back then was to use a self extracting archive. After some research, I found out an easy and simple way to do it.
Here's a detailed explanation on how things can be done: Bash Self-Extracting Script.
If you wish for a faster solution, you can check this Self-extracting Shell Script.

./M6

ASP.Net showing operating system and framework version

Recently I was in the process of migrating a simple ASP.NET MVC application.
After setting up IIS, using Upgrade Assistant and a some code changes, I got this feeling that, somehow, I was being tricked and .Net 4.8 Framework was still there running my code...

So, I got into the layout page and places this on the page footer:

<small>
@System.Runtime.InteropServices.RuntimeInformation.OSDescription
 |
@System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription
</small>

That prints the operating system and the framework where the application is running.


./M6

Ant not working in Ubuntu/Kubuntu 20.04 LTS

After a clean installation of a Kubuntu 29.04 LTS, Ant was not working properly. A simple ant -version came out as

/bin/ant: 1: cd: can't cd to /bin/../share/ant/bin/..
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher

One may think the problem resides in the ANT_HOME not being set, but actually the problem is that Ant is not pointing to the correct location.

The solution was quite simple, the incorrect symbolic link was removed and a new one was created pointing it to the correct location:

sudo rm -rf /bin/ant
sudo ln -s /usr/share/ant/bin/ant /bin/ant

Please note that this solution worked for me, check if it works for you to before making any system changes.

./M6

Less Than One - A radical new technique lets AI learn with practically no data

I came across with this very interesting new idea about training AI with a substantial small data set.

Since we humans sometimes don't even need to see one example of something to recognize it, why should AI be fed with tons of data to identify something?

Here's the 'Less Than One'-Shot Learning: Learning N Classes From M<N Samples original paper.

The A radical new technique lets AI learn with practically no data article explains it all.

./M6