Using -1 to denote something is disabled c#

The aim of this class is to provide an int with a number and also have a piece of functionality be disabled. I have implemented it as so:

  public class foo {     private const int _disabled = -1;     public int MaxNumber { get; set; }     public bool MaxEnabled => MaxNumber != _disabled ; } 

Is this an archaic way of enabling disabling a piece of functionality and protecting from invalid input?

How to denote the complex magnitude of a vector?

I want to know if there is some existing notation for the magnitude of a vector when it is complex. For example, suppose I have the following vector:

$ $ \mathbb{v}=(2+i) \ \hat{x}$ $

How is $ (2+i)$ called? Is there any convention that would let me write that vector as something in the form:

$ $ \mathbb{v}=|\mathbb{v}|\ \hat{x}$ $

which obviously doesn’t work here because the magnitude is real?

How can I conditionally format cells to denote past/future/current dates?

I have a church rota Google Sheet. Column A shows the date of each service.

To make it more obvious at a glance, I would like cells in column A to apply formatting so that dates in the past are colored differently. Ideally, the next upcoming date would be highlighted (or at least dates in the current month or something like this).

I am somewhat familiar with conditional formatting but not using it on dates – is this feasible and if so how can I do it? In a perfect world, the entire row would be colored for past weeks but just the cell is sufficient if this is getting tricky.

Best way to denote possibility of refreshing an image which is embedded in text in Android

In an Android application, I have to display images during texts. For example: enter image description here

So image must be a part of text without border, shadow, … or with button effect. Problem is that sometimes image does not load properly, for example:

enter image description here

Now I have to denote that image is refresh-able by clicking it. How I can denote this with keeping image as part of text?


  • Really above problem occurs at run-time and my application cannot detect loaded/generated image is incomplete, else it could try for reloading/regenerating.
  • My application is a Flashcard Application enter image description here
  • a card may contain more than one image