Skip to content

Instantly share code, notes, and snippets.

Mark Bishop sealfin

Block or report user

Report or block sealfin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Re. “Lucky Name Numbers”.md

I’m aware that this conversation is almost two years old, but you may (or, more likely, may not ;) be interested to know that almost two months ago I posted to my blog my solution to the “Lucky Name Numbers” problem posed by WJEC for the GCSE Computer Science unit 3 (“Developing Computing Solutions”) controlled assessment, although I focussed more on writing about- than on programming- my solution as I’ve a lot more experience of the latter than of the former – I’ve solved problems posed by the Advent Programming Contest, and Contest Coding, and …

View bigBooleanArray.c
#include "bigBooleanArray.h"
#include <stdio.h>
#include <stdlib.h>
static long g_maximum_index;
static long g_number_of_bytes;
static char *g_byte = NULL;
bool f_BigBooleanArray_Initialised( void )
{
View printDateAndTime.c
#include "printDateAndTime.h"
#include <time.h>
#include <stdio.h>
void p_PrintDateAndTime( void )
{
time_t t_0;
struct tm *t_1;
char s[ 26 ];
time( &t_0 );
View Minimal SDL2 & OpenGL stencil buffer example.mm
#include <SDL2/SDL.h>
#include "seal_quadColours_triangles.h"
#include "seal_texture.h"
int main( const int argc, const char * const argv[] )
{
const int W = 320, H = 240;
SDL_Init( SDL_INIT_VIDEO );
/* Request a stencil buffer of at least 1bit per pixel. */
@sealfin
sealfin / RussianPeasantMultiplication.java
Created Apr 6, 2014
Supposedly, Russian peasants perform multiplication in the following fashion: they write the two numbers which are to be multiplied at the top of two columns; then, they multiply the number in the right column by two, and divide the number in the left column by two – throwing away any fractional part – continuing until the number in the left col…
View RussianPeasantMultiplication.java
public class RussianPeasantMultiplication
{
public static int multiply( int l, int r )
{
int result = 0, lsb = l & 1;
if( lsb == 1 )
result += r;
while( l != 0 )
{
r <<= 1;
View formatCommandCharacterList.pas
{$R+}
unit formatCommandCharacterList;
interface
const
k_HEADER = 1; {T}
k_CENTERED_PARAGRAPH = 2; {C}
k_LINK = 3; {L}
k_HORIZONTAL_RULE = 4; {E}
View mhlp format analyser I.out
This program will enumerate the format command characters in the file 'metal_help.mhlp', viz. characters preceded by three '@' characters.
'T'
'C'
'L'
'N'
't'
'B'
'n'
'I'
View Minimal SDL2 & OpenGL example.mm
#include <SDL2/SDL.h>
#include "seal_quadColours_triangles.h"
#include "seal_texture.h"
int main( const int argc, const char * const argv[] )
{
const int W = 320, H = 240;
SDL_Init( SDL_INIT_VIDEO );
SDL_Window *window = SDL_CreateWindow( "SDL2 & OpenGL", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, W, H, SDL_WINDOW_OPENGL );
You can’t perform that action at this time.