|
Niklas Lindquist wrote: Coming from C++, I overloaded operator== et al, to compare the actual values
I am taking that to mean that you are overloading others besides equality.
Coming from C++ I almost never used operator overloading. At two C++ shops it was specifically forbidden to use it.
Excluding the comments about equality there can be specific circumstances where operators (all of them) might be appropriate to use.
Numeric representation are example of this. Thus Length might be a suitable candidate.
Angle on the other hand is less clear. But possible.
But hypothetically does a "geometry primitives" include a circle, square and rectangle?
If so please explain, objectively, how one implements less than for a square. And how one represents it for a square and rectangle. And a square and circle.
And once you have that if someone else can come up with a different interpretation then - don't use operator overloading because the operation is not in fact clear and well defined.
As an example of this what does less than mean for an Angle? Seems obvious that 60 degrees is less than 90 degrees. However is 60 degrees less than 300 degrees? And if you think that is obvious then draw a 60 degree angle in a circle and explain what the 'angle' measures on both sides of the line.
|
|
|
|
|
jschell wrote: But hypothetically does a "geometry primitives" include a circle, square and rectangle?
Not in my problem domain. They all consist of a single double value. Maybe physics primitives would have been a better description.
jschell wrote: However is 60 degrees less than 300 degrees?
My angles does not wrap around. 0 and 360 are different values and they might go well beyond a full turn. I think you might confuse this with a normalized angle. But I see your point. If there can be confusion, there probably will.
Thanks.
|
|
|
|
|
Hello Everybody,
I want to know that how to use UML in c# for designing.
Thanks
If you can think then I Can.
|
|
|
|
|
That's not really a C# question. You're just asking how you can use UML to design code. The language choice is, effectively, irrelevant to designing with UML. Get yourself a UML design application, I use Enterprise Architect, but you can get StarUML[^] for free. Then, as long as you know UML, you are good to go.
|
|
|
|
|
Is google not available in your country?
".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 on Wednesday, April 13, 2011 5:49 PM
|
|
|
|
|
no
Joking...
If you can think then I Can.
|
|
|
|
|
use joke icon, if its a joke.
Looks like you original question was a bad joke too.
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Use the question icon, then you can earn Enquirer points!
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!"
— Hunter S. Thompson
|
|
|
|
|
Doesn't work.
".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
|
|
|
|
|
|
I changed the icon to the question icon, and my enquirer score didn't go up. On this message, I started out with the question icon, so let's see what happened.
(after checking)
It looks like you have to set the correct icon when you originally post the message. If you change it after the message is posted, your points don't increase.
".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
|
|
|
|
|
This is a test of the answer icon.
(after checking the results)
Uh oh... I wonder if Chris knows about this...
".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
|
|
|
|
|
how to detect the difference between a keyboard and a barcode reader, I managed to list the USB devices, and found the difference in serial number, and I also want to display the brand of each device, and I need your help at this level, thank you
|
|
|
|
|
One is used by a mindless drone chewing gum and pretending to work all day, the other is found in a supermarket.
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!"
— Hunter S. Thompson
|
|
|
|
|
Hi membre123,
I don't know who voted your question as good question. But, this is clearly not a C# question.
I appreciate your inquiring mind and thus does not down-voting you.
Please be advised about relationships between questions and forums.
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Barcode readers often use the keyboard interface for entering their data into text fields. Consequently, I'd expect such readers to show up as "keyboards" also. Some other devices pretend to be keyboards just to get some electrical power via the USB port of the computer.... It's not wise to believe that all keyboards listed in device manager are really keyboards.
When you can get the Vendor ID and Product ID from the list of USB devices, you could compare those data with your list of your supported barcode readers - not a nice solution, but it would work.
|
|
|
|
|
Hello,
Would anyone please give me any idea about making a trial version (time limited) of my C# Windows Software. Or if you know any cheap software tool who can do that. Is there any nice tool available who will do the following things
1] Obfuscators
2] Setup maker (installer) (With checking .Net framework and sql server installed or not, ..)
3] time limited trial version.
I would highly appreciate your responses..
Thanks and regards
Ravi.
|
|
|
|
|
You can store your installation time details in registry or file system.
Then Calculate this value to current date.
Yes Redgate provide these applications.
If you can think then I Can.
|
|
|
|
|
So I mentioned in passing to my boss a few weeks ago that I wrote a library "at home". He immediately said "cool, I own it". Now, he is often sarcastic and says weird stuff alot, so its hard to judge him. It is my understanding that if I do something "at home", he doesn't own anything. Questions may arise of course if I used company or proprietary knowledge, but its not really related except that at work I use C# and the library I wrote is in C#. It uses no company related knowledge. I never mentioned it again and he quickly forgot about it.
Whats the situation here? its more of a reusable "my bag of tricks" type DLL that every programmer has.
I kind of want to use parts of it at work (I do that with a C++ library already). In regards to the C++ library I just used it and he didn't really say anything and he knew about it. I just said "I'm using it for this component". So it would kind of be the same thing. I didn't ask for money in either situation and don't intend to. Its "free with all the source". I'm just not going to reinvent it at every place I go to.
Its kind of like no programmer is going to re-invent the wheel 5 times. lol.
I know the safe thing to do is to just never mention it again lol, but my interest outside of work is in the reusable toolkit type thing rather then finished applications, so that would be kind of useless if I can't use it at work.
I have no interest in selling it or posting it online, etc. As I said, its just "my bag of tricks.dll".
|
|
|
|
|
my understanding has always been, if you didn't write it on company time, equipment or using their software, and its not anything related to a project at work(as in directly related, otherwise we would never be able to use a button again) then they can get bent its not theirs. I have heard rumors of contracts that essentially state "if you write code EVER while employed here its ours" but I have never seen one personally and would never sign one either. My time is my time to do as I damn well pleased including personal development, both literal and knowledge-wise.
That being said I don't know about using it in apps you write for them. Unless its some revolutionary algorithm but just standard "make the lugnuts for the wheel easier to get on and off" library I don't see where its an issue. Then again I'm not a sleazy lawyer either.. lol
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.
|
|
|
|
|
Yeah, it has nothing to do with the product directly. I'm not interested in getting anything for it. Its nothing revolutionary, its pretty much just a custom control library. Its pretty much exactly what you said: standard "make the lugnuts for the wheel easier to get on and off" type library.
If I start asking about it, it can only raise flags lol.
Every developer has that kind of library.
|
|
|
|
|
My university contract said something like that. All code I ever wrote while studying is technically theirs.
Of course they have no idea what I wrote or when, so I could just lie about the date if they're ever going to complain - which is extremely unlikely.
|
|
|
|
|
mine was similar. anything done on their equipment etc etc.. I did my first Android app for my capstone project. And made damn sure EVERY line of code was written on my laptop, using MY Eclipse not theirs etc.. just in case
They did not have the study part.. just on their equipment and whatnot.
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.
|
|
|
|
|
that's only true if you signed paperwork stating that specifically.... other than that, its all yours!
on a related topic...
my wheel is rounder than yours
|
|
|
|
|
Yeah, I asked a co-worker and apperently we did sign something like that. Oh well. Guess I won't use my cool stuff here . Not even worth the hassle. I'll save it for the next job and then just declare it as prior art. Can't really do that here.
|
|
|
|