Skip to content

Instantly share code, notes, and snippets.

View seanbamforth's full-sized avatar

Sean Bamforth seanbamforth

View GitHub Profile
@seanbamforth
seanbamforth / cArrayDictionary.pkg
Created February 2, 2025 14:21
Use Array to create basic key/value Dictionary class
//Use this in 18.2 or below. This class is 5 times slower than the alternatives.
Object oDictArray is a cObject
Property tDictionaryKey[] paKeyList
Property Boolean pisDirty
Function SearchDictKey tDictionaryKey val1 tDictionaryKey val2 Returns Integer
If (val1.sKey > val2.sKey) Function_Return (GT)
If (val1.sKey < val2.sKey) Function_Return (LT)
Function_Return (EQ)
@seanbamforth
seanbamforth / cJsonDict.pkg
Created February 2, 2025 14:19
Use cJSONObject for a basic key/value Dictionary Class.
Object oDictJSON is a cObject
Property Handle phJSON
Function JSONHandle Returns Handle
Handle hObj
Get phJSON to hObj
If (hObj=0) Begin
Get Create (RefClass(cJsonObject)) to hObj
Send InitializeJsonType of hObj jsonTypeObject
@seanbamforth
seanbamforth / stadiafix.src
Created June 25, 2021 10:23
Fix stadia connection - dataflex
Use Windows.pkg
Object oTest is a ModalPanel
Set Location to 10 5
Set Size to 20 61
Set Label to "On the top"
Set Window_Style WS_SYSMENU to False
Object oButton1 is a Button
Set Location to 3 4
@seanbamforth
seanbamforth / shroggs-pavilion.md
Last active June 13, 2021 13:48
Shroggs Park Pavilion

CONSTITUTION Of Save Shroggs Park Pavilion Group.

1. Name:

The name of the group shall be: “Save Shroggs Park Pavilion Group.”

2. Aim:

To bring the Shroggs Park Pavilion back into use, and encourage more sports to use the pavilion and other sports facilities at Shroggs Park.

@seanbamforth
seanbamforth / splitToArray.pkg
Created August 7, 2015 11:38
SplitToArray.pkg
Function SplitToArray Global String sVal String sChar Returns String[]
String[] astVal
String sHold
Integer iCount
Integer iPos
Integer iBreak
Integer iMax
Move (Length(sVal)) to iMax
Move (Length(sChar)) to iBreak
//************************************************************************
//
// Confidential Trade Secret.
// Copyright 1987-1992 Data Access Corporation, Miami FL, USA
// All Rights reserved
// DataFlex is a registered trademark of Data Access Corporation.
//
//
// $Source: k:\RCS\.\pkg\for_all.pkg,v $
// $Revision: 1 $
<p>
Drag the following link to your bookmarks. <br/>
<a class="bookmarklet" href="javascript:(function()%7B%24%24(%22s_club__club_code%22).type%3D%22%22%7D)()">Show Club</a><br/>
When in the adhoc screen, click the link, and manually type in the club.<br/>
@seanbamforth
seanbamforth / Atom-install
Created June 27, 2015 10:52
List of Atom Packages
Sublime-Style-Column-Selection
@seanbamforth
seanbamforth / oTailTest.pkg
Last active October 12, 2023 11:32
Logging via "tail.exe"
External_Function WinAPI_GetCurrentProcessId "GetCurrentProcessId" Kernel32.Dll Returns Integer
External_Function WinAPI_EnumProcessModules "EnumProcessModules" Psapi.Dll Handle hProcess Address lphModule Integer cb Pointer lpcbNeeded Returns Integer
External_Function WinAPI_CloseHandle "CloseHandle" Kernel32.Dll Handle hObject Returns Integer
External_Function WinAPI_OpenProcess "OpenProcess" Kernel32.Dll DWord dwDesiredAccess Boolean bInheritHandle DWord dwProcessId Returns Handle
Define PROCESS_TERMINATE for |CI$0001
Define PROCESS_CREATE_THREAD for |CI$0002
Define PROCESS_SET_SESSIONID for |CI$0004
Define PROCESS_VM_OPERATION for |CI$0008
Define PROCESS_VM_READ for |CI$0010
@seanbamforth
seanbamforth / webappframework.md
Last active August 29, 2015 14:21
Thoughts on webapp framework.

Webapp framework thoughts.

  1. The {webproperty=True} compiler directive for properties makes the code look ugly. I'd much prefer a WebProperty command.
  2. The Code for a page is too long. Add a couple of forms and some web labels and you're running at 50 lines of code when you should only really have 5 lines.
  3. default Session and User Management needs the facility to enable/disable a flag.
  4. Forward & Back Button.
  5. There should be user management (reset password, etc) built into the default apps.
  6. Trying to change a table (e.g. for weborders) doesn't tell you to stop the web app.
  7. Where's my pre-processor step. Jeez.