Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2015.1.1 (Build 505U)" ts="2015-06-17 22:55:48">
<Class name="App.Log">
<Super>%Persistent</Super>
<TimeChanged>63720,82487.41709</TimeChanged>
<TimeCreated>63685,63064.148177</TimeCreated>
<Parameter name="Null">
<Description>
Replacement for missing values</Description>
@mnjstwins
mnjstwins / Utils.CustomQuery.xml
Created March 31, 2016 18:04 — forked from eduard93/Utils.CustomQuery.xml
Custom class Query examples for InterSystems Caché
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Class name="Utils.CustomQuery">
<Super>%Persistent,%Populate</Super>
<TimeCreated>63869,45310.24869</TimeCreated>
<Property name="Prop1">
<Type>%String</Type>
</Property>
@mnjstwins
mnjstwins / DC.LoopPerformance.cls
Created June 1, 2016 15:48 — forked from timleavitt/DC.LoopPerformance.cls
Caché ObjectScript demo - various loops to iterate over pieces of a delimited string
/// 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
@mnjstwins
mnjstwins / 1-merging-or-extending-arrays-in-csharp.cs
Created July 9, 2016 16:31 — forked from lsauer/1-merging-or-extending-arrays-in-csharp.cs
C#: Merging,Appending, Extending two arrays in .NET (csharp, mono)
//www.technical-programming.com, lorenz lo sauer, 2013
//description: extending C# for fast and easy string extension
//note: part of a larger Open-Source Project-Codebase
//see: http://stackoverflow.com/questions/59217/merging-two-arrays-in-net
//resides in IEnumerableStringExtensions.cs
public static class IEnumerableStringExtensions
{
public static IEnumerable<string> Append(this string[] arrayInitial, object arrayToAppend)
{
@mnjstwins
mnjstwins / GistCreator.java
Created July 29, 2016 14:39 — forked from kevinsawicki/GistCreator.java
Create Gists using the GitHub v3 Java API
GitHubClient client = new GitHubClient().setCredentials("user", "p4ssw0rd");
Gist gist = new Gist().setDescription("Prints a string to standard out");
GistFile file = new GistFile().setContent("System.out.println(\"Hello World\");");
gist.setFiles(Collections.singletonMap("Hello.java", file));
gist = new GistService(client).createGist(gist);
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.4 (Build 555U JAVAINTEG)" ts="2016-07-18 15:27:06">
<Class name="Sample.LoggingProxy">
<Description>
simple sample of a logging proxy object:
each access (via call or property access) will
be logged to the designated global</Description>
<Super>%RegisteredObject</Super>
<TimeChanged>64116,57644.95789</TimeChanged>
<TimeCreated>64110,60845.71095</TimeCreated>
@mnjstwins
mnjstwins / intersystems.md
Created December 9, 2016 18:33 — forked from ayushjain7/intersystems.md
Why intersystems?
@mnjstwins
mnjstwins / DO.Utils.xml
Created December 9, 2016 18:33 — forked from eduard93/DO.Utils.xml
Work with Digital Ocean from InterSystems Caché
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2015.2 (Build 664U)" ts="2016-04-05 13:01:04">
<Class name="DO.Utils">
<Super>%CSP.REST</Super>
<TimeChanged>64013,44584.975713</TimeChanged>
<TimeCreated>64013,41190.502637</TimeCreated>
<Parameter name="KEY">
<Description>
Your API token</Description>
@mnjstwins
mnjstwins / ccontrol
Created December 9, 2016 18:33 — forked from daimor/ccontrol
bash completions for InterSystems cache
#!/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
@mnjstwins
mnjstwins / cosJSON.isc
Created December 9, 2016 18:33 — forked from isc-bspead/cosJSON.isc
Macros for writing forward compatible JSON code in InterSystems Caché 2016.1
#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()