This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for product in collection.products %} | |
{% capture everyThird %}{{ forloop.index | modulo: 3 }}{% endcapture %} | |
{% capture everyOnePastThird %}{{ forloop.index0 | modulo: 3 }}{% endcapture %} | |
{% if forloop.first == true or everyOnePastThird == '0' %} | |
<div class="row"> | |
{% endif %} | |
{% include 'product-catalog-item' %} | |
{% if forloop.last == true or everyThird == '0' %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Route("api/v1/account")] | |
[AllowAnonymous] | |
public class ApiController : Controller | |
{ | |
[Route("login")] | |
public async Task<IActionResult>Login([FromBody] LoginRequest login) | |
{ | |
if (ModelState.IsValid) | |
{ | |
// ... logic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async Task Main() | |
{ | |
var task1 = Task.Run(async () => { | |
await Task.Delay(500); | |
throw new Exception("Exception from task 1"); | |
}); | |
var task2 = Task.Run(() => | |
{ | |
throw new Exception("Exception from task 2"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Program | |
{ | |
public void Main() | |
{ | |
PrintEditDistance("ab", "ab"); | |
PrintEditDistance("bbc", "abc"); | |
PrintEditDistance("bbbc", "bbc"); | |
PrintEditDistance("xyza", "abcx"); | |
} |
OlderNewer