This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ZaidaZadkiel at march 28, 2020 | |
euler problem #11 - incorrect | |
run video at | |
https://www.youtube.com/watch?v=VMW04nEtKEk | |
*/ | |
big =[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |