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
#include %occReference | |
#if $$$comClassDefined("%Library.Object") | |
#define jsonClassIsLatestVersion $classIsLatestVersion | |
//usage: obj.$$$jsonClassIsLatestVersion() | |
#define jsonExtends $extends | |
//usage: {}.$$$jsonExtends(classname) | |
#define jsonFromJSON $fromJSON | |
//usage: {}.$$$jsonFromJSON(string) | |
#define jsonGetIterator $getIterator | |
//usage: obj.$$$jsonGetIterator() |
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
/// This class demonstrates the performance of various loops that iterate over the pieces of a delimited string. | |
Class DC.LoopPerformance | |
{ | |
ClassMethod Run(pIterations As %Integer = 10000, pPieceLength As %Integer = 20, pNumberPieces = 100, pDelimiter = ",") | |
{ | |
#define START(%msg) Write %msg Set start = $zh | |
#define END Write ($zh - start)," seconds",! | |
// Build a random string given the specifications |
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
#!/bin/sh | |
#### | |
# Dockerize: A tiny replacement for Dockerfiles | |
# This script leverages `docker run` and `docker commit` to provide a usable workaround for | |
# restrictions of `docker build` and Dockerfile syntax to strictly host-independent builds. | |
# | |
# See these discussions: | |
# https://github.com/docker/docker/pull/1124 | |
# https://github.com/docker/docker/issues/3156 | |
# https://github.com/docker/docker/issues/3949 |
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
#!/bin/bash | |
# bash completions for InterSystems ccontrol | |
_instances() | |
{ | |
if [ $# == 0 ] || [ $1 == "all" ]; then | |
echo $(ccontrol qlist | cut -d'^' -f1 | tr '\n' ' ') | |
else | |
echo $(ccontrol qlist | grep "\^$1\," | cut -d'^' -f1 | tr '\n' ' ') | |
fi |