This file contains 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 | |
/** | |
* Gets the URL search params. | |
* | |
* @param string $url The URL to parse. If no URL is passed, `$_SERVER["REQUEST_URI"]` will be used instead | |
* @param bool $arrays If false, search params that are added at the end will overwrite any existing values | |
*/ | |
function getQuery(string $url = "", bool $arrays = true) |
This file contains 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 { writable } from 'svelte/store' | |
const storedKeys: any = {} | |
/** | |
* Create a Writable localStorage store that allows both updating and reading by subscription | |
*/ | |
export function storable<T>(initialValue: T) { | |
const storedKey = `$-${Object.keys(storedKeys).length}` |
This file contains 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
\documentclass{article} | |
\usepackage{amsmath} | |
\usepackage{parskip} | |
\title{Boletin 1 - Termodinámica} | |
\author{Daniel Beltran Argueta} | |
\date{18 de diciembre de 2023} | |
\begin{document} |
This file contains 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 math | |
def cuadratica(a, b, c): | |
parte2 = math.sqrt(b**2 - 4 * a * c) | |
resultado1 = -b + parte2 | |
resultado2 = -b - parte2 |
This file contains 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 useFetch from 'http-react' | |
// The store. Because no url is passed, no request is sent | |
function useCount() { | |
const { data, mutate } = useFetch({ | |
id: 'count', | |
default: 0 | |
}) | |
return [ |
This file contains 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 factorial(numero) { | |
let multiplicador1 = numero | |
// Un número abajo | |
let multiplicador2 = numero - 1 | |
// Aquí se va sumando el resultado de cada vuelta | |
let resultado = 0 | |
// Si el número es 1, sólo retornamos 1 |
This file contains 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
/** | |
* An observable class that uses the observer pattern | |
*/ | |
class Observervable { | |
private suscribers: any | |
constructor() { | |
this.suscribers = {} | |
} | |
async addSubscriber(messageName: string, subscriber: any) { | |
if (!(messageName in this.suscribers)) { |
This file contains 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
"use strict" | |
/** | |
* @license http-react-fetcher | |
* Copyright (c) Dany Beltran | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
var __assign = | |
(this && this.__assign) || |
This file contains 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
"use strict" | |
/** @license Atomic State | |
* Copyright (c) Dany Beltran | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
var ReflectOwnKeys, | |
R = "object" == typeof Reflect ? Reflect : null, |
This file contains 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
const { randomUUID } = require("crypto") | |
/** | |
* Create an observable value | |
*/ | |
class Observable { | |
observableValue | |
subscribers = {} | |
/** |
NewerOlder