Instantly share code, notes, and snippets.

# Mark Bishopsealfin

• Sort options
Created Jun 24, 2017
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 …

Created Jun 15, 2014
View bigBooleanArray.c
 #include "bigBooleanArray.h" #include #include static long g_maximum_index; static long g_number_of_bytes; static char *g_byte = NULL; bool f_BigBooleanArray_Initialised( void ) {
Created May 31, 2014
View printDateAndTime.c
 #include "printDateAndTime.h" #include #include void p_PrintDateAndTime( void ) { time_t t_0; struct tm *t_1; char s[ 26 ]; time( &t_0 );
Created May 9, 2014
View Minimal SDL2 & OpenGL stencil buffer example.mm
 #include #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. */
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;
Created Jan 20, 2014
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}
Created Jan 20, 2014
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'
Last active Jul 21, 2017
View Minimal SDL2 & OpenGL example.mm
 #include #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.