It's actually a stack full of money -there's gold in them thar fills.
George Swan
Posts
-
Thought of the Day -
Thought of the DayI thought an Alligator wearing a tunic was a snappy dresser?
-
Article C# 8 New Features Plagiarised From Microsoft DocsSorry, 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.
-
Article C# 8 New Features Plagiarised From Microsoft DocsApologies, 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.
-
Article C# 8 New Features Plagiarised From Microsoft DocsThis article has code copied directly from this What's New in C# 8?
Originalpublic 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
}; -
That Linux praise?...I take at least part of it back.I think the main complaint is that Nvidia do not disclose sufficient information to allow others to build efficient drivers for its hardware.
-
That Linux praise?...I take at least part of it back.I would try Linux Mint before giving up.
-
That Linux praise?...I take at least part of it back.The problem is not with the CPU, it's the lack of driver support for the bungled hardware. See this piece regarding Nvidia.
-
That Linux praise?...I take at least part of it back.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'?
-
Thought of the DayTo buy or not to buy? That is the question.
-
What programming language ANSI C, C++ or C#.NET to use for AI genetic algorithms implementation ?Pleased to see that you were not speechless for long -you had me worried.
-
What programming language ANSI C, C++ or C#.NET to use for AI genetic algorithms implementation ?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 onuints
. My choice would be to use C# but converting from one value type to another, for example,int
touint
, is relatively slow and is best avoided in repetitive algorithms. -
Error Making Method AsyncYou should start the
Task
and thenawait
it.public static async void FileReceived(string fileName)
{
Task<string> t = Task.Run(() => FTPFile(fileName));
await t.ContinueWith((t1) =>
{
FileUploaded(t1.Result);
});
} -
Thought of the dayIf you don't get it, perhaps you should pass your eyes over it again
-
Issue: mouse-hover on QA questions shows post has been down-votedWell 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?