Skip to content

Instantly share code, notes, and snippets.

View DataZombies's full-sized avatar

Daniel J. Pinter DataZombies

View GitHub Profile
@DataZombies
DataZombies / basParseCopybook.bas
Last active December 12, 2015 09:19
Parse a COBOL Copybook
Option Base 0
Option Compare Database
Option Explicit
Option Private Module
'Dependency: basErrorHandler.bas
'https://gist.github.com/DataZombies/4751155
Private Type CopybookType
ID As Long
@DataZombies
DataZombies / basErrorHandler.bas
Created February 10, 2013 21:39
VBA ErrorHandler
Option Base 0
Option Compare Database
Option Explicit
Option Private Module
'***********************************************************************************************
' ErrorHandler (Public Sub)
'
' PARAMETERS:
' theForm - String - ByVal - Optional
@DataZombies
DataZombies / gist:4014424
Last active October 12, 2015 10:38
PhoneGap Replacements for window.alert & window.confirm
// This code gives you a browser alert and confirm or a Cordova alert and confirm dialog boxes depending on the platform
// app-wide constants & modified functions
var APP_NAME = 'A Truly GREAT app',
DESKTOP = true, // a constant controlling whether browser alert and confirm or Cordova alert and confirm are used.
ConfirmReturnValue = -1,
Alert = function (message) {
alert (message);
},
Confirm = function(message) {
@DataZombies
DataZombies / gist:4009752
Last active October 12, 2015 09:58
Objective C Database Versioning from AppDelegate
//AppDelegate.h
@property(nonatomic,assign) NSArray *documentPaths;
@property(nonatomic,assign) NSError *error;
@property(nonatomic,assign) NSFileManager *fileManager;
@property(nonatomic,assign) NSString *documentsDir;
//AppDelegate.m
@synthesize error, fileManager, documentPaths, documentsDir;
...