This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Filters an array according to a passed parameter. | |
//e.g. | |
//move (FilterArray(aStringList,self,get_is_uppercase)) to aStringList | |
Function FilterArray Global Variant[] aVariant Integer hObj Integer iMsg Returns Variant[] | |
Variant[] aReturn | |
Integer iPos | |
Integer iCopied | |
Integer iMax | |
Boolean isOK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'ALTER TABLE [' + SYSOBJECTS.Name + ']' + ' ' + ' COLLATE Latin1_General_CI_AS ' | |
FROM SYSOBJECTS | |
WHERE SYSOBJECTS.TYPE = 'U' | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim ad | |
Dim sql_query | |
Dim objFSO, objOutFile | |
Dim intCount, i | |
sql_query = "show databases" | |
sConnect = "Driver={MariaDB ODBC 1.0 Driver};Server=localhost;Uid=root;pwd=password" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#test.rb | |
#happy number checking | |
def nextPlace(testNum) | |
testNum.to_s.each_char.inject(0) { |sum, c| sum + c.to_i**2 } | |
end | |
def is_happy?(testNum) | |
a = b = testNum | |
while (a!=1) && (b!=1) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use cApplication.pkg | |
Procedure ReopenAll Integer hWorkspace | |
//first we need to reset the workspace. this can be different | |
//for clubwise because we do not use standard workspace objects. | |
//And we're still on 11. try it though. | |
Set psDataPath of hWorkspace to "c:\new\data" | |
Set psFileList of hWorkspace to "c:\new\data\filelist.cfg" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Visual DataFlex COM proxy classes generated from C:\Windows\SysWOW64\scrrun.dll | |
Use FlexCom20.pkg | |
Define OLECompareMethod for Integer | |
Define OLEBinaryCompare for 0 | |
Define OLETextCompare for 1 | |
Define OLEDatabaseCompare for 2 | |
Define OLEIOMode for Integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Struct tKeyValue | |
String sKey | |
String sValue | |
End_Struct | |
Class cDictionary is a cObject | |
Procedure construct_object | |
Forward Send Construct_Object | |
Property tKeyValue[] pDictionary | |
End_Procedure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$from = "selectcs-backup", | |
[string]$to = $(get-location).ToString() | |
) | |
#todo:if no parameters, then show instructions | |
#todo:mirror option that deletes items that don't exist | |
#todo:aws details need to be in the environment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$from = $(get-location).ToString(), | |
[string]$to = "selectcs-backup", | |
[switch]$mirror | |
) | |
#$DebugPreference = "Continue" | |
#todo:if no parameters, then show instructions | |
#todo:mirror option into own function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Calculates an eTag for a local file that should match the S3 eTag of the uploaded file. | |
$md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider | |
$blocksize = (1024*1024*5) | |
$startblocks = (1024*1024*16) | |
function AmazonEtagHashForFile($filename) { | |
$lines = 0 | |
[byte[]] $binHash = @() |