Interesante la función de los parámetros indefinidos.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menúmysql> SELECT Reservas.ReservaID, Reservas.Cliente, SUM(Transacciones.Importe)
-> FROM Reservas
-> INNER JOIN Transacciones
-> ON Reservas.ReservaID = Transacciones.ReservaID GROUP BY ReservaID;
+-----------+---------+----------------------------+
| ReservaID | Cliente | SUM(Transacciones.Importe) |
+-----------+---------+----------------------------+
| 1 | Juan | 300 |
| 2 | Pedro | 900 |
+-----------+---------+----------------------------+
2 rows in set (0.00 sec)
mysql>
#!/usr/bin/python
# -*- coding: iso-8859-15 -*-
def suma(x1, x2):
return x1+x2
print """
--- Calculadora v0.1\n
1. Suma
2. Resta
3. Multiplicación
4. División
"""
sSelec = int(raw_input('Elige: '))
if sSelec == 1:
x1 = int(input('Primer numero: '))
x2 = int(input('Segundo numero: '))
print 'El resultado es: %i' % suma(x1, x2)
function addSpace($sString){
# Start Script
# Created by: Shell Root
# Description: Add space every 8 characters
$sReturn = wordwrap($sString, 8, " ", true);
return $sReturn;
# End Script
}
print addSpace("010101010000000111010101000101001")."\n";
alex@shellroot:~/Escritorio$ php PoC.php
01010101 00000001 11010101 00010100 1
function fromTo($sFrom, $sTo, $sContent){
# Start Script
# Created by: WHK
# Modified by: Shell Root
# Description: It can extract the contents from one part to another
if(preg_match($sFrom ,$sContent)){
$sReturn = explode($sFrom, $sContent);
foreach($sReturn as $sCompare){
$sCompare = explode($sTo, $sCompare);
if($sCompare = $sCompare[0]){ $sBack[] = $sCompare; }
unset($sCompare);
}
return $sBack[1];
}else{ return false; }
# End Script
}
$sWeb = file_get_contents("http://127.0.0.1/PoC/PoC.html");
$sWeb = fromTo("<script languaje='javascript'>", "</script>", $sWeb);
print( $sWeb );
<html>
<head>
<script languaje='javascript'>
function sAlert(){ alert('PoC Loading'); }
function sWrite(){ document.write('PoC'); }
</script>
</head>
<body onLoad='sAlert();'>
<h1> PoC </h1>
</body>
</html>
alex@shellroot:~/Escritorio$ php PoC.php
function sAlert(){ alert('PoC Loading'); }
function sWrite(){ document.write('PoC'); }
function sBinario( $pNum ){
$sReturn = "";
while( $pNum > 0 ){
$aNum = $pNum;
$aNum = floor( $pNum/2 );
if( ($pNum%2) == 0 ){ $sReturn .= 0; }else{ $sReturn .= 1; }
$pNum = $aNum;
}
return strrev($sReturn);
}
print sBinario(805)."\n";