C-g = abort command
C-x C-c = Exit
C-_ | C-x u = Undo
C-z = iconify / %emacs to get back
C-x C-z = suspend, back qith "fg"
M-x shell = bash
ESC-! = shell command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Nondeterministic { | |
private int x = 0; | |
private int y = 1; | |
/* | |
* What happens when you synchronize only the write()? | |
* A synchrnoized method is like a bathroom with a door but without walls | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Bank { | |
private String name; | |
public Bank(String name) { | |
this.name = name; | |
} | |
public String getName() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Consumer extends Thread { | |
private IntBuffer buffer; | |
public Consumer(IntBuffer buffer) | |
{ | |
this.buffer = buffer; | |
} | |
public void run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
public class LinkedListFail { | |
/* | |
* This is slow | |
*/ | |
public static ArrayList<Integer> removeEvensInArrayList(ArrayList<Integer> list) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LinkedIntList { | |
private ListNode front; | |
public LinkedIntList() { | |
front = null; | |
} | |
public int size() { | |
int count = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mr Robert Aaron | |
Part-time Librarian | |
faculty-and-staff/robert-aaron | |
Ms Zaynab Abdul-Razacq | |
Library Assistant I | |
faculty-and-staff/zaynab-abdul-razacq | |
Dr Donna Abrams | |
Assistant Professor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Core { | |
public static void main(String[] args) { | |
int coreNum = Runtime.getRuntime().availableProcessors(); | |
System.out.println("Number of cores are: " + coreNum); | |
long maxMemory = Runtime.getRuntime().maxMemory(); | |
System.out.println("MAX size of the heap (MB): " + maxMemory / 1048576); | |
long freeMemory = Runtime.getRuntime().freeMemory(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ferrari california,2019,1000000,FALSE | |
toyota sienna,2019,50000,FALSE |