Questions tagged [subscript]

A subscript is a number, figure, symbol, or indicator that is smaller than the normal line of type and is set slightly below the baseline.

Subscripts are common in mathematical notation (generally indicating position, such as the index of a variable in a vector) and chemistry formulas (e.g. H2O).

Subscript and superscript (Wikipedia)

625 questions
0
votes
0 answers

QtJambi - Unicode QLineEdit?

Is it possible to set QLineEdits in QtJambi to show unicode text? I need to display unicode subscript characters in a QLineEdit, though just setting the text of the QLineEdit results in aesthetic error ( A strange line character; | ). I've read…
Anti Earth
  • 4,671
  • 13
  • 52
  • 83
0
votes
1 answer

MathML - left subscript and superscript

How to write left subscript and superscript preserving correct syntax of MathML? I mean something like this: Thanks for the hints.
rafalry
  • 2,620
  • 6
  • 24
  • 39
0
votes
2 answers

How do I add a subscript to a string?

I need to add a subscript (a little number next to a character, like 2 or 3 - note: not a power of...) to a string [variable]. Is this possible? I don't want the code to be lengthy as I will need to process a lot of formulas, one at a time. Thanks.
user1072207
-1
votes
1 answer

meaning of this code: return self.desk[number]![alpha]

please help me understand this part of the code. Why is ! located between two brackets []![] in this expression: self.desk[number]![alpha]? class GameDesk { var desk : [Int: [String: Chessman]] = [:] init() { for i in 1...8 { …
PLUXVR
  • 1
  • 1
-1
votes
1 answer

Bold subscript in plot axis

I have a subscript in one axis title which I want to have it in bold as the rest of the text. I am using this code: plt.ylabel(r'PC$_{\rm SD}$ (A)', fontsize=22, fontweight='bold') but this does not make the subscript part bold (see the plot). Any…
Hamed
  • 1
  • 1
-1
votes
1 answer

Confused with subscript expression in array

I'm trying to find the number of occurrence of digit in input (typed number). I'm confused with subscript expression of array in the expression ++ndigit[ c - '0']. Here the code #include /* count digits, white space, others*/ main() { …
Nil
  • 1
  • 1
-1
votes
1 answer

Is it possible to overload [] operator to do different thing in C++

I want to overload "[]" witch is used to access array But I also want to separate read/write to do different thing For example : class myclass{ private: int val; public: myclass(){val=0;} myclass(int _in){val=_in;} .... //for…
-1
votes
1 answer

Writing the sigmoid function in octave and calculating sigmoid of 0 and negative numbers

I am a beginner to machine learning and octave. I am trying to write a code in octave that would calculate the sigmoid function g(z)=g(z)=1./(1+exp(-(z))); When I try to find g(0) or g(-5) I get this error message:error: g(-5): subscripts must be…
-1
votes
1 answer

Creating a subscript c in python text

I have made some graphs in matplotlib that have a omega with a subscript of b and c. Now i am in the process of creating the buttons to display these plots in tkinter and i was going to use the simple unicode conversion of the subscript chars.…
Sean Powell
  • 564
  • 4
  • 20
-1
votes
2 answers

Swift: simple way to get the first leaf of multidimensional array

Considering a non-empty multidimensional array that has no empty subarrays in it, how can I get the first leaf of it? Currently, I'm using the following construct: let multidimensional = [[[[[[Int]]]]]]() let firstLeaf =…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
-1
votes
1 answer

I need to make a program that takes the median of a list of numbers then finds the middle number

I have a problem that one of the things i need to include is a subscript of median, but i have no clue what that means I have tried most things but again i have no clue what subscript of median means. def median(a): a=a.sort() a=len(a)/2 …
-1
votes
1 answer

Swift Ambiguous use of 'subscript'

I had recently added new pods to my project and updated the previous ones, this code had all worked before and now I am getting "Ambiguous use of 'subscript'" I have been checking other answers and it seems like the way I have it currently set up is…
Lukas Bimba
  • 817
  • 14
  • 35
-1
votes
1 answer

Can I use a Swift subscript to take care of the append functionality for a struct that is a dictionary?

I have a struct called DailyEvents that initializes as a dictionary. We attempt to append to the dictionary in another class, however, receive the error: Cannot use mutating member on immutable value because allEvents is a get-only property. …
Laurence Wingo
  • 3,912
  • 7
  • 33
  • 61
-1
votes
3 answers

Why can't I use a class which implements operator unsigned int() as an array index in Visual C++ 32-bit?

We have an emulated unsigned integer type, let's call it uint_t, which has operator unsigned int() implemented. When we use a variable of this type as an array index: #pragma warning(disable: 4514) // unreferenced inline function removed #pragma…
Ian Brockbank
  • 497
  • 5
  • 14
-1
votes
4 answers

Swift: Can not access/set an empty array's first item by subscript

Why can not access/set an empty array's first item by subscript? eg: var array: [Int] = [] array[0] = 1 //fatal error: Index out of range
邓利文
  • 1
  • 2