This question already has answers here:
How to put a static text (postfix, prefix) in QLineEdit?
(2 answers)
Closed 2 years ago.
It's possible to set a fix string at first of QLineEdit? something like this:
Which in here $ is constant and user could not remove or edit it.
use the input mask in the object: e.g.
ui->lineEdit->setInputMask("$ 000.000.000.000 ");
will look like
This question already has an answer here:
Notepad++ : Insert blank new line after match of some string
(1 answer)
Closed 4 years ago.
I have to join lines to make questions (having serial no. in order 1,2,3....) in one line and all options as shown below in another single line ? Example :
1.For his alleged
involvements in
espio-nage
(1) abc
(2) saf
(3) asf
(4) aqg
Output should be:
1. For his alleged involvement in espio-nage...
(1)abc (2)saf (3)asf (4)aqg
Note:I just want to make it compact to read in kindle reader so that maximum space will get utilised
I think
\r?\n(?!\(1|\d)
(And replace with empty string) will do what you want
Explanation: Looks for a newline that's not followed by either (1 or a single digit.
If you ever have more than 9 options that will cause problems as it'll split before (10 (11 etc. - in which case \r?\n(?!\(1\)|\d) should do it
Select text/elements and press CTRL+J
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 to query MongoDB with "like"
(45 answers)
Closed 6 years ago.
how to check the second character match in mongoDB. in sql we are using like '_a%'. how to use in mongoDB??
you should use syntax like below:-
db.users.find({"name": /.a./})
or like >> db.users.find({"name": /a/})
if you want to search for character "a"
This question already has answers here:
Using regex in R to find strings as whole words (but not strings as part of words)
(2 answers)
Closed 4 months ago.
I have a data.frame named all that has a column of factors, these factors include "word","nonword" and some others. My goal is to select only the rows that have the factor value "word".
My solution grep("\bword\b",all[,5]) returns nothing.
How come word boundaries are not recognized?
In R, you need two times \:
grep("\\bword\\b", all[5])
Alternative solutions:
grep("^word$", all[5])
which(all[5] == "word")