SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ('columnA','ColumnB') AND TABLE_SCHEMA='YourDatabase';
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ('columnA','ColumnB') AND TABLE_SCHEMA='YourDatabase';
Well, you're trying to use SortedSet<>
... which means you care about the ordering. But by the sounds of it your Player
type doesn't implement IComparable<Player>
. So what sort order would you expect to see?
Basically, you need to tell your Player
code how to compare one player with another. Alternatively, you could implement IComparer<Player>
somewhere else, and pass that comparison into the constructor of SortedSet<>
to indicate what order you want the players in. For example, you could have:
public class PlayerNameComparer : IComparer<Player>
{
public int Compare(Player x, Player y)
{
// TODO: Handle x or y being null, or them not having names
return x.Name.CompareTo(y.Name);
}
}
Then:
// Note name change to follow conventions, and also to remove the
// implication that it's a list when it's actually a set...
SortedSet<Player> players = new SortedSet<Player>(new PlayerNameComparer());
IQueryable<Parent> data = context.Parents.OrderBy(p=>p.Children.OrderBy(chi => chi.Name).FirstOrDefault());
Absolutely! Let’s break down backpropagation and gradients in the simplest possible way , like we’re teaching a curious 10-year-old. 🎯...