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
#Agregar en las opciones de la VM | |
-XX:+UseSerialGC -Xss512k -XX:MaxRAM=256m |
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
const todosLosUsuarios = [{ userid: "100", nombre: "NN", rowid: "0" },{ userid: "101", nombre: "HB", rowid: "1" },{ userid: "102", nombre: "Marcus", rowid: "2" }]; | |
const usuariosFiltro = [{ userid: "101", nombre: "HB", rowid: "1" }]; | |
console.log("todosLosUsuarios", todosLosUsuarios); | |
console.log("usuariosFiltro", usuariosFiltro); | |
const encontrados = todosLosUsuarios.filter(array => !usuariosFiltro.some(filter => filter.userid !== array.userid)); | |
console.log("encontrados", encontrados); |
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
var description:XML = describeType(miObjeto); | |
trace(description); |
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
private function map(value:Number, low1:Number, high1:Number, low2:Number = 0, high2:Number = 1):Number { | |
//El valor, valor min del original, valor máx del original, valor min, valor max | |
//myBox.x = map(mouseX, 0, 550, 100, 200);v | |
//http://lab.joelgillman.com/archives/87_map-function | |
//if the value and the 1st range low are equal to | |
// the new value must be low2 | |
if (value == low1){ | |
return low2; | |
} | |
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
public static function extractFileType(fileName:String):String { | |
var extensionIndex:Number = fileName.lastIndexOf("."); | |
if (extensionIndex == -1) { | |
return ""; | |
} else { | |
return "." + fileName.substr(extensionIndex + 1, fileName.length); | |
} | |
} | |
//Thanks to |
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
//Créditos | |
//http://labs.grupow.com/index.php/2009/05/random-points-inside-a-triangle/ | |
function getRandomPointInTriangle (A:Point,B:Point,C:Point):Point { | |
//P = aA + bB + cC | |
//@see http://www.cgafaq.info/wiki/Random_Point_In_Triangle | |
var a:Number = Math.random(); | |
var b:Number = Math.random(); | |
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
internal function rangoRandom(low:Number,high:Number):Number { | |
var numeroRandom:Number = Math.floor(Math.random() * (high - low)) + low; | |
//trace("Numero Random: " + numeroRandom); | |
return numeroRandom; | |
} |
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
var url:String="ruta.html"; | |
navigateToURL(new URLRequest(url), "_blank"); |
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
CFIndex rc = CFGetRetainCount((__bridge CFTypeRef)myObject); | |
NSLog(@"%li",rc); |
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
float r; float g; float b; float a; | |
[UIColor colorWithRed:r/255.f | |
green:g/255.f | |
blue:b/255.f | |
alpha:a/255.f]; |
NewerOlder