Exemple #1
0
    public IEnumerator SaveToTrainFile(string keypath)
    {
        preparat           prep = GameObject.Find("test").GetComponent <preparat>();
        keypredicted       kp   = GameObject.Find("test").GetComponent <keypredicted>();
        List <Information> key  = new List <Information>();

        key.Add(kp.pathToInformation(prep.data, keypath));
        yield return(StartCoroutine(kp.waitCheckMachineKey(key, trainurl, 2)));
    }
Exemple #2
0
    public IEnumerator teste()
    {
        preparat prep = GameObject.Find("test").GetComponent <preparat>();

        prep.Starts("http://127.0.0.1:8080/density.json");
        yield return(new WaitForSecondsRealtime(.7f));

        //keypredicted key = GameObject.Find("test").GetComponent<keypredicted>();
        //json = key.checkMachineKey(prep.data);
        POST();
    }
Exemple #3
0
    public IEnumerator findKey(string url)
    {
        preparat prep = GameObject.Find("test").GetComponent <preparat>();

        prep.Starts(url);
        yield return(new WaitForSecondsRealtime(.7f));

        //key = checkkey(prep.data);
        //path = checklatlng(prep.data, key.path);
        //myclass = findClass(key, path);
        StartCoroutine(checkMachineKey(prep.data));
        //Debug.Log(key.path + " " + path.lat + " " + path.lng);
    }
Exemple #4
0
    public IEnumerator matching(string url)
    {
        key  = new List <Information>();
        pair = new List <match>();
        //Debug.Log("findlatlng");
        preparat preparat = GameObject.Find("test").GetComponent <preparat>();

        preparat.Starts(url);
        keypredicted keypredicted = GameObject.Find("test").GetComponent <keypredicted>();

        yield return(new WaitForSecondsRealtime(0.7f));

        Information keypath = new Information();
        bool        same;

        for (int i = 0; i < preparat.data.Count; i++)
        {
            if (preparat.data[i].myType != "geolocation-lat" && preparat.data[i].myType != "geolocation-long")
            {
                same    = false;
                keypath = preparat.data[i];
                for (int j = 0; j < key.Count; j++)
                {
                    if (key[j].path == preparat.data[i].path)
                    {
                        same = true;
                        break;
                        //key.Add(preparat.data[i]);
                    }
                }
                //Debug.Log(preparat.data[i].path);
                if (!same)
                {
                    key.Add(keypath);
                }
            }
        }
        for (int i = 0; i < key.Count; i++)
        {
            //Debug.Log(key[i].path);
            geolocation location = keypredicted.checklatlng(preparat.data, key[i].path);
            temp.lat = location.lat;
            temp.lng = location.lng;
            temp.key = key[i];
            pair.Add(temp);
        }
        pair = pair.OrderBy(sel => sel.lat.path).ToList();
    }