how to programmatically change the components in a picker - uipicker

I have a picker with 5 components and each component holds the same NSArray filled with #"1" up to #"5". My question is how do i go about being able to change the contents of the picker after the user enters in any number to seed a random generator so that the components of each picker are "jumbled up" in relation to each other (this being after the initial viewDidLoad implementation where each component is identical ie. dip lays 1-5)
as an example this is what an ideal result would look like.
1 5 2 4 2
2 4 4 1 5
5 2 3 1 3
4 3 1 4 2
1 4 2 5 3
as a learner of obj-c i am just looking for guidance to solve this problem.
Thank you in advance for any comments that may be made.

Related

Mat Tables : is there a way to set two headers one vertical and other horizontal?

I want to create a table with two headers (one vertical and the other one horizontal) using Material Table, like this one :
header1 header2 header3
header1 1 1 1
header2 2 2 2
header3 3 3 3
and I wonder if there is any direct manner to implement this ?! Basically what I found was implementations either for horizontal or vertical tables but not one with the two kinds of headers!

Core Data: split into sections based on custom logic

I have a large data set of objects, made up of 2 large-ish subsets.
Set 1 has about 10,000 objects in it.
Set 2 has about 70,000 objects in it.
The object sets have many-to-many relationships between them.
There are also "favorites" subsets for both sets.
Before I display set 1 or set 2, I will have a subset from the other set to drive my query/fetch.
Let's say:
I have selected 10 objects from set 1.
I would like to display set 2.
I'd like set 2 to be grouped into 3 sections:
Section 1 would be objects in set 2 that have relationships with the 10 selected objects from set 1.
Section 2 would be objects in the "favorites" subset that are NOT in #1.
Section 3 would be the rest.
So, conceptually, I have the following steps (again, given 10 selected objects from set 1 and a "favorites" subset from set 2):
Figure out which objects in set 2 correspond to the selected objects from set 1.
Set #1 aside and remove them from the overall set (but only for this display).
Figure out which objects are left in set 2 that are also in the "favorites" subset.
Set #2 aside and remove them from the overall set (again, only for this display).
Figure out which objects are left.
At the end of this, I'd like to display the 3 sections in a UITableView.
I saw this question, but I wasn't sure whether the supplied answers were:
Still valid (it's been almost 7 years since the question was asked)
Valid for my use case. (Would the calculated method return a section number? If so, would I have to pass in both subsets on which I am doing my filtering? How is that going to perform with such large data sets?)

"Days in column" dots explanation

I'm trying to work out the logic behind the Days in Column dots on JIRA boards but can't quite get it right.
It's almost the following:
A grey dot is 1 day
An orange dot is 2 days
A red dot is 3 days
Only show dots for up to 12 days
But those rules don't work for a handful of cases.
Here's my data, taken from a snapshot of one of my boards:
https://docs.google.com/spreadsheets/d/16oGvpQomtJEaS6hmhNfFaDub-4nafmi1jJ32PYMSyvQ/edit?usp=sharing
Does anyone know the logic behind this?
See the "Using Days in column" on the online help:
Blank dot → 1 day
Grey dot → 2 days
Yellow dot → 3 days
1 red dot → 5 days
2 red dots → 8 days
3 red dots → 12 days
4 red dots → 20 or more days
Note that if you move an issue back to a column where it's previously been, the indicator gives you the cumulative number of days the issue has stayed in that column.
The logic has also changed recently according to this post stating "the new dots behaviour is available only in Cloud".
There is an outstanding bug where the weekends are counted as days. This might explain why your data doesn't align.

How do I compare cells in one row to cells in another row?

For example, I have the top row with the "answers" and I want to compare every row after the top row to the top row and count how many are equal:
--A B C D
1-1 2 2 4
2-1 1 1 1
3-2 2 2 2
4-1 2 1 4
I'd like a formula that would apply to rows 2:4 to compare them each to row 1 such that the result would be 1 for row 2, 2 for row 3, and 3 for row 4.
I'm not sure if it can't be done, or if I just don't know how to search for it properly, but I haven't been able to come up with anything on my own.
In E2, try:
=ArrayFormula(sum(--($A2:$D2=$A$1:$D$1)))
and drag down as far as needed.

Skip x axis points on highcharts

I am trying to figure out if this can be done with Highcharts. I have 5 different series on my chart and my X axis is made up of Dates. My problem is this, lets say Series 1 has 2 data points 10 and 15 with dates of 5/1/2013 and 5/3/2013. My second Series has Data that is 15 and 20 with dates of 5/1/2013 and 5/4/2013.
What will end up happening is that 5/1/2013 will show up twice and 5/4/2013 wont show up at all.
Now if I remove the duplicate dates, it causes another issue if Series 3 is 5, 10 with 5/3/2013 and 5/4/2013, Instead of the 5 being listed on 5/2/2013 it is showing up on 5/1/2013.
Is there any way around this? or will I have to make different charts for each Series I want listed on there?
Thanks,
Chris

Resources