Scale9BitmapMesh, which scale9s a bitmap using drawTriangles. Needs testing

error: pathspec 'raw/src/org/yellcorp/lib/bitmap/Scale9BitmapMesh.as' did not match any file(s) known to git

--- raw/src/org/yellcorp/lib/bitmap/Scale9BitmapMesh.as
+++ raw/src/org/yellcorp/lib/bitmap/Scale9BitmapMesh.as
@@ -0,0 +1,391 @@
+package org.yellcorp.lib.bitmap
+{
+import org.yellcorp.lib.error.assert;
+
+import flash.display.BitmapData;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.geom.Rectangle;
+
+
+public class Scale9BitmapMesh extends Sprite
+{
+    private var _width:Number;
+    private var _height:Number;
+
+    private var _scale9Grid:Rectangle;
+    private var _bitmapData:BitmapData;
+    private var _smoothing:Boolean;
+
+    private var verts:Vector.<Number>;
+    private var uvs:Vector.<Number>;
+
+    private var vertsNeedRecalc:Boolean;
+    private var uvsNeedRecalc:Boolean;
+
+    private var drawIndexSet:uint;
+    private static const CENTER_ROW:uint = 1;
+    private static const CENTER_COLUMN:uint = 2;
+
+    private static const CORNER_PATCHES:uint = 0;
+    private static const NO_CENTER_COLUMN:uint = 1;
+    private static const NO_CENTER_ROW:uint = 2;
+    private static const ALL:uint = 2;
+
+    private static var _indicesAll:Vector.<int>;
+    private static var _indicesNoCenterRow:Vector.<int>;
+    private static var _indicesNoCenterColumn:Vector.<int>;
+    private static var _indicesCornerPatches:Vector.<int>;
+    private static var _indicesCorners:Vector.<int>;
+
+    public function Scale9BitmapMesh(
+        bitmapData:BitmapData = null, innerRectangle:Rectangle = null,
+        smoothing:Boolean = false)
+    {
+        verts = Vector.<Number>([
+            0.00, 0.00,   0.00, 0.00,   0.00, 0.00,   0.00, 0.00,
+            0.00, 0.00,   0.00, 0.00,   0.00, 0.00,   0.00, 0.00,
+            0.00, 0.00,   0.00, 0.00,   0.00, 0.00,   0.00, 0.00,
+            0.00, 0.00,   0.00, 0.00,   0.00, 0.00,   0.00, 0.00
+        ]);
+        verts.fixed = true;
+
+        uvs = Vector.<Number>([
+            0.00, 0.00,   0.33, 0.00,   0.67, 0.00,   1.00, 0.00,
+            0.00, 0.33,   0.33, 0.33,   0.67, 0.33,   1.00, 0.33,
+            0.00, 0.67,   0.33, 0.67,   0.67, 0.67,   1.00, 0.67,
+            0.00, 1.00,   0.33, 1.00,   0.67, 1.00,   1.00, 1.00
+        ]);
+        uvs.fixed = true;
+
+        addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
+        addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage, false, 0, true);
+        _width = bitmapData ? bitmapData.width : 0;
+        _height = bitmapData ? bitmapData.height : 0;
+        this.bitmapData = bitmapData;
+        this.scale9Grid = innerRectangle;
+        this.smoothing = smoothing;
+
+        redraw();
+    }
+
+    public override function get width():Number
+    {
+        return _width;
+    }
+
+    public override function set width(new_width:Number):void
+    {
+        _width = new_width;
+        vertsNeedRecalc = true;
+        invalidate();
+    }
+
+    public override function get height():Number
+    {
+        return _height;
+    }
+
+    public override function set height(new_height:Number):void
+    {
+        _height = new_height;
+        vertsNeedRecalc = true;
+        invalidate();
+    }
+
+    public function setSize(width:Number, height:Number):void
+    {
+        _width = width;
+        _height = height;
+        vertsNeedRecalc = true;
+        redraw();
+    }
+
+    public function get bitmapData():BitmapData
+    {
+        return _bitmapData;
+    }
+
+    public function set bitmapData(new_bitmapData:BitmapData):void
+    {
+        uvsNeedRecalc = vertsNeedRecalc = !bitmapsSameSize(_bitmapData, new_bitmapData);
+        _bitmapData = new_bitmapData;
+        invalidate();
+    }
+
+    public override function get scale9Grid():Rectangle
+    {
+        return _scale9Grid;
+    }
+
+    public override function set scale9Grid(innerRectangle:Rectangle):void
+    {
+        _scale9Grid = innerRectangle;
+        uvsNeedRecalc = vertsNeedRecalc = true;
+        invalidate();
+    }
+
+    public function get smoothing():Boolean
+    {
+        return _smoothing;
+    }
+
+    public function set smoothing(new_smoothing:Boolean):void
+    {
+        _smoothing = new_smoothing;
+        invalidate();
+    }
+
+    public function redraw():void
+    {
+        graphics.clear();
+
+        if (_width <= 0 || _height <= 0 || !_bitmapData)  return;
+
+        if (!_scale9Grid)
+        {
+            drawLinear();
+        }
+        else
+        {
+            drawScale9();
+        }
+    }
+
+    private function drawLinear():void
+    {
+        if (vertsNeedRecalc)
+        {
+            recalcVertsLinear();
+        }
+        graphics.beginBitmapFill(_bitmapData, null, false, _smoothing);
+        graphics.drawTriangles(verts, indicesCorners, uvs);
+        graphics.endFill();
+    }
+
+    private function recalcVertsLinear():void
+    {
+        verts[6]  = verts[30] = _width;
+        verts[25] = verts[26] = _height;
+        vertsNeedRecalc = false;
+    }
+
+    private function drawScale9():void
+    {
+        if (uvsNeedRecalc)
+        {
+            recalcUVs();
+        }
+
+        if (vertsNeedRecalc)
+        {
+            recalcVertsScale9();
+        }
+
+        var indices:Vector.<int>;
+
+        switch (drawIndexSet)
+        {
+        case CORNER_PATCHES:
+            indices = indicesCornerPatches;
+            break;
+        case NO_CENTER_COLUMN:
+            indices = indicesNoCenterColumn;
+            break;
+        case NO_CENTER_ROW:
+            indices = indicesNoCenterRow;
+            break;
+        case ALL:
+            indices = indicesAll;
+            break;
+        default:
+            assert(false, "Weird drawIndexSet: " + drawIndexSet);
+        }
+
+        graphics.beginBitmapFill(_bitmapData, null, false, _smoothing);
+        graphics.drawTriangles(verts, indices, uvs);
+        graphics.endFill();
+    }
+
+    /*   0,1-----2,3-----4,5-----6,7
+     *    |     / |     / |     / |
+     *    |   /   |   /   |   /   |
+     *    | /     | /     | /     |
+     *   8,9----10,11---12,13---14,15
+     *    |     / |     / |     / |
+     *    |   /   |   /   |   /   |
+     *    | /     | /     | /     |
+     *  16,17---18,19---20,21---22,23
+     *    |     / |     / |     / |
+     *    |   /   |   /   |   /   |
+     *    | /     | /     | /     |
+     *  24,25---26,27---28,29---30,31  */
+
+    private function recalcUVs():void
+    {
+        verts[2] = verts[10] = verts[18] = verts[26] = _scale9Grid.x / _bitmapData.width;
+        verts[4] = verts[12] = verts[20] = verts[28] = _scale9Grid.right / _bitmapData.width;
+        verts[9] = verts[11] = verts[13] = verts[15] = _scale9Grid.y / _bitmapData.height;
+        verts[17] = verts[19] = verts[21] = verts[23] = _scale9Grid.bottom / _bitmapData.height;
+    }
+
+    private function recalcVertsScale9():void
+    {
+        if (_width - _scale9Grid.width > _scale9Grid.x)
+        {
+            drawIndexSet = CENTER_COLUMN;
+            verts[2] = verts[10] = verts[18] = verts[26] = _scale9Grid.x;
+            verts[4] = verts[12] = verts[20] = verts[28] = _width - _scale9Grid.width;
+        }
+        else
+        {
+            drawIndexSet = 0;
+            verts[2] = verts[10] = verts[18] = verts[26] =
+            verts[4] = verts[12] = verts[20] = verts[28] =
+                _width * _scale9Grid.x / (_bitmapData.width - _scale9Grid.right);
+        }
+        verts[6] = verts[14] = verts[22] = verts[30] = _width;
+
+        if (_height - _scale9Grid.height > _scale9Grid.y)
+        {
+            drawIndexSet |= CENTER_ROW;
+            verts[9] = verts[11] = verts[13] = verts[15] = _scale9Grid.y;
+            verts[17] = verts[19] = verts[21] = verts[23] = _height - _scale9Grid.height;
+        }
+        else
+        {
+            verts[9] = verts[11] = verts[13] = verts[15] =
+            verts[17] = verts[19] = verts[21] = verts[23] =
+                _height * _scale9Grid.y / (_bitmapData.height - _scale9Grid.bottom);
+        }
+        verts[25] = verts[27] = verts[29] = verts[31] = _height;
+    }
+
+    private function invalidate():void
+    {
+        if (stage) stage.invalidate();
+    }
+
+    private function onAddedToStage(event:Event):void
+    {
+        stage.addEventListener(Event.RENDER, onRender);
+        redraw();
+    }
+
+    private function onRemovedFromStage(event:Event):void
+    {
+        stage.removeEventListener(Event.RENDER, onRender);
+    }
+
+    private function onRender(event:Event):void
+    {
+        redraw();
+    }
+
+    /*    0 ----- 1 ----- 2 ----- 3
+     *    |     / |     / |     / |
+     *    |   /   |   /   |   /   |
+     *    | /     | /     | /     |
+     *    4 ----- 5 ----- 6 ----- 7
+     *    |     / |     / |     / |
+     *    |   /   |   /   |   /   |
+     *    | /     | /     | /     |
+     *    8 ----- 9 ---- 10 ---- 11
+     *    |     / |     / |     / |
+     *    |   /   |   /   |   /   |
+     *    | /     | /     | /     |
+     *   12 ---- 13 ---- 14 ---- 15  */
+
+    private static function get indicesAll():Vector.<int>
+    {
+        if (!_indicesAll)
+        {
+            _indicesAll = Vector.<int>([
+                 0,  4,  1,    4,  1,  5,
+                 1,  5,  2,    5,  2,  6,
+                 2,  6,  3,    6,  3,  7,
+
+                 4,  8,  5,    8,  5,  9,
+                 5,  9,  6,    9,  6, 10,
+                 6, 10,  7,    7, 10, 11,
+
+                 8, 12,  9,   12,  9, 13,
+                 9, 13, 10,   13, 10, 14,
+                10, 14, 11,   14, 11, 15
+            ]);
+            _indicesAll.fixed = true;
+        }
+        return _indicesAll;
+    }
+
+    private static function get indicesNoCenterRow():Vector.<int>
+    {
+        if (!_indicesNoCenterRow)
+        {
+            _indicesNoCenterRow = Vector.<int>([
+                 0,  4,  1,    4,  1,  5,
+                 1,  5,  2,    5,  2,  6,
+                 2,  6,  3,    6,  3,  7,
+
+                 8, 12,  9,   12,  9, 13,
+                 9, 13, 10,   13, 10, 14,
+                10, 14, 11,   14, 11, 15
+            ]);
+            _indicesNoCenterRow.fixed = true;
+        }
+        return _indicesNoCenterRow;
+    }
+
+    private static function get indicesNoCenterColumn():Vector.<int>
+    {
+        if (!_indicesNoCenterColumn)
+        {
+            _indicesNoCenterColumn = Vector.<int>([
+                 0,  4,  1,    4,  1,  5,
+                 2,  6,  3,    6,  3,  7,
+
+                 4,  8,  5,    8,  5,  9,
+                 6, 10,  7,    7, 10, 11,
+
+                 8, 12,  9,   12,  9, 13,
+                10, 14, 11,   14, 11, 15
+            ]);
+            _indicesNoCenterColumn.fixed = true;
+        }
+        return _indicesNoCenterColumn;
+    }
+
+    private static function get indicesCornerPatches():Vector.<int>
+    {
+        if (!_indicesCornerPatches)
+        {
+            _indicesCornerPatches = Vector.<int>([
+                 0,  4,  1,    4,  1,  5,
+                 2,  6,  3,    6,  3,  7,
+
+                 8, 12,  9,   12,  9, 13,
+                10, 14, 11,   14, 11, 15
+            ]);
+            _indicesCornerPatches.fixed = true;
+        }
+        return _indicesCornerPatches;
+    }
+
+    private static function get indicesCorners():Vector.<int>
+    {
+        if (!_indicesCorners)
+        {
+            _indicesCorners = Vector.<int>([
+                 0, 12, 3,  12, 3, 15
+            ]);
+            _indicesCorners.fixed = true;
+        }
+        return _indicesCorners;
+    }
+
+    private static function bitmapsSameSize(a:BitmapData, b:BitmapData):Boolean
+    {
+        return a && b && a.width == b.width && a.height == b.height;
+    }
+}
+}


TDDAIYMI Refactors on CommandFlow - now does after(EventType).executeAll(...)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/eric-stanley/robotlegs-framework.git/'


solving bug on stard the load process;

solving bug on stard the load process;

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


Update SpecialEvent.as

Update SpecialEvent.as

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jerome-desmedt/daelysid.git/'


Removed some legacy jump code.

Removed some legacy jump code.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/c0d3m0nk3y/Konata.git/'


add example using workers to prevent client blocking

git-svn-id: 44dac414ef660a76a1e627c7b7c0e36d248d62e4@29 c2cce57b-6cbb-4450-ba62-5fdab5196ef5

error: pathspec 'src/corsaair/server/spitfire/SimpleSocketServerSelect5.as' did not match any file(s) known to git

--- src/corsaair/server/spitfire/SimpleSocketServerSelect5.as
+++ src/corsaair/server/spitfire/SimpleSocketServerSelect5.as
@@ -0,0 +1,618 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+package corsaair.server.spitfire
+{
+
+    import C.errno.*;
+    import C.arpa.inet.*;
+    import C.netdb.*;
+    import C.netinet.*;
+    import C.sys.socket.*;
+    import C.sys.select.*;
+    import C.stdlib.*;
+    import C.unistd.*;
+
+    import flash.utils.getTimer;
+    import flash.utils.ByteArray;
+    import flash.utils.Dictionary;
+
+    import flash.system.Worker;
+    import flash.system.WorkerDomain;
+    import flash.concurrent.Mutex;
+
+    /**
+     * A simple socket server upgrade 5.
+     *
+     * If you look back at the very first example
+     * you will notcie that at that time we totally ignored
+     * something named fork() in the C source code
+     *
+     * fork() is a very convenient C function in the POSIX world
+     * which allow to create a new process (child process)
+     * that is an exact copy of the calling process (parent process)
+     * see: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html
+     *
+     * in server.c we can see
+     * if (!fork()) { // this is the child process
+     *      close(sockfd); // child doesn't need the listener
+     *      if (send(new_fd, "Hello, world!", 13, 0) == -1)
+     *          perror("send");
+     *      close(new_fd);
+     *      exit(0);
+     *  }
+     *
+     * In Redtamarin we deliberately decided to not support fork()
+     * mainly because it works only with true POSIX systems
+     * like Linux and Mac OS X but fail miserably under Windows
+     * but also because we run our code inse a VM (AVM2)
+     * and we can not as easily copy our process like that.
+     *
+     * But wait we have something as good as fork()
+     * and which work everywhere, something called workers.
+     *
+     * Here how we want tto manage it for now:
+     * var server = new SimpleSocketServerSelect5();
+     *     server.sleepTime = 1000;
+     *
+     *     if( Worker.current.isPrimordial )
+     *     {
+     *         server.main();
+     *     }
+     *     else
+     *     {
+     *         server.registerNewArrival();
+     *     }
+     *
+     * basically, if we are the server we want to run main()
+     * and if we are a client connecting we want to run registerNewArrival()
+     *
+     * But workers and fork() does not work exactly the same
+     * even if a background worker will create a virtual copy of the VM (AVM2)
+     * sharing data works differently.
+     *
+     * The main point is to be able to extract the part thart is blocking forever
+     * outside of the main process.
+     *
+     * Here, our registration is something that can block forever
+     * so for this part we want to run a worker so the worker will block
+     * while our main server will not block.
+     */
+    public class SimpleSocketServerSelect5
+    {
+
+        // the port users will be connecting to
+        public const PORT:String = "3490";
+
+        // how many pending connections queue will hold
+        public const BACKLOG:uint = 10;
+
+        private var _address:Array;   // list of addresses
+        private var _info:addrinfo;   // server selected address
+
+        private var _run:Boolean;     // run the server loop
+
+
+        public var serverfd:int;      // server socket descriptor
+        public var selected:int;      // selected socket descriptor
+        public var connections:Array; // list of socket descriptor
+
+        public var clients:Dictionary; // list of clients informations
+        public var sleepTime:uint; // time is expressed in milliseconds
+
+        private var _mutex:Mutex;
+        public var sharedData:ByteArray;
+
+        public function SimpleSocketServerSelect5()
+        {
+            super();
+
+            _address    = [];
+            _info       = null;
+            _run        = true;
+            serverfd    = -1;
+            selected    = -1;
+            connections = [];
+            clients     = new Dictionary();
+            sleepTime   = 0; // 0 means "do not sleep"
+            sharedData  = new ByteArray();
+            sharedData.shareable = true;
+        }
+
+        private function _getBindingSocket():int
+        {
+
+            var hints:addrinfo = new addrinfo();
+                hints.ai_family   = AF_UNSPEC;
+                hints.ai_socktype = SOCK_STREAM;
+                hints.ai_flags    = AI_PASSIVE; // indicates we want to bind
+
+            var info:addrinfo;
+
+            var eaierr:CEAIrror = new CEAIrror();
+            var addrlist:Array  = getaddrinfo( null, PORT, hints, eaierr );
+
+            if( !addrlist )
+            {
+                throw eaierr;
+            }
+
+            var sockfd:int;
+            var option:int;
+            var bound:int;
+
+            var i:uint;
+            var len:uint = addrlist.length;
+            for( i = 0; i < len; i++ )
+            {
+                info = addrlist[i];
+
+                sockfd = socket( info.ai_family, info.ai_socktype, info.ai_protocol );
+                if( sockfd == -1 )
+                {
+                    trace( "selectserver: socket" )
+                    trace( new CError( "", errno ) );
+                    continue;
+                }
+
+                option = setsockopt( sockfd, SOL_SOCKET, SO_REUSEADDR, 1 );
+                if( option == -1 )
+                {
+                    trace( "setsockopt" );
+                    trace( new CError( "", errno ) );
+                    exit( 1 );
+                }
+
+                bound = bind( sockfd, info.ai_addr );
+                if( bound == -1 )
+                {
+                    close( sockfd );
+                    trace( "selectserver: bind" );
+                    trace( new CError( "", errno ) );
+                    continue;
+                }
+
+                // we save the selected addrinfo
+                _info = info;
+                break;
+            }
+
+            // we merge the addresses found into our list of address
+            _address = _address.concat( addrlist );
+
+            // we return the socket descriptor
+            return sockfd;
+        }
+
+        private function _loopConnections():void
+        {
+            var i:uint;
+            var len:uint = connections.length;
+
+            for( i = 0; i < len; i++ )
+            {
+                selected = connections[i];
+
+                if( isReadable( selected ) )
+                {
+
+                    if( selected == serverfd )
+                    {
+                        _handleNewConnections();
+                    }
+                    else
+                    {
+                        _handleClientData();
+                    }
+
+                }
+
+            }
+
+        }
+
+        private function _handleNewConnections():void
+        {
+            // handle new connections
+
+            var new_fd:int;  // newly accept()ed socket descriptor
+            var client_addr:sockaddr_in = new sockaddr_in();
+
+            new_fd = accept( serverfd, client_addr );
+
+            if( new_fd == -1 )
+            {
+                trace( "accept" );
+                trace( new CError( "", errno ) );
+            }
+            else
+            {
+                _addClient( new_fd );
+
+                var s:String = inet_ntop( client_addr.sin_family, client_addr );
+                trace( "selectserver: new connection from " + s  + ", socket " + new_fd );
+
+                var msg_out:String = "Hello, world!\n";
+                var bytes_out:ByteArray = new ByteArray();
+                    bytes_out.writeUTFBytes( msg_out );
+                    bytes_out.position = 0;
+
+                var sent:int = send( new_fd, bytes_out );
+                if( sent == -1 )
+                {
+                    trace( "send" );
+                    trace( new CError( "", errno ) );
+                }
+                else
+                {
+                    trace( "sent " + sent + " bytes to the client " + new_fd );
+                }
+
+
+                //registerNewArrival( new_fd );
+
+                /* Note:
+                   It's here that we split the process
+                   by creating a worker
+                */
+                trace( "setup worker and start it" );
+                var newArrival:Worker = WorkerDomain.current.createWorkerFromPrimordial();
+                    newArrival.setSharedProperty( "clientfd", new_fd );
+                    newArrival.setSharedProperty( "mutex", _mutex );
+                    newArrival.start();
+            }
+        }
+
+        private function _handleClientData():void
+        {
+            // handle data from a client
+
+            var msg_in:String;
+            var bytes_in:ByteArray = new ByteArray();
+
+            var received:int = recv( selected, bytes_in );
+            if( received <= 0 )
+            {
+                // got error or connection closed by client
+                if( received == 0 )
+                {
+                    // connection closed
+                    trace( "selectserver: socket " + selected + " hung up" );
+                }
+                else
+                {
+                    trace( "recv" );
+                    trace( new CError( "", errno ) );
+                }
+
+                close( selected ); // bye!
+
+                // remove from master set
+                _removeClient( selected );
+            }
+            else
+            {
+                // we got some data from a client
+                trace( "received " + received + " bytes from client " + selected );
+                bytes_in.position = 0;
+                msg_in = bytes_in.readUTFBytes( bytes_in.length );
+                msg_in = msg_in.split( "\n" ).join( "" );
+
+                if( clients[selected].nickname != "" )
+                {
+                    trace( clients[selected].nickname + " : " + msg_in );
+                }
+                else
+                {
+                    trace( selected + " : " + msg_in );
+                }
+
+
+                if( msg_in == "shutdown" )
+                {
+                    trace( "selectserver: received 'shutdown' command" );
+                    _run = false;
+                }
+            }
+        }
+
+        private function _addClient( sd:int, name:String = "" ):void
+        {
+            connections.push( sd );
+            clients[ sd ] = { nickname: name };
+        }
+
+        private function _removeClient( sd:int ):void
+        {
+            if( sd == serverfd )
+            {
+                return;
+            }
+
+            var i:uint;
+            var len:uint = connections.length;
+            var desc:int;
+            for( i = 0; i < len; i++ )
+            {
+                desc = connections[i];
+                if( desc == sd )
+                {
+                    connections.splice( i, 1 );
+                    delete clients[ sd ];
+                }
+            }
+        }
+
+        private function _closeAndRemoveAllClients( removeServer:Boolean = false ):void
+        {
+            var i:uint;
+            var desc:int;
+            for( i = 0; i < connections.length; i++ )
+            {
+                desc = connections[i];
+
+                if( !removeServer && (desc == serverfd) )
+                {
+                    continue;
+                }
+
+                if( clients[desc].nickname != "" )
+                {
+                    trace( "selectserver: terminate " + clients[desc].nickname + " (" + desc + ")" );
+                }
+                else
+                {
+                    trace( "selectserver: terminate " + desc );
+                }
+
+                close( desc );              // close the socket
+                connections.splice( i, 1 ); // remove the socket from the connections list
+                delete clients[desc];       // delete the socket key for the clients data
+                i = 0; //rewind
+            }
+        }
+
+        public function sharedTrace( message:String ):void
+        {
+            _mutex.lock();
+            trace( message );
+            _mutex.unlock();
+        }
+
+        public function getPrimordial():Worker
+        {
+            var wdomain:WorkerDomain = WorkerDomain.current;
+            var workers:Vector.<Worker> = wdomain.listWorkers();
+            var worker:Worker;
+            for( var i:uint = 0; i < workers.length; i++ )
+            {
+                worker = workers[i];
+                if( worker.isPrimordial )
+                {
+                    return worker;
+                }
+            }
+
+            return null;
+        }
+
+        /**
+         * Register a new connected client.
+         */
+        public function registerNewArrival():void
+        {
+            /* Note:
+               Once we get our worker context
+               we can obtain properties setup by the parent
+               with getSharedProperty()
+
+               be carefull here
+               we use 2 workers
+               - Worker.current: the current child or background worker
+               - primordial: the parent or the primordial worker
+            */
+            var cworker:Worker = Worker.current;
+            var primordial:Worker = getPrimordial();
+            var clientfd:int  = cworker.getSharedProperty( "clientfd" );
+
+            trace( "worker started" );
+            trace( "worker.state = " + cworker.state );
+            trace( "clientfd = " + clientfd );
+
+            var msg_welcome:String = "What is your nickname?\n";
+            var bytes_welcome:ByteArray = new ByteArray();
+                bytes_welcome.writeUTFBytes( msg_welcome );
+                bytes_welcome.position = 0;
+            var welcome:int = send( clientfd, bytes_welcome );
+            if( welcome == -1 )
+            {
+                trace( "selectserver: welcome sent" );
+                trace( new CError( "", errno ) );
+                close( clientfd );
+                _removeClient( clientfd );
+                return;
+            }
+
+            trace( "selectserver: wait for nickname ..." );
+            var bytes_answer:ByteArray = new ByteArray();
+            var nickname:String;
+            var n:int;
+
+            /* Note:
+               we can still do a timeout
+               but this time it runs isolated in a worker
+               so let make it big like 60 seconds
+            */
+            var timeA:uint = getTimer();
+            var timeB:uint;
+            var diff:uint  = 0;
+            var timeout:uint = 60 * 1000; // 60 sec timeout
+            while( true )
+            {
+                timeB = getTimer();
+                diff  = timeB - timeA;
+                if( diff > timeout )
+                {
+                    trace( "selectserver: socket " + clientfd + " timed out" );
+                    var bytes_bye:ByteArray = new ByteArray();
+                        bytes_bye.writeUTFBytes( "You have been disconnected, bye\n" );
+                    send( clientfd, bytes_bye );
+                    close( clientfd );
+                    _removeClient( clientfd );
+                    break;
+                }
+
+                // only process if there is data in the pipe
+                if( isReadable(clientfd) )
+                {
+
+                    n = recv( clientfd, bytes_answer );
+                    if( n <= 0 )
+                    {
+                        // got error or connection closed by client
+                        if( n == 0 )
+                        {
+                            // connection closed
+                            trace( "selectserver: socket " + clientfd + " hung up" );
+                        }
+                        else
+                        {
+                            trace( "recv" );
+                            trace( new CError( "", errno ) );
+                        }
+
+                        close( clientfd );
+                        _removeClient( clientfd );
+                        break;
+                    }
+                    else
+                    {
+                        bytes_answer.position = 0;
+                        nickname = bytes_answer.readUTFBytes( n );
+                        nickname = nickname.split( "\n" ).join( "" );
+
+                        /* Note:
+                           We can not use
+                           clients[ clientfd ].nickname = nickname;
+                           because the current var 'clients' is handled by the server
+                           but we can use a little trick to set a shared property on the
+                           primoridal worker (eg. the server)
+                        */
+                        primordial.setSharedProperty( "nickname" + clientfd  , nickname );
+
+                        trace( "selectserver: socket " + clientfd + " registered as " + nickname );
+                        break;
+                    }
+
+                }
+            }
+
+            trace( "selectserver: terminating worker" );
+            var terminated:Boolean = cworker.terminate();
+            trace( "selectserver: terminated = " + terminated );
+        }
+
+        private function _checkRegistration():void
+        {
+            /* Note:
+               This can be run only from the server context
+               because we need to access the 'childs' property
+
+               and basically we use a stupid trick
+               we loop trough all the connections
+               to obtai nthe socket descriptor (we use it as an ID)
+               and then we check the primordial worker shared property
+               to see if a child has defined a nickname there
+
+               eg.
+               Server
+                 |_ childs[7].nickname = ""
+                => worker:
+                  primordial.setSharedProperty( "nickname7", "the nickname chosen" );
+                => server loop
+                  nickname = primordial.getSharedProperty( "nickname7" )
+                  if not empty
+                  childs[7].nickname = nickname
+
+               yes, we have no events or promises and it is a bit of a pain
+               to exchange data with the workers
+            */
+            var primordial:Worker = Worker.current;
+
+            for( var i:uint = 0; i < connections.length; i++ )
+            {
+                var clientfd:uint = connections[i];
+                if( clients[clientfd].nickname == "" )
+                {
+                    var nickname:String = primordial.getSharedProperty( "nickname" + clientfd );
+                    if( (nickname != undefined) &&
+                        (nickname != 'null') &&
+                        (nickname != "") )
+                    {
+                        clients[clientfd].nickname = nickname;
+                    }
+                }
+            }
+
+        }
+
+        public function main():void
+        {
+            _mutex = new Mutex();
+
+            serverfd = _getBindingSocket();
+
+            if( _info == null )
+            {
+                trace( "selectserver: failed to bind" );
+                exit( 1 );
+            }
+
+            var listening:int = listen( serverfd, BACKLOG );
+            if( listening == -1 )
+            {
+                trace( "listen" );
+                trace( new CError( "", errno ) );
+                exit( 1 );
+            }
+
+            trace( "selectserver: waiting for connections..." );
+
+            // the server is always the first client to be added to the connections
+            _addClient( serverfd, "server" );
+            trace( "selectserver: server on socket " + serverfd );
+
+            var frame:uint = 0;
+
+            // main server loop
+            while( _run )
+            {
+                //trace( "selectserver: main loop" );
+                trace( "selectserver: main loop " + frame++ );
+                trace( "connections = " + connections.length );
+
+                // check for new registrations
+                _checkRegistration();
+
+                _loopConnections();
+
+                if( sleepTime > 0 )
+                {
+                    sleep( sleepTime );
+                }
+            }
+
+            trace( "selectserver: connections left [" + connections + "]" );
+            _closeAndRemoveAllClients();
+
+            trace( "shutting down server" );
+            shutdown( serverfd, SHUT_RDWR );
+            close( serverfd );
+
+            exit( 0 );
+
+        }
+
+    }
+}


Add AVM2 test case.

Add AVM2 test case.

error: pathspec 'src/avm2/tests/regress/correctness/pass/compression.as' did not match any file(s) known to git

--- src/avm2/tests/regress/correctness/pass/compression.as
+++ src/avm2/tests/regress/correctness/pass/compression.as
@@ -0,0 +1,11 @@
+import flash.utils.ByteArray;
+
+var data = new ByteArray();
+
+data.writeUTFBytes('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc hendrerit, risus vel dapibus hendrerit, augue ipsum adipiscing lorem, quis orci aliquam.');
+trace(data.length);
+data.deflate();
+trace(data.length);
+data.inflate();
+trace(data.length);
+trace(data.readUTFBytes(150));


Riktig versjon tag.

Riktig versjon tag.


Fix on Soldier.as when pawn is promoted.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rlowke/lowkemedia.git/'


add utility function to help core.version convert from a string

error: pathspec 'src/com/google/analytics/utils/getVersionFromString.as' did not match any file(s) known to git

--- src/com/google/analytics/utils/getVersionFromString.as
+++ src/com/google/analytics/utils/getVersionFromString.as
@@ -0,0 +1,29 @@
+package com.google.analytics.utils
+{
+    import core.version;
+
+    public function getVersionFromString( v:String, separator:String = "." ):version
+    {
+        var ver:version = new version();
+
+        if( (v == "") || (v == null) )
+        {
+            return ver;
+        }
+
+        if( v.indexOf( separator ) > -1 )
+        {
+            var values:Array = v.split( separator );
+            ver.major    = parseInt( values[0] );
+            ver.minor    = parseInt( values[1] );
+            ver.build    = parseInt( values[2] );
+            ver.revision = parseInt( values[3] );
+        }
+        else
+        {
+            ver.major = parseInt( v );
+        }
+
+        return ver;
+    }
+}


Added support for Facebook Chat with the X-FACEBOOK-PLATFORM authentication mechanism.

git-svn-id: c197267f952b24206666de142881703007ca05d5@11904 b35dd754-fafc-0310-a699-88a17e54d16e

error: pathspec 'src/org/igniterealtime/xiff/auth/XFacebookPlatform.as' did not match any file(s) known to git

--- src/org/igniterealtime/xiff/auth/XFacebookPlatform.as
+++ src/org/igniterealtime/xiff/auth/XFacebookPlatform.as
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2003-2009 Igniterealtime Community Contributors
+ *
+ *     Daniel Henninger
+ *     Derrick Grigg <dgrigg@rogers.com>
+ *     Juga Paazmaya <olavic@gmail.com>
+ *     Nick Velloff <nick.velloff@gmail.com>
+ *     Sean Treadway <seant@oncotype.dk>
+ *     Sean Voisen <sean@voisen.org>
+ *     Mark Walters <mark@yourpalmark.com>
+ *
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.igniterealtime.xiff.auth
+{
+	import com.hurlant.crypto.hash.MD5;
+	import com.hurlant.util.Base64;
+	import com.hurlant.util.Hex;
+
+	import flash.utils.ByteArray;
+	import flash.utils.Dictionary;
+
+	import org.igniterealtime.xiff.core.XMPPConnection;
+
+	/**
+	 * This class provides SASL authentication using the X-FACEBOOK-PLATFORM mechanism.
+	 */
+	public class XFacebookPlatform extends SASLAuth
+	{
+		public static const MECHANISM:String = "X-FACEBOOK-PLATFORM";
+
+		public static const NS:String = "urn:ietf:params:xml:ns:xmpp-sasl";
+
+		public static var fb_api_key:String;
+		public static var fb_secret:String;
+		public static var fb_session_key:String;
+
+		/**
+		 * Creates a new XFacebookPlatform authentication object.
+		 *
+		 * @param	connection A reference to the XMPPConnection instance in use.
+		 */
+		public function XFacebookPlatform( connection:XMPPConnection )
+		{
+			req.setNamespace( XFacebookPlatform.NS );
+			req.@mechanism = XFacebookPlatform.MECHANISM;
+
+			response.setNamespace( XFacebookPlatform.NS );
+
+			stage = 0;
+		}
+
+		public static function setFacebookSessionValues( api_key:String, secret:String, session_key:String ):void
+		{
+			fb_api_key = api_key;
+			fb_secret = secret;
+			fb_session_key = session_key;
+		}
+
+		/**
+		 * Construct the signature as described by Facebook api documentation.
+		 */
+		public static function formatSig( map:Dictionary ):String
+		{
+			var md5:MD5 = new MD5();
+
+			var a:Array = [];
+
+			for( var p:String in map )
+			{
+				var arg:* = map[ p ];
+
+				a.push( p + '=' + arg.toString() );
+			}
+
+			a.sort();
+
+			var s:String = a.join( '' );
+
+			if( fb_secret != null )
+			{
+				s += fb_secret;
+			}
+
+			var sig:ByteArray = new ByteArray();
+			sig.writeUTFBytes( s );
+			sig = md5.hash( sig );
+
+			return Hex.fromArray( sig );
+		}
+
+		/**
+		 * Called when a challenge to this authentication is received.
+		 *
+		 * @param	stage The current stage in the authentication process.
+		 * @param	challenge The XML of the actual authentication challenge.
+		 *
+		 * @return The XML response to the challenge.
+		 */
+		override public function handleChallenge( stage:int, challenge:XML ):XML
+		{
+			var decodedChallenge:String = Base64.decode( challenge );
+			var challengeKeyValuePairs:Array = decodedChallenge.split( "&" );
+			var challengeMap:Dictionary = new Dictionary();
+			for each( var keyValuePair:String in challengeKeyValuePairs )
+			{
+				var keyValue:Array = keyValuePair.split( "=" );
+				challengeMap[ keyValue[ 0 ] ] = keyValue[ 1 ];
+			}
+
+			var responseMap:Dictionary = new Dictionary();
+			responseMap.api_key = fb_api_key;
+			responseMap.call_id = new Date().time;
+			responseMap.method = challengeMap.method;
+			responseMap.nonce = challengeMap.nonce;
+			responseMap.session_key = fb_session_key;
+			responseMap.v = "1.0";
+			responseMap.sig = formatSig( responseMap );
+
+			var challengeResponse:String = "api_key=" + responseMap.api_key;
+			challengeResponse += "&call_id=" + responseMap.call_id;
+			challengeResponse += "&method=" + responseMap.method;
+			challengeResponse += "&nonce=" + responseMap.nonce;
+			challengeResponse += "&session_key=" + responseMap.session_key;
+			challengeResponse += "&sig=" + responseMap.sig;
+			challengeResponse += "&v=" + responseMap.v;
+			challengeResponse = Base64.encode( challengeResponse );
+
+			var resp:XML = response;
+			resp.setChildren( challengeResponse );
+			return resp;
+		}
+
+		/**
+		 * Called when a response to this authentication is received.
+		 *
+		 * @param	stage The current stage in the authentication process.
+		 * @param	response The XML of the actual authentication response.
+		 *
+		 * @return An object specifying the current state of the authentication.
+		 */
+		override public function handleResponse( stage:int, response:XML ):Object
+		{
+			var success:Boolean = response.localName() == "success";
+			return {
+				authComplete: true,
+				authSuccess: success,
+				authStage: stage++
+			};
+		}
+	}
+}


Mapping two events to executeAll or separately to execute works the same


Branch merge

Branch merge

error: pathspec 'as3/Apparat.Library.AS3/src/apparat/inline/Inlined.as' did not match any file(s) known to git

--- as3/Apparat.Library.AS3/src/apparat/inline/Inlined.as
+++ as3/Apparat.Library.AS3/src/apparat/inline/Inlined.as
@@ -0,0 +1,24 @@
+/*
+ * This file is part of Apparat.
+ *
+ * Apparat is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Apparat is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Apparat. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Copyright (C) 2010 Joa Ebert
+ * http://www.joa-ebert.com/
+ *
+ */
+
+package apparat.inline {
+	public class Inlined {}
+}


implement test cases for BasePreloaderTest

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/MerlinDS/utils.git/'


EdgeList implements IDisposable

EdgeList implements IDisposable

--- src/com/nodename/Delaunay/EdgeList.as
+++ src/com/nodename/Delaunay/EdgeList.as
@@ -1,9 +1,10 @@
 package com.nodename.Delaunay
 {
-	import __AS3__.vec.Vector;
+	import com.nodename.utils.IDisposable;
+
 	import flash.geom.Point;

-	internal final class EdgeList
+	internal final class EdgeList implements IDisposable
 	{
 		private var _deltax:Number;
 		private var _xmin:Number;


fix so that Boats can't capture King, Elephant, or Knight


HooksProcessor was repeating verification for non-Hook classes unnecessarily. (Similar to previous commit for GuardsProcessor).


added CombinedColumn

added CombinedColumn

error: pathspec 'WeaveData/src/weave/data/AttributeColumns/CombinedColumn.as' did not match any file(s) known to git

--- WeaveData/src/weave/data/AttributeColumns/CombinedColumn.as
+++ WeaveData/src/weave/data/AttributeColumns/CombinedColumn.as
@@ -0,0 +1,117 @@
+/*
+    Weave (Web-based Analysis and Visualization Environment)
+    Copyright (C) 2008-2011 University of Massachusetts Lowell
+
+    This file is a part of Weave.
+
+    Weave is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License, Version 3,
+    as published by the Free Software Foundation.
+
+    Weave is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Weave.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package weave.data.AttributeColumns
+{
+	import weave.api.core.ILinkableHashMap;
+	import weave.api.data.IAttributeColumn;
+	import weave.api.data.IKeySet;
+	import weave.api.data.IQualifiedKey;
+	import weave.api.newLinkableChild;
+	import weave.api.registerLinkableChild;
+	import weave.core.CallbackCollection;
+	import weave.core.LinkableBoolean;
+	import weave.core.LinkableHashMap;
+	import weave.data.KeySets.KeySetUnion;
+	import weave.utils.ColumnUtils;
+
+	/**
+	 * This provides a wrapper for a dynamic column, and allows new properties to be added.
+	 * The purpose of this class is to provide a base for extending DynamicColumn.
+	 *
+	 * @author adufilie
+	 */
+	public class CombinedColumn extends CallbackCollection implements IAttributeColumn
+	{
+		public function CombinedColumn()
+		{
+			registerLinkableChild(this, keySetUnion.busyStatus);
+			columns.childListCallbacks.addImmediateCallback(this, handleColumnsList);
+		}
+
+		public const useFirstColumnMetadata:LinkableBoolean = registerLinkableChild(this, new LinkableBoolean(true));
+		public const columns:ILinkableHashMap = registerLinkableChild(this, new LinkableHashMap(IAttributeColumn));
+		private const keySetUnion:KeySetUnion = newLinkableChild(this, KeySetUnion);
+
+		private var _columnsArray:Array = [];
+
+		private function handleColumnsList():void
+		{
+			_columnsArray = columns.getObjects();
+			if (columns.childListCallbacks.lastObjectAdded)
+				keySetUnion.addKeySetDependency(columns.childListCallbacks.lastObjectAdded as IKeySet);
+		}
+
+		/************************************
+		 * Begin IAttributeColumn interface
+		 ************************************/
+
+		public function getMetadata(propertyName:String):String
+		{
+			if (useFirstColumnMetadata.value)
+			{
+				var firstColumn:IAttributeColumn = _columnsArray[0] as IAttributeColumn;
+				return firstColumn ? firstColumn.getMetadata(propertyName) : null;
+			}
+			return ColumnUtils.getCommonMetadata(_columnsArray, propertyName);
+		}
+
+		public function getMetadataPropertyNames():Array
+		{
+			// TEMPORARY SOLUTION
+			var firstColumn:IAttributeColumn = _columnsArray[0] as IAttributeColumn;
+			return firstColumn ? firstColumn.getMetadataPropertyNames() : null;
+		}
+
+		/**
+		 * @return the keys associated with this column.
+		 */
+		public function get keys():Array
+		{
+			return keySetUnion.keys;
+		}
+
+		/**
+		 * @param key A key to test.
+		 * @return true if the key exists in this IKeySet.
+		 */
+		public function containsKey(key:IQualifiedKey):Boolean
+		{
+			return keySetUnion.containsKey(key);
+		}
+
+		/**
+		 * getValueFromKey
+		 * @param key A key of the type specified by keyType.
+		 * @return The value associated with the given key.
+		 */
+		public function getValueFromKey(key:IQualifiedKey, dataType:Class = null):*
+		{
+			for each (var column:IAttributeColumn in _columnsArray)
+				if (column.containsKey(key))
+					return column.getValueFromKey(key, dataType);
+			return dataType == String ? '' : undefined;
+		}
+
+		public function toString():String
+		{
+			return debugId(this) + '(' + ColumnUtils.getTitle(this) + ')';
+		}
+	}
+}


fix import line

fix import line


add basic select server

add basic select server

git-svn-id: 44dac414ef660a76a1e627c7b7c0e36d248d62e4@17 c2cce57b-6cbb-4450-ba62-5fdab5196ef5

error: pathspec 'src/corsaair/server/spitfire/SimpleSocketServerSelect.as' did not match any file(s) known to git

--- src/corsaair/server/spitfire/SimpleSocketServerSelect.as
+++ src/corsaair/server/spitfire/SimpleSocketServerSelect.as
@@ -0,0 +1,426 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+package corsaair.server.spitfire
+{
+
+    import C.errno.*;
+    import C.arpa.inet.*;
+    import C.netdb.*;
+    import C.netinet.*;
+    import C.sys.socket.*;
+    import C.sys.select.*;
+    import C.stdlib.*;
+    import C.unistd.*;
+
+    import flash.utils.ByteArray;
+
+
+    /**
+     * A simple socket server upgrade 1.
+     *
+     * This time we do use a loop to listen and interact with multiple clients.
+     *
+     * @see http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html#select a cheezy multiperson chat server
+     */
+    public class SimpleSocketServerSelect
+    {
+
+        // the port users will be connecting to
+        public const PORT:String = "3490";
+
+        // how many pending connections queue will hold
+        public const BACKLOG:uint = 10;
+
+        public function SimpleSocketServerSelect()
+        {
+            super();
+        }
+
+        public function showAddressInfo1():void
+        {
+            var hints:addrinfo = new addrinfo();
+            var info:addrinfo;
+
+            /* Note:
+               because we want to bind
+               eg. ai_flags = AI_PASSIVE
+               it will automatically use the wildcard address 0.0.0.0
+               which means you're binding to every IP address on your machine
+            */
+            hints.ai_family   = AF_UNSPEC;
+            hints.ai_socktype = SOCK_STREAM;
+            hints.ai_flags    = AI_PASSIVE; // indicate we want to bind
+
+            var eaierr:CEAIrror = new CEAIrror();
+            var addrlist:Array  = getaddrinfo( null, "http", hints, eaierr );
+
+            if( !addrlist )
+            {
+                throw eaierr;
+            }
+
+            trace( "found " + addrlist.length + " addresses" );
+            for( var i:uint = 0; i < addrlist.length; i++ )
+            {
+                info = addrlist[i];
+                trace( "[" + i + "] = " + inet_ntop( info.ai_family, info.ai_addr ) );
+            }
+        }
+
+        public function showAddressInfo2():void
+        {
+            var hints:addrinfo = new addrinfo();
+            var info:addrinfo;
+
+            /* Note:
+               Without ai_flags = AI_PASSIVE
+               the first local address will be the loopback
+               eg. 127.0.0.1
+            */
+            hints.ai_family   = AF_UNSPEC;
+            hints.ai_socktype = SOCK_STREAM;
+
+            var eaierr:CEAIrror = new CEAIrror();
+            var addrlist:Array  = getaddrinfo( null, "http", hints, eaierr );
+
+            if( !addrlist )
+            {
+                throw eaierr;
+            }
+
+            trace( "found " + addrlist.length + " addresses" );
+            for( var i:uint = 0; i < addrlist.length; i++ )
+            {
+                info = addrlist[i];
+                trace( "[" + i + "] = " + inet_ntop( info.ai_family, info.ai_addr ) );
+            }
+        }
+
+        public function showAddressInfo3( hostname:String = "" ):void
+        {
+            /* Note:
+               gethostname() will obtain your local hostname
+               and use the IP address used on your local network
+               for ex: 192.168.0.xyz
+
+               if you pass a custom hostname like "www.as3lang.org"
+               it will resolve to the IP address of that remote hostname
+
+               it can also return many IP addresses depending on
+               the remote hostname configuration, for ex: with something
+               like cloudlfare it can  returns 2 or more addresses
+               etc.
+            */
+            if( hostname == "" )
+            {
+                hostname = gethostname();
+            }
+
+            trace( "hostname = " + hostname );
+
+            var hints:addrinfo = new addrinfo();
+            var info:addrinfo;
+
+            hints.ai_family   = AF_UNSPEC;
+            hints.ai_socktype = SOCK_STREAM;
+
+            var eaierr:CEAIrror = new CEAIrror();
+            var addrlist:Array  = getaddrinfo( hostname, "http", hints, eaierr );
+
+            if( !addrlist )
+            {
+                throw eaierr;
+            }
+
+            trace( "found " + addrlist.length + " addresses" );
+            for( var i:uint = 0; i < addrlist.length; i++ )
+            {
+                info = addrlist[i];
+                trace( "[" + i + "] = " + inet_ntop( info.ai_family, info.ai_addr ) );
+            }
+        }
+
+        public function main():void
+        {
+            var sockfd:int; // listening socket descriptor
+
+            var new_fd:int;  // newly accept()ed socket descriptor
+
+            var hints:addrinfo = new addrinfo();
+            var servinfo:addrinfo;
+
+            hints.ai_family   = AF_UNSPEC;
+            hints.ai_socktype = SOCK_STREAM;
+            hints.ai_flags    = AI_PASSIVE; // use my IP
+
+            var eaierr:CEAIrror = new CEAIrror();
+            var addrlist:Array  = getaddrinfo( null, PORT, hints, eaierr );
+
+            if( !addrlist )
+            {
+                throw eaierr;
+            }
+
+            var option:int;
+            var bound:int;
+
+            // loop through all the results and bind to the first we can
+            for( var i:uint = 0; i < addrlist.length; i++ )
+            {
+                servinfo = addrlist[i];
+
+                sockfd = socket( servinfo.ai_family, servinfo.ai_socktype, servinfo.ai_protocol );
+                if( sockfd == -1 )
+                {
+                    trace( "selectserver: socket" )
+                    trace( new CError( "", errno ) );
+                    continue;
+                }
+
+                option = setsockopt( sockfd, SOL_SOCKET, SO_REUSEADDR, 1 );
+                if( option == -1 )
+                {
+                    trace( "setsockopt" );
+                    trace( new CError( "", errno ) );
+                    exit( 1 );
+                }
+
+                bound = bind( sockfd, servinfo.ai_addr );
+                if( bound == -1 )
+                {
+                    close( sockfd );
+                    trace( "selectserver: bind" );
+                    trace( new CError( "", errno ) );
+                    continue;
+                }
+
+                break;
+            }
+
+            if( servinfo == null )
+            {
+                trace( "selectserver: failed to bind" );
+                exit( 1 );
+            }
+
+            var listening:int = listen( sockfd, BACKLOG );
+            if( listening == -1 )
+            {
+                trace( "listen" );
+                trace( new CError( "", errno ) );
+                exit( 1 );
+            }
+
+
+            trace( "selectserver: waiting for connections..." );
+
+            /* Note:
+               so what is a select() server exactly ?
+
+               it is simple
+               - you use 'fd_set' to delcare sets of file descriptor (like an Array)
+               - you use FD_SOMETHING macros to read/write/clear data from those sets
+                 FD_ZERO to reset a 'fd_set'
+                 FD_ISSET to know if a socket descriptor is set
+                 FD_SET to set a socket descriptor into a set
+                 FD_CLR to remove a socket descriptor from a set
+               - then you use the function select()
+                 to loop trough all those sets
+
+               And you know what, I messed up the implementation of select()
+               "as is" it does not work or half-work, ok my bad
+
+               but wait ...
+               a 'fd_set' is like an array so you know what
+               it's pretty simple to do like select() without select()
+               simply put
+               - add each new socket descriptor into an array
+               - loop trough the array
+               - detect if the socket is readable
+
+               humm how to detect if a socket is readable ?
+               well in C.sys.select.* you can find 3 functions
+               isReadable()    - Test if a socket is ready for reading.
+               isWritable()    - Test if a socket is ready for writing.
+               isExceptional() - Test if a socket has an exceptional condition pending.
+               and those are working :)
+               (long sotry short strangely under the hood they alos use 'fd_set' but in
+               a very simple stupid way that works)
+            */
+
+
+            // reset the list
+            var connections:Array = [];
+
+            // add the listener to the master set
+            connections.push( sockfd );
+            trace( "selectserver: server on socket " + sockfd );
+
+            var run:Boolean = true;
+
+            /* Note:
+               it can be a for(;;), a while(1), a while(true), etc.
+               but yes you get it, here we need an infinite loop
+
+               no worries it's Redtamarin, not Flash/AIR
+               we can loop forever it will not cause a script timeout
+            */
+            // main loop
+            for(;;)
+            {
+
+            	if( !run )
+            	{
+            		break;
+            	}
+
+                // run through the existing connections looking for data to read
+                for( var j:uint = 0; j < connections.length; j++ )
+                {
+                    //trace( "selectserver: selecting socket " + connections[j] );
+
+                    /* Note:
+                       if the socket descriptor is readable
+                       then we do our work
+
+                       ATTENTION
+                       in 'connections' you have both the server and all the clients
+                       - for the server
+                         being readable mean someone try to connect to the server
+                         and if no one try to connect then the server is not readable
+                       - for the client
+                         being readable mean the client try to send data to the server
+                         and if the client do nto send data then it is not readable
+
+                       so here the loop works like
+                       - loop trough all the socket descriptor
+                       - only do work if there is osmethign to read
+                         - if server, create a new connection
+                         - if client, read the client data
+                       - otherwise keep looping
+                    */
+                    // we got one!!
+                    if( isReadable( connections[j] ) )
+                    {
+                        // the server
+                        if( connections[j] == sockfd )
+                        {
+                            // handle new connections
+                            var client_addr:sockaddr_in = new sockaddr_in();
+                            new_fd = accept( sockfd, client_addr );
+                            if( new_fd == -1 )
+                            {
+                                trace( "accept" );
+                                trace( new CError( "", errno ) );
+                            }
+                            else
+                            {
+                                // add to master set
+                                connections.push( new_fd );
+
+                                // keep track of the max
+                                /* Note:
+                                   the array index does that for us
+                                */
+
+                                var s:String = inet_ntop( client_addr.sin_family, client_addr );
+                                trace( "selectserver: new connection from " + s  + ", socket " + new_fd );
+
+                                var msg_out:String = "Hello, world!\n";
+                                var bytes_out:ByteArray = new ByteArray();
+                                    bytes_out.writeUTFBytes( msg_out );
+                                    bytes_out.position = 0;
+
+                                var sent:int = send( new_fd, bytes_out );
+                                if( sent == -1 )
+                                {
+                                    trace( "send" );
+                                    trace( new CError( "", errno ) );
+                                }
+                                else
+                                {
+                                    trace( "sent " + sent + " bytes to the client " + new_fd );
+                                }
+
+                            }
+
+                        }
+                        else
+                        {
+                            // handle data from a client
+                            var msg_in:String;
+                            var bytes_in:ByteArray = new ByteArray();
+
+                            var received:int = recv( connections[j], bytes_in );
+                            if( received <= 0 )
+                            {
+                                // got error or connection closed by client
+                                if( received == 0 )
+                                {
+                                    // connection closed
+                                    trace( "selectserver: socket " + connections[j] + " hung up" );
+                                }
+                                else
+                                {
+                                    trace( "recv" );
+                                    trace( new CError( "", errno ) );
+                                }
+
+                                close( connections[j] ); // bye!
+
+                                // remove from master set
+                                connections.splice( j, 1 );
+                            }
+                            else
+                            {
+                                // we got some data from a client
+                                trace( "received " + received + " bytes from client " + connections[j] );
+                                bytes_in.position = 0;
+                                msg_in = bytes_in.readUTFBytes( bytes_in.length );
+                                msg_in = msg_in.split( "\n" ).join( "" );
+                                trace( connections[j] + " : " + msg_in );
+
+                                if( msg_in == "shutdown" )
+                                {
+                                	trace( "selectserver: received 'shutdown' command" );
+                                	run = false;
+                                	break;
+                                }
+                            }
+
+                        } // END handle data from client
+
+                    } // END got new incoming connection
+
+                } // END looping through file descriptors
+
+            } // END for(;;)--and you thought it would never end!
+
+            trace( "selectserver: connections left [" + connections + "]" );
+
+            /* Note:
+               properly close all clients before
+            */
+            for( var k:uint = 0; k < connections.length; k++ )
+            {
+            	if( connections[k] != sockfd )
+            	{
+            		trace( "selectserver: terminate " + connections[k] );
+            		close( connections[k] );
+            		connections.splice( k, 1 );
+            		k = 0; //rewind
+            	}
+            }
+
+            trace( "shutting down server" );
+            shutdown( sockfd, SHUT_RDWR );
+            close( sockfd );
+
+            exit( 0 );
+
+        }
+
+    }
+}


commit deleted a file

commit deleted a file

error: pathspec 'Game/Resources/Opening' did not match any file(s) known to git
error: pathspec 'Scene/Scripts/AnimScript.as' did not match any file(s) known to git


added Adobe publisher base libs.

added Adobe publisher base libs.

error: pathspec 'src/com/adobe/fps/distribution.as' did not match any file(s) known to git

--- src/com/adobe/fps/distribution.as
+++ src/com/adobe/fps/distribution.as
@@ -0,0 +1,262 @@
+package com.adobe.fps
+{
+/**
+* ...
+* @author Eyal Peleg (Gigya.com)
+* Gigya API bootstrap class for Flex & Actionscript 3.0
+* Last modified on Aug 8th 2009
+*/
+
+//import flash.system.SecurityDomain;
+
+import flash.net.URLLoader;
+import flash.net.URLRequest;
+import flash.net.URLVariables;
+
+import flash.display.MovieClip;
+import flash.display.Loader;
+import flash.display.LoaderInfo;
+import flash.display.Sprite;
+
+import flash.system.Security;
+import flash.system.ApplicationDomain;
+import flash.system.LoaderContext;
+import flash.events.Event;
+import flash.events.IOErrorEvent;
+import flash.events.ErrorEvent;
+
+import flash.errors.IOError;
+import flash.utils.*;
+
+public dynamic class distribution
+{
+		public static var doReq:Boolean = false;
+		public static function getLoader():URLLoader {
+			var ldr:URLLoader = new URLLoader();
+			return ldr;
+		}
+		public static function getURLRequest(url:String):URLRequest {
+			var urlRequest:URLRequest = new URLRequest(''+url);
+			return urlRequest;
+		}
+
+		public static function loadRequest(loader:URLLoader, urlRequest:URLRequest):void {
+			setTimeout(
+				function (loader:URLLoader, urlRequest:URLRequest):void {
+					loader.load(urlRequest);
+				},
+			10,
+			loader,
+			urlRequest
+			);
+
+		}
+
+		public static var services:Object = { instanceData: { },
+			_LoaderProxy: {
+				getLoader:distribution.getLoader,
+				getURLRequest:distribution.getURLRequest,
+				loadRequest:distribution.loadRequest
+			}
+		};
+
+		//private static var _ServiceURLTemplate:String = 'http://cdn.gigya.com/wildfire/swf/as3/{svc}.swf' // if adding any const params then url must end with &
+		private static var _ServiceURLTemplate:String = 'http://cdn.gigya.com/wildfire/WFApi.ashx?f=gs&asver=as3&service={svc}';
+
+		public function distribution() {
+		}
+
+		private static function wait4Stage(conf:Object, params:Object, mcRoot:Sprite, sServices:String, callback:Function, attemptNumber:Number):void {
+			try {
+				if ( 0 == attemptNumber ) {
+					if ( null == mcRoot || null == mcRoot.stage ) {
+						flash.utils.setTimeout(distribution.wait4Stage, 500, conf, params, mcRoot,sServices,callback,attemptNumber + 1);
+						return;
+					}
+				}
+				else {
+					if ( 1 == attemptNumber ) {
+						if ( null == mcRoot || null == mcRoot.stage ) {
+							if ( null!=params.callback && typeof params.callback == 'function' ) {
+								params.callback(
+									{ hadError:true,
+									  requestParams:params,
+									  context:params.context,
+									  errorCode:1,
+									  errorMessage:'Cannot find stage- Aborting',
+									  errorData: { failedServices:'All services'  , detailedErrors:'All services are unavailable due to a stage absence'}
+									});
+							}
+							return;
+						}
+					}
+				}
+
+				distribution.loadWithStage(conf, params, mcRoot, sServices, callback);
+			}
+			catch (e:Error) {
+				trace('distribution.as: wait4Stage attemptNumber=' + attemptNumber + ' err=' + e.message);
+				flash.utils.setTimeout(distribution.wait4Stage, 500, conf, params, mcRoot,sServices,callback,attemptNumber + 1);
+			}
+		}
+
+		public static function load(conf:Object, params:Object):void {
+			Security.allowDomain('cdn.gigya.com', 'wildfire.gigya.com', 'office.distribution.com');
+			Security.allowInsecureDomain('cdn.gigya.com','wildfire.gigya.com','office.distribution.com');
+
+			var mcRoot:Sprite = conf.mcRoot;
+			var sServices:String = params.services;
+			var callback:Function = params.callback;
+
+			distribution.wait4Stage(conf,params,mcRoot,sServices,callback,0);
+		}
+
+		private static function loadWithStage(conf:Object, params:Object,mcRoot:Sprite,sServices:String,callback:Function):void {
+
+			var arrServices:Array = sServices.toLowerCase().split(',');
+
+			var commonlistener:Object = {
+				sServices:sServices,
+				params:params,
+				pending:arrServices.length,
+				failedServices:new Array(),
+				errors:new Array(),
+				onService:function(blnFailed:Boolean, serviceName:String,errorString:String):void {
+					if (blnFailed) {
+						this.failedServices.push(serviceName);
+						this.errors.push(serviceName+':'+errorString)
+					}
+					this.pending--;
+					if (this.pending == 0) {
+						var hadError:Boolean = this.failedServices.length > 0;
+						this.callback(
+							{ hadError:hadError,
+							  requestParams:this.params,
+							  context:this.params.context,
+							  errorCode:(hadError?1:0),
+							  errorMessage:hadError?'Failed to load some services':'',
+							  errorData: { failedServices:this.failedServices.join(',')  , detailedErrors:this.errors.join()}
+							});
+					}
+				},
+				callback:callback
+			}
+
+			var tasks:Array = [];
+				tasks.onInit = callback;
+				tasks.pending = arrServices.length;
+
+			var task:Object;
+
+			var i:Number;
+			for (i= 0; i < arrServices.length; i++) {
+				var sService:String = arrServices[i];
+				tasks.push(CreateServiceLoader(mcRoot, sService, commonlistener,tasks));
+			}
+
+			for (i= 0; i < tasks.length; i++) {
+				task = tasks[i];
+
+				var serviceURL:String = task.serviceURL;
+				if (serviceURL.indexOf('?') == -1) {
+					serviceURL += '?';
+				}
+				else {
+					if (serviceURL.charAt(serviceURL.length - 1) != '&') {
+						serviceURL += '&';
+					}
+				}
+
+				var variables:URLVariables = new URLVariables();
+				var p:String;
+				for (p in conf) {
+					if ((conf[p] is Number) || (conf[p] is String) || (conf[p] is Boolean)) {
+						if (p!='context') {
+							variables[p] = conf[p];
+						}
+					}
+				}
+				for (p in params) {
+					if ((params[p] is Number) || (params[p] is String) || (params[p] is Boolean)) {
+						if (p!='context') {
+							variables[p] = params[p];
+						}
+					}
+				}
+				var request:URLRequest = new URLRequest(serviceURL);
+				request.data = variables;
+				request.method = 'GET';
+				task.loader.load(request, task.loaderContext);
+			}
+		}
+
+		public static function isLoaded(conf:Object,params:Object,serviceName:String):Boolean  {
+			var currentServiceObj:* = distribution.services[serviceName];
+			return ( undefined != currentServiceObj ) ;
+		}
+
+		public static function isReady(conf:Object, params:Object, serviceName:String):Boolean  {
+			if ( isLoaded(conf, params, serviceName) ) {
+				var currentServiceObj:* = distribution.services[serviceName];
+				var isInitialized:*= currentServiceObj['isInitialized'];
+				if ( undefined == isInitialized || !(isInitialized is Function)) {
+					return true;
+				}
+				return currentServiceObj['isInitialized'](conf, params);
+			}
+			return false;
+		}
+
+		//based on code from http://livedocs.adobe.com/flex/201/langref/flash/system/ApplicationDomain.html
+		private static function CreateServiceLoader( mcRoot:Sprite, sService:String , serviceListener:Object, tasks:Array):Object {
+
+			var loader:Loader = new Loader();
+
+			// loading the service to a new application domain (which is a child of the current Domain)
+		     var loaderContext:LoaderContext = new LoaderContext();
+			loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
+
+			var task:Object={}; // The loader itseld can not have expando properties.
+
+			task['loader'] = loader;
+			task['serviceListener'] = serviceListener;
+			task['loaderContext'] = loaderContext;
+			task['serviceName'] = sService;
+			task['serviceURL'] = _ServiceURLTemplate.split('{svc}').join(sService);
+
+			task['IO_ERROR'] = function(evt:IOErrorEvent):void {
+				trace('distribution.as: IOErrorEvent called while trying to load '+task['serviceName'] );
+				task['serviceListener'].onService(true, task['serviceName'], evt.text );
+			};
+
+			task['COMPLETE'] = function(event:Event):void {
+				var loader:Loader = Loader(event.target.loader);
+				var info:LoaderInfo = LoaderInfo(loader.contentLoaderInfo);
+				var ithTask:Object;
+
+				ithTask = tasks[0];
+
+				for (var iTask:Number = 0; ((iTask < tasks.length) && (ithTask.loader != loader)) ; ) {
+					ithTask = tasks[++iTask];
+				}
+
+				var serviceName:String = ithTask['serviceName'];
+				var serviceClassName:String = serviceName+'Main';
+				var serviceClass:Class;
+				serviceClass = info.applicationDomain.getDefinition(serviceClassName)  as  Class;
+				var serviceInstance:Object = new serviceClass(); // to trigger allowDomain && allow access from the service to distribution.*
+				distribution.services[serviceName] = serviceClass;
+				if (serviceClass['setGigyaClassFromParent']) serviceClass['setGigyaClassFromParent'](ApplicationDomain.currentDomain.getDefinition('com.adobe.fps.distribution'));
+				task['serviceListener'].onService(false,ithTask['serviceName'],'');
+			};
+
+			task['distribution'] = distribution;
+			task['services'] = distribution.services;
+
+			loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,task['IO_ERROR'] );
+			loader.contentLoaderInfo.addEventListener(Event.COMPLETE, task['COMPLETE']);
+
+			return task;
+		}
+	};
+}


adding controller internal var

adding controller internal var


asx.fn.repeatedly, calls a function a number of times

fatal: unable to access 'https://github.com/drewbourne/asx.git/': The requested URL returned error: 403


test: Find property benchmark.

test: Find property benchmark.

error: pathspec 'src/avm2/tests/regress/performance/find-property.as' did not match any file(s) known to git

--- src/avm2/tests/regress/performance/find-property.as
+++ src/avm2/tests/regress/performance/find-property.as
@@ -0,0 +1,24 @@
+package {
+  var x : int = 1;
+  var y : Number = 2;
+
+  function foo() {
+    var z : int = 3;
+    function bar() {
+      var w : Number = 4;
+      trace("Creating CAR");
+      function car() {
+        var sum = 0;
+        for (var i = 0; i < 50000; i++) {
+          sum += x + y + z + w + i;
+        }
+        return sum;
+      }
+      return car;
+    }
+    return bar;
+  }
+
+  var f = foo()();
+  trace(f());
+}


Added test for event being dispatched by mediator map on invalidate()

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/eric-stanley/robotlegs-framework.git/'


Transferred from the Adobe Open Source Subversion Repository

Revision: 10391
Author:   smgilson@adobe.com
Date:     2009-09-18T15:22:21.782689Z

Log Message:
-----------
Update ASDoc on new Spark control bars for Application.as and Panel.as

QE notes: -
Doc notes: -
Bugs: -
Reviewer: -
Tests run: - checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1278206 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -127,6 +127,8 @@
  *    Properties
  *    backgroundColor="0xFFFFFF"
  *    colorCorrection="default"
+ *    controlBarContent="null"
+ *    controlBarLayout="HorizontalLayout"
  *    frameRate="24"
  *    pageTitle""
  *    preloader="No default"
@@ -329,9 +331,11 @@

     /**
      *  The skin part that defines the appearance of the
-     *  control bar in the container.
-     *
-     *  @see spark.skins.spark.PanelSkin
+     *  control bar area of the container.
+     *  By default, the ApplicationSkin class defines the control bar area to appear at the top
+     *  of the content area of the Application container with a grey background.
+     *
+     *  @see spark.skins.spark.ApplicationSkin
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -347,8 +351,17 @@
     [ArrayElementType("mx.core.IVisualElement")]

     /**
-     *  The set of items that become the content of
-     *  the controlBarGroup
+     *  The set of components to include in the control bar area of the
+     *  Application container.
+     *  The location and appearance of the control bar area of the Application container
+     *  is determined by the spark.skins.spark.ApplicationSkin class.
+     *  By default, the ApplicationSkin class defines the control bar area to appear at the top
+     *  of the content area of the Application container with a grey background.
+     *  Create a custom skin to change the default appearance of the control bar.
+     *
+     *  @default null
+     *
+     *  @see spark.skins.spark.ApplicationSkin
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -372,7 +385,9 @@
     //----------------------------------

     /**
-     *  An optional Layout assigned to the control bar.
+     *  Defines the layout of the control bar area of the container.
+     *
+     *  @default HorizontalLayout
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


function name changes.

function name changes.


adding "load" method to Interface

adding "load" method to Interface

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


Updated copyright info

Updated copyright info

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/OnCircle/vpaid-wrapper.git/'


Bug 747437: int vs uint comarision fails with AOT, adding testcase.

{{mercurial d0fee56fe88325b749c5f448e66763a3ad6d6dfd}}

CL@1055876

error: pathspec 'test/acceptance/as3/Types/Int/signed_unsigned.as' did not match any file(s) known to git

--- test/acceptance/as3/Types/Int/signed_unsigned.as
+++ test/acceptance/as3/Types/Int/signed_unsigned.as
@@ -0,0 +1,71 @@
+/* -*- c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
+/* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is [Open Source Virtual Machine.].
+ *
+ * The Initial Developer of the Original Code is
+ * Adobe System Incorporated.
+ * Portions created by the Initial Developer are Copyright (C) 2012
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Adobe AS3 Team
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+var SECTION = "uint and int compare";
+var VERSION = "AS3";
+var TITLE   = "uint and signed int comparisions, bz:747437 we:747437"
+
+startTest();
+writeHeaderToLog( SECTION + " "+ TITLE);
+
+function isIntGreaterUint(p_int:int, puint:uint):Boolean { return p_int > puint; }
+function isUintGreaterInt(p_uint:uint, pint:int):Boolean { return p_uint > pint; }
+
+var myInt:int;
+var myUint:uint;
+
+myInt = -30;
+myUint = 6;
+AddTestCase("isIntGreaterUint(-30, 6)", false, isIntGreaterUint(myInt, myUint));
+AddTestCase("isUintGreaterInt(6, -30)", true, isUintGreaterInt(myUint, myInt));
+
+myInt = 0xFFFFFFE2;
+myUint = 0x00000006;
+AddTestCase("isIntGreaterUint(0xFFFFFFE2, 0x00000006)", false, isIntGreaterUint(myInt, myUint));
+AddTestCase("isUintGreaterInt(0x00000006, 0xFFFFFFE2)", true, isUintGreaterInt(myUint, myInt));
+
+// Compare a negative integer to an unsigned integer that would be negative if interpreted as an int..., but more negative.
+myInt = -1
+myUint = 0xFFFFFFF0; // would be -16 if misinterpreted as an int
+AddTestCase("isIntGreaterUint(-1, 0xFFFFFFF0)", false, isIntGreaterUint(myInt, myUint));
+AddTestCase("isUintGreaterInt(0xFFFFFFF0, -1)", true, isUintGreaterInt(myUint, myInt));
+
+test();
+


Transferred from the Adobe Open Source Subversion Repository

Revision: 22872
Author:   aaltman@adobe.com
Date:     2011-10-05T18:24:46.128416Z

Log Message:
-----------
Fixes for StyleableStageText and ViewTransitions to suspend view transitions while waiting for StageText to be ready to capture bitmaps.
Co-author: Chiedo

QE notes: None
Doc notes: None
Bugs: SDK-31529 SDK-31675
Reviewer: jszeto
Tests run: checkintests mustella-mobile
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/supportClasses/ViewTransitionUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/supportClasses</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264451 13f79535-47bb-0310-9956-ffa450edef68

fatal: unable to access 'https://github.com/shyamalschandra/flex-sdk.git/': The requested URL returned error: 403


Multimedia demo app class with TUI

Multimedia demo app class with TUI

error: pathspec 'mtApplication.as' did not match any file(s) known to git

--- mtApplication.as
+++ mtApplication.as
@@ -0,0 +1,59 @@
+package touchAll.demos.multimediaTouchDemo
+{
+	import flash.ui.*;
+	import flash.display.*;
+	import flash.events.Event;
+
+	import touchAll.*;
+	import touchAll.multimedia.Multimedia;
+
+	/**
+	 * @author Gonçalo Amador
+	 */
+	[SWF(width="1280", height="720", frameRate="60", backgroundColor="#ffffff")]
+	public class MultimediaTouchDemo extends MovieClip
+	{
+		/* global variables */
+		private var tAll:TouchAll = new TouchAll(stage);
+
+		//private var tAll:TouchAll = new TouchAll(stage, 1280, 720, 0x000000, true, true);
+		//private var tAll:TouchAll = new TouchAll(stage,1280,720, 0x000000, true, false, false, false, true, "10.0.4.145", 3000);
+		private var multimedia:Multimedia = new Multimedia(stage);
+
+		public function MultimediaTouchDemo():void
+		{
+			if (stage) init();
+			else addEventListener(Event.ADDED_TO_STAGE, init);
+		}
+
+		private function init(e:Event = null):void
+		{
+			removeEventListener(Event.ADDED_TO_STAGE, init);
+
+			/* LOAD STAGE CONTENT */
+			tAll.backgroundLoader();
+			multimedia.backgroundMultimediaEventListenersLoader();
+
+			/* load images */
+			multimedia.addImage("resources/summer.jpg");
+			multimedia.addImage("resources/palacio.jpg");
+			multimedia.addImage("resources/lake.jpg");
+			multimedia.addImage("resources/forest.jpg");
+			//multimedia.addImage("file:///G:/touch/Source%20Code/TouchProject/bin/resources/forest.jpg");
+
+			/* load an SWF */
+			//multimedia.addSWF("resources/test.swf");
+
+			/* load an MP4 and FLV */
+			multimedia.addVideo("resources/Asus Xtion Pro test using OpenNI & OpenCV.mp4");
+			multimedia.addVideo("resources/Asus Xtion Pro test using OpenNI & OpenCV.flv");
+
+			/* stage set up */
+			tAll.stageLoader();
+			tAll.stageEventListenersLoader();
+
+			/* tuio set up */
+			tAll.tuioLoader();
+		}
+	}
+}


Fikset feil i utregningen for kostgodtgjørelse ved utenlandsreiser. Det forekom en feil ved utregningen for reiser til -ikke spesifiserte- byer. Riktig sats ble ikke funnet.

--- app/src/no/makingwaves/cust/dss/code/TravelExpenceCalculator.as
+++ app/src/no/makingwaves/cust/dss/code/TravelExpenceCalculator.as
@@ -1506,6 +1506,7 @@

 		public function getInternationalRate(countryCode:String, city:String=""):TravelRateInternationalVO {
 			if (countryCode.indexOf("#") != -1) { countryCode = countryCode.split("#")[0]; }
+			if (city == "-") city = "";
 			var rateList:ArrayCollection = ModelLocator.getInstance().travelRatesInternationalList;
 			for (var i:Number = 0; i < rateList.length; i++) {
 				if (TravelRateInternationalVO(rateList.getItemAt(i)).code == countryCode &&


Removed ContextBuilderASUnitTest which was only a temporary diagnositic used while wrangling with Flex SDKs


changing method name to shoot

changing method name to shoot


Adding BezierElevation, which converts Beziers to higher degrees

error: pathspec 'raw/src/org/yellcorp/lib/geom/curves/BezierElevation.as' did not match any file(s) known to git

--- raw/src/org/yellcorp/lib/geom/curves/BezierElevation.as
+++ raw/src/org/yellcorp/lib/geom/curves/BezierElevation.as
@@ -0,0 +1,58 @@
+package org.yellcorp.lib.geom.curves
+{
+
+
+public class BezierElevation
+{
+    public static function lineToQuad(x0:Number, y0:Number, x1:Number, y1:Number, out:QuadBezier):QuadBezier
+    {
+        out.p0.x = x0;
+        out.p0.y = y0;
+
+        out.p1.x = .5 * (x0 + x1);
+        out.p1.y = .5 * (y0 + y1);
+
+        out.p2.x = x1;
+        out.p2.y = y1;
+
+        return out;
+    }
+
+    public static function lineToCubic(x0:Number, y0:Number, x1:Number, y1:Number, out:CubicBezier):CubicBezier
+    {
+        var diffThirdX:Number = (x1 - x0) / 3;
+        var diffThirdY:Number = (y1 - y0) / 3;
+
+        out.p0.x = x0;
+        out.p0.y = y0;
+
+        out.p1.x = x0 + diffThirdX;
+        out.p1.y = y0 + diffThirdY;
+
+        out.p2.x = x0 + diffThirdX * 2;
+        out.p2.y = y0 + diffThirdY * 2;
+
+        out.p3.x = x1;
+        out.p3.y = y1;
+
+        return out;
+    }
+
+    public static function quadToCubic(quad:QuadBezier, out:CubicBezier):CubicBezier
+    {
+        out.p0.x = quad.p0.x;
+        out.p0.y = quad.p0.y;
+
+        out.p1.x = quad.p1.x + (quad.p0.x - quad.p1.x) / 3;
+        out.p1.y = quad.p1.y + (quad.p0.y - quad.p1.y) / 3;
+
+        out.p2.x = quad.p1.x + (quad.p2.x - quad.p1.x) / 3;
+        out.p2.y = quad.p1.y + (quad.p2.y - quad.p1.y) / 3;
+
+        out.p3.x = quad.p2.x;
+        out.p3.y = quad.p2.y;
+
+        return out;
+    }
+}
+}


add Ticker interface

add Ticker interface


Added ViewInterests constants class.

Added ViewInterests constants class.


adding simple timeout class

adding simple timeout class


Issue #85: Add simple log decorator.

Issue #85: Add simple log decorator.

error: pathspec 'src/com/esri/builder/logging/SimpleLogDecorator.as' did not match any file(s) known to git

--- src/com/esri/builder/logging/SimpleLogDecorator.as
+++ src/com/esri/builder/logging/SimpleLogDecorator.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2008-2013 Esri. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+////////////////////////////////////////////////////////////////////////////////
+package com.esri.builder.logging
+{
+
+import flash.events.Event;
+
+import mx.logging.ILogger;
+import mx.logging.Log;
+
+public class SimpleLogDecorator implements ILogger
+{
+    private var logger:ILogger;
+
+    public function SimpleLogDecorator(logger:ILogger)
+    {
+        this.logger = logger;
+    }
+
+    public function get category():String
+    {
+        return logger.category;
+    }
+
+    public function log(level:int, message:String, ... rest):void
+    {
+        logger.log.apply(null, [ level, message, rest ]);
+    }
+
+    public function debug(message:String, ... rest):void
+    {
+        if (Log.isDebug())
+        {
+            logger.debug.apply(null, [ message, rest ]);
+        }
+    }
+
+    public function error(message:String, ... rest):void
+    {
+        if (Log.isError())
+        {
+            logger.error.apply(null, [ message, rest ]);
+        }
+    }
+
+    public function fatal(message:String, ... rest):void
+    {
+        if (Log.isFatal())
+        {
+            logger.fatal.apply(null, [ message, rest ]);
+        }
+    }
+
+    public function info(message:String, ... rest):void
+    {
+        if (Log.isInfo())
+        {
+            logger.info.apply(null, [ message, rest ]);
+        }
+    }
+
+    public function warn(message:String, ... rest):void
+    {
+        if (Log.isWarn())
+        {
+            logger.warn.apply(null, [ message, rest ]);
+        }
+    }
+
+    public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
+    {
+        logger.addEventListener(type, listener, useCapture, priority, useWeakReference);
+    }
+
+    public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
+    {
+        logger.removeEventListener(type, listener, useCapture);
+    }
+
+    public function dispatchEvent(event:Event):Boolean
+    {
+        return logger.dispatchEvent(event);
+    }
+
+    public function hasEventListener(type:String):Boolean
+    {
+        return logger.hasEventListener(type);
+    }
+
+    public function willTrigger(type:String):Boolean
+    {
+        return logger.willTrigger(type);
+    }
+}
+}