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
#Agregar en las opciones de la VM | |
-XX:+UseSerialGC -Xss512k -XX:MaxRAM=256m |
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
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 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
//Vaciar el contenedor | |
private function vaciarContenedor(contenedor:MovieClip):void { | |
//Borrar todos los objetos en el contenedor | |
for (var i:int = contenedor.numChildren - 1; i >= 0; i--){ | |
contenedor.removeChildAt(i); | |
} | |
} |
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
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]; |
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
public var sb:ScrollBar = new ScrollBar; | |
public var mcContenido:MovieClip; | |
public var mcMask:MovieClip; | |
private function configScroll():void { | |
//Config Scroll | |
//trace("Configurar Scroll"); | |
sb.x = 20+mcContenido.x + mcContenido.width; | |
sb.y = mcContenido.y; | |
sb.height = mcMask.height; |
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
CFIndex rc = CFGetRetainCount((__bridge CFTypeRef)myObject); | |
NSLog(@"%li",rc); |
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
var url:String="ruta.html"; | |
navigateToURL(new URLRequest(url), "_blank"); |
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
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 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
//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 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
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 |
NewerOlder