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
/// TicTacToe Game Class | |
Class dc.Game.TicTacToe | |
{ | |
/// Start a new Game match | |
ClassMethod Start() | |
{ | |
Do ##class(TicTacToe.Engine).NewGame() | |
Write # | |
Write !,"Let's play Tic Tac Toe" |
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
Class CodeGolf.MagicTowel | |
{ | |
ClassMethod AddWater(pill As %Integer) As %Integer | |
{ | |
Quit "" | |
} | |
} |
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
Class CodeGolf.NatoTranslator | |
{ | |
ClassMethod ToNato(strin As %String) As %String | |
{ | |
Set strout = "" | |
// action | |
Quit strout | |
} |
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
Class utl.Xml | |
{ | |
ClassMethod CorrelateStream(pXMLStream As %CharacterStream, pClasse As %String, pTag As %String, Output pObjXML As %XML.Adaptor) As %Status | |
{ | |
Set tSC = $$$OK | |
Try | |
{ |
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
{ | |
"$$$ThrowOnError": { | |
"prefix": "toe", | |
"body": "$$$$THROWONERROR(tSC, $1)", | |
"description": "Throw On Error Macro" | |
}, | |
"$TryCatch": { | |
"prefix": "$try", | |
"body": [ | |
"Set tSC = $$$$OK", |
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 recordCamera = () => { | |
smallVideoType=1; | |
cleanRecord() | |
navigator.getUserMedia({ | |
audio: false, | |
video: { mandatory: { minWidth: 50, minHeight: 50 } } | |
}, getMediaStream, getUserMediaError) | |
} |
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
{ | |
"editor.minimap.enabled": false, | |
"files.insertFinalNewline": true, | |
"files.trimFinalNewlines": true, | |
"files.trimTrailingWhitespace": true, | |
"editor.tabSize": 2, | |
"diffEditor.ignoreTrimWhitespace": true, | |
"git.autofetch": true, | |
} |
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
// I just write a finder to find templates, | |
func TemplatesFinder(engine *gin.Engine, pathOfRoot, templateDirName string) { | |
dir := gin.Dir(pathOfRoot, true) | |
file, err := dir.Open(templateDirName) | |
util.PanicError(err) | |
defer file.Close() | |
dirs, err := file.Readdir(10) | |
util.PanicError(err) |
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 <Servo.h> //Servo motor library. This is standard library | |
#include <NewPing.h> //Ultrasonic sensor function library. You must install this library | |
//our L298N control pins | |
const int LeftMotorForward = 7; | |
const int LeftMotorBackward = 6; | |
const int RightMotorForward = 4; | |
const int RightMotorBackward = 5; | |
//sensor pins |
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
sudo touch /etc/init.d/couchdb | |
# Standard Ubuntu Elixir installation instructions | |
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
sudo dpkg -i erlang-solutions_1.0_all.deb | |
sudo apt-get update | |
sudo apt-get -f install | |
sudo apt-get install elixir |