This question already has answers here:
Strange //! comment syntax in Quick Controls 2.0 QML source [duplicate]
(2 answers)
Why are comments that start with "//!" colored blue in Qt Creator?
(2 answers)
Closed 6 years ago.
In "screenshot.cpp" of the Screenshot Example for Qt5.7, I saw around 15 comment-like lines of the form //! [int], like //! [0], //! [1], etc. They're syntax-highlighted differently than normal comments (highlighted blue instead of green in Qt Creator). I looked around and thought it might have something to do with the "!" mark in Qdoc, and thought it was unique in Qt, but when I tried typing it into Code::Blocks, it was syntax-highlighted differently too.
Does this syntax have any special meaning in C++? Or is it just a normal comment? I tried googling "c plus plus exclamation comment syntax" but I didn't get anything like this.
Related
This question already has answers here:
Perform calculation only if both cells are not blank with arrayformula? [duplicate]
(3 answers)
ArrayFormula and "AND" Formula in Google Sheets
(4 answers)
Closed 4 months ago.
So I am trying to get this Arrayformula to work so I can plot this formula instead of calculating every Y myself.
=arrayformula(Sum(IF(Z3:Z294>Y$1;IFS(AB3:AB294>0;0;Z3:Z294>Y$1;Y3:Y294-(F3:F294*Y$1));0)-(Sum(IF(and(J3:J294>0;Z3:Z294>Y$1);F3:F294;0)))))
It gives me the (correct) return of this part:
Sum(IF(Z3:Z294>Y$1;IFS(AB3:AB294>0;0;Z3:Z294>Y$1;Y3:Y294-(F3:F294*Y$1));0)
But it doesn't subtract the second part:
-(Sum(IF(and(J3:J294>0;Z3:Z294>Y$1);F3:F294;0)))))
I am quite new to extensive Excel/Sheets formulas so I have no idea how to get this to work, It is also quite weird that the second part doesn't add up even seperate from the first part. So this also doesn't work:
=arrayformula(Sum(IF(and(J3:J294>0;Z3:Z294>Y$1);F3:F294;0)))
I hope it makes some sense without any context, thanks in advance!
Have a great rest of your day,
P.S. Please ignore simple mistakes, I don't code that often in Sheets ;)
AND is not supported. instead of
and(J3:J294>0;Z3:Z294>Y$1)
do this:
(J3:J294>0)*(Z3:Z294>Y$1)
This question already has an answer here:
Increasing the print depth in SML/NJ
(1 answer)
Closed 6 years ago.
I'm using Emacs to write a simple function in sml of about 4 lines and when I try to call the function/evaluate it in the buffer it returns this with 3 dots at the end
val it = [1,2,2,2,2,2,2,2,2,2,2,2,...] : int list
What's the dots at the end? My code doesn't print any dots. Is this is from Emacs or sml? any hints please.
Also I'm supposed to get a longer list like
[1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
is that why the dots there?
is that why the dots there?
Yes.
This question already has answers here:
How do you make Vim unhighlight what you searched for? [duplicate]
(14 answers)
Closed 6 years ago.
So I'm practicing Ruby on Codeacademy and to save the work that I'm doing I copied and pasted my code onto my cmd prompt using VIM. However, I noticed that each line of code was commented with the '#' symbol and I wanted to remove them.
To be productive, I searched online how to use regex to search for all the hashtags and remove them with this command:
:%s/#//gc
Then this popped up:
replace with (y/n/a/q/l/^E/^Y)?
I pressed y every time until the message disappeared and now I'm stuck with all hashtags characters being replaced with a yellow rectangle. So instead of having this:
#
I have this:
[] but shaded in yellow for every time I use a hastag.
Any help would be much appreciated!
The yellow rectangle represents the characters that matched your expression. To clear the last search highlighting, use:
:noh
To uncomment the lines of code, I would just do this:
Use V to select each line, then
:norm x
This question already has answers here:
Get platform specific end of line character in C++/Qt
(4 answers)
Closed 7 years ago.
Using the QT library, is there a simple way to obtain the line ending characters particular to the platform where the program is being executed?
How can I obtain the line ending characters as a QString?
If you are working with text files, open files in text mode and use \n. Please note that using endl is no more portable than \n.
This question already has answers here:
QCompleter Custom Completion Rules
(8 answers)
Closed 6 years ago.
Is there an example available of a QCompleter subclass that will provide autocompletions for fragments that appear in the middle of words?
eg:
Suppose you have the wordlist { "apple", "pear", "banana" }.
When the user types 'p', the suggested autocompletions should be "apple" and "pear", but not banana (because "apple" and "pear" both contain 'p');
The default autocompletion will only suggest "pear".
QtCreator 1.3 (that will be release soon) will have an extended completion that will allow to find a function by indicating only capital letter. See the video : http://www.youtube.com/watch?v=TyfO-7lvy_c&feature=player_embedded.
This is a behavior near to the one you want. Since QtCreator is open source you can have a look to its source code for a real example. For now I do not know the release date of this version so you will have to wait a little to see.