Virtual machine image sharing between computers works best with operating systems that are not license-bound to hardware.
Linux and
ReactOS
are good candidates.
Windows is not a good candidate for virtual machine sharing since Windows checks the hardware.
The image can reside on a fast USB drive or network share.
For the 50 United States and possessions, there is a convenient
clickable map
that returns elevation data.
Lists of elevation data can also be retrieved.
This is useful as a sanity check for the more typical DEM programs typically used.
Easily compile and use the “GNC” Robust Optical Flow C code from M. Black’s
article.
Black Robust optical flow code
Run the C-compiled executable gnc directly, from Matlab or Python.
The Bash shell has environment variables LINES and COLUMNS representing the current terminal window width.
One might therefore incorrectly assume that Fortran 2003 standard get_environment_variable() subroutine would trivially get the current Terminal window dimensions.
This is not so, since Bash passes along only the “POSIX” set of environment variables, and those that have been exported to the executable.
A working example of getting current Fortran terminal size using Ncurses is in the
BlockTran
program, where the variables LINES and COLS are set using the getmaxyx Ncurses macro.
Use the method above, as the method below naïvely fails.
Thus, the following will result in status code 1, indicating the environment variable was not found.
If the user runs this program as
LINES=24 ./myprog
that “works”, but we want an automatically determined value.
programnoenvuse,intrinsic::iso_fortran_env,only:error_unitimplicitnone(type,external)character(4)::bufinteger::h,ioscallget_environment_variable('LINES',buf,status=ios)if(ios/=0)thenwrite(error_unit,*)'got error code',ios,'on trying to get LINES'stopendifread(buf,*)hendprogram
Fortran 77 statement functions were thankfully made obsolete by Fortran 95 standard.
Statement functions are notanonymous functions.
In most cases, one should simple use standard functions instead of confusing statement functions.
Other use cases are addressed by the polymorphism enabled from Fortran 2003 forward and/or pointers.
Example: Replace Fortran statement function with a standard function.
programstinteger::f,i,j,k,n! obsolete statement function (don't use)
f(n)=n+(i*j)**ki=2j=3k=4print*,fprint*,g(i,j,k)containsintegerfunctiong(n,i,j,k)! use this instead of statement function
integer,intent(in)::n,i,j,kg=n+(i*j)**kendfunctiongendprogram
While for regular use one might setup a headless VM with RDP and/or SSH running on the VM itself,
this procedure is for connecting to a virtual machine on a remote PC.
Prerequisites:
Remote: VirtualBox install of guest operating system
local: apt install xfreerdp-x11
on your local laptop, create a script vmrdp.sh containing:
Optionally, add a few simple
FreeRDP options
to enhance performance, especially on limited data bandwidth connections
Most people can use the VirtualBox GUI, and don’t need the alternative command line option.
Establish a VNC connection over SSH
The very basic OpenBox desktop environment can open a Terminal on the remote PC by right clicking anywhere on the remote desktop and type
virtualbox
The usual VirtualBox program should open
From the right dropdown menu of the right arrow “start” button on the main VirtualBox window on the remote VNC PC, click headless.
The status of the VM will show “Running”.
Connect from laptop with a script vmrdp.sh as above.
When done, shutdown your VM as usual if desired.
Most can use the GUI method above, but VirtualBox can also be managed well via shell commands.
virtualbox vmstart MyVMName --headless
starts up the VM named “MyVMName” for example.
Numerous headless options exist for low server resource utilization via
VBoxManage
CLI.
The
BlockTran
tetromino falling block Fortran game exhibits several types of best practices for modern Fortran design with user keyboard input and animated text output.
Ncurses is used to handle the screen drawing via iso_c_binding from Fortran.
Inspired by the demo Fortran program use of Ncurses, we created the game in object-oriented modern Fortran.
Ncurses redraws the screen on each necessary update (pseudo-interrupt driven).
CPU load is very low.
It would be straightforward to add color, sound and more.
Writing to /dev/null can save significant time on legacy Fortran programs that dump unneeded data to disk.
This is lower risk than making modifications to non-standard compliant code, and certainly less programmer time consuming.
We have seen 10x speedup from programs that had unneeded intensive file writing.
It’s also particularly useful for Fortran code called from Python via f2py.
The ADALM-PLUTO is a UHF-microwave (software hackable to cover VHF) SDR with rapidly growing software support, particularly from GNU Radio and Matlab.
Don’t freak out about the unshielded case.
Like
Red Pitaya,
PLUTO is an FCC-verified educational tool.
An amateur radio license is very useful in general for software defined radio work to avoid falling foul of federal regulations.
Frequency, bandwidth, and bit depth are among the most fundamental specifications of a typical SDR.
While the AD9363 is rated for 325-3800 MHz, functionality has been observed to 70-6000 MHz akin to the AD9364.
The tunable frequency range is rated as 325 - 3800 MHz.
A
software hack
enables 70 - 6000 MHz coverage.