- Settings use the Dainty theme for VS Code
- The used font family is Jetbrains Mono
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
/*------------------------------------------------------------------------ | |
File : Export table headers | |
Purpose : Gist for exporting table headers in Progress OpenEdge | |
Description : | |
Author(s) : Johan Vergeer. With thanks to TheDropper at | |
https://stackoverflow.com/questions/44204335/how-to-add-column-name-while-export-csv-in-progress-4gl#44205839 | |
Created : 6 december 2017 | |
----------------------------------------------------------------------*/ | |
DEF VAR hTable AS HANDLE NO-UNDO. |
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
#!/usr/bin/env bash | |
GIST_ID=${1} | |
# Check if the GIST_ID param has a value | |
if [ -z "$GIST_ID" ]; | |
then | |
echo 'GIST_ID is a required parameter'; | |
else |
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
class PersonService: | |
@property | |
def person_repo(self) -> PersonRepo: | |
return PersonRepoFactory().create() | |
def set_name(self, person_id: int, new_name: str) -> None: | |
p = self.person_repo.find(person_id) | |
p.name = new_name | |
self.person_repo.add_or_update(p) |
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
class Dog(Mammal): | |
pass | |
class Cat(Mammal): | |
pass | |
TMammal = TypeVar("TMammal", bound=Mammal) | |
class MammalCollection(Generic[TMammal]): | |
def __init__(self, *mammals: TMammal) -> None: |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<body> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> | |
<tspan x="0" y="0em">A Comix Sample</tspan> | |
</label> | |
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59"> |
This script is intended to demonstrate how a backup can be created and restored using Docker containers. The image we'll use is SQL Server 2017
The scripts are baed on the official Microsoft documentation
Create a new container from the mssql-server-linux image
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
// Create a component, which is global and can be used anywhere | |
// in the application | |
const Hello = Vue.component( | |
'Hello', // Name of the component | |
{ templdate: '<span>Hello</span>' } // Options object, which contains a template | |
) | |
new Vue({ | |
template: '<div><Hello/> there</div>', // Hardcoded 'Hello' is replated with the component | |
el: '#app' |
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
/// <summary> | |
/// Simple script to check whether a C# Guid is really a UUID version 4. | |
/// </summary> | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine($"{"Current",-10}{"Errors found",-10}"); | |
Console.WriteLine($"{"-------",-10}{"------------",-10}"); |
NewerOlder