Questions tagged [subscript]

0

votes
0

answer
5

Views

Is there a way to make octave interpret strings in static text of uicontrol using TeX (Greek letters, subscripts, superscripts etc.)?

I am writing a GUI in GNU octave (5.1.0). It is supposed to read some input values, make some calculations, plot some graphs and write the results. Everything works well besides the unwanted fact that uicontrol displays the given string uninterpreted (Greek letters, subscripts, superscripts etc.). I...
Tomáš Hofer
1

votes
1

answer
93

Views

Trouble with Spotfire R code (TERR) - Invalid subscript type 'list' error

I've written code that runs perfectly in R Studio (3.4.3). I copied the code over into a Spotfire project (TERR) and it ran fine once or twice, but now bombs with the 'Invalid subscript type 'list'' error. I have identified it coming from the line below in the apply function. minGT =') resultGT[re...
JDC
1

votes
0

answer
18

Views

Does spaCy deal with subscripts and superscripts?

I have some HTML texts that include and tags. I am wondering how I should convert them into plain text so that they will be correctly processed by current spaCy models. Should I convert and as something like a_b and a^b to preserve subscript and superscripts? Thanks.
user1424739
3

votes
1

answer
22

Views

Do pointers support “array style indexing”?

(Self-answered Q&A - this matter keeps popping up) I assume that the reader is aware of how pointer arithmetic works. int arr[3] = {1,2,3}; int* ptr = arr; ... *(ptr + i) = value; Teachers/C books keep telling me I shouldn't use *(ptr + i) like in the above example, because 'pointers support array s...
Lundin
1

votes
0

answer
85

Views

excel vba runtime error 9 subscript out of range

Please help! I've been following a tutorial on how to make my document's worksheet's password protected via a log in page. I'm having issues with a Run Time Error on the ** rows below.      Sheets(SheetNm).Protect '123'      Sheets(SheetNm).Visible = xlSheetVisible End If I managed to byp...
Will
1

votes
0

answer
73

Views

Printing Superscript / Subscript in RPGLE on iSeries (AS/400)

How to print subscript / superscript through RPGLE into spool file. This gets converted to pdf at the end. How to print '1st' as 1 (superscript) using RPGLE. The printer field type is character length 15. External printer file. Printer device type . . . . . . . . . : *AFPDS coded as @Symbo =...
J A
1

votes
0

answer
31

Views

Expression label in visnetwork r

Is it possible to use expression for subscript or superscript at the node label in vis network? Or is it possible to change the label after the plot? nodes
mjberlin15
1

votes
0

answer
41

Views

Include superscripts and subscripts letters on axis labels from hist3D plots

I need help to finish some hist3D plots using plot3D package from R software. The problem is that I don't know how to include superscripts and subscripts letters in the axis labels of this kind of plots. I've tried with other codes posted in this side, nevertheless, they don't work on hist3d plots f...
Eloy Montero
1

votes
2

answer
48

Views

VBA to insert before and after superscript and subscript in MSWord

I am trying to create VBA to insert before and after Supercript and subscript. My code is below. Public Sub MySubscriptSuperscript() Dim myRange As Word.Range, myChr For Each myRange In ActiveDocument.StoryRanges Do For Each myChr In myRange.Characters If myChr.Font.Superscript = True Then...
Dhruva
1

votes
2

answer
1.5k

Views

I am getting a error [ error: expected unqualified-id before ‘&’ token ] in a c++ program

I am getting a unusual error: error: expected unqualified-id before ‘&’ token Source code: // Overloading the c++ array subscript operator [ ] #include using namespace std; const int size=10; class myArray { int a[size]; public: myArray() {} int & operator [](int); void print_array(); }; int...
Samrat Mazumdar
1

votes
2

answer
1.9k

Views

Sub/Superscripts in UITextView

I want to display and edit superscripts and subscripts my application. In UITextView's documentation it said that you cannot use any kind of formatting that doesn't apply to the whole document. I realize I still have a few options on how to display these formats, I'm not sure what will be the best...
Jordan Medlock
1

votes
6

answer
2.7k

Views

Assign value using overloaded subscript operator

I am trying to create custom array indexed from 1 using subscript operator. Getting value works fine, but I have no clue, why assign using subscript operator doesn't work. class CEntry { public: CKey key; CValue val; CEntry(const CKey& key, const CValue& val) { this->key = key; this->val = val; } CE...
sealskej
1

votes
2

answer
1.1k

Views

Place subscripts in a QString

I'm having a difficult time finding how to insert subscripts into a QString. I know it can be done with style sheets, but I can't really use a style sheet in places where I place a QString. I've tried HTML markup and UTF-8 and other unicode systems for substrings with no luck. Hopefully someone ha...
roundtheworld
1

votes
1

answer
642

Views

R Error: subscript out of bounds with by() nested with kappam.fleiss()

I have a dataframe in which I want to compute interrater agreement (Fleiss Kappa) for multiple raters on multiple levels of my factor, 'form.' When I run my code, I get the following error: **Error in factor(ratings[i, ], levels = lev) : subscript out of bounds** Here's a sample of what it looks...
René Lawless
1

votes
1

answer
368

Views

C++ : Overloading subscripting operator

I'm implementing a vector, so i wanted it to behave as an array. That's the reason i tried to implement the subscripting operator but i haven't achieve the correct behavior. The implementation was something like this: template class Vector{ private: value_type ** vector ; long size ; long used...
Gonzo RI
1

votes
1

answer
116

Views

Overloading [] but its result isn't resolving before interacting with other operators (c++)

I've got a data object that I'm trying to get all of the operators working with. It's one chunk of data with variable ptrs into it, and has any number of different types and sizes and whatnot. Types are handled with enums and templates and switch statements. So for each x, d[x] is one type, with...
starship
1

votes
1

answer
553

Views

Subscript on half-type in hlsl

I seem to be unable to crack this nut myself and after some googling where I came up blank I thought it were time to turn to the community looking for answers. I have some code in a project I am working with, I will provide a quite simplified version but it should help me show the concept. //hlsl co...
qrikko
1

votes
1

answer
1.3k

Views

r-loops-`*tmp*` subscript out of bounds

I am using slove.QP to solve a quadratic problem (asset allocation problem). I have four constraints on different ranges of expected returns. For example, for the return range from 6.1 to 6.5, I put a constraint on this range, for range from 6.6 to 7.0, I put another constraint on it, etc. I create...
user3716379
1

votes
1

answer
443

Views

plotting axis labels with both Greek symbols from vector and subscripts

How do I change the code below to have: a subscript after the symbol (e.g. it would be $\alpha_R$, $\beta_R$, $\gamma_R$ in LaTeX) a space between the 'log' and the symbol (tried putting a '~' as suggested, but it didn't work) This is a mixture of the questions Plotting axis labels with Greek symbol...
Catalina
1

votes
1

answer
261

Views

VBA Error9 exporting to pdf

Using Excel VBA, I'm trying to print as PDF a single sheet of my workbook. I am using this code: Private Sub cmd_Print_Design_Click() Sheets('Sheet1').ExportAsFixedFormat _ Type:=xlTypePDF, _ Filename:=ThisWorkbook.Path & '/' & 'Design Summary', _ Quality:=xlQualityStandard, _ IncludeDocProperties:=...
Magnicco
1

votes
2

answer
351

Views

How to make struct a subscriptable in Swift 2?

Within my struct I have the following: subscript(index: Int) -> FileSystemObject { var i: Int = 0 for a in contents! { if (i == index) { return a } i++ } } Where, var contents: FileSystemObject = [FileSystemObject]? But when, let it: FileSystemObject = FileSystemObject() And I write: return it.conte...
Brandon Bradley
1

votes
1

answer
458

Views

can't catch “ctor subscript out of range” exception in visual studio 2012

I am writting a program which uses a vectors in visual studio 2012. This is the problematic fragment of my code: std::vector< std::vector< std::vector > > tensor; //some code try { ret = tensor[x][y][z]; } catch(...) { std::cout
Karol Borkowski
1

votes
2

answer
347

Views

Subscript an Arrary of generics type: error: Cannot subscript a value of type '[T]'

How to solve this problem? protocol Mappable { ... } class Foo { item:AnyObject } class SomeClass { var someObject = Foo() var items:[T] ... func someFunction() { someObject.item = items[index] // error: Cannot subscript a value of type '[T]' } I've tried adding an extension for subscripting [T] but...
Alston
1

votes
1

answer
274

Views

Ambiguous use of 'subscript' with NSArray & JSON

I have looked through the similar topics in stackoverflow but none of those solutions seem to work for me. I have an app that fetch video through youtube API . The following code is giving the error. var arrayOfVideos = [Video]() // I am getting the error for the following line and it says 'Ambig...
Burak Pusat
1

votes
1

answer
305

Views

Ambiguous use of subscript error only on real device

When I try to run the code below on my iPhone, I get the following error rrr.swift:356:72: Ambiguous use of 'subscript' The strange thing is it happens only when I want to run the app on the phone, on the simulator however it works fine. There are 3 lines which cause the error where. I noted them be...
1

votes
1

answer
60

Views

Subscript out of range error when referencing cells

the goal of my code is to take the old value of a cell, and check it against a new value, if it is entered. And if the old value changes to a new value, then update the date in a cell specified. The problem with my code is that I cannot seem to find a way to get around this error without my code bre...
juiceb0xk
1

votes
1

answer
206

Views

How to use Character subscript in Swift 3.1?

I'm new to Swift. I found out some weird behavior of subscript matching: struct SubscriptTest { subscript(character: Character) -> String { return 'Character: \(character)' } subscript(string: String) -> String { return 'String: \(string)' } subscript(int: Int) -> String { return 'Int: \(int)' } } l...
Robo Robok
1

votes
1

answer
43

Views
1

votes
2

answer
0

Views

Using boost::bind output as an array subscript

How do I get boost::bind to work with array subscripts? Here's what I'm trying to achieve. Please advice. [servenail: C++Progs]$ g++ -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr /share/info --ena...
posharma
1

votes
1

answer
0

Views

Vector subscript out of range [closed]

I'm getting the vector subscript out of range error. I've had it before, but it prints 'before' but it doesn't print 'after' so I'm confused at to why one of these lines would be causing it. cout
pighead10
1

votes
1

answer
0

Views

Using a subscript operator on a char pointer passed into a function doesn't modify the value. Why? [closed]

I've noticed that the following function: void myFunction(char *myString) { myString[0] = 'H'; } will not actually modify myString. However, this function does: void myFunction2 (char *myString) { *myString = 'H'; } It's obvious to me why myFunction2 works, though I'm not sure why myFunction does n...
Casey Patton
1

votes
1

answer
1.5k

Views

Wolfram Mathematica solving a particular equation

I'm using Wolfram Mathematica 8 and I want to make it solve this equation for the variable t: It probably involves using variables with longer names and having subscripts
Daniel Rusev
1

votes
1

answer
3.3k

Views

wpf c#: label with superscript and subscript [duplicate]

This question already has an answer here: Set superscript and subscript in formatted text in wpf 8 answers In my WPF application, C# based, I need to have some labels with superscript and subscript, as usually in various maths operations. For example: Es/Em or 4x I need to understand how to create...
FrancescoDS
1

votes
2

answer
882

Views

Passing $args to a script works differently than passing created array

I call a script: 'TestArgs1 xxx -T'. From within TestArgs1, I call TestArgs2, trying to pass it the same arguments. If I use: 'TestArgs2 @args', switch -T is correctly passed as true. Also if I copy $args to another array and pass it, it works. But if I create my own array first, (in order to modi...
John Pankowicz
1

votes
1

answer
215

Views

Bug in Swift array subscript indexing?

I've isolated some Swift code from my project that can be pasted into a Playground. It produces an error 'Could not find an overload for '+' that accepts the supplied arguments' both in normal Xcode editing and the Playground. The error refers to the last (non-trivial) line. import UIKit let point...
Brandon Murakami
1

votes
3

answer
1k

Views

Change font type and add sub-superscripts or greek letters in the labels of a corrplot correlogram

I want to make a correlogram with the corrplot R package. The data used are like the table below head(dat) pH EC NO3 NH4 Alpha Beta 1 8.32 12.6174 5.5658 0.6406 641.1503 545.1455 2 8.19 11.9373 10.5631 0.9045 754.5042 514.9512 3 8.07 11.3534 6.8375 0.7977 744.9126 493.5152 4 8...
mtsiknia
1

votes
1

answer
2k

Views

MATLAB boxplot XTickLabel with subscripts

boxplot(rand(10,2)) set(gca,'XTick',(1:2)) set(gca,'XTickLabel',{'A_{a}','B_{b}'}) %a and b should be subscripts Does not plot a and b as subscripts as it is suppose to do. Any suggestion on how to make subscripts for XTickLabel?
BERKO
-1

votes
0

answer
33

Views

String subscript out of range? Error code (C++)

I'm trying to create a script that will remove the vowels from the users input string. However, when running the script, I get an error code 'string subscript out of range'. What is causing this in my code? Thank you Code: void stringDemo() { string sName = 'Corey Vickroy'; string sGuess; string sT...
Apollo503
1

votes
2

answer
442

Views

Using subscripts and variables for multiple legends for R plots

My goal is to have multiple lines in my legend that would look like this format, Nsubscript(M), Nsubscript(F). The subscripts will be used to make my legend shorthand. There will be variables that will need to be evaluated to get the numeric values. How do I make multiple lines of legends with subs...
Meli
1

votes
1

answer
65

Views

How to subscript out binary leading 0b in a list

so I've got binary literals but I need to remove the leading '0b's in each one. How do I go about subscripting them out? Here is my current code: en = [132, 201, 141, 74, 140, 94, 141, 140, 141, 15, 31, 164, 90, 229, 201, 141, 78, 114, 241, 217, 141, 217, 140, 180, 141, 164, 51, 141, 188, 221, 31,...
DoN_Dan

View additional questions