## User interaction for interdependent fields

Context:

I’m working on a screen where a table will be rendered based on the user’s choice of “Country” and “Organization”. Both these fields are interdependent and the user needs to have the ability to choose any of the fields first.

I have currently designed them both as dropdowns:  Problem

The problem with this is that there are a lot of validations that need to be taken care of. Eg – Say a user chooses Country as India first and then clicks on the Organization dropdown, Orgs that are not present in India need to be greyed out. In contrast, if the user chooses Organization as BMW first, and then clicks on country dropdown, countries that BMW isn’t present in will need to be greyed out. This, I think would be confusing to some extent. What would a better approach to this problem be? To add to it, I have never encountered such an interaction anywhere else so I also think that it would not be very intuitive to a normal user. What am I missing here?

The use case is that the user needs to have the ability to:
a) See data of All Countries that org X is in
b) See data of All Orgs that Country Y has
c) See data of Org X in Country Y
d) See data of All Countries in All Orgs

## UI Pattern for interdependent settings?

I’ve been trying to build a configuration screen for a network appliance that needs to be configured by the user and has multiple parameters that each influence the max values of the others. The user may only have the requirement for one or two of these values and the others should be auto-optimized by the system.

I want to make the interdependence clear to the user and give him the freedom to set the values, but also allow him to have the system auto-calculate the ones he didn’t adjust.

Is there an established pattern for such a scenario?

A very preliminary visualization of the problem: Thanks a lot!

## Bounding two interdependent quantities in a combinatorial sequential process

We are given two non-increasing integer sequences, $$n(t)$$ and $$k(t)$$, that can get decreased by at most $$1$$ moving from $$t$$ to $$t+1$$ for all $$t\ge 0$$. Their values at time $$t=0$$ are known to be $$n(0)=N>0$$ and $$k(0)=K>0$$. We can have $$n(t+a)\le n(t)-1$$ only if $$a\ge k(t)$$, and $$k(t+b)\le k(t)-1$$ only if $$b\ge n(t)$$.

Question: What is the minimum value attainable for $$n(NK/c)$$ for a constant $$c\ge 16$$?

Posted on Categories cheap private proxies

## Python – best way to have interdependent variable in a class

Newbie Python questions: I want to model something that can have a several inter-connected instance variables and if I set one, I want to recalculate the others. Any can be set.

E.g. a circle – each instance has an area, circumference and radius (let’s ignore the diameter). If I set the area, I want the circumference & radius re-calculated and vice-versa. Should I :

``class circle:     def area(self):        return cmath.pi*self.radius*self.radius     def circumference(self):       return 2 * cmath.pi * self.radius     def radius(self):       return self.circumference/(2*cmath.pi)  circle1 = circle() circle1.radius = 5 print "Circle1's area is {0} and its circumference is {1}".format(circle1.area, circle1.circumference)  ``

Now there’s nothing in the code sample to calculate the area once the radius has been set, so do I need `@property` with setters and getters for the radius, area and circumference to calculate the other attributes when this one is set or am I barking up completely the wrong tree?