Skip to content

Instantly share code, notes, and snippets.

View Irwin1985's full-sized avatar
📕
https://leanpub.com/foxlite

易文翰 Irwin1985

📕
https://leanpub.com/foxlite
View GitHub Profile
@Irwin1985
Irwin1985 / DBFReader.cs
Created January 7, 2019 03:17 — forked from sleimanzublidi/DBFReader.cs
C# DBF Reader
using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
@Irwin1985
Irwin1985 / LARAVEL_lumen.md
Created May 19, 2019 17:59 — forked from juanlopezdev/LARAVEL_lumen.md
Apuntes y primeros pasos con LUMEN (Microframework de Laravel)

Lumen

Lumen es un micro-framework para PHP.

Lumen es una versión más liviana de Laravel y orientado más a la creación de APIs y microservicios, aunque también puedes usarlo para crear sitios web o lo que quieras.

Si es posible migrar de Lumen a Laravel

Microservicios:

@Irwin1985
Irwin1985 / Tokenizer.prg
Created September 28, 2020 15:36
A single yet powerfull State based Tokenizer.
*~~~~ TOKENIZER BEGIN ~~~~*
&& ======================================================================== &&
&& Class Tokenizer
&& ======================================================================== &&
Define Class Tokenizer As Custom
tokentype = .Null.
tokenstate = .Null.
&& ======================================================================== &&
&& Function Init
&& ======================================================================== &&
clear
Dimension aNum(1)
For i = 1 to 100
Dimension aNum(i)
aNum(i) = i * 2
EndFor
?binary_search(@aNum, 1, Alen(aNum, 1), 10)
* Binary search
tab = DEFINE PAD identifier
PROMPT string
LAYOUT string
[CONTEXT string]
[COLOR number]
[ONCLICK callFunc]
[PICTURE string]
[SKIP [FOR expression]]
[VISIBLE boolean]
[KEY keylabel]
* Comandos probados
* JSON
CREATE JSON OBJECT FROM FILE | CURSOR | identifier | STRING -> OK
PRINT JSON varJSON TO identifier | IN SCREEN -> OK
* HTTP
HTTP GET MyHTTPObj
URL 'the url'
ADD HEADER 'header' WITH 'header value'
Rhodus - EBNF
program = statementList [';' statementList] endOfStream
statementList = statement {[';'] statement}
statement = assignmentStmt
| forStmt
| ifStmt
| whileStmt
| repeatStmt
| returnStmt
// assignment
let x = 10;
print("El número es: " + x);
println("El número es: " + x);
// for statement
for x = 1 to 10
print("contando por el: " + x);
end
@Irwin1985
Irwin1985 / CompilingCSharpCode.cs
Created November 12, 2020 17:28 — forked from RickStrahl/CompilingCSharpCode.cs
A few different approaches to dynamically execute C# code dynamically at runtime from a string of code.
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Scripting;
using Microsoft.CodeAnalysis.Scripting;
using Mono.CSharp;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.Dynamic;
using System.Linq;
public class ParsingNumbers {
static String expression;
static int currentCharPosition;
static char Look;
static double result;
// parse integer or double of any length.
public static double parseNum() {
double number = 0.0;
int digit = 0;
double scale = 1;