Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
94 views

I have a synchronized Task list populated, for monitoring purposes. I want to progressively remove the completed tasks from the list. To do so I resolved to use Continuation tasks like so: //remove ...
Andrea Bardelli's user avatar
2 votes
1 answer
327 views

I'm trying to understand concept of captured variable in Java. I found quite detailed article about it: http://www.devcodenote.com/2015/04/variable-capture-in-java.html and I'm not sure about ...
Pronto Violetas's user avatar
0 votes
0 answers
61 views

I encountered this strange behavior with captured variables. Below are two loops. I would expect both to behave the same. Why it behaves differently? private static void Loop1() { ...
Hunter's user avatar
  • 2,480
5 votes
1 answer
113 views

I have the following code that creates 10 threads which in turn write out messages to the console: for (int i = 0; i < 10; i++) { { Thread thread = new Thread((threadNumber) => ...
Maverick's user avatar
0 votes
3 answers
526 views

I want to compute rank of element in an IEnumerable list and assign it to the member. But below code works only when called 1st time. 2nd time call starts from last rank value. So instead of output ...
Ankush's user avatar
  • 2,574
2 votes
1 answer
1k views

Let's say that I have the following string Type="Category" Position="Top" Child="3" ABC="XYZ".... And 2 regex groups: Key and Value Key: "Type", "Position", "Child",... Value: "Category", "Top", "3",...
ByulTaeng's user avatar
  • 1,269
1 vote
3 answers
437 views

I'm currently musing about some idea I can't get right. The problem is that I want to use one lambda function to instantiate a captured variable and another lambda to access a property of that ...
VVS's user avatar
  • 19.6k