|
Oh, now I get why you want lamingtons...
|
|
|
|
|
I have been going round and round in circles trying to get a (fairly) simple class to work with both foreach and Linq .Select , .Sum methods.
The foreach part has been working for hours.
But the Linq stuff? Nope, can't even get it to compile ... Time for a break, I've done this before and had no problems, so why the heck are you playing me up today?
I'll come back to it tomorrow, but I've had enough of useless google results and my head hurts.
This happen to you often?
"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!
|
|
|
|
|
Well, you know this programming thing is just a fad. Try Wordle.
|
|
|
|
|
I just did:
BEGAN - G+A Green, others Grey.
CIGAR - G + A + R Green, others Grey.
SUGAR - Five Green.
Lucky, lucky, lucky!
"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!
|
|
|
|
|
Spoiler alert!
SHEAR - S+A+R Green, other grey
SOLAR - ditto
SUGAR - All Green
Typical. I've played five times, and usually get it in three, yesterday's in four.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
Damn! Took me four tries today. I have only done one in three guesses, in the last 10 days.
Incidentally, I don't know if you saw it, but there was an article in The Telegraph last week with the headline "Physicists Crack Wordle". Apparently a physics professor and a Computer scientist inspected the web page's source and found the link to the 'secret' word list. Obviously extremely clever people.
|
|
|
|
|
You're good! Mine was
ROUTE
GROUP
BUGGY
SUGAR
|
|
|
|
|
You call that lucky? My first attempt often is SOLAR; triple green today. So I got sugar in 2.
Magnificent it said.
Luc Pattyn [My Articles]
The Windows 11 "taskbar" is disgusting. It should be at the left of the screen, with real icons, with text, progress, etc. They downgraded my developer PC to a bloody iPhone.
|
|
|
|
|
I came here to get away from the ubiquitous Wordle posts on Facebook and what do I find? More elephanting Wordle!
Try this instead, it's even more addictive, Wiki History Game[^]
So old that I did my first coding in octal via switches on a DEC PDP 8
|
|
|
|
|
|
Wonderful when it works ...
"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!
|
|
|
|
|
I'm not sure why it's funny or cool and deserving of an upvote to (hopefully pretend to) not know a standard part of .NET that's been around for 15 years
Imagine buying a new car and the salesperson asks "what's (adaptive) cruise control?" or "what's BlueTooth?" or "electric cars?"
Not so funny then and you'll probably go to another car garage.
But when it comes to programming it's totally okay to bash technology that hasn't been around since the 90's
|
|
|
|
|
We really need a sarcasm message type!
Honestly, I only deal with linq enough to get through the problem at hand, then I forget it until the next time! Is that dementia?
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
kmoorevs wrote: We really need a sarcasm message type! That's the problem, I'm not even sure it's sarcasm
Plenty of people in our industry who are always bitching on those new technologies and claim things were better and easier in the old days.
For example, I knew someone who started a new VB6 project... In 2014
This was a professional developer (although I guess "professional" really wasn't applicable), hired by a professional company, for a commercial, well-paying client.
I just heard from a friend who has been hired by a company to solve problems with their new application.
It was built two years ago, but using 15 year old technology because that's what the architect knew.
Long story short, he can't wait to be out of there because all he does is fight said architect because the architect doesn't want to budge an inch.
An ex-coworker of mine once said "oh, that's one of those places where you actually have to learn and stay current" when I told him about a new job
I have examples to spare, so tell me, was this sarcasm?
|
|
|
|
|
kmoorevs wrote: Is that dementia?
I prefer to think of it as "a limited working set"
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
What’s .NET?
And why are you .SHOUTING!???!?
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
SelectMany
I'll get my coat and monad...
|
|
|
|
|
OriginalGriff wrote: The foreach part has been working for hours.
But the Linq stuff? Nope, can't even get it to compile
Sounds like you forgot to implement IEnumerable<T> .
foreach will work with anything that implements the non-generic IEnumaberable , or anything that looks like it implements that:
class Foo
{
public FooEnumerator GetEnumerator() => new();
}
class FooEnumerator
{
private bool _done;
public int Current => 42;
public bool MoveNext()
{
if (_done) return false;
_done = true;
return true;
}
}
Foo x = new();
foreach (int y in x)
{
Console.WriteLine(y);
}
LINQ is much more pernickety - if it doesn't implement IEnumerable<T> (or, for the Cast and OfType methods, IEnumerable ), then it doesn't work.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That's what I was trying but it keeps on complaining.
I'll say "stuff it" for the night, and knock up a trivial class to add it to tomorrow. Once that works, I'll upgrade the real thing.
"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!
|
|
|
|
|
So is it a violation of the Lounge rules if I ask you to post the non-working code here?
|
|
|
|
|
Nope, but it might be if I did!
"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!
|
|
|
|
|
Not to worry, the codez is right over there >> SO
Where is my coat?
>64
Some days the dragon wins. Suck it up.
|
|
|
|
|
You don't even want to know Grif.......
You don't even want to know......
|
|
|
|
|
Since Pluto was ousted to keep out thousands of irregular orbiters of Sol, the clear definition of the word 'planet' has been: a celestial body moving in an elliptical orbit around a star
The JWST has now achieved L2 orbit - in line with Earth's orbit of Sol. So does it now count as a planet, or is mass an issue?
|
|
|
|
|
Mass is only an issue for Roman Catholics.
|
|
|
|