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
int s1 = 2; //entry button 1 | |
int s2 = 3; //entry button 2 | |
int e1 = 4; //exit button 1 | |
int e2 = 5; //exit button 2 | |
int r1 = 6; //route set indicator 1 | |
int r2 = 7; //route set indicator 2 | |
int r3 = 8; //route set indicator 3 | |
int r4 = 10; //route set indicator 4 | |
int timeout = 11;//Route time out indicator light |
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
/* | |
* PiRMI. | |
* Copyright (C) 2015 Gareth J Barnard | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
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
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-armhf/ | |
export GRADLE_HOME=~/gradle-2.3 | |
export PATH=$PATH:/usr/lib/jvm/java-7-openjdk-armhf/bin:$GRADLE_HOME/bin |
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
/* | |
* Sequence. | |
* © G J Barnard 2013 - Attribution-NonCommercial-ShareAlike 3.0 Unported - http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB. | |
*/ | |
package sequence; | |
/** | |
* This class outputs a sequence where x = y * y - y. | |
* | |
* @author G J Barnard |
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
/* | |
* Pi RMI. | |
* © G J Barnard 2013 - Attribution-NonCommercial-ShareAlike 3.0 Unported - http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB. | |
*/ | |
package pirmi; | |
import java.rmi.Remote; | |
import java.rmi.RemoteException; | |
/** |
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
/* | |
* Thread Pool. | |
* © G J Barnard 2012 | |
* License: Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0). | |
* See: http://creativecommons.org/licenses/by-nc-sa/3.0/ | |
*/ | |
package threadpool; | |
import java.util.Date; | |
import java.util.LinkedList; |
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
/* | |
* Custom exception example. | |
* © G J Barnard 2013 - Attribution-NonCommercial-ShareAlike 3.0 Unported - http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB. | |
*/ | |
package myexception; | |
/** | |
* Demonstrate how custom exceptions can be defined and employed. | |
*/ | |
public class ExceptionTest |
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
/* | |
* FreeSpace JNI class. | |
* © G J Barnard 2013 - Attribution-NonCommercial-ShareAlike 3.0 Unported - http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB. | |
* | |
* Defines the native functions to use and loads the resulting 'libfreespace.so' for Java to use at runtime. | |
* | |
* Start here. | |
* So with this file operating above the package folder: | |
* javac miniwebserver/FreeSpace.java to generate the .class file for FreeSpaceMiniWebServer. | |
* javah miniwebserver.FreeSpace to generate the miniwebserver_FreeSpace.h file with the function declarations to implement. |
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
#include <stdio.h> | |
union | |
{ | |
unsigned int i; | |
unsigned char c; | |
} aunion; | |
int main() | |
{ |
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
/* Recursion vs loops example. | |
(c) G J Barnard May 2013 | |
License: | |
http://creativecommons.org/licenses/by-nc-nd/3.0/ | |
*/ | |
#include <stdio.h> | |
#include <sys/time.h> | |
unsigned char aNumber = 42; |
NewerOlder