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
let xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'https://jsonplaceholder.typicode.com/posts'); | |
xhr.send(); | |
xhr.onload = function() { | |
if(xhr.status != 200) | |
alert(`Error ${xhr.status}`); | |
else |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
namespace MysteryOfDelegates | |
{ | |
public class Clock | |
{ | |
public DateTime Alarm { get; set; } |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
namespace MysteryOfDelegates | |
{ | |
public class Post | |
{ | |
public int Id { get; set; } |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
namespace MysteryOfDelegates | |
{ | |
public class Post | |
{ | |
public int Id { get; set; } |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
namespace Demo6thOct | |
{ | |
class Program | |
{ | |
public delegate void FunctionPointer(); |
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
using System; | |
using System.Collections.Generic; | |
namespace PrimitiveAndComplexTypes | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello World!"); |
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
[HttpGet("{id:guid}", Name = "CustomerGet")] | |
public IActionResult Get(Guid id) | |
{ | |
if (Request.Headers.ContainsKey("If-None-Match")) | |
{ | |
var oldETag = Request.Headers["If-None-Match"].First(); | |
if (_cache.Get($"Customer-{id}-{oldETag}") != null) | |
{ | |
return new StatusCodeResult(304); | |
} |
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
var handler = new HttpClientHandler { AllowAutoRedirect = false }; | |
var client = new HttpClient(handler); | |
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0"); | |
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/html")); | |
client.DefaultRequestHeaders.Add("Accept-Language", "en-US,en;q=0.5"); | |
client.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Encoding", "gzip, deflate"); | |
var basePage = await client.GetStreamAsync("http://www.kalerkantho.com/print-edition/editorial/"); | |
using (var deflateStream = new GZipStream(basePage, CompressionMode.Decompress)) |
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
var origins = await vm.GetManualData(); | |
foreach (var origin in origins) | |
{ | |
foreach (var intersection in origin.Intersections) | |
{ | |
BasicGeoposition position = new BasicGeoposition(); | |
if (intersection.IntersectionLocation != null && intersection.Intensity != null) | |
{ |
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
<Grid x:Name="HamburerPane" | |
Margin="-480,0,0,0"> | |
<Grid.Projection> | |
<PlaneProjection/> | |
</Grid.Projection> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto"/> | |
<RowDefinition Height="*"/> | |
</Grid.RowDefinitions> |
NewerOlder