|
And your question is?
Veni, vidi, abiit domum
|
|
|
|
|
Member 10270825 wrote: can't Rows
I'm not surprised.
The DevExpress GridControl doesn't have a Rows property: DevExpress GridControl Members[^] - and even if it did, it is very, very unlikely to return DataGridViewRow values - they are associated with the .NET DataGridView control...
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
|
I want to use Roulette wheel selection for function minimization and want to select parents for reproduction from the fitness values. I want to ask is this necessary to sort the fitness (in ascending or descending order) values calculated from the population size or not?
|
|
|
|
|
You can use random number generation to simulate roulette wheel output.
Try something and post your code here.
|
|
|
|
|
You may want to read up on "Roulette Wheel Selection[^]" before you stick your foot in your mouth again.
modified 24-Oct-13 12:33pm.
|
|
|
|
|
Weird - but the link is not working?
|
|
|
|
|
*Cough* ahem[^]. I assume you ate the rest of the foot
|
|
|
|
|
Hmmm... It pasted back into a browser window just fine before I pasted it into the post.
Fixed!
|
|
|
|
|
In the book I'm studying and the articles at MSDN, they both say pretty much the same thing…
Just to clarify, in my book it uses this example:
Parent Class
{
}
Child Class
{
}
Grandchild Class
{
}
GreatGrandchild Class
{
}
The Base Class for Great-Grandchild Class would be the Grandchild Class
The Base Class for The Grandchild Class Would Be the Child Class
The Base Class for the Child Class Would Be the Parent Class
If that is true, in both my book and the articles at MSDN also say if I want to call a method that resides in the parent class from great-grandchild class to use the "base" keyword before the method…
Just a little confusing, maybe I read it wrong and misunderstood it.
Any feedback would be greatly appreciated.
|
|
|
|
|
You are right in your assumptions.
Just to correct your code a little bit though -
Parent Class
{
}
Child Class : Parent
{
}
Grandchild Class : Child
{
}
GreatGrandchild Class : Grandchild
{
}
|
|
|
|
|
First of all, you need a method or property which is declared "virtual". That allows you to "override" it in derived classes.
When you override such a virtual function, but need to call the functionality of the original implementation also, you use the base keyword:
public class Parent
{
public virtual void FunctionOne()
{
}
}
...
public class GreatGrandChild : GrandChild
{
public override void FunctionOne()
{
Console.WriteLine("Called in GreatGrandChild");
base.FunctionOne();
}
}
Otherwise, you can access the functions of the base which are not overriden just like any other function of a class, and beyond that you can access "protected" functions/properties.
|
|
|
|
|
Yes, That's Obvious… Or so I thought it was.
|
|
|
|
|
I wanted to create a application in which there will be 10 to 12 users(clients) and database at one place(server).
My Qs is how to create this kind of application and what technology should I use between these..Windows ? or Web based ?.
Pls tell me how to implement this kind of app.
Pls give links to sample application if anyone knows..
thanks in advance.
|
|
|
|
|
What you are really looking at here is usually known as a client-server application. The database will be placed on the server and the client will reside, well on the client. There are many different ways you can partition your application; for instance, you could partition it so that using MVC and an n-tier architecture.
As to what type of app you should write - that really depends. If you need to interact with the local file system, I'd go with a desktop based approach. If everything could be handled through a browser, then I would go with a web based architecture. Only you know your requirements.
|
|
|
|
|
Thanks for ur quick reply.
Everything can be handled through browser. so I think I will go with web based application.
Can you provide some links on these kind of applications or a small sample ?
|
|
|
|
|
Here is a MVC4[^] implementation but I wouldn't use EF.
Edit I forgot to add the link.
Edit 2 Link paste bug.
David
|
|
|
|
|
See this[^] step-by-step tutorial.
/ravi
|
|
|
|
|
Pdeveloper wrote: Windows ? or Web based ?.
What is your client looking for?
Are they ok if you install the client on their local machines.
|
|
|
|
|
I have "bought into" the view that programmers in WinForms should not put a Form inside a Form. My reasoning has gone something like this: [1]
1. A Form is a "heavy-weight" object; using "lighter-weight" objects. like a Panel on the Form, a UserControl (for re-usability), or other ContainerControl(s) on the Form, is better practice. And, I believe the idea of using a TabControl to implement a multi-document work-space is a good one.
2. A Form within a Form (if it is movable: that is, if it has a TitleBar) can easily be moved at run-time so almost all of it is "outside" its Parent Form. It's actually possible to "lose track," visually, of a Form within a Form if: you do "just the wrong thing" while the outer Form is Maximized, and then set the Form WindowState back to 'Normal. Of course, the programmer, can easily write code to control for such cases.
3. Particularly for newcomers to programming in WinForms, putting a Form in a Form is "bad practice" that leads to programming errors, hair growing on the palms, etc.
If I consider what, if any, advantages there might be to using a Form within a Form, I find it hard to come up with anything tangible. Using multiple independent windows (Forms) in an app: yes, I can see that (and I write apps that way); each Form can have its own Opacity value, for example. And, the programmer, with a small amount of effort, can implement docking of the independent Forms to their "main Form," or other Forms, etc.
Based on the belief that questioning one's technical assumptions (frequently) is a healthy thing to do, I'm curious to ask you, my peers, and betters, what you think about putting Forms inside Forms:
1. is it something you do yourself in your own practice (in situations you are not using MDI) ?
2. is it a very "bad thing" in terms of consuming resources (like memory) compared other possible containers ? Does it diminish performance ?
3. do you think it is a mistake for beginning programmers to use Forms inside Forms ?
all-ears, bill
[1] I've left MDI out of this discussion, even though CP is still getting questions on MDI: questions from people working with/on legacy apps; and, questions that I believe are coming from students who are assigned to create an MDI app in their classes. I go along with the view that MDI is outmoded, and read that MS has "deprecated" it. Bias: I find MDI apps butt-ugly.
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
|
|
|
|
|
I must say I have never placed a form inside another form and can see no reason to do so - none of the situations I have ever found myself in have needed this.
So it would be interesting to hear about its benefits, if there are any(I think it would just mess my head up trying to debug that sort to of scenario).
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
I'm just a newbie to C#, but… I'm just starting to read about and understand some of, Polymorphism… Whatever methods you have in your main class, you could change them to virtual methods then by using inheritance… The methods in your child classes could use override.
Like I said, I'm just a newbie… But, just a thought.
|
|
|
|
|
- No, sounds like a bad idea.
- I would say yes it's a bad thing, but I have never tested it to see the effect on resources/performance.
- Certainly, they do enough bad things as it is.
Veni, vidi, abiit domum
|
|
|
|
|
BillWoodruff wrote: And, I believe the idea of using a TabControl to implement a multi-document work-space is a good one. I believe that different users are attracted to different MDI implementations.
BillWoodruff wrote: A Form is a "heavy-weight" object; using "lighter-weight" objects. Not by definition; an application is a Window, just like a button is a Window. One can set a new parent, and could choose to set the apps' parent to a button.
BillWoodruff wrote: If I consider what, if any, advantages there might be to using a Form within a Form, I find it hard to come up with anything tangible. Encapsulation and re-use.
BillWoodruff wrote: is it something you do yourself in your own practice (in situations you are not using MDI) ? I sometimes use a complete executable as described above; that's heavier than declaring a thread, but also robuster
BillWoodruff wrote: is it a very "bad thing" in terms of consuming resources (like memory) compared other possible containers ? Does it diminish performance ? How much more resources does a Form use compared to a Panel? Yes, it costs performance, the question should be whether it's "expensive". If you're looking for optimal performance, then you should not be creating a window using a managed language.
BillWoodruff wrote: 3. do you think it is a mistake for beginning programmers to use Forms inside Forms ? I think it's a mistake to make it a black-and-white decision, without any context. The only thing that's "always" wrong is to swallow exceptions.
BillWoodruff wrote: Bias: I find MDI apps butt-ugly. ..yes, most important thing about the car is the color - not whether it's an efficient design.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: an application is a Window, just like a button is a Window. I'm not sure what you meant to say. A Form is a ContainerControl , while a Button is a ButtonBase .
/ravi
|
|
|
|