Skip to content

Instantly share code, notes, and snippets.


Raj rajrao

View GitHub Profile
rajrao / OdataQueryD365FinanceAndOperationsTest.cs
Last active Sep 14, 2020
Shows how to perform authentication and retrieval of data from D365 Finance and Operations using OData and the Service to service calls using client credentials
View OdataQueryD365FinanceAndOperationsTest.cs
//more details at:
var baseUrl = ""; //a trailing slash here will cause a "No P3P Policy defined" error
var tenantId = "TENANTID AS A GUID HERE";
string applicationId = "APPLICATION GUID HERE";
string clientSecret = "CLIENT SECRET HERE";
string api = "data/";
var authorityUrl = $"{tenantId}";
rajrao / lz77.cs
Created Jul 4, 2020 — forked from mjs3339/lz77.cs
C# Implementation LZ77 Compression Algorithm
View lz77.cs
public static class Lz77
private const int RingBufferSize = 4096;
private const int UpperMatchLength = 18;
private const int LowerMatchLength = 2;
private const int None = RingBufferSize;
private static readonly int[] Parent = new int[RingBufferSize + 1];
private static readonly int[] LeftChild = new int[RingBufferSize + 1];
private static readonly int[] RightChild = new int[RingBufferSize + 257];
private static readonly ushort[] Buffer = new ushort[RingBufferSize + UpperMatchLength - 1];
rajrao /
Created Aug 1, 2016 — forked from ecaron/
Python script for listening to Raspberry Pi button push
import requests
import time
import RPi.GPIO as GPIO
url = 'http://nightlight/' # I map this to my internal DNS hosting the node app
gpio_pin=18 # The GPIO pin the button is attached to
longpress_threshold=5 # If button is held this length of time, tells system to leave light on
GPIO.setup(gpio_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
You can’t perform that action at this time.