[Solved] How to Regular Expression match not having a constant at the end of a string (.net validator)

(?> … ) is the syntax for an atomic grouping. And the syntax for look-ahead assertion is just (?! … ). Edit   Try this regular expression instead: .*$(?<!-CONST) The .*$ will consume everything and the look-behind assertion will exclude those that end with a -CONST. Edit    Just for completeness’ sake: If your regular expression language does not … Read more

[Solved] Why does this causes the application to hang [closed]

The biggest problem here is that your constructor does not return until all of the tasks have completed. Until the constructor returns, the window will not be shown, because the window messages related to drawing the window aren’t going to be processed. Note that you don’t really have “deadlock” here per se. Instead, if you … Read more

[Solved] Function is not working [closed]

You get zero orders because List<OrderInfo> orders = CommerceLibAccess.GetOrdersByRecent(recordCount); is returning an empty list. It is returning an empty list because: return ConvertDataTableToOrders (GenericDataAccess.ExecuteSelectCommand (comm)); is returning an empty data-table. You’ll have to dig into your data table to figure out why it thinks its empty. (maybe because it is actually empty??) 2 solved Function … Read more

[Solved] How many times a word is present in a web page using htmlagility C#

You could treat the whole page/web request as a string and do something like this: https://msdn.microsoft.com/en-us/library/bb546166.aspx It might not be efficient and it would search CSS classes and everything else but it might be a starting point. Else you need to use the agility pack and scrape through each not and check each bit of … Read more

[Solved] How To Download HTML File Name As A String?

Explanation about the error: WebClient.DownloadFileAsync public void DownloadFileAsync( Uri address, string fileName ) It doesn’t return anything (void) and you are passing this to listsext! Ofcourse you will get an Exception: Cannot implicitly convert type ‘void’ to ‘string’ What you want to achieve: (my guess, not much information given) You want to have the filename, … Read more

[Solved] Is there a stricter version of .Single()? [closed]

Single() already throws an InvalidOperationException if the result contains more than one element (or if it is empty). You were probably confusing it with First(), which doesn’t throw if there is more than one element. 2 solved Is there a stricter version of .Single()? [closed]

[Solved] Linq: help me to make this work

You should group all person skills by person id, and then select only those groups, which contain both given category and sub category: unitOfWork.PersonSkillsRepository.GetAll() .GroupBy(p => p.PersonId) .Where(g => g.Any(p => p.IdCategory == ids.IdCategory) && g.Any(p => p.IdSubCategory == ids.IdSubCategory)) .Select(g => g.Key) For optimization, you can filter out skills which do not match any … Read more