![]() ![]() I didn’t try to work in a array with Prime as value, because I would have to store this value and I’m afraid it would be time and Memory consuming. Now, is there a way to accelerate the search in the array ? Or another way to store Primes? I would prefer not to use DB, because I’m not familiar with SQL. This works fine, but between 100 million and 1 billion, this becomes drastically slow. So I have to loop until finding the xth Prime, ignoring rows with False values. 1 billion rows → 50 847 534 Primes in 66,11 secondsīut then, searching a Prime in the array is very slow, because the Prime is not the value of a row, but the index.This can get a bit tedious if you have lots of items to add. Additional items are added the same way: teamDictionary.Value ('City') 'Boston'. 100 000 000 rows → 5 761 455 Primes in 6,51 seconds and For example, this adds Red Sox as the value for the key TeamName: Dim teamDictionary As New Dictionary teamDictionary.Value ('TeamName') 'Red Sox'.I could swear this worked and then all of a sudden its not working. Theres clearly a ChildNode oject under the layers object in the debugger but it will not assign to layernode. You can act as if they are all strings except for the objects and arrays which, as I mentioned, will be another JSONItem. I cant understand what Im doing wrong here. I use this technique all the time to implement several different kinds of data structures. ![]() In Xojo, a JSONItem value, returned as a Variant, can only be one of those too. Asked on the Xojo forums and since i cant post this there. A single JSON value can be nil, a number, a boolean, a string, or another JSON object or array. I’ve coded a Sieve of Eratosthene, using an array of false Boolean, and I set up the boolean to True when finding a Prime. The array is akin to a Xojo array of Variant. The goal is to calculate Prime numbers, as fast and as much as possible. Yes, Kem, you’re right, it’s a challenge! If I could figure out how to use a two element array, the present issue would not exist. Ok, I see I have to give you more details. Problem of dictionary of arrays - General - Xojo Programming Forum I am working with the MBSChartDirector which gets its data from a single element array. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |