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
| /* | |
| The following function | |
| public static long rand(int min, int max) { | |
| return (System.nanoTime()%(max-min)) + min; | |
| } | |
| does not generate random numbers with a known distribution; | |
| the properties (randomness) of the output depend on factors that modify it. |
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
| /* | |
| PHP <8.1 does not support | |
| https://unicode-org.github.io/icu/userguide/format_parse/datetime/index#datetimepatterngenerator | |
| */ | |
| package com.computermind.sandbox.icu; | |
| import com.ibm.icu.text.DateTimePatternGenerator; |
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
| <!DOCTYPE html> | |
| <html> | |
| <style> | |
| div { | |
| display: block; | |
| float: left; | |
| } | |
| </style> | |
| <script> | |
| var N = 12; // nº of divisions |
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 org.testing; | |
| import java.util.List; | |
| import java.util.stream.IntStream; | |
| import static java.util.stream.Collectors.counting; | |
| import static java.util.stream.Collectors.groupingBy; | |
| import static java.util.stream.Collectors.toList; | |
| public class Test { |
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
| <!DOCTYPE html><html><head><meta charset="utf-8"> | |
| <!-- obtener alguna fuente @font-face ... en este caso "Noto Sans SC" --> | |
| <link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet"> | |
| <style> | |
| /* donde sea usar esta fuente (puede añadirse a la lista de font-families del root) */ | |
| .chino { | |
| font-family: "Noto Sans SC"; |
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
| Info de descarga en: | |
| https://www.boe.es/datosabiertos/ | |
| Para bajar todo desde enero de 2009 por ejemplo: | |
| for y in `seq 2009 2020` | |
| do | |
| for m in 01 02 03 04 05 06 07 08 09 10 11 12 | |
| do |
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
| # Si las relaciones son contínuas (ej. pueden ser expresadas por una función real), | |
| # una ANN puede aproximarla de forma precisa: | |
| # | |
| # https://en.wikipedia.org/wiki/Universal_approximation_theorem | |
| # Install | |
| # $ python --version | |
| # Python 3.8.5 | |
| # $ pip --version | |
| # pip 20.1.1 from /usr/lib/python3.8/site-packages/pip (python 3.8) |
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
| // la consola javascript suele abrirse con F12, copiar, pegar, ENTER: | |
| [].slice.call(document.querySelectorAll("li.comment")) | |
| .filter(x => x.querySelector("b.fn").innerText == "David B") | |
| .forEach(x => x.style.display = 'none') | |
| // Antonio (AKA "Un físico") | |
| [].slice.call(document.querySelectorAll("li.comment")) | |
| .filter(x => x.querySelector("b.fn").innerText == 'Antonio (AKA "Un físico")') | |
| .forEach(x => x.style.display = 'none') |
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
| class ToFrom f where | |
| to :: List2 a -> f a | |
| from :: f a -> List2 a | |
| instance ToFrom Maybe where | |
| to End = Nothing | |
| to (Elem x _) = Just x | |
| from Nothing = End | |
| from (Just x) = Elem x End |
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 Test.QuickCheck | |
| import Algorithm.Search | |
| ... | |
| -- conversion util | |
| to :: List2 a -> [a] | |
| to End = [] | |
| to (Elem x xs) = x: to xs |