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 javax.swing.*; | |
class Main { | |
public static void main(String[] arg) { | |
String color = JOptionPane.showInputDialog("Por favor seleccione nu color: "); | |
Electrodomesticos e = new Electrodomesticos(30,25,color,'C'); | |
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 "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic";html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button |
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 | |
final public static function iconitos(array $features) : array { | |
$iconitos = array( | |
'gimnasio' => 'soap-gimnasio-xd', | |
'piscina' => 'soap-piscina-xd' | |
# etc ... | |
); | |
foreach($features as $nombre_del_feature) { | |
$result[] = $iconitos[strtolower($nombre_del_feature)]; |
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 | |
/** | |
* CRUD Model - Ocrend Framework | |
* Ejemplo de uso correcto para un CRUD usando rutas y la api rest | |
*/ | |
final class Crud extends Models implements OCREND { | |
public function __construct() { |
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 | |
# SIN API REST | |
$modelo = new Modelo; | |
switch($this->method): | |
## codigo ... | |
case 'crear': | |
if($_POST) { | |
$modelo->Crear(); | |
} else { |
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 | |
# Seguridad | |
defined('INDEX_DIR') OR exit('Ocrend software says .i.'); | |
//------------------------------------------------ | |
final class Files { | |
//------------------------------------------------ |
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
for($x = 0, $y = 0; $x <= 10 || $y <= 20;$x++, $y++) { | |
echo 'Ja'; | |
} | |
echo '<br />'; | |
$algo = true; | |
for(;$algo && true;) { | |
if(mt_rand(0,1) == 1) { | |
echo 'Entro en el if y se detiene<br />'; |
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 | |
/** | |
* Dado un índice asociativo y un arreglo, devuelve el índice numérico correspondiente al asociativo | |
* | |
* @param string $index: Índice asociativo del arreglo | |
* @param array $a: Arreglo a evaluar | |
* | |
* @return int el índice correspondiente, -1 si no existe el indice | |
*/ |
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
""" | |
Este codigo muestra el comportamiento de una pila en python | |
""" | |
#Función que imprime la pila | |
def imprimir(stack): | |
x = len(stack) - 1 | |
while x >= 0: | |
print stack[x] | |
stack.pop() #saca siempre al ultimo elemento ingresado |
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
/** | |
* JSON_LIB | |
* Funciones básicas para comunicar PHP 7 con C++, "simulando" una primitiva de Json | |
* @link http://www.ocrend.com/ | |
* @author Brayan Narváez (Prinick) <princk093@gmail.com> <prinick@ocrend.com> | |
* @copyright 2016 Brayan Narváez | |
*/ | |
//Definición de librerías necesarias | |
#ifndef iostream |