|
You can add attributes to the backing field for auto properties / events by prefixing the attribute with field: - for example:
[field:NonSerialized]
public Action Foo { get; set; }
[field:NonSerialized]
public event EventHandler Bar; Attributes (C#) | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Once again you have proved your eagle-eyes see all, know all
Why the devil didn't I come across that in poring over the docs on BinarySerializer (again), and related threads on SO ?
The "field" prefix is mandatory on Properties of Type Action and Func ... and, I assume Predicate ... you don't want serialized, but, optional on Func and Action Fields you don't want serialized, where [NonSerialized] works fine.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
modified 1-Jun-21 9:43am.
|
|
|
|
|
... Version 91.0.4472.77 (Official Build) (64-bit)
Well, apparently it runs JS 25% faster than V90.x.y.z
And ... I have no way to measure it, but yes, it does seem faster to load CP pages on my Surface.
That may be me expecting to see improvement, but ... who knows?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: And ... I have no way to measure it, but yes, it does seem faster to load CP pages on my Surface. Are you sure that is really due to it? Maybe the hamster got a redbull this morning
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
... that you can explain the purpose of in one (reasonable) line, say a sentence or two brief ones.
Mine is implementing a 2D polygon fill algorithm on a write only display device.
I know how in theory - vaguely - to do it, but it's mind bending to attempt in practice, and I say that as someone who writes old-school table based LR parsers.
UPDATE: Randor humbled me. There's an easy way to do this. I even knew about it at one point but blanked on it here. I am very grateful, despite feeling a little foolish.
My most complicated algo... probably GLR parsing. In terms of ones I haven't solved - there's one that should be simple but I can never get it right -> converting an NFA or DFA state machine into a regular expression.
Real programmers use butterflies
modified 31-May-21 10:18am.
|
|
|
|
|
|
a sentence or two brief ones.
or say, a tweet if I'm being generous. If you can put it in one tweet.
Real programmers use butterflies
|
|
|
|
|
Something bounded by two points.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Technowockally, that a line _segment_.
|
|
|
|
|
That must be the H.264 video encoding and decoding algorithm, I don't even want to look at the newer H.265 algorithm!
|
|
|
|
|
I've never tackled that one, I just punt that kind of thing to ffmpeg
Real programmers use butterflies
|
|
|
|
|
Many (~ 500) moons ago, I had to write a line "fitting" program with some unusual constraints. None of the usual "least squares", "cubic spline" etc. methods did exactly what was wanted, so I had to roll my own.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
true love
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
Treating love like an algorithm might have something to do with it.
Real programmers use butterflies
|
|
|
|
|
When "true love" is your patient, then, doctor, treatment "primum non nocere" is even more critical.
I find it fascinating that the original sigil of the Asclepian healing cult had only onw serpent twining around the staff, not two (as on the Caduceus of Mercury).
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
Obligatory xkcd: Useless
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Given these truths:
o Time is money.
o Money is the root of all evil.
o Girls cost time and money.
We obtain
time = money
_____
money = V evil
girls = time x money
girls = money x money
_____ _____
girls = V evil x V evil
girls = evil
|
|
|
|
|
You forgot the branch cut - a square root has two solutions. This gives us:
time = money
_____
money = ± V evil
girls = time x money
girls = money x money
_____ _____
girls = ± V evil x ± V evil
girls = ± evil
This is closer to the real world, in that:
- Money may be either positive (credit) or negative (debit)
- Some girls are good
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Greg Utas wrote: Given these truths:
o Time is money.
o Money is the root of all evil.
o Girls cost time and money.
Time is worth far more than money ( money can't ( always ) buy me time )
"_The love of_" money is the root of all evil. ( Actually, I'd say power(?) domination(??) )
Proposition 3 I won't touch.
|
|
|
|
|
Mine, and I have not completed it after a few years.. :/
Is to do 2D shape (bordered by bezier line) intersection...
|
|
|
|
|
honey the codewitch wrote: Mine is implementing a 2D polygon fill algorithm Are you saying that the most complex algorithm you've ever implemented is a depth-first/breadth-first traversal? Or am I misunderstanding something. I glanced through your latest articles but didn't see anything mentioned.
I guess the most complicated I've dealt with is noisy sparse signals recovery using Kalman filter[^] variants while I was working at Marine Technologies[^] circa ~2006. Kalman wasn't even the hard part... the underlying Gaussian mixture model[^] was where all the magic really happens. The reason it's considered difficult is because it's an approximation and there is always a better approximation to be found. We had to hire a mathematics professor from Norway as a consultant to help. Math is hard.
Best Wishes,
-David Delaune
|
|
|
|
|
It's just not depth first or breadth first traversal - that part is easy. I think you're thinking of a flood fill algorithm, which won't work on a write only device because you need to read the pixel data. It also won't work if you try to draw a filled polygon over existing draws.
What I need to do for example:
_/\_
\__/
Say that's my poly
here /\ I need to go top to bottom, left to right from the beginning of each point of the left line to each point on the right line, across.
I also need to sort the points so I can figure out where to start drawing.
Real programmers use butterflies
modified 30-May-21 6:06am.
|
|
|
|
|
Hi,
A few more questions;
1.) Does your algorithm support polygons with holes[^]?
2.) Did you invent something new or implement an existing algorithm?
3.) Where can I find your work? I'd like to look at it.
Best Wishes,
-David Delaune
|
|
|
|
|
1. Heck no!*
2. I haven't been able to implement the algorithm. It is described at tutorialspoint somewhere but no implementation
3. I'll publish it here when I solve it.
Sorry if my OP implied I solved it. I did not mean to. If I had solved it I'd have found something else to get stuck on by now.
* adding, there's no way to even describe it with my API, except you should be able to approximate any polygon with holes by one without one that loops back on itself - as long as it's filled you won't be able to tell the difference.
Real programmers use butterflies
|
|
|
|
|
I just figured out a much easier way in theory to do it. Just scale the thing smaller and smaller by 1 pixel in any direction and keep redrawing it until you get down to a single point.
Unfortunately, in practice this won't work - the way the bresenham line drawing algo works it will leave little holes in the result. *sadface*
Real programmers use butterflies
|
|
|
|