It's telling you that you can't pass an integer in; instead, you have to pass in something that implements IIndexParams. The default implementations from Emgu are AutotunedIndexParams, CompositeIndexParams, HierarchicalClusteringIndexParams, KdTreeIndexParams, KMeansIndexParams, LinearIndexParams, LshIndexParams and SearchParams. You just need to choose the appropriate one (also, you need to learn how to read a build error; this was all clearly laid out).
You need to set the variable value of the company ID to your where clause. Here's a quick example using syntax-based query.
var companyId = 100; //set some valuevar contacts = (from a in db.Company
join b in db.CompanyContacts on a.CompanyId equals b.CompanyId
join c in db.Contacts on b.ContactId equals c.ContactId
where a.CompanyId == companyId
select(x => new ContactEntity
Id = x.Id,
Prefix = x.Prefix,
FirstName = x.FirstName,
MiddleName = x.MiddleName,
LastName = x.LastName,
Suffix = x.Sufffix
I have an image which displays the state of execution of an action.
- green: the execution is currently performed
- yellow: the execution has been interrupted
- red: an error has occurred
- green: the execution is complete and went fine.
I would like to make this image blinking (green) as long as the current action is executed.
I'd vote against any animation; seen lots of animations continue where the current action was definitely not executing.
Assuming you're doing the "current action" in a background-thread, you would want to "ReportProgress" as the backgroundworker does. On each reportprogress, toggle the green image to its next state. That way if your "current action" dies then it will be reflected in the green light no longer blinking.
Yes, may sound like a lot more work than an animation, but then again, this way it also adds something usefull, instead of an animation that merely gives the impression that something might be going on. One is adding value, the other is wasting money.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
If I have an object defined in a method and pass that object into another method, perform some operation that changes a parameter value in that object and then pass the same object back to the caller, is that the same as using ref or out?
Wow that is an exceptional response. I really appreciate that. Now I have more confidence in that code so I can look at other things that might be causing my problems with a program I'm working on. I was just going to pull all that stuff out and rewrite it. You saved me from that.
«While I complain of being able to see only a shadow of the past, I may be insensitive to reality as it is now, since I'm not at a stage of development where I'm capable of seeing it.» Claude Levi-Strauss (Tristes Tropiques, 1955)
Hi Bill, That was my initial thought about ref and out being more visible. For someone who's trying to keep all of these things straight, that kind of hint is important. I'm definitely a big fan of extension methods and have written several that I uses often. Of course some of them do things that can already be done with Null coalescing operator and null conditional operators, but I haven't used those in practice and so I forget about them... and LINQ, geez, I feel like I'm stuck in the dark ages until I get up to speed with those things.
The lack of surety in programming is part of the reason software is fragile.
If you do get into the "functional programming" thing, as in F#, you will have reasons, imho, to think about the issue of "immutability" ... F# enforces that strictly.
Marc Clifton's recent articles here that demonstrate FP approaches with C# are very interesting.
I am inclined, now, to do without 'ref and 'out, and make my classes as immutable as possible using 'get only Properties, etc. You can see this in the second extension method above named 'Clone.
With a very complex Class, copying all the field/property values into a new object might be very expensive; in that case, is the Class "more immutable" if there is a specific method that modifies one or more class instance members values ? Not yet sure on that one.
In any case, I think it imperative to think carefully about when, how, and where, any Class instance may be modified.
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
Last Visit: 31-Dec-99 19:00 Last Update: 2-Feb-23 21:06