Skip to content

Instantly share code, notes, and snippets.

View albertklik's full-sized avatar

Paulo Albertklik albertklik

  • Vibe Desenvolvimento
  • X @albertklik
View GitHub Profile
@albertklik
albertklik / HttpRequest.cs
Last active March 31, 2024 02:04
Http request builder for .net
#nullable enable
using System.Net;
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text;
using System.Text.Json;
using Microsoft.Extensions.Logging;
namespace App.Http;
@albertklik
albertklik / Delphy-to-kotlin.py
Last active April 4, 2022 18:29
Delphy-to-kotlin script
import re
reg_list = [
(r'for[ ]+([_A-Z-a-z][_A-Z-a-z0-9]*)[ ]+:=[ ]+(.*)[ ]+downto[ ]+(\d)[ ]+do[ ]*', r'for (\1 in \2 downto \3)'),
(r'for[ ]+([_A-Z-a-z][_A-Z-a-z0-9]*)[ ]+:=[ ]+(\d)[ ]+to[ ]+(.*)[ ]+do[ ]*', r'for (\1 in \2..\3)'),
(r'if[ ]+(.*)[ ]+then', r'if (\1)'),
(r'\bvar\b', r''),
(r'\bbegin\b', r'{'),
(r'\bend\b', r'}'),
(r' = ', r' == '),
(r'inc\((.*)\)', r'\1++'),
@albertklik
albertklik / regular-express-scanner.java
Last active December 14, 2017 12:06
teoria da computação
//framework de validação de dados de formulario para aplicativos rápidos
//recebe uma string de dados de um documento
//define uma regra com expressões regulares com base em opções definidas pelo usuario
//verifica a primeira ocorrência
//verifica numero de ocorrências do documento