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
java.lang.RuntimeException: java.lang.RuntimeException: SQL exception in endTransaction | |
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:231) | |
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) | |
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) | |
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) | |
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) | |
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) | |
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) | |
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) | |
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) |
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
Copied from http://mc.pp.se/dc/vms/flashmem.html | |
VMS Flashrom | |
The VMS flash memory contains 128 kilobytes of storage. These are divided into 256 blocks of 512 bytes each. Of these blocks, 200 are available for user files. The rest of the blocks contain filesystem information, or are simply not used at all. | |
The allocation of the 256 blocks is as follows: | |
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
import java.util.Random; | |
public class BirthdaySimulation | |
{ | |
public static void main(String [] args) { | |
Random rand = new Random(); | |
int month = rand.nextInt(12); | |
int day = getDayInMonth(month); | |
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
* Reads a ROM file and returns a vector containing | |
* its bytes if successful. Otherwise an error string | |
* if the file is too large or IoError is raised */ | |
fn read_rom(file_path: String) -> Result<Vec<u8>,String> { | |
match File::open(&Path::new(file_path)).read_to_end() { | |
Ok(rom_contents) => { | |
/* Programs start at address 0x200, in original implementation | |
* 0x000 - 0x1FF reserved for VM, just pad start of mem with |