Calcula la probabilidad usando la distribución de Bernoulli.
A Pen by Luis Cabrera Benito on CodePen.
| <?php | |
| /** | |
| This is a simple proof of concept of a brute force algorithm for string matching with | |
| given set of characters. | |
| The way this works is that the algorithm counts from first to last possible combination of | |
| given characters. Instead of counting(incrementing) in number base 10 we use | |
| a new base which is derived from your set of possible characters (we count in symbols). | |
| So if your characters list contains 27 characters the program actually counts in a 27 base | |
| number system. |
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'); | |
| } |
| public class SomeFragment extends Fragment { | |
| MapView mapView; | |
| GoogleMap map; | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
| View v = inflater.inflate(R.layout.some_layout, container, false); | |
| 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); |
| using System; | |
| namespace App | |
| { | |
| class Programa | |
| { | |
| static void Main(string[] args) | |
| { | |
| Console.WriteLine("Introduce una palabra y te diré si es palíndroma :) "); | |
| String palabra = Console.ReadLine(); |
| 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"); | |
| } |