Skip to content

Instantly share code, notes, and snippets.

View TristanOrta's full-sized avatar

Oscar Tristan Orta TristanOrta

  • Productora Nacional de Papel
  • San Luis Potosi
View GitHub Profile
@TristanOrta
TristanOrta / f_valida_correo.md
Last active December 15, 2023 19:39
Funcion para Validar Correos con PowerBuilder / Function to Validate Emails with PowerBuilder

Validate emails PowerBuilder 2023 - Validar correos PowerBuilder 2023

  • Validar correos
  • Validate emails

Descripción - Description

Esta función, f_valida_correo, recibe una cadena de correo electrónico ls_cadena_correo y devuelve un valor booleano lb_correo_error que indica si hubo algún error en los correos electrónicos proporcionados. / This function, f_valida_correo, receives an email string ls_cadena_correo and returns a boolean value lb_correo_error indicating whether there was any error in the provided email addresses.

Parámetros - Parameters

  • ls_cadena_correo: String que contiene correos electrónicos separados por comas.
@TristanOrta
TristanOrta / Close_conexion_ora.md
Last active December 15, 2023 19:43
C# no cierra sesión de Oracle al terminar de hacer una transacción

Cerrar conexion en base de datos oracle ( eliminar sesion )

Normalmente, cuando hacemos una conexión a Oracle desde C#, usamos una cadena de conexión como la siguiente:

string sqlconn = $"Data Source={server}; Password={password}; USER ID={user};";

Al momento de hacer la conexión, se utiliza el método Open de la librería de conexión:

conexion.Open();
@TristanOrta
TristanOrta / SSHConexion.cs
Created May 17, 2023 16:14
simple example of an SSH connection using the SSH.NET library
using Renci.SshNet;
using System;
using System.Collections.Generic;
using System.Text;
namespace ssh_CShP
{
class ConexionSSH
{
public string conectSSH()
@TristanOrta
TristanOrta / ConexionORacle.cs
Created May 17, 2023 16:10
This is an example of a C# connection to an Oracle database.
// This class receives as parameters a sql query and a field which brings us the result of the query and saves it in a string
//
using Oracle.ManagedDataAccess.Client;
using System;
using System.Collections.Generic;
using System.Text;
namespace ssh_CShP
{
@TristanOrta
TristanOrta / Sobre_Gist.md
Created October 13, 2022 12:26 — forked from renatojobal/Sobre_Gist.md
¿Qué es un gist en GitHub?

¿Qué es un Gist en GitHub y para qué sirve?

Un gist es una forma que se tiene para poder compartir código usando GitHub.

Cuando tenemos un código que no es lo suficientemente grande para crear un repositorio, entonces creamos un gist. Aunque gist funciona básicamente cómo un repositorio, ya que se le puede hacer un fork o clonarlo. Así mismo se puede editar y las personas pueden comentar el gist.

Usos del gist

Muchas personas usan gist cómo un portapapeles. Para subir código que siempre sueles usar en diferentes proyectos. También se suele usar cómo una forma de hacer posts. Cómo este que estas viendo.

@TristanOrta
TristanOrta / PBNI smtp powerbuilder
Last active July 1, 2022 03:37
Implementation of pbni smtp for sending emails with Powerbuilder /implementacion de pbni smtp para envio de correos con powerbuilder
// call the function "f_envia_smtp_pbni" with the following parameters
string ls_recipient = 'Oscar Tristan <oscar_tristan_13@hotmail.com>'
string ls_subject = 'This is a message sent from PBNI'
string ls_message = 'Hello, I sent this message from PB'
string ls_attach = 'My file path'
f_envia_smtp_pbni(ls_recipient,ls_subject,ls_message,ls_attach)
@TristanOrta
TristanOrta / oracle 9i - powerbuilder not recognize the Oracle TNSNames.md
Last active December 15, 2023 19:38
Installation of Powerbuilder with Oracle 9i / Instalación de powerbuilder con oracle 9i

Installation of PowerBuilder with Oracle 9i

These instructions are meant to address the error generated by PowerBuilder when used with Oracle 9i, which does not recognize the Oracle TNSNames when creating a data profile. This bug is fixed in Oracle 11.

  1. Install the Oracle 9i client:

    • Begin by installing the Oracle 9i client in the usual manner.
  2. Run PowerBuilder Installer:

    • Run the PowerBuilder installer and follow the provided instructions.
@TristanOrta
TristanOrta / resources.md
Created June 28, 2022 22:37 — forked from x0nu11byt3/resources.md
A curated list of Assembly Language / Reversing / Malware Analysis -resources

Assembly Language / Reversing / Malware Analysis -resources

Twitter: Muffin

⭐Assembly Language

@TristanOrta
TristanOrta / weight capture, serial port to powerbuilder
Last active June 28, 2022 22:14
weight capture of a scale through serial COM port to powerbuilder
//this module corresponds to an OleCustomControl object of powerbuilder, the read COM port function is called, which is also among my GIST
String ls_car
integer peso
// the object is read until a 6-digit result is obtained if the ascci character 10 is detected
if MSCOMM_LEER_PESO_LO.object.CommEvent = 2 then
ls_car = MSCOMM_LEER_PESO_LO.object.Input
if Asc(ls_car) = 13 then Return
@TristanOrta
TristanOrta / Read_powerbuilder_com_port
Last active June 25, 2022 15:04
Connection and reading of serial port to PowerBuilder
//if the port is open it closes
if ol_mscomm.object.PortOpen then
ol_mscomm.object.PortOpen = false
end if
//port reading process
try
ol_mscomm.object.CommPort = as_puerto
ol_mscomm.object.Settings = as_config_puerto
ol_mscomm.object.Handshaking= 0