Skip to content

Instantly share code, notes, and snippets.

View fernandezpablo85's full-sized avatar

Pablo Fernandez fernandezpablo85

View GitHub Profile
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
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=[]
## 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);
package main
import (
"net"
"os"
)
const (
RECV_BUF_LEN = 1024
)
package main
import (
"net"
"os"
)
const (
RECV_BUF_LEN = 1024
)
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);
}
// 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) {
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()))
$('#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('');
},
// 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