Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

George Swan

@George Swan
About
Posts
15
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Thought of the Day
    G George Swan

    It's actually a stack full of money -there's gold in them thar fills.

    The Lounge com question lounge

  • Thought of the Day
    G George Swan

    I thought an Alligator wearing a tunic was a snappy dresser?

    The Lounge com question

  • Article C# 8 New Features Plagiarised From Microsoft Docs
    G George Swan

    Sorry, Griff. I'm new to this. I never vote an article down but this was so obviously lifted from somone else that I thought I should report it. I would have thought that asking the question, 'is this your own work?' woud have prompted the author to add a reference. Regards, George.

    Spam and Abuse Watch csharp com regex question

  • Article C# 8 New Features Plagiarised From Microsoft Docs
    G George Swan

    Apologies, I am new to this and don't like reporting authors but the article did not even reference the source so I thought I should flag it up.

    Spam and Abuse Watch csharp com regex question

  • Article C# 8 New Features Plagiarised From Microsoft Docs
    G George Swan

    This article has code copied directly from this What's New in C# 8?
    Original

    public static string RockPaperScissors(string first, string second)
    => (first, second) switch
    {
    ("rock", "paper") => "rock is covered by paper. Paper wins.",
    ("rock", "scissors") => "rock breaks scissors. Rock wins.",
    ("paper", "rock") => "paper covers rock. Paper wins.",
    ("paper", "scissors") => "paper is cut by scissors. Scissors wins.",
    ("scissors", "rock") => "scissors is broken by rock. Rock wins.",
    ("scissors", "paper") => "scissors cuts paper. Scissors wins.",
    (_, _) => "tie"
    };

    Article

    public static string PlayRockPaperScissors(string first, string second)
    => (first, second) switch
    {
    ("rock", "paper") => "rock is covered by paper. Paper wins.",
    ("rock", "scissors") => "rock breaks scissors. Rock wins.",
    ("paper", "rock") => "paper covers rock. Paper wins.",
    ("paper", "scissors") => "paper is cut by scissors. Scissors wins.",
    ("scissors", "rock") => "scissors is broken by rock. Rock wins.",
    ("scissors", "paper") => "scissors cuts paper. Scissors wins.",
    (_, _) => "tie"
    };

    Original

    public static decimal ComputeIncomeTax(Address location, decimal income) =>
    location switch
    {
    { State: "TX" } => income * 0.25M, //Property pattern
    { State: "MA" } => income * 0.31M,
    { State: "NY" } => income * 0.35M,
    // other cases removed for brevity...
    _ => income * 0.30M
    };

    Article

    public static decimal ComputeIncomeTax(Address location, decimal income) =>
    location switch
    {
    { State: "TX" } => income * 0.25M, //Property pattern
    { State: "MA" } => income * 0.31M,
    { State: "NY" } => income * 0.35M,
    // other cases removed for brevity...
    _ => income * 0.30M
    };

    Spam and Abuse Watch csharp com regex question

  • That Linux praise?...I take at least part of it back.
    G George Swan

    I think the main complaint is that Nvidia do not disclose sufficient information to allow others to build efficient drivers for its hardware.

    The Lounge help linux c++ mobile com

  • That Linux praise?...I take at least part of it back.
    G George Swan

    I would try Linux Mint before giving up.

    The Lounge help linux c++ mobile com

  • That Linux praise?...I take at least part of it back.
    G George Swan

    The problem is not with the CPU, it's the lack of driver support for the bungled hardware. See this piece regarding Nvidia.

    The Lounge help linux c++ mobile com

  • That Linux praise?...I take at least part of it back.
    G George Swan

    Could I please make a few representations for the defence? It's not surprising that a PC built to run Windows does not run Linux as efficiently. Also, it takes two to network, if Linux doesn't network well with Windows it's equally true that Windows does not network well with Linux. As for the final statement, 'Linux...you're so close, yet still so far from actually being usable.' How can you explain that, according to Wikipedia, 'Linux has the largest installed base of all general-purpose operating systems. Linux is also the leading operating system on servers and other big iron systems such as mainframe computers'?

    The Lounge help linux c++ mobile com

  • Thought of the Day
    G George Swan

    To buy or not to buy? That is the question.

    The Lounge com question

  • What programming language ANSI C, C++ or C#.NET to use for AI genetic algorithms implementation ?
    G George Swan

    Pleased to see that you were not speechless for long -you had me worried.

    The Lounge csharp algorithms tutorial question c++

  • What programming language ANSI C, C++ or C#.NET to use for AI genetic algorithms implementation ?
    G George Swan

    My experience is that developers prefer to write AI code in either C or C++ and that C# is rarely used. That’s probably because they like to manipulate pointers directly and favour unsigned integers over signed integers. Although C# supports uint, the .Net framework doesn’t seem to. I’ve found that certain bitwise operations are more easily performed on uints. My choice would be to use C# but converting from one value type to another, for example, int to uint, is relatively slow and is best avoided in repetitive algorithms.

    The Lounge csharp algorithms tutorial question c++

  • Error Making Method Async
    G George Swan

    You should start the Task and then await it.

    public static async void FileReceived(string fileName)
    {
    Task<string> t = Task.Run(() => FTPFile(fileName));
    await t.ContinueWith((t1) =>
    {
    FileUploaded(t1.Result);
    });
    }

    C# help sysadmin tutorial question

  • Thought of the day
    G George Swan

    If you don't get it, perhaps you should pass your eyes over it again

    The Lounge

  • Issue: mouse-hover on QA questions shows post has been down-voted
    G George Swan

    Well put, Bill. I feel that the temptation to be dictatorial on the Q&A forum needs to be resisted. Members should be free to post and answer questions without being bullied by others who think they know what’s best for them. To me, passing judgement on posters, when nothing is known about them or their circumstances, is somewhat unfair. Surely, virtue is not found by deprecating the needy but by offering them unconditional help?

    The Lounge beta-testing architecture help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups