formatting – HTML/JavaScript temperature converter with rounding

The use of non-ASCII character º in variable names is surprising to me


There is a lot of repeated * 1 that is presumably used to convert string to number. parseFloat or parseInt will make intention more clear


There is a lot of repetition in formulas. I would get the new user-inputted value and convert to a standard format (for example, ºC). I would then have one function to convert from ºC to any of the other units


== should be replaced with === whenever possible


campo seems to be Portuguese for “field”. Consensus is that coding should be in English


Minor bug: increasing number of decimals results in inaccuracies (It says 20ºC is 293K, but should be 293.15K). Results need to be recalculated from last user-inputted value to be accurate


The default step for input tags is 1. This attribute should be changed to any to remove validation errors.

SharePoint 2019 On Prem – Modern experience – Conditional Formatting not working

All Excel-style expressions begin with an equal (=) are only available in SharePoint Online (not in SharePoint 2019).

In SharePoint 2019, you have to use the Abstract Syntax Tree (AST) expressions.

So try using below JSON:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v1/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField",
  "attributes": {
    "class": {
      "operator": "?",
      "operands": (
        {
          "operator": "<=",
          "operands": (
            "@currentField",
            0
          )
        },
        "sp-field-severity--good",
        "sp-field-severity--warning"
      )
    }
  }
}

You can change the inner operator (<=) as per your requirements/conditions.
For Example: To set the class attribute if number column value is equal to 0, use:

"class": {
  "operator": "?",
  "operands": (
    {
      "operator": "==",
      "operands": (
        "@currentField",
        0
      )
    },
    "sp-field-severity--good",
    "sp-field-severity--warning"
  )
}

Output:

enter image description here

list – SharePoint Online – formatting column headers

I have created a modern list in SPO with JSON conditional formatting on the row and view levels.

One conditional formatting snippet I’ve added hides the cell text (row level) based on the current user. But I would like to also hide the column header text as well and cannot figure out how to do this.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField",
  "style": {
    "display": "=if(@me == 'priv-user@someorg.com','','none')"
  }
}

Similarly, I would like to format the column header to have a line break in case the title is long. This could be done with on-premise using CSS but again I have not found a way to do this in JSON. The actual column text can be JSON formatted to break but I can’t do it at the column heading level. Simply adding a BR tag or nr (or its HTML-encoded equivalent) doesn’t do anything.

Any insight would be welcome.

How to query data range including data formatting (color, font) in Google sheets?

How to modify this formula to make the result get the data with its original color & font formatting.

=query(Sheet1!A1:D,"select A,B,C,D where A is not null",0)

Lets say I want only column D to be in the new tab with its original color format.

filesystems – Does formatting with FAT on Windows 10 send TRIM to the SSD?

Sources seem hard to come by regarding Windows’ behavior regarding TRIM and formatting.

This now removed blog entry on msdn.com states that since Windows 7, TRIM is sent to the SSD when formatting to NTFS (emphasis mine):

In Windows 7, if an SSD reports it supports the Trim attribute of the ATA protocol’s Data Set Management command, the NTFS file system will request the ATA driver to issue the new operation to the device when files are deleted and it is safe to erase the SSD pages backing the files.

The Trim operation is fully integrated with partition- and volume-level commands like Format and Delete, with file system commands relating to truncate and compression, and with the System Restore (aka Volume Snapshot) feature.

Wikipedia is undecided on whether TRIM is even supported for FAT on Windows:

Sources disagree on whether TRIM support exists for other filesystems (than NTFS).

Is there any information on whether Windows 10 issues TRIM when formatting with FAT?

Doc lib view formatting: accessing filetype icons

I am trying to get the file icons displayed in the standard view in the document libraries:

enter image description here

I want them to be displayed on a custom "file card" alongside the filename and a preview.
The SE article linked here didn’t help as they suggest using the Fabric Icons. But I want the original SharePoint icons.

Google Docs – Custom Format with Conditional Formatting

I’m trying to use the Custom Format feature with Conditional Formatting. When I click on Formatting Style, Custom Format, the Formatting Style window closes and I get no options to enter my format. It works fine from the main format menu, but not with conditional formatting. I’ve found several posts from 7 years ago stating that this only works on the “New” google sheets, but I’m using the current version. Any suggestions on what I’m doing wrong?

Jquery Conditional Formatting – Number Range

Not the way that you are selecting cells, because you are using the CSS selector :contains() to find cells with a specific text value. You can’t use contains() for anything other than an exact match.

You could look at ranges if you get the value of the table cells in a usable way in code and then compare it to a range:

// this selects _all_ of the table cells that match your CSS selector,
// regardless of their content, and loops through them all
$("td .ms-vb-lastCell.ms-cellstyle.ms-vb2.ms-vb-lastCell").each(function() {

    // inside the loop function, "$(this)" refers to the single table cell
    // that is getting looped over that time through the loop.  you can use
    // jQuery's "text()" function to get the text contents of the cell 
    var cellText = $(this).text();

    // from your code example, it appears as though you are expecting the
    // contents of the cells to be precentages, i.e "10%", "20%", etc.
    // so you can use parseInt() to change the percentage string into
    // an actual number so you can do number comparisons
    var cellPercentValue = parseInt(cellText);

    // then you can do your comparisons, and set the background color
    // accordingly.  remember "$(this)" still refers to the table cell
    if (cellPercentValue >= 50) {
        $(this).css('background-color', 'green');
    } else if (25 <= cellPercentValue < 50) {
        $(this).css('background-color', 'yellow');
    } else if (cellPercentValue < 25) {
        $(this).css('background-color', 'red');
    }
});

How to apply basic formatting to a WordPress article as a raw text file?

I’m writing for a blog that uses WordPress and I’m curious if there’s any way for me to apply basic formatting to different parts of the article, e.g., headings, links, lists, etc. if I don’t have the access to WordPress’ editor?
I think I saw an extension that enables markdown support, but is there a built-in, default way of formatting raw text articles if one doesn’t have an access to the WordPress administration itself?
I write my article as raw text inside a regular text editor, send it to the client, and then they put the article up.

SharePoint 2016 Classic Experience Column Formatting

I have a Custom List which displays as numerical variance as a percentage. I would like to color code the numerical value based on it’s value. i.e. 10% displays in red.

I am using SharePoint 2016 OP with the Classic Experience enabled. I tried JSON, however it did not work. Any help would be appreciated. Thanks!