Skip to content

Instantly share code, notes, and snippets.

View ZaidaZadkiel's full-sized avatar
😁
Got a computer again! I can code again

Zaida Zadkiel Revelacion Misericordia ZaidaZadkiel

😁
Got a computer again! I can code again
  • Somewhere in the depths of Hell, Mexico
View GitHub Profile
@ZaidaZadkiel
ZaidaZadkiel / nonoverlapping_random.js
Created October 12, 2022 02:11
Take two entries from an array which are never the same entry
function get_two_random_elements() {
let indexA = ( Math.floor(Math.random() * data.length ) )
let indexB = ( (Math.floor(Math.random() * (data.length-1)) + indexA + 1) % data.length )
console.log(
`${indexA}: ${data[indexA]}, ${indexB}: ${data[indexB]}`,
indexA == indexB ? "SAME" : "ok",
data.length
)
}
@ZaidaZadkiel
ZaidaZadkiel / euler11.js
Created June 23, 2022 19:04
I dont even remember what this is about - euler problem #11 incorrect solution - node js
/* ZaidaZadkiel at march 28, 2020
euler problem #11 - incorrect
run video at
https://www.youtube.com/watch?v=VMW04nEtKEk
*/
big =[
@ZaidaZadkiel
ZaidaZadkiel / is_palindrome.c
Last active February 16, 2022 15:11
Numeric Palindrome test to show off
//compile in linux with: gcc is_palindrome.c -g -lm -lc && ./a.out
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
char* itoa(int value, char* result, int base);
int is_palindrome(unsigned int number, int base){
@ZaidaZadkiel
ZaidaZadkiel / SyE.c
Created February 10, 2022 01:11
Serpientes y Escaleras en modo consola en C con sonido portable
#include<stdio.h>
#include<stdlib.h>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include <time.h>
/* https://github.com/vareille/toot
requerido para hacer sonido
*/
@ZaidaZadkiel
ZaidaZadkiel / tic_tac_toe.py
Last active February 6, 2022 03:37
Tic Tac Toe in python in a 4 iteration for loop
# import only system from os
from os import system, name
import math
# define our clear function
def clear():
# for windows
if name == 'nt':
_ = system('cls')
package com.ZaidaZadkiel.ValueTime;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Interpolation;
public class ValueTime {
public float values[];
public float times[];
public int lastindex=0;