|
How to take picture from camera(directx.capture)? (please help me)
|
|
|
|
|
Don't post the same question in both Q&A and the forums - is duplicates work and annoys people.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Compensated for 1-voting 'tard...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
And then he 1-voted my post that called him a 'tard...
Some people... SHEESH!
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Compensated - both of them!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
OriginalGriff wrote: Compensated - both of them! Can excess compensation lead to decompensation, triggering an infinitely recursive bi-cycle ?
The front-wheel that turns in my mind contemplating this has so many spokes I experience it as solid, but I know that it is not: I can't see the back wheel
best, Bill
"Anyone who shows me my 'blind spots' gives me the gift of sight." ... a thought from the shallows of the deeply shallow mind of ... Bill
|
|
|
|
|
Lately I have been exploring the interesting world of the Tuple object in .NET 4. I find it interesting that a Tuple's internal Items (buckets ? ... or whatever is under the hood) can take any objects of any Type, and those objects can be accessed, via the getter, then used without casting.
And, nice that Tuple exposes Sort, Equivalence/Equality, and Comparison.
Given that Tuples are, by design, immutable: I am curious under what circumstances you would choose to use Tuples.
Appreciate any thoughts, and I do realize this is a more "general" kind of question than is usually asked here, but I can't think of a more appropriate forum on CP.
thanks, Bill
"Anyone who shows me my 'blind spots' gives me the gift of sight." ... a thought from the shallows of the deeply shallow mind of ... Bill
modified 5-Dec-11 4:16am.
|
|
|
|
|
Very rarely and for short periods only; for real work I write a class/struct. I think they're ridiculous.
|
|
|
|
|
I used it in a comment once:
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
modified 5-Dec-11 8:47am.
|
|
|
|
|
[groan] Comments like that should be in the Lounge
No comment
|
|
|
|
|
If we can't laugh at each other, who CAN we laugh at?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
John Simmons / outlaw programmer wrote: who CAN we laugh at
Everyone else who are not us of course.
No comment
|
|
|
|
|
|
There is an article here on CP which suggests some possible uses:
C# 4 - Tuples[^]
|
|
|
|
|
+5 Thanks for this link ! I am continually urging QA questioners to search CP, so this does remind me I should "practice what I preach."
It would interest me to know the .NET performance aspects of Tuples compared to a solution in which structs were used as the basis for a collection that was sortable, comparable, etc. Anonymous types are another possible answer, but you can't "export" them, so for me they don't belong in this hypothetical comparison.
thanks, Bill
"Anyone who shows me my 'blind spots' gives me the gift of sight." ... a thought from the shallows of the deeply shallow mind of ... Bill
|
|
|
|
|
One occasion when rapidly developing an application I will use it as a return type when I need to return more than one variable. However, I usually end up refactoring it to be a real object.
|
|
|
|
|
I would never use one in production code. They might be useful for a quick hack to produce a technical prototype, but they seem like a step backward to me, in that you lose all semantic meaning of the type declaration. (You don't return ArrayList from methods, do you? Think about why not, and how much of that also applies to a typed tuple.)
It's trivial to create a custom data storage class to hold a multi-part return and you can give that a meaningful name, provide helpful reading or manipulation methods and so on which relate directly to the particular use you want to put the class to.
I use tuples in prototyping or dynamic languages where they are syntactically convenient and the expectations of meaning and type safety are relaxed (e.g. APL) – but even there, most of those languages now support the dynamic creation of objects which you can use to provide meaningful names for elements of the data. E.g. JavaScript:
function x(args){
return { thing: 'result'; type: 'awesome'; answer: 42 };
}
That seems much clearer to me than
return ['result', 'awesome', 42];
... and the same applies in C#. Add onto that the clumsy looking declaration for a tuple (Tuple<string, string, int> is as long as CleverMethodResult ) and I see no reason to use them.
|
|
|
|
|
Thanks Bob, for your thorough reply. Your wider perspective on the use of Tuples outside .NET is very valuable.
Right now the only advantage I can see in using them in C# .NET is that you can have Tuples with the same internal values for each Item be keys in a Dictionary, but that's a rather rare/strange usage.
It was fun, plumbing the depths of Tuples
Too bad there isn't a Form of Tuple that lets you establish "meaningful aliases" to use instead of Item1.Item2 ...
best, Bill
"Anyone who shows me my 'blind spots' gives me the gift of sight." ... a thought from the shallows of the deeply shallow mind of ... Bill
modified 6-Dec-11 22:24pm.
|
|
|
|
|
Hai, friends
Iam new to develop a application with multiple language in c#. i writed program for getting translated texts from database. and i put it in the form1's code event but it work only for the form1 i would like to get my translation to all my form my application have and each and every message showing in message box. so where should i put this translation code? in the program.cs page?
can anyone Help me by a small exmple?
Please Help me
Arunkumar.T
|
|
|
|
|
You need to read up on something called Separation of Concerns. There are plenty of C# examples that you should be able to get an understanding of. You should separate the translation code out into a separate cless. Good luck.
|
|
|
|
|
Which UI-framework are you targetting? WPF[^] or WinForms[^]?
Bastard Programmer from Hell
|
|
|
|
|
Trying to talk him in to taking a look at MVVM?
Cheers (and regards from Sinterklaas ) AT
Cogito ergo sum
|
|
|
|
|
Addy Tas wrote: Trying to talk him in to taking a look at MVVM?
Wouldn't hurt, but I was trying to talk him into taking a look at MSDN
Addy Tas wrote: Cheers (and regards from Sinterklaas ) AT
He'll have another chance at abducting me to Spain next year
Bastard Programmer from Hell
|
|
|
|
|
Please clarify: is this WinForms, or Web based, or ... ?
Also, exactly what do you mean by "translate" here: what exactly is the "translation code" ?
1. you could be saying you are pulling data from a database in one language, and then translating it yourself in your own code (or via some Web service, or by interacting with other software components) into other (multiple ?) languages, so different languages might be displayed in different Forms.
2. you could be referring to the issue of localization here, but I seriously doubt that.
3. or, are you saying you want to take this "translated text" you retrieved from the DataBase, which is already translated into one-and-only-one language, and display it in more than one Form: so the same content, in the same language is shown in every Form ?
And, where do MessageBoxes come into the action here: where does the content of the MessageBoxes come from ?
My guess is that you mean #1, but it would be good to know that for sure.
"Anyone who shows me my 'blind spots' gives me the gift of sight." ... a thought from the shallows of the deeply shallow mind of ... Bill
modified 4-Dec-11 21:10pm.
|
|
|
|
|
I'm guessing here, but the OP's question smells to me like localisation.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|