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
// ==UserScript== | |
// @name Questpond: Mark watched | |
// @namespace http://nitinsawant.com/ | |
// @version 2025-04-03 | |
// @description Mark questpond videos watched | |
// @author Nitin Sawant | |
// @match https://questpond.teachable.com/p/questvideos | |
// @match https://questpond.teachable.com/courses/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=questpond.teachable.com | |
// @grant GM_addStyle |
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
//Author: Nitin Sawant | |
//add reference to AspectInjector package https://github.com/pamidur/aspect-injector | |
using AspectInjector.Broker; | |
using System.Reflection; | |
DeferTest test = new DeferTest(); | |
test.Test(); | |
public class DeferTest |
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
{"lastUpload":"2019-02-21T11:58:08.359Z","extensionVersion":"v3.2.5"} |
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
//iTextSharp | |
using (FileStream fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + "TableTest.pdf", FileMode.Create)) | |
{ | |
Document doc = new Document(PageSize.LETTER); | |
doc.SetMargins(0, 0, 0, 0); | |
PdfWriter writer = PdfWriter.GetInstance(doc, fs); | |
doc.Open(); | |
//add first page | |
PdfReader pdfReader = new PdfReader(templatePath + "Page1.pdf"); |
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.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication4 | |
{ | |
public class LineParser<T> where T : class |
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
//Task Parallel library dataflow can be obtained by nuget: https://www.nuget.org/packages/System.Threading.Tasks.Dataflow/ | |
var watch = new System.Diagnostics.Stopwatch(); | |
watch.Start(); | |
Action<int> an = n => { | |
//add your processing logic here | |
Console.WriteLine(n); | |
}; | |
var options = new ExecutionDataflowBlockOptions |
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
class Program | |
{ | |
[DllImport("gdi32.dll")] | |
static extern int GetDeviceCaps(IntPtr hdc, int nIndex); | |
[DllImport("user32.dll")] | |
static extern IntPtr GetDC(IntPtr hWnd); | |
/// <summary> | |
/// Logical pixels inch in X |