It’s easy!
String version = myObject.getClass() .getPackage() .getImplementationVersion();
Where it comes from…? I think from the MANIFESTO in the jar file.
It’s easy!
String version = myObject.getClass() .getPackage() .getImplementationVersion();
Where it comes from…? I think from the MANIFESTO in the jar file.
You cannot include a lstlisting
(package listings
) in a only
or visible
command in LaTeX beamer. BUT you can define the listing beforehand and then include that inside the only
or visible
!
Example (from slides about recursion in Java):
\defverbatim{\Lst}{ \begin{lstlisting} public int fakultaet(int n) { if ( n == 1 ) { return 1; } else { return n * fakultaet( n-1 ) ; } } \end{lstlisting} } \begin{frame}[fragile] \frametitle{Aufgabe: Fakultät von $n$} Definition: \begin{itemize} \item \lstinline{fakultaet( 1 ) = 1} \item \lstinline{fakultaet( n ) = n * fakultaet( n-1 ) } \end{itemize} \bigskip Java Code: \visible<2|handout:0>{\Lst} \end{frame}
I use sed
sometimes to change stuff in files. But I don’t use it often enough, so I usually need way too many tries to get it right. Now I found an online tool to test your sed patterns! So much more convenient than trying it on the command line!
Here is the link: https://sed.js.org/