This file contains 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
'// ***************************************************************** | |
'// Delete all files by a given fileMask | |
'// ~~ | |
'// Example: | |
'// DeleteFiles("C:\temp\*.txt") | |
'// or | |
'// DeleteFile("*.log") => will delete all .log files in the | |
'// current folder | |
'// ***************************************************************** | |
Sub DeleteFiles(ByVal fileMask) |
This file contains 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
// ------------------------------------------------------------------ | |
// QlikView Extension helper functions for sending some messages | |
// to console output | |
// (prevents errors if console object is not available) | |
// ------------------------------------------------------------------ | |
function ConsoleLog(msg) { | |
if (typeof console != "undefined") { | |
console.log(msg); | |
} | |
} |
This file contains 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
// Define one or more styles sheets to be used within the extension | |
var cExtensionName = 'ExtensionName'; | |
var cssFiles = []; | |
cssFiles.push('Extensions/' + cExtensionName + '/lib/css/style.css'); | |
cssFiles.push('Extensions/' + cExtensionName + '/lib/css/style2.css'); | |
for (var i = 0; i < cssFiles.length; i++) { | |
Qva.LoadCSS(Qva.Remote + (Qva.Remote.indexOf('?') >= 0 ? '&' : '?') + 'public=only' + '&name=' + cssFiles[i]); | |
} |
This file contains 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
// Define one or more javascript files to be used within the extension | |
var cExtensionName = 'ExtensionName'; | |
var jsFiles = []; | |
jsFiles.push('Extensions/' + cExtensionName + '/lib/js/BaseUtils.js'); | |
jsFiles.push('Extensions/' + cExtensionName + '/lib/js/ExtensionUtils.js'); | |
Qv.LoadExtensionScripts(jsFiles, function () { | |
// Initialize the extension | |
//Init(); |
This file contains 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
// ------------------------------------------------------------------ | |
// General Utils | |
// ------------------------------------------------------------------ | |
function nullOrEmpty(obj) { | |
if (obj == null || obj.length == 0 || obj == 'undefined') { | |
return true; | |
} | |
return false; | |
} |
This file contains 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
function setVariableValue(varName, val) { | |
var qvDoc = Qv.GetCurrentDocument(); | |
qvDoc.SetVariable(varName, val); | |
} |
This file contains 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
@@echo off | |
set TARGET_PATH=C:\Users\%USERNAME%\AppData\Local\QlikTech\QlikView\Extensions\Objects | |
set EXTENSION_NAME=%~1 | |
set VS_TARGET_DIR=%~2 | |
set VS_TARGETNAME=%~3 | |
set VS_TARGETFILENAME=%~4 | |
echo.------------------------- | |
echo.Settings for local extension deployment: |
This file contains 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
// '.\' is the current path | |
// Define the path here, if required ... | |
SET basePath = '.\'; | |
TRACE ---------------------------------------------------------------; | |
TRACE Saving tables ... ; | |
TRACE ~~; | |
For i = 0 To NoOfTables() -1 | |
This file contains 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
/** | |
* Compares two software version numbers (e.g. "1.7.1" or "1.2b"). | |
* | |
* This function was born in http://stackoverflow.com/a/6832721. | |
* | |
* @param {string} v1 The first version to be compared. | |
* @param {string} v2 The second version to be compared. | |
* @param {object} [options] Optional flags that affect comparison behavior: | |
* <ul> | |
* <li> |
This file contains 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
$date = Get-Date -UFormat %Y-%m-%d; | |
$backupFolder = $date; | |
$basePath = "C:\bla"; | |
$destinationPath = Join-Path $basePath $backupFolder; | |
if(!(Test-Path -Path $destinationPath)) { | |
New-Item -ItemType directory -Path $destinationPath; | |
(C:\mongodb\bin\mongodump.exe --out $destinationPath); | |
} |
OlderNewer