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
var engine_js = { | |
"ErrorCode.-128": "Internal engine error", | |
"ErrorCode.-1": "Unknown error", | |
"ErrorCode.0": "Unknown error", | |
"ErrorCode.1": "Some data is not correctly specified.", | |
"ErrorCode.2": "The resource could not be found.", | |
"ErrorCode.3": "Resource already exists.", | |
"ErrorCode.4": "Invalid path", | |
"ErrorCode.5": "Access is denied", | |
"ErrorCode.6": "The system is out of memory.", |
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
// Define the decorator | |
// if the method parameter is not passed | |
// then the decorator will return the result of someOtherFunction() | |
// as value for the parameter | |
export const decoratorFunction = (index: number) => ( | |
target: any, | |
key: string, | |
propDesc: PropertyDescriptor | |
) => { | |
let originalFunction: Function = propDesc.value; |
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
const enigma = require('enigma.js'); | |
const WebSocket = require('ws'); | |
const schema = require('enigma.js/schemas/12.170.2.json'); | |
let qlik = { | |
session: {}, | |
global: {}, | |
doc: {}, | |
details: { | |
host: 'localhost', |
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
// The idea is to create a master item visualisation from | |
// an existing dashboard object | |
// If the requirement is to create a master item from json (exported from another app) | |
// the first step is to create the source object first and the use it | |
// to create the master item and then drop the source (if needed) | |
// Create empty object with type of masteritem | |
let myMasterItem = await qDoc.createObject({ | |
"qInfo": { | |
"qId": "my-id", |
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
private void CreateTask(string user) | |
{ | |
QMSClient Client; | |
string QMS = "http://localhost:4799/QMS/Service"; | |
Client = new QMSClient("BasicHttpBinding_IQMS", QMS); | |
string key = Client.GetTimeLimitedServiceKey(); | |
ServiceKeyClientMessageInspector.ServiceKey = key; | |
Client.ClearQVSCache(QVSCacheObjects.UserDocumentList); |
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
// add reference to System.DirectoryServices.AccountManagement | |
// using System.DirectoryServices.AccountManagement; | |
PrincipalContext ctx = new PrincipalContext(ContextType.Domain); | |
GroupPrincipal group = GroupPrincipal.FindByIdentity(ctx, "domain\\groupname"); | |
var users = group.GetMembers(); | |
if (group != null) | |
{ |
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
// Save QV table without the headers (or at least without the original headers) | |
set vNH_SourceTable = Data; // which QV table need to be exported | |
set vNH_OutputFile = C:\Users\adm-s7729841\Desktop\Headerless.csv; //the path to the result csv/txt file | |
Qualify *; | |
Headers: | |
First 1 | |
Load | |
* | |
Resident |
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
Raw: | |
Load * Inline [ | |
Month | |
2014-01 | |
2014-02 | |
2014-03 | |
2014-04 | |
2014-05 | |
]; |
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
= ((year(vDate2)*12)+month(vDate2)) - (((year(vDate1)*12)+month(vDate1))) |
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
// OrderId = [1,2,3,4,5,6] | |
BulkUpdate(OrderId, function() { | |
console.log('done'); | |
}); | |
function BulkUpdate(OrderId, callback) { | |
Model.update( | |
{ orderid : { $in: OrderId } }, | |
{ $set: { status: 'complete' } }, |
NewerOlder