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 LOG_ERROR 16 | |
#Define LOG_INFO 64 | |
#Define LOG_WARNING 48 | |
#Define CRLF Chr(13) + Chr(10) | |
Define Class Logger as Custom | |
Hidden cLogFile | |
Procedure SetLogFile(tcLogFile) | |
this.cLogFile = tcLogFile | |
EndProc |
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
Clear | |
Local loCrypto | |
loCrypto = CreateObject("CryptoFox") | |
?loCrypto.ComputeHash("VfpRocks!") | |
Release loCrypto | |
return | |
Define Class CryptoFox As Custom | |
Hidden cAlgTyp, oLogger, cLastErrorText | |
cAlgTyp = "SHA256" |
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
* ==================================================================================== * | |
* Este ejemplo retorna la lista de zonas horarias soportadas por worldtimeapi.org | |
* REQUISITOS: | |
* 1. JSONFox (https://github.com/Irwin1985/JSONFox) | |
* 2. VFPRestClient (https://github.com/Irwin1985/VFPRestClient) | |
* ==================================================================================== * | |
Local lcJSONFoxLocation, lcVFPRestClientLocation, laZonasHorarias, loTimeZone | |
lcJSONFoxLocation = GetFile("app", "JSONFox") |
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
# ===================================================== # | |
# Diccionario con todas las texturas clasificadas | |
# por color (black, red, blue). | |
# ===================================================== # | |
var ducks_list: Dictionary = { | |
"black": { | |
"diagonal": | |
[ | |
preload("res://assets/sprites/ducks/fly-diagonal-black-1.png"), | |
preload("res://assets/sprites/ducks/fly-diagonal-black-2.png"), |
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
/* | |
Learn Ring in 5 minutes | |
Author: Irwin Rodríguez <[email protected]> | |
Date: 2023-03-19 22.14 | |
Ring is a general purpose programming language used to create | |
portable software like Console, GUI, Web, Games, etc. | |
IMPORTANT: The language can support 3 styles of writting code so let's | |
learn all of them at once in every example then you can mix them or just |
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
// comentario sencillo | |
/* | |
Comentario | |
múltiple | |
*/ | |
// literales | |
123 // enteros |
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
// JS array equivalents to C# LINQ methods - by Dan B. | |
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version): | |
// Here's a simple array of "person" objects | |
var people = [ | |
{ name: "John", age: 20 }, | |
{ name: "Mary", age: 35 }, | |
{ name: "Arthur", age: 78 }, | |
{ name: "Mike", age: 27 }, |
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 sample reads an entry from your Registry | |
* ============================================================== * | |
* Local lcHLM As String, lcKey As String, lcEntry As String | |
* lcHLM = "HCU" | |
* lcKey = "Software\Microsoft\VisualFoxPro\9.0\Options" | |
* lcEntry = "EditorStringColor" | |
* ? GetValue(lcHLM, lcKey, lcEntry) | |
* ============================================================== * |
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
* ===================================================================================== | |
* Consulta las tasas del dolar desde el sitio web: | |
* https://www.datos.gov.co/resource/32sa-8pi3.json?vigenciadesde= | |
* | |
* Dependencias: | |
* VfpRestClient: https://github.com/Irwin1985/VFPRestClient | |
* JSONFox: https://github.com/Irwin1985/JSONFox | |
* | |
* NOTA: | |
* 1. Cambie las rutas de vfpRestClient y JSONFox por las correspondientes. |
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
{ | |
uTerm is a small unit to print text and background with color in your | |
terminal window. | |
Usage: | |
// forecolor | |
uTerm.Blue('This text should be printed in blue'); | |
// backcolor | |
uTerm.BgBlue('This text should be printed in white with blue background'); | |
**********************************************************************} | |
NewerOlder