Skip to content

Instantly share code, notes, and snippets.

View blewert's full-sized avatar
📖
thesis writing

Benjamin Williams blewert

📖
thesis writing
View GitHub Profile
cur_hp = 90;
cur_ar = 10;
print("hp: " + str(cur_hp));
print("ar: " + str(cur_ar));
damage = 333.7;
print("\n-" + str(damage));
# armour
%%
%% lincolncsthesis.cls
%% Copyright 2019 Benjamin Williams <bwilliams@lincoln.ac.uk>
%%
%% A LaTeX template for typesetting research degree theses
%% according to the University of Lincoln School of Computer Science
%% thesis guidelines.
%%
%% It is worth noting that the main inspiration (and small snippets of code)
%% for this template was Cameron Gray's bangorcsthesis template.
@blewert
blewert / doggos.jsx
Created February 20, 2020 21:10
A working example of a horizontal ScrollView with some example click events.
import React, { Component } from 'react';
import { StyleSheet, Text, View, Button, ScrollView } from 'react-native';
class DoggoListButton extends Component
{
handlePressButton()
{
//This is called when you press this doggo button
//it just prints out the name of this doggo and its number that was passed :)
alert("hello i am " + this.props.doggo + ", my number is " + this.props.num + " and I am the bestest boyo in the whole wide WORLD");
// Upgrade NOTE: replaced '_World2Object' with 'unity_WorldToObject'
/**
* @author Benjamin Williams <bwilliams@lincoln.ac.uk>
* @file threshold-shader.shader
*/
Shader "blewert/Dist-based Threshold"
{
Properties
from math import floor
def assign_equal_groups(sample_size, num_groups):
return_list = [];
group_size = sample_size / num_groups;
for i in range(0, sample_size):
v = (i / group_size) % num_groups;
return_list.append(floor(v));
// threaded-file-read.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <thread>
#include <iostream>
#include <vector>
#include <functional>
#include <fstream>
#include <string>
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "Nature/Terrain/Flipped Standard"
{
Properties
{
// used in fallback on old cards & base map
[HideInInspector] _MainTex("BaseMap (RGB)", 2D) = "white" {}
[HideInInspector] _Color("Main Color", Color) = (1,1,1,1)
}
var timeout = 30 * 1000;
var lastKeyPress = +(new Date());
setInterval(update, 100);
function update()
{
var diff = +(new Date()) - lastKeyPress;
if(diff > timeout)
window.location.href = "../..";
@blewert
blewert / EnumWindowZOrder.cpp
Last active June 22, 2026 01:43
[windows.h] Iterating over all desktop windows in C++, by z-order
//Find the top-most window. We need the Z-order to be
//relative to this
HWND window = GetTopWindow(GetDesktopWindow());
do
{
//Your code
}
while (window = GetWindow(window, GW_HWNDNEXT));
# skills assessment booklet info
[teamwork]
Ability to form relationships at all levels and motivate and support other team members;Willingness to ask others for advice or help when solving a problem;Ability to work fairly and productively alongside others
[emotional intelligence]
Ability to recognise the emotions of others and adapt your behaviour accordingly;Ability to use social awareness and empathy towards others;Adapt your communication style depending on the audience
[feedback]