Posts

Showing posts from January 13, 2019

Get all duplicate records from database into a List of Lists

Image
0 So i needed to write a method that gets all people that have the same email as each other and I came up with this: // This is from our Framework, as we're not actually using // But this is basically a `Person.Where(x => x.IsActive)` query // And returns all persons that are active var people = Querier.Person.AttrQuery(x => x.IsActive).AsQueryable<Person>().ToList()M // A 2D List, where every inner list is a set of duplicate people var duplicates = new List<List<Person>> {new List<Person>()}; var last = new Person(); foreach (var person in people) { if (person.Email == last.Email) duplicates.Last().Add(person); else duplicates.Add(new List<Person>()); } // Remove all empty Lists and all Lists without any duplicates duplicates = dup

nano: how to search text with tab

Image
0 How can I search text with nano and in OSX that contains a tab? I use ctr+w do start the search and then type the text I want. I tried "t" but it doesn't work. osx nano share | improve this question edited Jan 4 at 17:25 Christopher 10.3k 3 29 47 asked Jan 4 at 16:55 Miguel Miguel 101 2 add a comment  |