Chris West's Blog

  • Home
  • Site Search
  • About Me
  •  YourJS
  • Search for:

JavaScript, Math, and much more.

Blog

Simple CSS Loading Spinner

I recently wanted to create my own simple loading spinner with just HTML and CSS. Here is the code that I came up with: HTML CSS See It In Action Below is what it looks like in action. I added Read more…

By Chris West, 2 days ago June 27, 2022
Blog

JavaScript – Async Function Constructor

In JavaScript you can create a function by using the Function constructor: The above code produces a sum() function which takes 1 or more arguments and returns the sum of them all added together. You can check out the following Read more…

By Chris West, 6 days ago June 24, 2022
Blog

PHP Snippet – parse_jsonc()

A few months ago I wrote a quick post showing how to parse JSONC (JSON with comments) files in JavaScript. Shortly thereafter I adapted the code to work in PHP as well: This function takes the same arguments that you Read more…

By Chris West, 3 weeks ago June 8, 2022
Blog

IO App – XML To JSON Converter

There are a lot of online converters out there that will take XML file contents and turn it into JSON. I decided to make my own and then show how simply this can be done with modern JavaScript: How Does Read more…

By Chris West, 3 weeks ago June 7, 2022
Blog

JavaScript Snippet – importUnpkg()

There are many websites that make it super easy to import node packages into your website. One of them is Unpkg.com. If you want to import a package into your web page or website you can try using the following: Read more…

By Chris West, 4 weeks ago June 4, 2022
Blog

Salesforce LWC – Controlling Height of Datatables

At times you may want to set a minimum height and/or a maximum height for an Lightning Web Component Datatable. The documentation may lead you to believe that you cannot accomplish this but with some CSS3 you definitely can. If Read more…

By Chris West, 3 months ago April 12, 2022
Blog

JSON.parse() Reviver for Dates

Did you know that you can pass a function as the second parameter to JSON.parse()? Doing this causes every key/value pair to be passed to this function for further processing. You can read all about how JSON.parse() and the reviver Read more…

By Chris West, 5 months ago February 7, 2022
Blog

JavaScript Snippet – parseJSONC()

Last year I needed a way to be able to parse JSON with comments (also known as JSONC). With that in mind I wrote the following short solution which will essentially remove JavaScript-style comments and trailing commas from the specified Read more…

By Chris West, 5 months ago February 5, 2022
Blog

Python Snippet – Get Exception Stack Trace

Every once in a while I just need to get the stack trace of an exception as a string so that I can log the error in a separate system. Here is a quick way to do that:

By Chris West, 8 months ago November 15, 2021
Blog

JavaScript – Base64 Data URLs Outside of the Latin1 Range

It is often handy to create downloadable content on the fly using JavaScript. Sometimes you may want to do so while also encoding the contents as base64. That is where the btoa() function comes in handy. Here is an example Read more…

By Chris West, 12 months ago June 30, 2021

Posts navigation

1 2 … 35 Next
Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Archives
Categories
Blog (339) CSharp (1) Games (3) HTA (2) Java (5) JavaScript (216) JScript (149) Math (49) Microsoft Office (16) Movie Trailers (1) PHP (13) POW Answer (2) Problem of the Week (31) Python (15) Reporting (1) Salesforce (4) SQL (28) VBA (6) VBScript (8) Videos (9)
Tags
Apache (1) Apex (2) Array (37) Audio (2) Bash (3) Canvas (6) Chrome (3) Chrome Extension (1) CSS (11) CSS3 (2) Curry (1) Date (6) EcmaScript 6 (8) Encryption (2) Español (2) Excel (20) Function (134) GitHub (11) Hack (7) HTML (3) HTML5 (2) JasperReport (2) JasperServer (1) jPaq (35) JSON (2) JSONP (2) JW.org (5) Logic Puzzle (2) Mail Merge (1) Math (53) Network (1) OpenKM (2) PostgreSQL (27) Private Data (4) Problem of the Week (31) Prototype (41) Quirk (3) Recursion (10) Regular Expressions (22) String (61) SVN (1) Video (2) Wildcards (3) WScript (2) YourJS (17)
  • About Me
Hestia | Powered by WordPress