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 byteToHex = (byte) => { | |
const key = '0123456789abcdef' | |
let bytes = new Uint8Array(byte) | |
let newHex = '' | |
let currentChar = 0 | |
for (let i=0; i<bytes.length; i++) { // Go over each 8-bit byte | |
currentChar = (bytes[i] >> 4) // First 4-bits for first hex char | |
newHex += key[currentChar] // Add first hex char to string | |
currentChar = (bytes[i] & 15) // Erase first 4-bits, get last 4-bits for second hex char | |
newHex += key[currentChar] // Add second hex char to string |
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 java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; | |
public class FB { | |
public static int comparator(String s1, String s2) { |
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
/** | |
* ECMA2015 | |
*/ | |
function convertHex(hexCode, opacity = 1){ | |
var hex = hexCode.replace('#', ''); | |
if (hex.length === 3) { | |
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='UTF-8' /> | |
<title>Lista de Esados de la República Mexicana</title> | |
</head> | |
<body> | |
<h1>Lista de Estados de la República Mexicana</h1> | |
<label>Estado de la República</label> | |
<select name="estado"> |