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
Immutable state tree | |
Dispatch actions | |
Pure fuctions don't modify the attributes that the recieve and also alway return the same value for the same params | |
Reducer: takes the previus state, the action to be dispatch and returns the next state. | |
Reducers change(But don't mutate it) properties in the store | |
action has a type | |
use payload as a convention for naming actions' values |
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/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon | |
### END INIT INFO |
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
for(var i = 1; i <= 20; i++){ | |
console.log($('input[name=radEva_'+i+']')); | |
$('input[name=radEva_'+i+']').click(); | |
}; |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Central Gmap</title> | |
<script src="https://code.jquery.com/jquery-1.11.2.js"></script> | |
<script src="https://maps.google.com/maps/api/js?sensor=true"></script> | |
<script src="gmaps.js"></script> | |
</head> | |
<body> |
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
// 1. Ir a la pagina a la que se le quiere dar 'likes' a sus publicaciones | |
//Con el siguiente codigo se llega al final de la pagina automaticamente. Repetir hasta que sea necesario (Recomendable que haya cargado < de 50 publicaciones) | |
// 2. Pegar lo siguiente hasta que consideres necesario. | |
window.scrollTo(0, document.body.scrollHeight); | |
setTimeout(function(){ | |
window.scrollTo(0, document.body.scrollHeight); | |
}, 2000); |
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
db = null | |
constructor: -> | |
# WebSQL Database | |
db = openDatabase('myDB', '1.0', 'this is my DB', 2 * 1024 * 1024) | |
db.transaction (tx) => | |
tx.executeSql("CREATE TABLE IF NOT EXISTS mytable (id, name, stuff)", | |
[], | |
(tx, results) => console.log(results), | |
(tx, error) => console.error(error), | |
) |
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 | |
$data = array(); | |
foreach ($tareas as $tarea) { | |
$data[] = $tarea; | |
} | |
var_dump($data); | |
?> |
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
window.onload = function() { | |
$("select").change(function () { | |
var str = ""; | |
$("select option:selected").each(function () { | |
str += $(this).text(); | |
}); | |
compr(str); | |
}); | |
function compr(str){ | |
if(str == 'Vendedor'){ |