Skip to content

Instantly share code, notes, and snippets.

View DoCTheBest01's full-sized avatar
πŸ‘¨β€πŸ’»
I code the fuck out of you

DoCTheBest DoCTheBest01

πŸ‘¨β€πŸ’»
I code the fuck out of you
View GitHub Profile
@DoCTheBest01
DoCTheBest01 / meta-tags.md
Created February 12, 2024 19:22 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@DoCTheBest01
DoCTheBest01 / Root.cs
Created December 10, 2023 22:07
CSharp Nth Root Function
public static Type Root<Type>(dynamic number, int root) where Type : struct
{
const double epsilon = 1e-10; // Tolerance level for convergence
Type guess = (Type)Convert.ChangeType(number / root, typeof(Type)); // Initial guess
while (Absolute<Type>(Power<Type>(guess, root) - number) > epsilon)
{
guess = (Type)Convert.ChangeType(((dynamic)(root - 1) * (dynamic)guess + (dynamic)number / Power<Type>((dynamic)guess, root - 1)) / root, typeof(Type));
}
return guess;