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
EXTENDS Naturals, TLC | |
(* --algorithm transfer | |
variables db_data = {}, read_db_data = {}, published_rx_data = {}, new_entry = 1, subscribed = FALSE; | |
fair process writer = "writer" | |
variables local_db_data = {} | |
begin | |
WRITER_OPEN: local_db_data := db_data; \* open transaction | |
WRITER_WRITE: local_db_data := local_db_data \union {new_entry}; \* write |
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 org.junit.Assert; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.mockito.Mock; | |
import org.mockito.runners.MockitoJUnitRunner; | |
import java.util.Map; | |
import static org.mockito.Mockito.doReturn; | |
import static org.mockito.Mockito.when; | |
@RunWith(MockitoJUnitRunner.class) |
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
<html> | |
<head> | |
<link rel="stylesheet" href="style.css"> | |
<script src="https://code.jquery.com/jquery-3.0.0.js"></script> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<div id="loader"> | |
<div></div> | |
</div> |
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 hashlib | |
import random | |
import itertools | |
alphabetString = "abcdefghijklmnopqrstuvwxyz" | |
def doubleSHA256( plainText ): | |
firstEncryption = hashlib.sha256() | |
secondEncryption = hashlib.sha256() | |
firstEncryption.update(plainText) |