Chris West's Blog

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

JavaScript, Math, and much more.

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, 12 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, 1 year 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, 2 years ago June 30, 2021
Blog

Python Snippet – Datetimes In UTC

There have been so many times when I wanted to have a datetime show in UTC. I am not talking about simply looking at the time and acting as if it is in UTC. For example let’s say that I Read more…

By Chris West, 2 years ago April 10, 2021
Blog

Python Integration – QuickBooks Customer Object Tidbit

Recently I had to write a custom integration which would sync customers found in QuickBooks with accounts found in Salesforce. We have been using Python to write all of our custom integrations so I have been using python-quickbooks and simple-salesforce. Read more…

By Chris West, 2 years ago October 14, 2020
Blog

JavaScript Snippet – Convert Column Name To Number

On a rare occasion you may need to convert a column name from Excel or Google Sheets to a number. For example you may be seeing references to a random column such as D, G, BV, etc. but you don’t Read more…

By Chris West, 3 years ago June 10, 2020
Blog

Embed Office Documents On Your Site

Have you ever wanted to display an Excel workbook or a Word document on your website? Of course, it is possible to save files as HTML but it just doesn’t have the same feel. Fortunately Microsoft can actually come to Read more…

By Chris West, 3 years ago May 22, 2020
Blog

Salesforce Apex – Disable Downloads Based On File Name & User Profile

Let’s say that similar to what we did in yesterday’s post, today you want to disable downloads based on a file name. The difference is this time you want to target the user’s profile type instead of their role. Once Read more…

By Chris West, 3 years ago February 21, 2020
Blog

Salesforce Apex – Disable Downloads Based On File Name & User Role

Imagine that you want to disable downloads for certain users based on the name of the file uploaded to Salesforce. This is totally possible thanks to the power of Apex classes. We can use the following example code inside of Read more…

By Chris West, 3 years ago February 20, 2020
Blog

JavaScript Snippet – domReady() Function

Sometimes you may want to know if the DOM is ready to be manipulated. Most of the time you want to run some code only after the DOM is ready to be modified. For that reason for years we used Read more…

By Chris West, 3 years ago February 19, 2020

Posts navigation

Previous 1 2 3 … 35 Next
Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Archives
Categories
Blog (342) CSharp (1) Games (3) HTA (2) Java (5) JavaScript (218) 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 (6) SQL (28) VBA (6) VBScript (8) Videos (9)
Tags
Apache (1) Apex (3) Array (37) Audio (2) Bash (3) Canvas (6) Chrome (3) CSS (11) CSS3 (2) Curry (1) Date (6) EcmaScript 6 (8) Encryption (2) Español (2) Excel (20) Function (135) GitHub (11) Hack (7) HTML (3) HTML5 (2) JasperReport (2) JasperServer (1) jPaq (35) JSON (2) JSONP (2) JW.org (5) Logic Puzzle (2) LWC (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