private static void Main()
{
var list1 = new List<DB>
{
new DB {vopros = "1", url = "11"},
new DB {vopros = "2", url = "22"},
new DB {vopros = "3", url = "33"}
};
var list2 = new List<DB>
{
new DB {vopros = "2", url = "66"},
new DB {vopros = "3", url = "55"},
new DB {vopros = "5", url = "44"}
};
var except = list1.Except(list2, new DBComparer());
var except1 = list2.Except(list1, new DBComparer());
}
public class DB
{
public string vopros { get; set; }
public string otvet { get; set; }
public string url { get; set; }
}
public class DBComparer : IEqualityComparer<DB>
{
public bool Equals(DB x, DB y)
{
if (ReferenceEquals(x, y)) return true;
return x != null && y != null && x.vopros.Equals(y.vopros);
}
public int GetHashCode(DB obj)
{
return obj.vopros == null ? 0 : obj.vopros.GetHashCode();
}
}
Все библиотеки, которые встречал в них приходится явно указывать название папки с которой брать письма.
INSERT INTO `table` (`two`, `three`)
SELECT `t1`.`two`, `t1`.`three`
FROM (
SELECT :two AS `two`, :three AS `three`
) AS `t1`
LEFT JOIN `table` AS `t2` USING (`two`, `three`)
WHERE `t2`.`two` IS NULL;
s = raw_input('Enter 3 words')
word1, word2, word3 = (s.split() + [''] * 3)[:3]
print word3, word2, word1