I hereby claim:
- I am eaddingtonwhite on github.
- I am eaddingtonwhite (https://keybase.io/eaddingtonwhite) on keybase.
- I have a public key ASD4PKByCNZFqPfhbUnTxU7NI2BKe4wElT-6LsNMea-g2Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
.data | |
L1: .word 2,4,6,8,10,12,14,16 # the array | |
.text | |
.globl main | |
main: add $t0, $0, $0 # initialize $t0=0 | |
add $t1, $0, $0 # initialize the sum = 0 | |
lw $t2, L1($t0) # load first value | |
add $t1, $t1, $t2 # add to sum | |
addi $t0, $t0, 8 # computer addr of two elements down |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
public static synchronized void addValue(int myIndex) { | |
boolean imDone = false; | |
System.out.println("Thread " + myIndex + " is trying to add its value"); | |
do { | |
if (myIndex != numberOfThreadsDone) { | |
try { | |
System.out.println(myIndex + " is about to wait"); | |
ParallelSerial.class.wait(); // <-- ** Important need to call className.class.wait() in syncronized method** | |
} catch (InterruptedException e) { | |
e.printStackTrace(); |
var scope = angular.element($('#elementToUpdate')).scope(); | |
scope.$apply(function() { | |
scope.variable1 = $scope.variable1; | |
scope.variable2 = $scope.variable2; | |
}); |