Class Act

A public shelf for working code

Methods, classes, and the notes beside them.

Read what other developers marked public. Sign in with Google to keep your own notebook and choose what to share.

TitleLanguagePlatformScopeDescriptionUpdated
v4 application event log for console appVB.netASP.netMethodVB.net code to write a message to the Windows Application Event Log from a console application.11/12/2026
v2 Link: Claw AIC#ASP.netMethod10/21/2026
v1 HTML 5 Required ArgumentHTMLASP.netSnippetAn HTML form using the required attribute so the browser prevents submission until all required fields are filled in.10/19/2026
v1 Create TableSQLASP.netSnippetA SQL CREATE TABLE script — a starting template for creating a new database table.10/19/2026
v1 Create Stored ProcedureC#ASP.netMethodA SQL stored procedure (spDates) and C# code to call it — a starting template for date-related calculations.10/19/2026
v1 No Cache Server and ClietJavascriptASP.netSnippetCode to tell both the server and the browser not to cache a page, so users always get the newest version.10/19/2026
v1 Random PasswordJavascriptASP.netMethodA JavaScript function (randomPassword) that generates a random password string.10/19/2026
v1 Local HostVB.netASP.netSnippetVB.net code to check whether the application is running on the local machine (localhost).10/19/2026
v2 Credentials Google AuthenticationHTMLASP.netMethodHTML and JavaScript to wire up Google OAuth sign-in on an ASP.NET page.10/19/2026
v1 JS QueryString class, get and setJavascriptASP.netClassA JavaScript class (QueryString) to read a query parameter from the URL and update it without reloading the page.10/15/2026
v1 JS Validate class, email phone required numberJavascriptASP.netClassA JavaScript class (Validate) with simple checks you can call before saving a form: required, email, phone, and whole number.10/15/2026
v1 viewport meta, mobile widthHTMLASP.netSnippetThe HTML viewport meta tag that tells mobile phones to use the actual screen width instead of pretending the page is a wide desktop.10/15/2026
v1 position sticky table headerCSSASP.netSnippetCSS to keep a table header row sticky at the top while the body rows scroll underneath it.10/15/2026
v1 Nothing vs empty stringVB.netASP.netSnippetVB.net: the difference between Nothing (no string at all) and an empty string ('').10/15/2026
v1 Regex match timeout, stop a runaway patternC#ASP.netMethodC# code to run a regular expression with a time limit so a bad pattern on a long input does not freeze the request.10/15/2026
v1 Cache insert with an absolute expirationC#ASP.netMethodC# code to store an object in ASP.NET's server-side cache until a specific clock time expires.10/15/2026
v1 HtmlEncode before writing text that came from a userC#ASP.netMethodC# code to HTML-encode text before writing it to a web page, so user-typed content cannot break the page or inject scripts.10/15/2026
v1 The RavenHTMLASP.netSnippetThe full text of 'The Raven' by Edgar Allan Poe, used to test how web apps handle very long blocks of text.11/01/2023
v1 shift click eventJavascriptASP.netSnippetJavaScript code that detects when the user holds Shift and clicks at the same time.10/28/2022
v1 JSON Sort MethodJavascriptASP.netMethodA JavaScript function to sort an array of objects by any property name you choose.09/07/2022