Skip to content

Instantly share code, notes, and snippets.

View Ts-Pytham's full-sized avatar
🏠
Working from home

Johan Sánchez Ts-Pytham

🏠
Working from home
  • On my way...
View GitHub Profile
@MrDave1999
MrDave1999 / Enumerator.cs
Last active December 23, 2022 00:40
A program that does not make use of the "yield return"
/*
The program only creates two collections and then prints it together.
By not using "yield return", it is required to do everything manually, as the IEnumerable and IEnumerator interfaces must be implemented to iterate over the collection.
The intent of this code is to show that the use of "yield return" is extremely necessary as it saves work.
Most of this work is done internally by the compiler.
*/
using System;
using System.IO;
using System.Collections.Generic;
@Ts-Pytham
Ts-Pytham / ReplaceALL.CS
Last active April 13, 2020 03:41
ReplaceALL and RemoveALL C# By Ts-Pytham
using System;
namespace ReplaceALL
{
class Program
{
static string ReplaceAll(string str, string palabra_reemplazar, string palabra)
{
string aux = "", aux1 = "";
int len = str.Length, correcto = palabra_reemplazar.Length, j = 0;
@MrDave1999
MrDave1999 / fibonacci.c
Last active September 17, 2019 16:12
Serie Fibonacci en C/C#/Python/Pawn
#include <stdio.h>
#include <stdint.h>
#define MAX_NUM (50)
void SerieFibonacci()
{
const char* const as = "*****";
const char* j = as + 4;
uint64_t value_ant = 0;
uint64_t value_sig = 1;
@Ts-Pytham
Ts-Pytham / Serie de Fibonacci.py
Last active September 17, 2019 03:14
Sucesión de Fibonacci en C++/Python
prim = 1
ant = 0
c = "*"
d = 0
r = int(input("Ingrese el rango a terminar para la sucesión de Fibonacci."))
for i in range(0,r):
if d >=1 and d<=4:
c+="*"
else:
d = 0
@MrDave1999
MrDave1999 / bubblesort.h
Last active July 17, 2019 02:23
Implementaciones del algoritmo de la burbuja, de una forma eficiente.
#ifndef _BUBBLESORT_H
#define _BUBBLESORT_H
int BubbleSort(int*const parray, const int size)
{
int count; //contar iteraciones.
int total = 0; //total de iteraciones.
int* i;
int* psize = parray + size;
int aux;
@MrDave1999
MrDave1999 / list.cs
Last active July 17, 2019 02:41
Colecciones genéricas en C#
using System;
using System.Collections.Generic;
class ListP
{
private int data;
public int getData() { return data; }
public void setData(int data)
{
this.data = data;
@lopspower
lopspower / README.md
Last active July 17, 2024 00:29
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store