-
¿Qué es el DOM? Document Object Model
-
¿Qué es un selector? Nos permite encontrar uno o más elementos HTML
-
¿Cuál es la diferencia entre
document.getElementById
ydocument.getElementsByClassName
? Además de que regresan elementos por distinto selector, el Elements regresa especificamente un arreglo, así devuelva un sólo elemento dentro.
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 | |
$dirs = array_slice(scandir('.'), 2); | |
for($i=0;$i<count($dirs);$i++){ | |
if ( is_dir($dirs[$i]) ){ | |
$base = $dirs[$i]; | |
for($j=0;$j<count($dirs);$j++){ | |
if ($i!=$j) { | |
if ( is_dir($dirs[$j]) ){ | |
$against = $dirs[$j]; |
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
#include <MIDI.h> | |
#include <PCM.h> | |
#include <gemido.h> | |
MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI); | |
int oldStatusUp[25]; | |
int newStatusUp[25]; | |
int oldStatusDown[25]; |
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> | |
<title>Network | Basic usage</title> | |
<script type="text/javascript" src="http://visjs.org/dist/vis.js"></script> | |
<link href="http://visjs.org/dist/vis-network.min.css" rel="stylesheet" type="text/css" /> | |
<style type="text/css"> | |
#mynetwork { |
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
#!/bin/bash | |
input=$1 | |
output=$2 | |
declare -A st1=([text]="C IS THE FRUIT OF COMPUTING" [start]=80 [end]=123 ) | |
declare -A st2=([text]="YOU CAN MAKE GAMES" [start]=124 [end]=161 ) | |
declare -A st3=([text]="DATABASES, COMPILERS" [start]=162 [end]=210 ) | |
declare -A st4=([text]="ENGINES, DRIVERS" [start]=211 [end]=247 ) | |
declare -A st5=([text]="THERE'S, UM" [start]=248 [end]=265 ) |
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
# Install Google webfonts on ubuntu | |
sudo apt-get -y install git | |
git clone https://github.com/google/fonts.git web_fonts_temp | |
mkdir -p ~/.fonts/google-fonts/ | |
find $PWD/web_fonts_temp/ -name "*.ttf" -exec sudo install -m644 {} ~/.fonts/google-fonts/ \; || return 1 | |
fc-cache -f > /dev/null | |
rm -rf web_fonts_temp | |
echo "Done." |
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
if [ ! -d "$1" ]; then | |
echo "Directory doesnt exists" | |
exit | |
fi | |
cd $1 | |
fileCount=800 | |
dirNum=1 |
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
if [ ! -d "$1" ]; then | |
echo "Directory doesnt exists" | |
exit | |
fi | |
cd $1 | |
a=1 | |
for i in *.jpg; do | |
new=$(printf "%09d.jpg" "$a") #09 pad to length of 9 |
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
#/bin/bash | |
#We only allow empty destination folders. | |
if [ -d "$2" ]; then | |
echo "Directory already exists" | |
exit | |
fi | |
#If it doesn't exists create it. | |
if [ ! -d "$2" ]; then | |
mkdir $2 | |
fi |
NewerOlder