Chris West's Blog

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

JavaScript, Math, and much more.

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, 5 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, 5 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, 5 years ago February 19, 2020
Blog

Hack – Get A User’s GitHub Avatar

Have you ever needed to get any user’s GitHub avatar just based on their username? If you have then you are in luck because the process is quite simple. All you need to do is place the username in the Read more…

By Chris West, 5 years ago February 14, 2020
Blog

C# – Cool Feature – String Interpolation

Have you ever wanted to concatenate multiple strings to make one string and felt like the code should be shorter? So have I. For instance you may have written something like this: Of course the above code will work fine Read more…

By Chris West, 5 years ago February 6, 2020
Blog

How To Add Custom JavaScript To WordPress Posts

Let’s say that you want the following JavaScript to run directly in a WordPress post: To execute that you can write the following into your post: The resulting of running the above in a WordPress post is this: As you Read more…

By Chris West, 5 years ago January 31, 2020
Blog

Postgres – Get ISO Year Start & ISO Year End

Today I had to get the ISO year start and the ISO year end for a given date. For instance, according to ISO8601 the week number for January 30, 2020 is 5: Year Limits By Date In Year Let’s say Read more…

By Chris West, 5 years ago January 30, 2020
Blog

C# Snippet – Error Count In ASP.NET Controller

Perhaps, like me, you find yourself maintaining an ASP.NET MVC web application and you need to find the number of errors added to the ModelState. Of course, you may think that you can just use something like ModelState.Count, but this Read more…

By Chris West, 6 years ago November 22, 2019
Blog

JavaScript Snippet – getGitContents(…)

Have you ever wanted to get the contents of a GitHub file via JavaScript? If so I wrote the following function which gives you the ability to get the contents of a file or of a directory: Here is an Read more…

By Chris West, 6 years ago August 23, 2019
Blog

PL/pgSQL Snippet – get_url_params()

One thing that you may need to use from time to time in Postgres is a function to be able to extract the value of a URL parameter from URLs stored in your DB. I wanted to be able to Read more…

By Chris West, 6 years ago May 20, 2019

Posts navigation

Previous 1 2 3 4 … 36 Next
Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Archives
Categories
Blog (345) CSharp (1) Games (3) HTA (2) Java (5) JavaScript (219) JScript (149) Math (49) Microsoft Office (16) Movie Trailers (2) PHP (13) POW Answer (2) Problem of the Week (31) Python (15) Reporting (1) Salesforce (6) SQL (28) VBA (6) VBScript (8) Videos (10)
Tags
Apache (1) Apex (3) Array (37) Audio (2) Bash (3) Canvas (6) Chrome (3) CSS (12) CSS3 (2) Curry (1) Date (6) EcmaScript 6 (8) Encryption (2) Español (2) Excel (20) Function (136) GitHub (12) Hack (8) HTML (4) 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 (62) SVN (1) Video (2) Wildcards (3) WScript (2) YourJS (18)
  • About Me
Hestia | Powered by WordPress