problem in Range selection
-
I can't follow the logic of what you want. Why can't you go from 2-5, how does that relate to 3 and 7 ?
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
select x = a if x falls in the range 3-7 then its illogical to have select x=b if x falls in range 2-5 coz in such case x would satisfy both the condition.
-
select x = a if x falls in the range 3-7 then its illogical to have select x=b if x falls in range 2-5 coz in such case x would satisfy both the condition.
So what you really mean is that your second selection and your first can't be the same value ? 2 is not in the range 3-7
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
So what you really mean is that your second selection and your first can't be the same value ? 2 is not in the range 3-7
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
what i mean that no two selection range should intersect each other. for eg:- range is 3-5 5-7 and not like 2-5 3-6 coz the value four falls in both the selection which is not possible
-
what i mean that no two selection range should intersect each other. for eg:- range is 3-5 5-7 and not like 2-5 3-6 coz the value four falls in both the selection which is not possible
Well this is partitioning a (discrete) interval in not intersecting intervals. What is your trouble about (please detail)? BTW are you voting down Christian?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
what i mean that no two selection range should intersect each other. for eg:- range is 3-5 5-7 and not like 2-5 3-6 coz the value four falls in both the selection which is not possible
OK - so how do the ranges get selected, by selecting a group from both drop downs ? I guess you can just check when the second range is selected, if it intersects. This seems trivial to me. Where is the issue ?
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Well this is partitioning a (discrete) interval in not intersecting intervals. What is your trouble about (please detail)? BTW are you voting down Christian?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarkethe problem statement is i have two combo box's named max and min and a text box for entering value. in max we have values range from 0 - 10 and similarliy we have in min. now user has to select range from both the combo box. like he can select min to be 4 and max to be 7 and value for this range to be some X%. Now i have to restrcit user from selecting min to be 2 and max to be 6. When the user closes the application and restarts it we should see that the above condition entered before logging off is validated before entering the new ranges. i have sql database and using a application is begn developed using .NET C# YEs i m rating down cris
-
the problem statement is i have two combo box's named max and min and a text box for entering value. in max we have values range from 0 - 10 and similarliy we have in min. now user has to select range from both the combo box. like he can select min to be 4 and max to be 7 and value for this range to be some X%. Now i have to restrcit user from selecting min to be 2 and max to be 6. When the user closes the application and restarts it we should see that the above condition entered before logging off is validated before entering the new ranges. i have sql database and using a application is begn developed using .NET C# YEs i m rating down cris
sailesh_gupta wrote:
i have two combo box's named max and min and a text box for entering value.
OK. that's fine.
sailesh_gupta wrote:
n max we have values range from 0 - 10 and similarliy we have in min.
That's good (possibly min should range 0-9 and max 1-10).
sailesh_gupta wrote:
now user has to select range from both the combo box.
That is not clear. Do you mean:"The user has to define a range by selecting min and max values?"
sailesh_gupta wrote:
Now i have to restrcit user from selecting min to be 2 and max to be 6.
Why? This point is very obscure.
sailesh_gupta wrote:
When the user closes the application and restarts it we should see that the above condition entered before logging off is validated before entering the new ranges.
Due to previous cluttered statements that is not clear.
sailesh_gupta wrote:
i have sql database and using a application is begn developed using .NET C#
That's fine.
sailesh_gupta wrote:
YEs i m rating down cris
That's an unbelieveble mistake. The reason you can't get help is all in your obscure descriptions. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
sailesh_gupta wrote:
i have two combo box's named max and min and a text box for entering value.
OK. that's fine.
sailesh_gupta wrote:
n max we have values range from 0 - 10 and similarliy we have in min.
That's good (possibly min should range 0-9 and max 1-10).
sailesh_gupta wrote:
now user has to select range from both the combo box.
That is not clear. Do you mean:"The user has to define a range by selecting min and max values?"
sailesh_gupta wrote:
Now i have to restrcit user from selecting min to be 2 and max to be 6.
Why? This point is very obscure.
sailesh_gupta wrote:
When the user closes the application and restarts it we should see that the above condition entered before logging off is validated before entering the new ranges.
Due to previous cluttered statements that is not clear.
sailesh_gupta wrote:
i have sql database and using a application is begn developed using .NET C#
That's fine.
sailesh_gupta wrote:
YEs i m rating down cris
That's an unbelieveble mistake. The reason you can't get help is all in your obscure descriptions. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarkesailesh_gupta wrote: now user has to select range from both the combo box. That is not clear. Do you mean:"The user has to define a range by selecting min and max values?" yes you got it right. also sailesh_gupta wrote: Now i have to restrcit user from selecting min to be 2 and max to be 6. Why? This point is very obscure. i have to restrict the user from selecting the range between 2 to 6 because he has already selected a a range from 3 to 5. which means i should selectthe value of x = a if x lies between 3-5.this condition is set by user using the application. during the next time user cannot put a condition that select x = b if x lies between 2to 6 beacuse already a condition exist. i.e if both the constraint are there and input value is 4 what will be the value of x using the constarint.
-
sailesh_gupta wrote: now user has to select range from both the combo box. That is not clear. Do you mean:"The user has to define a range by selecting min and max values?" yes you got it right. also sailesh_gupta wrote: Now i have to restrcit user from selecting min to be 2 and max to be 6. Why? This point is very obscure. i have to restrict the user from selecting the range between 2 to 6 because he has already selected a a range from 3 to 5. which means i should selectthe value of x = a if x lies between 3-5.this condition is set by user using the application. during the next time user cannot put a condition that select x = b if x lies between 2to 6 beacuse already a condition exist. i.e if both the constraint are there and input value is 4 what will be the value of x using the constarint.
Well, I think you need to re-design a bit your application. probably you need to let the user to define a set of classes partitioning the range. For instance (Assuming adjacent interval classes):
Class min max assigned value
1 0 2 a
2 3 5 b
3 6 9 c
4 10 10 dYou can do that in several ways, neverthless a simple approach is the following: the program starts with one default class
Class min max assigned value
1 0 10 aThe user may choose to split the interval by choosing the discriminator value, suppose
3
, this will produce:Class min max assigned value
1 0 3 a
2 4 10 band so on. Note that user may only choose the descriminator (and class assigned value, i.e. a, b,...) properly rearranging intervals it is a program duty. Hope that helps. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
Well, I think you need to re-design a bit your application. probably you need to let the user to define a set of classes partitioning the range. For instance (Assuming adjacent interval classes):
Class min max assigned value
1 0 2 a
2 3 5 b
3 6 9 c
4 10 10 dYou can do that in several ways, neverthless a simple approach is the following: the program starts with one default class
Class min max assigned value
1 0 10 aThe user may choose to split the interval by choosing the discriminator value, suppose
3
, this will produce:Class min max assigned value
1 0 3 a
2 4 10 band so on. Note that user may only choose the descriminator (and class assigned value, i.e. a, b,...) properly rearranging intervals it is a program duty. Hope that helps. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain ClarkeTHANKS A LOT .... I GOT THE SOLUTION