|
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
|
|
|
|
|
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:
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 d
You 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 a
The 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 b
and 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
|
|
|
|
|
THANKS A LOT .... I GOT THE SOLUTION
|
|
|
|
|
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 )
|
|
|
|
|
Hello everyone,
How to fix the compile error when interlock exchange a bool type variable?
public static void Main()
{
bool b = false;
bool a = Interlocked.Exchange(ref b, true);
return;
}
thanks in advance,
George
|
|
|
|
|
You're out of luck, MSDN[^] clearly says
"This method only supports reference types. There are overloads of the Exchange method for the value types Int32, Int64, IntPtr, Single, and Double, but there is no support for other value types."
|
|
|
|
|
Thanks Senthil,
Question answered.
regards,
George
|
|
|
|
|
Hey guys I'm new here! So here's my problem: I have to do a project for the university. I have to use a crawler, download some pages to my hard drive (number doesn't matter atm) and then for each page of these (for each URL to be exact) I need to populate a database with each page's URL and all the links that this page contains.
I found this crawler on the site http://www.codeproject.com/KB/IP/Crawler.aspx[^].
But since I'm a newbie I can't seem to find a way to do what I need. Do I need to html-parse each page after it is downloaded? Or can I simply tweak the crawler's code and do what I need?
Thanks in advance
George
All you have to decide is what to do with the time that is given to you.-
|
|
|
|
|
Hi i have to develop an application which supports globalization feature. I am storing the data into a ms access database, so i want to know whether ms access do provide any features for globalization or not..
|
|
|
|
|
No, it's a database. You need to design tables that contain your globalised strings.
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 )
|
|
|
|
|
Dear All,
Any one know free xml web service,to send sms messages(include amlost all countires) using C#,
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
If it exists, google knows. There are also articles here on CP, but all the gateways I know of, in articles or otherwise, are not international.
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 )
|
|
|
|
|
My program uses a lot of pictures (from screendumps) and I need to compress those so that my program uses less memory. Any idea how to do that in C#?
_____________________________
...and justice for all
APe
|
|
|
|
|
If you have an image as something other than a JPEG, load it into a Bitmap and save it as a JPEG.
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 )
|
|
|
|
|
Hi, i have a form which is size 500 * 300
I have groupbox, textboxes, and buttons inside that form. When the form is loading into my main mdi parent form, its size is 500*300, when i maximize the childform, my controls all are at the position top left. How do i make it center( when the window is maximize) depending on the screen size?
|
|
|
|
|
If you want to center the groupbox, not the controls in it,
personally I would recalc the Location from the groupbox on the maximize event.
The controls in the groupbox will change their location automatically.
For the other controls outside the groupbox, use a panel and calc its location as you do for the groupbox.
Hope this helps
Tiefe Brunnen muss man graben wenn man klares Wasser will,
tiefe Wasser sind nicht still.
|
|
|
|
|
how to i recalculate the location? do i have to so some division or multiplication or somthing./
|
|
|
|
|
You do not need to any calculations if you do proper anchoring. It will solve the purpose. Use TableLayoutPanel in case you find it difficult to anchor controls as such.
|
|
|
|
|
anchoring changes the size of the control to center i thought? imho if you want to center the control without changing its size, you have to recalc.
Tiefe Brunnen muss man graben wenn man klares Wasser will,
tiefe Wasser sind nicht still.
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">sunspeed wrote:</div>imho</blockquote>
What does this mean?
If used smartly, anchoring can help you postion the control to centre the control with or without resizing.
I have created a sample form in which control will be at centre(and of same size) regardless of how you resize the form.
|
|
|
|
|
Could you send me the code? Thats interesting.
I have not found this possibility.
imho means "in my humble opinion"
Tiefe Brunnen muss man graben wenn man klares Wasser will,
tiefe Wasser sind nicht still.
|
|
|
|