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
<?php | |
$fecha = $_POST['fecha']; | |
$hora = $_POST['hora']; | |
$nombre = $_POST['nombre']; | |
$apellido = $_POST['apellido']; | |
$conexion = mysql_connect("localhost","user","pass"); |
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
<?php | |
$fecha = $_POST['fecha']; | |
$hora = $_POST['hora']; | |
$nombre = $_POST['nombre']; | |
$apellido = $_POST['apellido']; | |
$conexion = mysql_connect("localhost","user","pass"); |
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
Environment: | |
Request Method: GET | |
Request URL: http://127.0.0.1:8000/admin/ | |
Django Version: 1.3.1 | |
Python Version: 2.7.2 | |
Installed Applications: | |
['django.contrib.auth', |
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
i=0 | |
in_number = raw_input("INGRESE UN NUMERO:") | |
lista = [] | |
while in_number: | |
lista.append(int(in_number)) | |
in_number = raw_input("INGRESE UN NUMERO:") | |
for number in lista: | |
if number % 2 == 0: |
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
str_numbers = raw_input("ingrese una secuencia de numeros separados por espacios:") | |
numbers = [] | |
for sn in str_numbers.split(): | |
try: | |
n = int(sn) | |
except: | |
n = 0 | |
numbers.append(n) | |
def pares(numbers,i = 0): |
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
def maximo(lista): | |
m = max(lista) | |
print m | |
lista=[1,50,60,5] |
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
# max es una funcion nativa de paython asi que | |
# no la podes usar como nombre de variable | |
def maximo(lista,i=0,m=0): | |
if i == len(lista) - 1: | |
return m | |
else: | |
if lista[i]>=m: | |
m=lista[i] | |
return maximo(lista,i+1,m) |
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
def pares(lista,i=0): | |
if i<len(lista): | |
if lista[i]%2==0: | |
print lista[i] | |
pares(lista,i+1) | |
lista=[1,4,5,9,8] | |
# print pares ..... emmm hasta ahora no te diste cuenta que tenes | |
# que llamar a una funcion para que esta se ejecute | |
pares(lista) |
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
<?php | |
class Embebidos{ | |
var $servidores = array( | |
array("http://www.youtube.com/","youtube"), | |
array("http://soundcloud.com/","soundcloud") | |
); | |
var $reemplazados = array(); | |
function __construct($post){ | |
$this->post = $post; | |
} |
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
import random | |
def rec(n): | |
if n<2: | |
return 1 | |
else: | |
n=random.random() | |
return n*rec(n) | |
numf=rec(3) | |
print numf |
OlderNewer