Calcula la probabilidad usando la distribución de Bernoulli.
A Pen by Luis Cabrera Benito on CodePen.
Calcula la probabilidad usando la distribución de Bernoulli.
A Pen by Luis Cabrera Benito on CodePen.
// Somewhere in your controllers for this given example | |
// Example functions | |
$scope.itemOnLongPress = function(id) { | |
console.log('Long press'); | |
} | |
$scope.itemOnTouchEnd = function(id) { | |
console.log('Touch end'); | |
} |
import urllib.request, json | |
from urllib.parse import quote | |
from urllib.request import Request, urlopen | |
class Acortar: | |
def __init__(self, link): | |
self.link = link | |
self.link_seguro = quote( link.encode('UTF-8') ) | |
def responder_texto_plano(self, cadena): |
""" | |
Abre una base de datos de sqlite3 e interactúa con ella. | |
Útil para hacer pruebas | |
@author parzibyte | |
""" | |
import sqlite3 | |
while True: | |
try: | |
""" |
#define PIN_RELEVADOR 2 | |
void setup() { | |
Serial.begin(9600); | |
pinMode(PIN_RELEVADOR, OUTPUT); | |
} | |
void apagarRelevador() { | |
digitalWrite(PIN_RELEVADOR, LOW); | |
} | |
void encenderRelevador() { | |
digitalWrite(PIN_RELEVADOR, HIGH); |
const esPalindroma = (cadena) =>{ | |
if(cadena.length < 2) return true; | |
if(cadena.charAt(0) === cadena.charAt(cadena.length - 1)) return esPalindroma(cadena.substring(1, cadena.length - 1)); | |
return false; | |
} |
using System; | |
namespace App | |
{ | |
class Programa | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Hola mundo"); | |
} |
<?php | |
function extensionDe($nombre){ | |
$posicionPunto = strrpos($nombre, "."); | |
if($posicionPunto !== FALSE){ | |
return substr($nombre, $posicionPunto + 1); | |
}else return "Desconocida"; | |
} | |
//Probar | |
$archivos = [ |
<?php | |
function apareceSoloUnaVez($cadena, $busqueda){ | |
return substr_count($cadena, $busqueda) === 1; | |
} | |
//Para probar | |
$arreglo = [ | |
"https://www.parzibyte.me" => "https", | |
"Hola, ¿Qué haces?" => "Qué", | |
":) hola :)" => ":)", | |
"Separado\ncon muchos\nsaltos de línea" => "\n", |
class HolaMundo{ | |
public static void main(String[] argumentos){ | |
System.out.println("Hola mundo"); | |
} | |
} |