« first day (2661 days earlier)      last day (2510 days later) » 

00:36
posted on January 27, 2018 by Phil Haack

Developers are real passionate about their semi-colons; or lack thereof. Comment threads on GitHub can get a bit…testy…on this topic. What’s a beleaguered1 repository maintainer to do when an issue comment thread gets out of hand? GitHub provides community tools maintainers can use to define community standards for their projects. For example, it’s easy to add a code of conduct to a repos

 
6 hours later…
user5500750
06:44
What does this ..// represent in Xpath?
user5500750
Example; DetailsTable.SelectSingleNode("..//tr[4]").SelectSingleNode("..//td[2]")
user5500750
This selects the first TR element instead of the fourth.
07:37
@Unknowndeveloper A class is not a blueprint.
Or even a template
08:20
Yo yo.
 
3 hours later…
11:20
Hi guys
What should be the correct answer for this:
You are developing an ASP.NET MVC application that uses forms authentication to verify
that the user is logged in.
Authentication credentials must be encrypted and secure so no user identity is exposed.
You need to ensure that user credentials are persisted after users log on.
Where should you store the credentials? (Each correct answer presents a complete
solution. Choose all that apply.)

    A. In Session on the server
    B. In a cookie stored in the browser
    C. In ViewData in the application
@AvnerShahar-Kashtan
Can you help me with this question please
 
3 hours later…
user5500750
14:19
Is there a difference between these 2 HTMLNode selectors;
user5500750
DetailsTable.SelectSingleNode("..//tr[4]").SelectSingleNode("..//td[2]")
DetailsTable.Descendants().Where(x => x.Name.ToLower() == "tr").ElementAt(3).Descendants().Where(x => x.Name == "td").ElementAt(1)
user5500750
Using DetailsTable.Descendants().Where(x => x.Name.ToLower() == "tr").ElementAt(3).Descendants().Where(x => x.Name == "td").ElementAt(1) always works.
The first one is probably a lot more optimized. I don't know how the DOM is stored internally, but it might be easy for it to find the 4th tr or the second td.
The second one will fetch all descendants and iterate over them until it finds the 4th one whose names matches tr. If there are a lot of elements and many of them before the 4th tr, your code might have to go over a lot of elements.
Not to mention the fact that your ToLower calls are creating new strings all over the place.
Generally speaking, though global searches (//) are a bad idea.
It's best to query using stricter structure.
 
2 hours later…
user5500750
16:00
BlockingCollection<T> doesn't events or is there a way to implement one?
user5500750
For example subscribe to an event whenever an item is added or removed.
user5500750
I have a BlockingCollection that looks like this; BlockingCollection<SQLiteDb.ScrapeProxy> Proxies = new BlockingCollection<SQLiteDb.ScrapeProxy>(new ConcurrentQueue<SQLiteDb.ScrapeProxy>());
user5500750
Sometimes I take an item and add it back immediately.
user5500750
...I want to wait until the item that I have just added has been taken away by another thread.
user5500750
...so that I can take the next fresh item available
user5500750
16:05
I am looking at SkipWhile<T>(Func<T, Boolean>) but it looks like it returns a collection which is very confusing.
user5500750
22:38
A class is a reference type so I don't have to worry about references when assigning or copying?
user5500750
Given; Given; SQLiteDb.ScrapeProxy scrapeProxyToUse = List.First();
user5500750
Then I try to take the object of scrapeProxyToUse into; SQLiteDb.ScrapeProxy useLessScrapeProxy = scrapeProxyToUse;
user5500750
Then I add; scrapeProxyToUse = new scrapeProxyToUse()
user5500750
useLessScrapeProxy has the old object of scrapeProxyToUse and not the new one?
user5500750
I can't test this because it takes about an hour to test. So I need to make sure I have the object that I think I have.

« first day (2661 days earlier)      last day (2510 days later) »