Skip to content

Instantly share code, notes, and snippets.

View DarkLotus's full-sized avatar

James DarkLotus

View GitHub Profile
@DarkLotus
DarkLotus / PoE NPL
Created January 25, 2013 10:47 — forked from Zoxc/PoE NPL
struct PoEEmpty
{
}
[DataTypeByteOrder = 1] UnsignedNumber PoEU16
{
Size = 2
}
[DataTypeByteOrder = 0] UnsignedNumber PoEU16LE
@DarkLotus
DarkLotus / Assignment 1
Created May 1, 2014 23:45
Assignment 1
/**
* James Kidd
* Student ID: S3316990
*/
import java.io.PrintStream;
import java.util.Scanner;
public class Stage3
{
using Photon;
using System;
using System.Collections.Generic;
using UnityEngine;
public class InteractiveDiceObject : SimpleInteractiveObject
{
private int m_diceValue;
public InteractiveDiceObject()
@DarkLotus
DarkLotus / Contact Enhanced Math Captcha
Created July 10, 2014 04:35
Contact Enhanced Math Captcha
jQuery(document).ready(function($){
var mathenticate = {
bounds: {
lower: 5,
upper: 50
},
first: 0,
second: 0,
generate: function () {
this.first = Math.floor(Math.random() * this.bounds.lower) + 1;
@DarkLotus
DarkLotus / No animation
Created August 22, 2014 09:00
Remove default animation from Xamarin forms navigation renderer
/*
Shared implementation, use in place of NavigationPage
*/
using Xamarin.Forms;
namespace LakesEntrance
{
public class NoAnimationNavigationPage : NavigationPage
{
public NoAnimationNavigationPage(Page startupPage) :base(startupPage)
@DarkLotus
DarkLotus / Week 2 Exercise
Last active August 29, 2015 14:06
Week 2 Exericse
// https://www.dropbox.com/s/ya77lpafdjvp8pq/week2-uml2.PNG?dl=0
// My final UML which didnt quite match up with the actual implementation.
import java.io.IOException;
import java.sql.Time;
import java.util.ArrayList;
import java.util.Date;
import java.util.Random;
import java.util.Scanner;
import java.util.Timer;
@DarkLotus
DarkLotus / a2 tester
Last active August 29, 2015 14:07
A2 tester
package com.jameskidd;
/**
* An automated driver class for the farm game.<p>
*
* @version 1.0
* @author James Kidd
*/
import java.io.Console;
import com.jameskidd.Controllers.Controller;
@DarkLotus
DarkLotus / gist:90e6ab625bc9ad5f3fee
Created October 23, 2014 10:55
Arduino Farm Driver
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <pgmStrToRAM.h>
#include <MemoryFree.h>
#include "Controller.h"
#include "Wheat.h"
Controller * _game;// (F("James"));
@DarkLotus
DarkLotus / 23LCV512 MBED STM32 Driver code
Created November 7, 2014 09:08
23LCV512 MBED STM32 Driver code
/*
* Library to interface with the 23LCV512 SRAM microchip.
*
* Apache2 licensed
* Written by James Kidd 2014
* */
#include "mbed.h"
enum SRAM_MODE {
BYTE_MODE = 0x00,
SEQ_MODE = 0x40
@DarkLotus
DarkLotus / main.xml
Created February 7, 2015 06:56
main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/imageView"
android:src="@drawable/bg"