|
these are the two different operations i have:
E 10:45:03 Line 4 : Dispense
tip 1 : dispense 20.56µl 6, 3 Deep Well, landscape [1,1]
10.00µl ">> Water << 23" Fixed <3 - 50µl> Single
and
E 10:45:05 Line 5 : Wash Tips
wash (2ml + 1ml), grid 20 and grid 20
the first line is great works fine, but with wash tips it doesnt seem to follow the pattern. when i replace the 2nd line in wash tips with the 2nd and 3rd line of dispense everything is kosher.
another problem im having is, id like to have the file read line by line but i cant seem to get that done too.
|
|
|
|
|
sorry for the trouble... i think i fixed it... again thanks and sorry
|
|
|
|
|
I'm developing a vector graphics app and I'm to the part of allowing rotations to the shapes. Since I'm using C# I don't know all of the pros and cons of the two following methods. Could one of you gurus out there clear up the confusion? Keep in mind that I'm using the Matrix class for page scaling and panning. The functionality that I'm refering to must allow independent transforms on each shape.
Method 1: Rotate the shape (vectors) purely by trig. If the user then resizes the shape, the shape must be resized along the rotated axis.
Method 2: Use the matrix class to transform the vectors. My drawback on this method is that on every paint and mouseover, mousedown, mouseout event, the shape would have to be repeatedly transformed. Wouldn't this be a cpu hog?
My code this week has no errors. But it's Monday morning and I haven't got out of bed.
|
|
|
|
|
Didn't you ask this before? I suggested you take a look at Piccolo.
Matrixes are going to be faster than trig. Transforming a point by a matrix is a handful of operations.
If you have a great deal of points, then regardless of using matrixes or trig, you will need to implement view caching / damage and spatial indexing.
|
|
|
|
|
Hey Mark,
Thanks for the info. I'll take a more serious look at Piccolo.
In the mean time I've done some research about matrixes. It does appear to be the way to go! My work will definitely be much easier.
Thanks again,
Richard Blythe
My code this week has no errors. But it's Monday morning and I haven't got out of bed.
|
|
|
|
|
I am coding an override for OnDragDrop , only DataFormat.FileDrop is valid, tested for in OnDragEnter and in the OnDragDrop handler.
I've just reviewed the code and noticed that I have put in a if (File.Exists(filename)) test before allowing the drop.
Is this test redundant? I mean, are there any circumstances in which a DataFormats.FileDrop can occur apart from when dragging from explorer, or other shell source.
This must be a really daft question but my brain is going in circles at the moment and I can't get my head round it.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: are there any circumstances in which a DataFormats.FileDrop can occur apart from when dragging from explorer, or other shell source.
I've never tried it, but I suspect any application can create a FileDrop event. Furthermore I suspect it is possible to do it such that your test would evaluate to false.
|
|
|
|
|
Cheers.
I'll leave it as is, I think, unless I hear otherwise from the C# sages.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Henry,
one can programmatically drop just about anything on an app, including non-existing files.
Also files can get deleted while a drag-drop is going on.
On the other hand, when a file gets operated on (as in after the drop), you need to have
error handling anyway, so you may as well skip the test.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Luc Pattyn wrote: when a file gets operated on (as in after the drop), you need to have
error handling anyway
Good thinking Batman!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
// StatusID =2
// xGetStatusOID = 2
if (StatusID.CompareTo(xGetStatusOID).Equals(true))
{
ii = 1;
}
else
{
ii = 2;
}
//Result
//ii = 2
|
|
|
|
|
well, CompareTo returns an int, saying whether the passed argument is less, equals or greater than the object.
You can rewrite your code like this:
ii = (StatusID.Equals(xGetStatusOID) ? 1 : 2);
That's all.
Regards
Sebastian
|
|
|
|
|
Hi,
what are you doing?
did you check the return type of CompareTo?
does your code even compile?
why not simply if(StatusID==xGetStatusOID) { ... } else { ... } ?
I recommend you buy a book on the language or technology of interest and study it.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
This code does compile and returns false,
perhaps you should of read what I wrote, it was a question.
|
|
|
|
|
ziwez0 wrote: perhaps you should of read what I wrote, it was a question.
No you didnt, you just posted some code!
Perhaps you should buy a beginner book on C# and work your way through it!
|
|
|
|
|
Hi j4amieC,
J4amieC wrote: No you didnt, you just posted some code!
Suject "Why not True"
http://www.thefreedictionary.com/why[^]
I asked a question?, perhaps if you spent more time reading what people write, maybe your reponse might be helpful (like Alan's post), instead of your alternative which was a quick dismissal of someone's question.
|
|
|
|
|
Hi,
yes you are absolutely right, it does compile (well, after one adds type declarations for all the variables used), although it does not make sense whatsoever.
CompareTo returns an int
int.Equals(true) returns false no matter what.
It may help to read some documentation[^] especially if you insist on using methods you don't really need and apparently don't understand well.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Friday, June 10, 2011 11:35 AM
|
|
|
|
|
Why use methods when operators will suffice?
|
|
|
|
|
is it because :
bool == 0; is false?
you are comparing an 'integer' to a 'bool' which is always false as they are different types
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Ok
Lets break your code into steps
int result1 = StatusID.CompareTo(xGetStatusOID);
// result1 will be zero as the values are equal
bool result2 = result1.Equals(true);
//result2 will be false
The overload of Equals your code would call is
public override bool Equals (Object obj)
and the documentation says
The return value is true if obj is an instance of Int32 and equals the value of this instance; otherwise, false.
Alan.
modified on Wednesday, February 4, 2009 12:01 PM
|
|
|
|
|
|
The page you provided a link to discusses string comparison.
How does that relate to the original question?
Further more whether CompareTo returns 0, 1 or any other number is irrelevant as long as
you apply .Equals(true) to it, since that will ALWAYS return false.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Friday, June 10, 2011 11:35 AM
|
|
|
|
|
Hi Luc,
Yes the link was a string comparision, but dont forget that Int32 Supports the CompareToMethod,
and they both return 0 if "strA equals strB."
And as mentioned I thought it would return 1 and not 0.
|
|
|
|
|
You read the wrong pages, you think you read the opposite of what they say,
you ignore earlier good advice, in short you don't have a clue.
I suggest a career change.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Friday, June 10, 2011 11:35 AM
|
|
|
|
|
Thanks for that, keep up the good advice....
|
|
|
|