Thursday, April 6, 2017

Singles Canada site

Canada Singles

Review:  I think all but one or two had legitimate profiles for those that were inquiring on a given profile.  Quite predatory site which any number running the most obvious scams.  Conversations inevitably wind up migrating to:

1.  A dead father, or dead parents.
3.  A profile candidate living in Africa, or more specifically Ghana while a profile indicating none of the above.
4.  A profile candidate waiting on inheritance.
5.  Most eventually migrating to requests for money.

After extensive conversation with one suspected fake profile candidate, an individual offered that most profiles on the site were fakes and likely being located anywhere else but as were profiles were supposedly originating.

Probably one of the worst places to encounter fraud.  Not a good site.  Especially if you wanting to find someone from Canada!  :)

Most of the profile fraud, however, has been quite easy to spot and obvious.  All usually don't bother lingering around on questioning.

Raises an important question in mind.  Why pay $40.00 a month for that?

This all brings to mind the massive and rampant level of consumer fraud that exists for an online dating site with a top search result under "Canada Dating"

Friday, March 17, 2017

Typescript/JavaScript Angular Problem: Hashmap a dictionary of rescaled one dimensional coordinate values to their corresponding indices for a position based array mapping and more

Okay, so the title is rather a big one, but the problem goes like this:

You've had to squeeze your data down in such a way so that it fits into your canvas graphic...that is, it makes little sense if you have big numbers that can't be viewed because their plot values are outside of the dimension of your screen.  This problem is of 'squeezing' the data is otherwise re scaling it so that it fits into visual dimensions that can be read.  Its really not a big deal doing that since you can refactor a plot without changing its shape/form attributes by using a global scale factor.  But let's say you wanted to have a quick and easy search algorithm that matches a screen based coordinate that a user has supplied, say from mouseover position that relates to a position on the graph or at least as directly related to your big data.  How to do this?

As it turns out you may have stored your big data, in some sort of collection type that contains points which may have something like: x, y in 2 dimensions, and this collection type may be structured in the form of an array.  The problem is that with any mouseover, your first inclination may be to search the set of points and then break at a common match, but this is slow!  I say this since you are constantly search iterating points to find the match based on a screen position that is supplied.  Why not create an inverse map on the set of points and hashmap these?

As it turns out you can do it in Typescript/Javascript, but as I found out, keys say with the {} type string values.  If your data is on the other hand given by positions which are 'number' types you'd first have to likely Math.round(), Math.floor() or Math.ceiling your numbers.  Then you'd convert this to string using the position.x.toString(),  'number' types have a .toString() method.  Then you'd key the value while storing its array index in value position.

A sketch:

    public setScreenXCoords(){
        //called after screen coordinates have been setSceenXCoords
        //and that this.points is a screen coordinate set.  
        var i = 0;
        for (let pvec of this.screenpoints){
            let x = pvec.x;
            x = Math.round(x);
            /*
            console.log("key: ");
            console.log(x);
            console.log("value");
            console.log(i);
            */
            this.screenToIndex[x.toString()] = i;
            i += 1
        }
    }

In a given data range set of points, it is important to keep in mind that keying position data means also that truncation (by floor, rounding, or ceiling a number) may necessarily supply more than one position for a given key, and for this you may need to bucket the values in an array, and provide additional searching algorithms in refining a search, but at least this method provides nice fast lookup position addressing.

So when you search you need to account for undefined key values.  These are screen positions that do not have a corresponding key in, for instance, inverse2dVectorsMap.  For this, you simply omit the user supplied position until they have sufficiently toggled a position that corresponds to a point on the data set.

And example sketch:

    public getScreenPoint(xposnumber){
        let xpostr = xpos.toString();
        if (xpostr in this.screenToIndex){
            return this.screenToIndex[xpostr];
        }
        return undefined;
    }


Then filter 'undefined' return values relative to non 'undefined' ones.

For example:

    private mouseMoved(eMouseEvent){
        //(mousemove)="mouseMoved($event)"
        console.log(e.offsetX);
        let xstr = e.offsetX.toString();

        
        console.log("screen index: ");
        
        if (e.offsetX != undefined){
            let ind = this.dataCharts[0].getScreenPoint(e.offsetX - 80.0);
            console.log(ind);
            if (ind != undefined){
            this.pointindex[0] = ind;
            this.pointindex2 = ind;
            }
        }
    }

Oblivion

 Between the fascination of an upcoming pandemic ridden college football season, Taylor Swift, and Kim Kardashian, wildfires, crazier weathe...