This is a new SciJava Notebook¶
What’s happening
- The notebook is viewed and running from a browser on a completely different machine
 - Jupyter Lab is running on Ubuntu in the background as user anaconda
 - Jupyter Lab is accessible over the local network via https & secured with a password
 
this is really very cool
Why?
- because it is
 - because I said so
 - did I mention it’s really cool?
 
In [1]:
System.out.println("Numbers:");
for(int i = 0; i < 100; i++) {
    System.out.print(i + " ");
}
System.out.println("Done.");
And now… The Sieve of Eratosthenes…‘
- the code was on my local pc
 - the code was just cut and pasted into this notebook
 - the code ran first time (well, it did on the PC as well)…
 
In [2]:
public class Seive {
static int MAX = 1000;
    public static void main(String[] args) {
        int[] stones = new int[MAX+1];
        // initialize
        for(int i = 2; i <= MAX; i++) {
            stones[i] = i;
        }
        // remove non-primes
        for(int i = 2; i <= MAX/2; i++) {
            for(int j = i+i; j <= MAX; j += i) {
                stones[j] = 0;
            }
        }
        // display the primes
        System.out.println("Primes");
        for(int i = 2; i <= MAX; i++) {
            if(stones[i] > 0) System.out.print(stones[i] + " ");
        }
        System.out.println();
    }
}
a web link using regular old html…
Huntrods Zone
In [ ]: