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
/* | |
* 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
/* Recursion vs loops example. | |
(c) G J Barnard May 2013 | |
License: | |
http://creativecommons.org/licenses/by-nc-nd/3.0/ | |
*/ | |
#include <iostream> | |
using namespace std; | |
#include <sys/time.h> | |
class Recursion |
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; |
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
/* | |
* 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
/* | |
* 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
/* | |
* 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
/* | |
* 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
/* | |
* 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. |
OlderNewer