Click here to Skip to main content
15,390,740 members

Comments by codetowns (Top 27 by date)

codetowns 13-Dec-17 5:51am View
   
Sorry the dots were supposed to show total width as up to 8*32=256 bits. I didn't explain myself well enough.
codetowns 12-Dec-17 14:38pm View
   
No, it's 32 bytes with 8 bits in each byte.
codetowns 12-Dec-17 12:23pm View
   
Cack-handed is right! It revolves around the fact that I have a 32 Byte array which I have to add a byte to. I'm surprised .NET doesn't let me do it in one line!
codetowns 12-Dec-17 11:46am View
   
Thanks. My C# is poor but I think I understand the idea - I have to loop it and add it manually.
codetowns 11-Dec-17 14:59pm View
   
Yes, but what happens when 11111111 has 1 added to it? The subsequent byte would then need to be added to.

Is the only solutions to iterate each byte until there is no contribution from the last one?
codetowns 1-Feb-15 6:07am View
   
Yes, delayed retry on exception is a good idea. I would go the database route if the shared folder was always on one server but it isn't so I guess I would have to install it on all machines for this to work. Anyway many thanks Zoltán.
codetowns 30-Jan-15 9:01am View
   
Thanks Zoltan. Apologies if 'logging' isn't the word - I am pretty much self taught so have a few gaps in my knowledge!

Yes, I have file sharing already setup and I have implemented FileSystemWatcher to flag file changes. I'm really only after a very basic method and am loath to go down the database route at the moment.

I had a basic implementation of this working by creating/deleting 'check' files in the shared folder. The problem is it produces file sharing exceptions from time to time.

Is there a way around file sharing exceptions in a Windows network?
codetowns 26-Jan-15 6:18am View
   
Many thanks Sergey. I think the hint helps me and your suggestions on copying methods is valuable.
codetowns 28-Aug-14 13:29pm View
   
Fantastic Richard!

It worked first time and is MUCH faster.

Many thanks for your help!!!
codetowns 17-May-14 11:06am View
   
Many thanks - two good ideas !
codetowns 17-May-14 11:06am View
   
Many thanks - two good ideas !
codetowns 10-Sep-13 3:41am View
   
Thanks so much for taking the time to look at it Mike-MadBadger. I'll sit down and see how your code works and incorporate it.

Cheers all!
codetowns 9-Sep-13 17:15pm View
   
That's great. (I didn't realise you could use a FirstODefault Method).

Many thanks 7681169 !!!
codetowns 23-Jun-13 5:32am View
   
Well thanks for that. Strangely they compile from the "play" button at about the same speed. It is running the bin\Release\EXE that has the delay.

One thing I have noticed and perhaps I should have mentioned is that Visual Studio sometimes complains that a customised control I am using (from x86 times) should be built for the target x64 processor. All appears to work fine in the EXE but could this be what is slowing down the Release version?

Anyone know what would VS need me to do to the control?
codetowns 7-May-13 3:29am View
   
Thanks for the replies. Well I fear you are both seeing my ignorance but I would like to do both if possible. I am unsure how to capture the textbox caret from the code I linked to and would also welcome any advice of how the character position could be captured without editing (with I guess some sort of mousemove event?).
codetowns 26-Mar-12 8:42am View
   
Yes, many thanks for that link!

I've now got it searching in halves until it finds a point. Failing that it knows the two nearest ones for interpolation.
codetowns 26-Mar-12 8:40am View
   
I was unaware of that 'points.where' function - interesting. As the straight line method was needed anyway (as you said y = mx + c)I decided to do the binary search method in the end. Thanks for the reply!
codetowns 25-Mar-12 6:34am View
   
Apologies and thanks for the reply.

It is sorted low to high in Y but is not uniform. X has a range of around + 50 to - 50. So it is something like:

15,1
25,3
-15,5
-17,6
5,9
10,21
etc.

I tried the array.find but it appeared to me that the predicate function only took a point (and not the required Y without a public variable), and also would fail on a missing Y. It sounds stupid I know but I guess this is my problem of being self taught! Perhaps there is a suitable array method?

codetowns 5-Nov-11 7:26am View
   
I have stumbled across that website before and will revisit, thanks. Interesting about the image being upside down. I assumed that point 0,0 would be the first bit in the first byte of array Eachbyte. Is that not right then?
codetowns 5-Nov-11 7:23am View
   
Thanks for the reply Yvan. The Hex representation is new to me. Maybe I should have shown that I was looking at the CurrentByteBit of EachByte(CurrentByte) to see if it was on. The output still doesn't resemble the original for some reason though.
codetowns 2-Sep-11 11:28am View
   
Well I think you are all correct but looking at what I have now, it is very difficult to factor stuff out without causing a lot of problems. In the future I plan to design more classes but may put up with what I have done so far - Partial Classes and a Module may help I guess.

Strangely, although the problem isn't particularly unusual (large image editing and vector capture program), I find it very difficult to imagine how to use Class-based objects over Subs and Functions. Perhaps that is the danger of being self taught !?
codetowns 2-Sep-11 4:13am View
   
Thanks Philippe. A good idea as currently mine are all over the place. Thanks for the links below too.
codetowns 2-Sep-11 4:12am View
   
Thanks Marcus. I will work out how I can subdivide into separate classes.
codetowns 1-Sep-11 10:45am View
   
Many thanks John! I'm self-taught (from scratch) over the last 6 months and I guess I have been putting off rationalising the code which is currently way over 1000 lines. I guess I'll have to read up on Partial Classes.
codetowns 5-Jul-11 13:16pm View
   
Deleted
Hi R025. Yes I saw that and played with the .exe and it still has an exception at the limit unfortunately. I'm sure it doesn't have to though because it does only load part images. I'm still deciding on the best way forward on this. Cheers.
codetowns 3-Jul-11 15:53pm View
   
Thanks for the replies. I will now attempt to write something for this.
codetowns 30-Jun-11 11:12am View
   
In the end I used the extrapolation formula from Wikipedia and all is well with it. Am very pleased and am learning all the time. Cheers!