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
class Calculadora | |
def Calculadora.sumar(n,m) | |
n+m | |
end | |
def Calculadora.restar(n,m) | |
n-m | |
end | |
def Calculadora.multiplicar(n,m) | |
n*m | |
end |
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
/** | |
* For Ranges | |
*/ | |
function getFirstIndex(indexSelected:Number, range:Number, total:Number):Number | |
{ | |
var middle:Number = Math.ceil(range/2); | |
var index:Number; | |
if(indexSelected < middle) | |
index = 1; |
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
private function getLastDateOfMonth(year:Number, month:Number):Number | |
{ | |
const maxDateOfMes:Number = 31; | |
var myDate:Date = new Date(year, month, maxDateOfMes); | |
return (myDate.getDate() == maxDateOfMes ? maxDateOfMes : maxDateOfMes - myDate.getDate()); | |
} |
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 com.otakurzo.utils | |
{ | |
// BEGIN: Added | |
import flash.display.DisplayObjectContainer; | |
// END | |
/** | |
* Reusable FlashVars class | |
* @link http://cookbooks.adobe.com/post_Reusable_flashvars_class-17037.html | |
* @fixedBy Otaku RzO (Renzo Castro Jurado) |
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
"use strict"; | |
console.log('GAME Ready!'); | |
var container = document.getElementById('container'); | |
container.innerHTML = '<a id="btn-accion" href="#" class="btn">Acción</a><div id="hero"></div>'; | |
var hero = document.getElementById('hero'); | |
hero.style.left = "0px"; // parche |
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
"use strict"; | |
console.log('app.js'); | |
// Arrays (Arreglos) | |
/* | |
var titulo = "Area51"; | |
console.log( titulo ); | |
console.dir( titulo.split('') ); |
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
"use strict"; | |
console.log('app.js'); | |
// Arrays (Arreglos) | |
/* | |
var titulo = "Area51"; | |
console.log( titulo ); | |
console.dir( titulo.split('') ); |
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
console.log('** FUNCIONES **'); | |
console.log('- sin parametros ------------------'); | |
function saludar(){ | |
console.log( arguments ); | |
var mensaje = 'saludar'; | |
console.log(mensaje); | |
} |
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
// Clase sobre Funciones | |
// gist.github.com/otakurzo/5350996 | |
/* Ejercicios: */ | |
// 1. | |
console.log( reverso('Area51') ); | |
// 15aerA | |
// 2. |
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
/* Ejercicios */ | |
// gist.github.com/5351166 | |
/* SOLUCIONES */ | |
// 1. | |
// Forma PRO | |
function reverso(texto){ | |
return texto.split('').reverse().join(''); | |
} |
OlderNewer