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
<button class="btn btn-circle"> | |
<div class="ripple-container"> | |
<span class="ripple-effect"></span> | |
</div> | |
+ | |
</button> | |
<button class="btn btn-rectangle btn-raised"> | |
<div class="ripple-container"> | |
<span class="ripple-effect"></span> | |
</div> |
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
button{ | |
outline: 0px; | |
} | |
.btn{ | |
border: none; /*Quita los bordes asperos que tienen los botones por defecto*/ | |
background-color: #2196F3; | |
margin: .5rem; | |
position: relative; | |
transform: rotateZ(360deg); | |
transition: all .2s ease; |
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
.ripple-container { | |
/*Con los siguientes valores de position, top, left, width y height aseguramos que el div tome todo el tamaño de su padre*/ | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
overflow: hidden; | |
background: transparent; | |
} |
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
var ripple = document.querySelectorAll('.ripple-container'); | |
/*Guardamos un array con todos los botones. Para compatibilidad con navegadores | |
antiguos puedes reemplazar el querySelectorAll con un getElementsByClassName*/ | |
[].forEach.call(ripple, function(e) { | |
e.addEventListener('click', function(e) { | |
/*Esto se activará cada vez que haya un click en un botón*/ | |
var offset = this.parentNode.getBoundingClientRect(); | |
//Toma los limites del padre (el padre es el <button> para | |
//los botones, o el <div> principal en la imagen | |
var effect = this.querySelector('.ripple-effect'); |
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 name="viewport" content="width=device-width, initial-scale=1"> | |
<meta charset="utf-8"> | |
<title>Efecto Ripple - Material Design</title> | |
<link href="styles.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="container"> |
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
private static int N = 5, V; | |
private static int[] coinValue = new int[] {1, 5, 10, 25, 50}; | |
private static int[][] memo = new int[6][7500]; | |
private static int ways(int type, int value) { | |
if (value == 0) { | |
return 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
1 | |
1 2 1 2 1 | |
3 5 3 4 3 | |
4 2 1 2 1 | |
2 | |
3 1 4 2 1 2 1 | |
4 2 5 3 6 5 4 | |
1 3 1 4 2 3 1 | |
2 4 2 3 1 4 2 | |
1 3 1 5 2 3 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
1 30 | |
2 19 | |
3 696 | |
4 39 | |
5 58 | |
6 33 | |
7 55 | |
8 1 | |
9 5 | |
10 198 |
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
1 2 2 1 0 | |
2 11 16 8 4 | |
3 44 92 50 24 | |
4 189 512 284 144 | |
5 798 2654 1499 776 | |
6 3383 13344 7620 4004 | |
7 14328 65368 37636 19984 | |
8 60697 314432 182152 97472 | |
9 257114 1490842 867829 467184 | |
10 1089155 6988464 4083824 2208996 |
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
1 14093/99532 | |
2 16/113 | |
3 1/7 | |
4 563775/599324 | |
5 74678/135649 | |
6 594925/755304 | |
7 228407/240744 | |
8 530597/774977 | |
9 306441/319652 | |
10 397881/411826 |
OlderNewer