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
def obtener_n_mayores(n, numeros): | |
counter = 0 | |
mayores = [] | |
while counter < n: | |
max1=max(numeros) # intentar hacer otra funcion que haga lo mismo que `max` acá (y llamar a esa). | |
mayores.append(max1) | |
numeros.remove(max1) | |
counter+=1 | |
return mayores |
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
def obtener_2_mayores(*numeros): | |
max1=max(numeros) | |
max2=min(numeros) | |
for i in range(len(numeros)): | |
if numeros[i]<max1>max2: | |
max2=numeros[i] | |
return max1,max2 | |
def obtener_mayor_par(*numeros): | |
maxp=[] |
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
## The Problem | |
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.) | |
## The temptingly easy but ultimately wrong solution: | |
Alter the port the script talks to from 8000 to 80: | |
}).listen(80); |
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
package main | |
import ( | |
"net" | |
"os" | |
) | |
const ( | |
RECV_BUF_LEN = 1024 | |
) |
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
package main | |
import ( | |
"net" | |
"os" | |
) | |
const ( | |
RECV_BUF_LEN = 1024 | |
) |
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
namespace Proveedores | |
{ | |
public interface IMapeadorCRUD<V, F> | |
{ | |
bool Agregar(V valor); | |
bool Modificar(V valor); | |
bool Eliminar(V valor); | |
List<V> Listar(F filtro); | |
V Consultar(F filtro); | |
} |
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
// supongamos que se llama 'coso' | |
coso.append($("<div>") | |
.attr("class", "people-panel-item-table-row-cell") | |
.append($("<div>") .append($("<div>") | |
.attr("class","info-header-name") | |
.attr("id", "info-header-name-" + item.index) | |
.html(item.contact.displayName())); | |
if(usuarioLogueado) { |
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
algo.append($("<div>").attr("class", "people-panel-item-table-row-cell") | |
.append($("<div>").attr("class","info-header-name") | |
.attr("id", "info-header-name-" + item.index) | |
.html(item.contact.displayName())) |
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
$('#enviarEmail').click(function () { | |
$.ajax({ | |
url: '@Url.Action("SetEmail","Email")', | |
type: 'POST', | |
dataType: "json", | |
data: { text: $('#email').val() }, | |
success: function (data) { | |
alert('Gracias por suscribirse!'); | |
$('#email').val(''); | |
}, |
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
// E1 | |
((2 == 3) && ("asdf" > "ASDF") && ( 4/2 == 2)) || (false && true) | |
(false && true && true) || false) | |
false || false | |
false | |
// E2 | |
(Math.max(2,3) == 3) && (1+2+3+4+5+6+7+8+9+10 == 55) | |
true && true |
NewerOlder