|
Quote: but is not for programming questions. Oh wait, nevermind, you have been here awhile so it's allowed.
And to answer your question, I have no preference.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
ZurdoDev wrote: Oh wait, nevermind, you have been here awhile so it's allowed.
Well its not really a programming question. If you wander across the tracks to SO you will see questions like this (asking opinions on something) are almost always closed as not relevant.
Now - I don't want to use SO as a guideline for CP but in this case...
ZurdoDev wrote: you have been here awhile
So he knows that some very good developers will answer the question here instead of being inundated by newbie responses in the C# forum!
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
DRHuff wrote: Well its not really a programming question. ... (asking opinions on something) I was going to answer him with something like that (I totally agree with you) but then I thought... not worthy to start with
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.
modified 24-Feb-20 11:33am.
|
|
|
|
|
DRHuff wrote: Well its not really a programming question. The title of his own message disagrees with you.
And I don't disagree with you. But I have seen newbie posters ask the same exact type of question and get flamed for it. Just making a point that most everyone will ignore.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
DRHuff wrote: being inundated by newbie responses in the C# forum! That is going to piss off Richard and Richard, those 2 answer the bilk of c# questions, calling them newbies should ge right up their noses.
Seriously the forums see very little idiocy, that seems to be limited to Q&A.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Mycroft Holmes wrote: Richard and Richard,
Wait - there are a couple of Dicks answering questions in the forum?
Mycroft Holmes wrote: Seriously the forums see very little idiocy, that seems to be limited to Q&A.
Shows you how much time I spend there...
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
I do have a small issue with your extension method.
It returns an array instead of an IEnumerable like everything else in LINQ.
That means it's directly evaluated even though you may not expect it (the original Repeat function isn't).
I guess you could rename it to RepeatToArray, but you'd possibly need an RepeatToList as well, and just naming it Repeat and returning an IEnumerable and then calling ToArray is almost the same...
Also, your Repeat extension method extends every possible object in .NET, which isn't a very good practice.
I imagine you don't need it everywhere, so maybe an internal extension method would be better.
Or it would need its own namespace so you always have to explicitly import it.
Having said all that, I prefer the second method.
To me, it's the best readable version and also the best performant in terms of memory and CPU (theoretically, because we're talking nanoseconds here).
|
|
|
|
|
Option 4:
Type[] expectedTypes = { typeof(string), typeof(string), typeof(string) }; No need to repeat the element type, or add the new[] keyword.
ToArray[^] delegates to the internal Buffer<TElement>[^] class. If the input implements ICollection<TElement> (which the result of Repeat doesn't), it declares and returns a single array of the correct size. Otherwise, it starts with an array of four elements; doubles the size each time it runs out of room; and then allocates a final array of the correct size once it's finished.
It's obviously not a huge extra overhead in this case. But it could add up if you're calling the code many times. And I don't think it really makes the code any clearer.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
you 'da man !
«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
|
|
|
|
|
@Marc-Clifton
Hi Marc, I am wondering why you'd ever need a collection where each item is a pointer to the same Type.
cheers, Bill
«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 27-Feb-20 3:05am.
|
|
|
|
|
Pic [^]
I'll bet the guy who was driving along when it happened had to make judicious use of cleaning materials.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: the guy who was driving along when it happened
This doesn't exactly look like a busy 4-lane highway to me...I'd say it would've been dumb luck if there was anyone around at all when it did happen.
|
|
|
|
|
Out in the sticks, here, families have owned the land either side of each road for well over a thousand years, and they don't like giving up even a few inches, so many of the roads, even busy ones, are pretty much the same width as they were when horses were the height of travelling technology.
In the town where I live, only one main road has been made wide enough for two cars (or one car and a tractor) to pass each other comfortably.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
My main point wasn't focused around the road's width; it was about the likelihood that anyone was around when that tree twig fell.
I've lived out in the sticks myself all my life, and I'd say I'm more likely to see a dumb deer jump in front of my car than see a tree fall on a road.
|
|
|
|
|
That looks like a bike path to me. For what it's worth, I've been riding a couple of times when a storm blew up, and had parts of trees fall nearby; can be a bit scary.
Software Zen: delete this;
|
|
|
|
|
In Friesland, that's almost a highway.
I couldn't see any bruising or scraping, down the fork of the tree, so it must have fallen pretty precisely into the 'V'. It probably would have been fun to watch, but I'm glad I went there "after the effect", so to speak.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: so it must have fallen pretty precisely into the 'V'.
I swear this is true:
Years ago there was a tree in a nearby forest with a hole in it (many feet off the ground), and we knew there was a family of raccoons living in there.
One day I'm guessing a raccoon lost its footing just as he was getting in, and must've caught his neck in the bottom part of the hole, and the weight of his body must've pulled him down enough that he got strangled right there and then. He hung there for months. Eventually, there was a raccoon's skeleton at the bottom of the tree, but the head had probably fallen inside the hole as it was nowhere to be found...
I thought nature was exceptionally cruel to this little guy.
|
|
|
|
|
|
It's all about guaranteeing the quality of the slurped data that they hand over to the feds.
Your safest bet is to forget it, and find a third-party solution.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: Your safest bet is to forget it, and find a third-party solution. That's what I am doing
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.
|
|
|
|
|
Just consider yourself lucky you even found a download link. I can't seem to find downloads for anything Microsoft related these days. Always just seems to redirect to some page about the software or some other unrelated page (regardless or being signed in or otherwise)
|
|
|
|
|
I know... I found a collection of old MSDN Magazines... a big % of the links were broken, luckily for me, tiping the "correct" link manually still found most of them, but there are issues where no example to be found (at least all my tries were unsuccessful)
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.
|
|
|
|
|
I have only seen that happen with apps that will only run on phones, for example. What are you trying to download?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I wanted to donwload Movie Maker 2012 (included in Microsoft Essentials), but the almost 1 hour I tried to find it only came out with it was deleted and sorted out in 2017 (I lastly installed it in 2016).
Then I wanted to give them the benefit of the doubt and give a try to MovieMaker 10 (its new option). There is when I got that.
Now I say... screw you, MS
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.
|
|
|
|
|