Exemplo n.º 1
0
        public string buildTrie()
        {
            titleTrie = new Trie();
            createTable();
            string lastWordAdded = "Nothing Added";
            int    totalTitles   = 0;

            using (System.IO.StreamReader sr = new System.IO.StreamReader(System.IO.Path.GetTempPath() + "\\wiki.txt")) {
                while (sr.EndOfStream == false && (GetAvailableMBytes() > 50))
                {
                    lastWordAdded = sr.ReadLine();
                    titleTrie.insert(lastWordAdded);
                    totalTitles++;
                }
                sr.Close();
            }
            //Add title count entity
            titleCount     finalTitleCount  = new titleCount(totalTitles);
            TableOperation insertTitleCount = TableOperation.InsertOrReplace(finalTitleCount);

            stattable.Execute(insertTitleCount);

            //Add last title to table
            lastTitle      titleAdd        = new lastTitle(lastWordAdded);
            TableOperation insertLastTitle = TableOperation.InsertOrReplace(titleAdd);

            stattable.Execute(insertLastTitle);
            return(lastWordAdded + " Bytes: " + GetAvailableMBytes());
        }
Exemplo n.º 2
0
 => Build(title, firstTitle, secondTitle, thirdTitle, lastTitle, firstImage, secondmage, thirdImage, lastImage, firstTextColor, secondTextColor, thirdTextColor, lastTextColor);