#213862 - 2020-07-04 01:04 AM
UDF Library
|
Glenn Barnas
KiX Supporter
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
|
It's been a while, but my UDF and apps library is back online - www.barnas.us/programming. Items that are available include:
- Intro to Programming Guide
- KGen Function Linker / Script Generator
- Entire KixLib as a single Zip file
- The KixLib in browsable HTML format
- The Cipher UDF - Tokenized
- Universal Login Script
The site is a little bland - I just wanted to get the components back online first. The UDF library has been maintained and updated, and there are several new UDFs, including a URL function that supports PUT,GET,POST,PATCH, and DELETE, and can download text and binary files over HTTP or HTTPS protocols. Another new function that we use extensively for debugging is DispResult(thing) Feed it a "thing" and it figures out what it is (var, array, complex array), then reports the type of data and displays the contents. The Excel library (Lib-XL) has been updated with Save-As and Export to PDF/XPS functionality.
I have additional libraries available under license that interface with REST APIs of various products, including QuickBooks, Zen Support/Sell, and others.
Enjoy!
Glenn
_________________________
Actually I am a Rocket Scientist!
|
Top
|
|
|
|
#213877 - 2020-08-06 11:57 PM
Re: UDF Library
[Re: Glenn Barnas]
|
Henriques
Fresh Scripter
Registered: 2007-09-13
Posts: 43
|
Talking about the Excel-Library, there's an error in xlRangeSort() namely in line 1203 there's a variable _ExRv which is no longer dimmed and I think not even necessary in that line since it's nowhere filled.
|
Top
|
|
|
|
#213879 - 2020-08-07 12:59 AM
(NA) Re: UDF Library
[Re: Glenn Barnas]
|
Henriques
Fresh Scripter
Registered: 2007-09-13
Posts: 43
|
When looking in version 1.1 you'll see that there is a dim of $_ExRv.
|
Top
|
|
|
|
#213904 - 2020-08-10 11:52 PM
Re: (NA) Re: UDF Library
[Re: Allen]
|
Glenn Barnas
KiX Supporter
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
|
IniArray added EnumIniArray(), which I found worked slightly differently than EnumIni(). There was an extra newline coming from ReadProfileString that wasn't in EnumIniArray() that caused some wonkiness. The other SIGNIFICANT change is that you can pass an array of INI-format data instead of a filename for IniArray to process. Here's a cool trick we're using:$aGlobal = FileIO('GlobalConfig.ini', 'R') ; read the GLOBAL config settings.
$aTask = FileIO('TaskConfig.ini', 'R') ; read the Task-Specific config settings.
$aGlobal = ArrayJoin($aGlobal, $aTask) ; combine the two INI files
$aConfig = IniArray($aGlobal) ; "read" the complete ini file This allows us to maintain one config file with the common settings, and then have one or more "task" files that list what needs to be done. FileIO loads each INI file into an array, then ArrayJoin puts the two arrays together, which gets passed to IniArray as if it had read one complete config file. This allows having many task configs but only one file with the common information instead of duplicating it in each file (and later having to update each file when something changes).
ArrayJoin() is new, as is Edit(). While we have lots of INI files for configs, many have features disabled that need to be enabled by removing the comment. Edit allows us to do that through automation. There's a few more actions coming on that one...
You should look at DispResult(), which has been a great tool for development troubleshooting, pass it anything - var, array, or 2-dim array and it will identify it and then display all the data.$Result = SomeFunc()
DispResult($Result) ? You don't need to worry about the var type, so when you get back an array while expecting a variant, well - there it is!
ListCompare() (obviously) compares 2 delimited lists and returns an array of arrays listing what's missing from one file relative to the other. We were doing a lot of data logging/mining and looking for missing items during dev made me want to poke my eyes out. Comparing what we generated to what we knew was in the data allowed us to pinpoint a logic issue when one element consistently came up missing.
Also new are GetTimeNTP(), IntlDate(), and StandardizedTime(), which help with displaying times/dates internationally.
We've been busy, and there are some 25 additional non-public UDFs added to our library in the past year besides the ones I published or updated yesterday.
Some really cool things afoot - We have a Kix service that runs on a server, using Sockets to listen for work requests. It monitors a folder for job requests. Requests are processed and added to a queue using IniArray (for speed) that writes an INI file copy of the memory array every few minutes (for recoverability). We have up to 8 thin clients that each run a service. They use Sockets to check in with the server every minute. If there's a job in the queue, the job is sent to the first available client for processing. The client logs into a web app and using Selenium, performs updates and customization tasks. Normally 1 T-C system is running, but we can start more when we do mass updates to client systems, completing almost 80 update an hour - about the time it took for one engineer to update just 2-3 systems. The Kix service drives a Python-Selenium EXE, and the service can run multiple Kix or "PyLenium" apps to complete the overall job. The deployment service communicates status to the management service, waits on failures, and can be commanded by the management service to retry, skip, or terminate.
And you thought Kix was a login script processor, eh?
_________________________
Actually I am a Rocket Scientist!
|
Top
|
|
|
|
#213930 - 2020-10-10 07:06 PM
Re: (NA) Re: UDF Library
[Re: Glenn Barnas]
|
Henriques
Fresh Scripter
Registered: 2007-09-13
Posts: 43
|
Glenn on the 2020-08-07 you wrote about a bug in the XLRangeValue function in the Lib-XL.kxf script, I've been looking but I didn't find any difference with the old function.
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|