Skip to content
  • Converting and merging js to c# .

    C# csharp javascript linq help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Moving some outlets...

    The Lounge javascript cloud csharp linq com
    23
    0 Votes
    23 Posts
    0 Views
    M
    And now you know why the power outlets have never been moved from the centre of the office. Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
  • Sound of the Week

    The Lounge javascript cloud csharp linq com
    7
    0 Votes
    7 Posts
    0 Views
    Sander RosselS
    peterkm wrote: Nice ... makes me also think about Harakiri For The Sky Harakiri For The Sky - Fire, walk with me - YouTube Listened to their latest album because a friend recommended it to me. Good stuff, but somehow not really my cup of tea. Can certainly listen to it though. This track is nice as well. peterkm wrote: Also Insomnium comes to mind ... :) Insomnium - Black Heart Rebellion (HQ) (LYRICS) - YouTube Nice one! :thumbsup: Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
  • Sound of the Week

    The Lounge javascript cloud csharp linq com
    8
    0 Votes
    8 Posts
    0 Views
    D
    Sander Rossel wrote: and he still listens to it too. But of course! :thumbsup: :-D Our Forgotten Astronomy | Object Oriented Programming with C++
  • Aaaaaaand I'm back

    The Lounge javascript cloud csharp linq com
    5
    0 Votes
    5 Posts
    0 Views
    P
    Shouldn't be running MS-DOS anyway 😁 Paul Sanders. Not that the story need be long, but it will take a long while to make it short - Henry David Thoreau Some of my best work is in the undo buffer.
  • So... My email just stopped. Again.

    The Lounge javascript cloud csharp linq com
    22
    0 Votes
    22 Posts
    2 Views
    J
    use Thunderbird!!! "A little time, a little trouble, your better day" Badfinger
  • Linq to SQL With Enum On Null Field [MODIFIED]

    C# csharp database linq question
    12
    0 Votes
    12 Posts
    0 Views
    Richard DeemingR
    Depending on how well the ORM works, you may be able to use: Prefix = (NamePrefix?)p.Prefix ?? NamePrefix.None, NB: Using an enum for a name prefix or suffix seems like a bad idea. What happens when your users try to add a person whose prefix / suffix doesn't exist in your list? Are you going to make that person wait while you recompile your application? I'd suggest either using a lookup table, or just free-text values. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Sound of the Week

    The Lounge javascript cloud csharp linq com
    6
    0 Votes
    6 Posts
    0 Views
    Sander RosselS
    This is great :thumbsup: Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
  • Sound of the Week

    The Lounge javascript cloud csharp linq com
    8
    0 Votes
    8 Posts
    0 Views
    Sander RosselS
    PeterKM wrote: :thumbsup: :thumbsup: :thumbsup: ... wonderful (my mouse got stuck from enthusiasm :) ) :D PeterKM wrote: and somehow it brings back this Flyleaf, too ... After listening to your song I get that :D Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
  • Linq TO SQL DistinctBy Question

    C# database question csharp linq help
    4
    0 Votes
    4 Posts
    0 Views
    Richard DeemingR
    It depends. Are you using the DistinctBy method added in .NET 6, or a different implementation? And does the ORM you're using translated DistinctBy to SQL, or does it evaluate it on the client? If it evaluates it on the client, and you're using the .NET 6 method or something equivalent, then technically it will return the first item it encounters within each group. However, this is an implementation detail, and you cannot rely on it. And since you don't order by the ID, you can't guarantee that the database will return the records in any ID-related order. If you always want the lowest ID, then you need to be explicit: var jobSequenceSheets = dc.JobSequenceSheets .Where(jss => jss.JobId == jobId) .Where(jss => jss.RevisionNumber == maxRev) .GroupBy(jss => new { jss.Plan, jss.Elevation }, (_, items) => items.OrderBy(jss => jss.ID).First()) .OrderBy(jss => jss.Plan).ThenBy(jss => jss.Elevation) .ToList(); NB: Depending on your ORM, you might need to stick an .AsEnumerable() between the second .Where(...) and the .GroupBy(...) to force client evaluation of the grouping. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • I am unsure whether I am lazy or sensible

    The Lounge csharp help code-review linq com
    10
    0 Votes
    10 Posts
    0 Views
    J
    If you ever meet someone who loves and embraces changes I think they're either worth getting cozier with or very much not. It's not always one or the other in all cases. But I'm pretty sure it's one or the other in any distinct case. The bigger point maybe being that people do generally dislike change. Everyone in the boat will have a degree of apprehension if you go messing with the bottom of it. Maybe even more so if they don't have the time to fully reassure themselves you're patching vs drilling.
  • 0 Votes
    3 Posts
    0 Views
    Richard DeemingR
    To write: Enumerable.Range(1, N).AsParallel() .Select(n => n * 2) .Select(n => Math.Sin((2 * Math.PI * n) / 1000)) .Select(n => Math.Pow(n, 2)) .Sum(); with a single Select would be more like: Enumerable.Range(1, N).AsParallel() .Select(n => Math.Pow(Math.Sin((4 * Math.PI * n) / 1000), 2) // 2 × PI × (n × 2) === 4 × PI × n .Sum(); However, it shouldn't make a huge difference. LINQ already optimizes .Select(x => fn1(x)).Select(x => fn2(x)) to .Select(x => fn2(fn1(x))), so the only extra overhead would be from calling multiple delegates rather than just one. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Sound of the Week

    The Lounge javascript cloud csharp linq com
    9
    0 Votes
    9 Posts
    0 Views
    Sander RosselS
    Totally hearing it. I got some Hooverphonic[^] vibes as well, mostly because of the singer. Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
  • Who called it "malloc()"...

    The Lounge javascript cloud csharp linq com
    16
    0 Votes
    16 Posts
    0 Views
    G
    Daniel Pfeffer wrote: Running on good old DOS, you could easily read (and sometimes write) to NULL Back in the day my product ran under the DOS4GW extender (just like DOOM!). In that environment I had both real-mode and protected-mode code for things like interrupt services in order to reduce unnecessary mode switches. Dereferencing NULL meant different things happened depending on which mode you were in. My hindsight has cataracts, so good times. Software Zen: delete this;
  • Sound of the Week

    The Lounge javascript cloud csharp linq com
    7
    0 Votes
    7 Posts
    0 Views
    Sander RosselS
    Nice one indeed! :D Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
  • 0 Votes
    5 Posts
    0 Views
    P
    You'll get to the bottom of it when push comes to shove.
  • Lists C#

    C# csharp help linq sales tutorial
    8
    0 Votes
    8 Posts
    2 Views
    R
    Thanks James, this code was very useful Regards Rui
  • Sound of the Week

    The Lounge javascript cloud csharp linq com
    2
    0 Votes
    2 Posts
    0 Views
    R
    Around our house it is common when ever something is available in a 2-pack my wife or I will say to the other, 2-pack for sure! and in the cart it goes. :thumbsup:
  • Sound of the Week

    The Lounge javascript cloud csharp linq com
    10
    0 Votes
    10 Posts
    0 Views
    Sander RosselS
    Wow, got some Alan Parsons vibes in that first second. Pretty much vanished in the third second or so :laugh: Didn't know them, sounds good though :thumbsup: Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
  • 0 Votes
    19 Posts
    0 Views
    Richard DeemingR
    Here lies the body of our MP Who promised lots for you and me. His promises did not fulfil, And though he's dead, he's lying still. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer