Questions tagged [dollar-sign]
Anything related to the dollar symbol `$` and its special meanings in programming. The dollar symbol is often used in various programming languages as a special symbol for various purposes.
186
questions
0
votes
0
answers
18
views
Using dollar sign for looping through multiple data frames [duplicate]
I have one big data frame df.
I used split() to devide it into smaller data frames. thes can be viewed by: view(a$1) , view(a$2),...
I wondered if i could use a loop for this to view all the smaller ...
2
votes
1
answer
57
views
In R, how do you select a column while using double curly brackets? Why can't I use the $ operator with curly brackets?
I'm making a function where I need to select a specific column based on user input. The function works except that I'm trying to call the specific column a user has specified with ${{input}}, I get an ...
0
votes
1
answer
14
views
Neo4j How to access a property in a map with key containing dollar sign $
I have a json in the following format:
{"_id":"someid123"
"role": "Customer",
"itemDate": {
"$date": 1579687615849
}
}
I want to access ...
0
votes
1
answer
125
views
Haskell, "Is Prime" function
I am new to Haskell and I couldnt understand the "Null $ filter" thing.
isPrime n
| n < 2 = error "Zu kleine Zahl fuer Primzahltest"
| otherwise = null $ filter (\k -> n `...
1
vote
3
answers
273
views
Why dollar sign and brackets inside string do not work? Javascript/npm/react [closed]
I am taking HTML/CSS/JS course. There is exercise to create web app with robofriends. There should be many robofriends photos, but I got return only the same. Could you please check if I am doing ...
-1
votes
1
answer
234
views
$ (dollar sign) string in C# not working in VS2013
Why can't I use the dollar sign $ in Console.WriteLine()?
I know that I use it for using the C# code in {} but it doesn't work and I don't know why? My code is:
Console.WriteLine($"Name is : {}&...
2
votes
1
answer
76
views
plotly : Difficulty in displaying a string with two dollar signs in plot annotation [duplicate]
I have a string with two dollar sign, and I want to be used as a text annotation below my plot.
This code created a string, and you can see its output.
str=f"Maximum: {a} , ${numerize.numerize(b)...
3
votes
2
answers
110
views
How can I escape $ so I can hyperlink to it in R Markdown?
I used $ as a name for one of my sections. I then noticed that the hyperlink from my table of contents to that section does not work. Can this be fixed? I've tried escaping it with \ and I've even ...
1
vote
1
answer
94
views
How not to have dollar sign in target_link_options mangled?
If I have this CMake script:
add_link_options(--preload-file=temp$.txt)
add_executable(main main.cpp)
or
add_executable(main main.cpp)
target_link_options(main PUBLIC --preload-file=temp$.txt)
and ...
7
votes
1
answer
834
views
What is the dollar-sign prefix in function arguments used for in Julia?
When I searched about the '$' prefix in Julia, all I could find is that it is for string or expression interpolation. For example, here https://docs.julialang.org/en/v1/base/punctuation/. However, I ...
0
votes
1
answer
31
views
Why is the upper output 2 rather than 6 but the other one is 3?
lab=(jeff roger brian)
lab[3]=sean
lab=("${lab[*]}" "${lab[*]}")
echo ${#lab[*]}
echo $({lab[*]} > jeff roger brian sean jeff roger brian sean
echo ${#lab[*]} > 2
io=(io ...
-1
votes
1
answer
35
views
Why is bash behaving differently when it takes argument in braces? [duplicate]
Input: range 6
function range {
echo {0..$1}
echo {0..6}
if [[ $1 =~ 6 ]]
then
echo "Equal"
fi
}
Output:
{0..6}
0 1 2 3 4 5 6
Why is the ...
0
votes
2
answers
152
views
How do I overload Kotlin's string template operator (the dollar symbol)?
I'm sure I've read that Kotlin's "dollar operator" for string templates can be redefined, but their documentation on operator overloading does not indicate how to overload it, and their ...
-3
votes
1
answer
60
views
Regex for less than $250 [closed]
I am brand new to regex and I am looking for a way to match any dollar amount under $250. How can this be accomplished? There is a dollar symbol in the numbers that I will be looking at. Thank you!
0
votes
4
answers
95
views
How do I remove $ sign from string using replace?
I cannot remove the dollar sign from the balance properties, I am not sure what I am missing? I thought it was string.replace(searchvalue, newvalue)??
const data = [{
index: "14",
name: "...
-1
votes
1
answer
39
views
Can drop=FALSE be passed to $?
I tried `$`(mtcars,cyl,drop=FALSE), but this threw an error. I know that in practice you would use [ or [[ instead, but I'm curious, can drop=FALSE be passed to $?
2
votes
1
answer
43
views
Why does $ not partially match on summaries of linear models?
Take summary(lm(wt~mpg,data=mtcars))->a. a$r returns NULL, suggesting that there were no variables names beginning with r. However, both a$residuals and a$r.squared give valid output, contradicting ...
1
vote
2
answers
73
views
$ is an internal generic function, so how did the tibble package extend it?
Because it is on the list of Internal Generic Functions, I know that $ is an internal generic function. To my knowledge, this means that it cannot be extended using S3. Despite this, it is well-known ...
1
vote
2
answers
70
views
Aside from partial matching, can the $ operator do anything that [ and [[ cannot?
I believe the following to be true of the $ operator:
It allows names to be partially matched. For example, data$Sky can match data$Skywalker if there is no Sky name in use.
It cannot be used for ...
-1
votes
3
answers
123
views
return total value of only strings with a number + dollar
I need to return the total value of only the strings containing a number+dollar like '12.55$' in ['10$', 'sock', '12.55$', 'pizza11']. This list should return 22.55$ for example (with the dollar sign)....
1
vote
1
answer
99
views
Why does Powershell not process a string correctly which has a dollar sign and a question mark?
In PowerShell, why does this return nothing:
PS > $y = "$prid?api"
PS > echo $y
But these work better:
PS > $y = "$prid\?api"
PS > echo $y
18\?api
PS > $y = "${...
1
vote
1
answer
246
views
R Markdown kable table using $ sign in column name for html output
I'm wanting to include the units in my column description for a kable table in R Markdown with html output.
Basically for each cost I want 'Cost Min ($k)', 'Cost Mode ($k)' and 'Cost Max ($k)' as 3 of ...
1
vote
0
answers
67
views
Can't print out a string with $ in it [duplicate]
I was quite bored and decided to experiment by making my own string 'encoder'. Everything went fine until I noticed a 'error' I'd say.
In the code I have two functions encode & decode, then ...
3
votes
1
answer
1k
views
What does the dollar sign mean when put before a class call in Flutter?
I'm a beginner at Flutter/Dart and I keep seeing dollar signs appearing before calls to classes or methods, an example is the following (found in Floor package documentation):
final database = await $...
1
vote
1
answer
998
views
Create a column with dollar sign in Oracle SQL [closed]
I am wondering whether I can create a column with dollar sign? The output should look like the area marked by red line. But the column can still be calculated like number.
I am not sure whether it is ...
0
votes
0
answers
51
views
Why does `infix operator $` produce contradictory error messages in Swift?
I was having some fun with custom operators, and I had the following code:
precedencegroup HaskellGrouping {
lowerThan: TernaryPrecedence
associativity: right
}
infix operator $: ...
-1
votes
2
answers
84
views
regex ${something} [duplicate]
How do I use regex to get what is inside of a ${} enclosed value such as:
Dont care about this. ${This is the thing I want regex to return} Not this either.
Should return:
This is the thing I want ...
1
vote
1
answer
155
views
How to generate a three column data file in gnuplot
its my first question in this community. I am running the following short script in gnuplot (5.2),
set table "testable.txt"
plot '+' using 1:($1**2):($1**3)
unset table
The resulting data file ...
-2
votes
1
answer
62
views
What are the exact meanings and differences using these values in JS : ${abc} vs {abc} vs (abc) [closed]
What are the exact meanings and differences using these values in JS : ${abc} vs {abc} vs (abc)
1
vote
1
answer
179
views
How does one create and load a table into BigQuery with $ value?
I have a csv with dollar amounts for various products. The column in the csv already contains the "$" in front of the number, and since it's not in "" it can't be a string. How do I load this csv into ...
2
votes
4
answers
448
views
What is a "string-ending newline" in relation to the $ metacharacter?
I'm studying regular expressions from Mastering Regular Expressions, 3rd Edition, and I've come across the statement that $ is a bit more complex than ^, which surprised me as I thought they were "...
1
vote
1
answer
534
views
How to do bash variable replacement with curl artifactory AQL query [duplicate]
I would like to be able to use bash variable replacement in the following query to Artifactory Query Language api (AQL)
In the shell, the command works like this:
$ curl -H 'content-type: text/plain'...
0
votes
1
answer
2k
views
What are the special dollar sign variables in zsh?
When using bash, there are self-referential variables that don't seem to be available in zsh. For example, $? gets the exit status of the most recent foreground process, $_ gets the last parameter of ...
3
votes
1
answer
438
views
Java regex (java.util.regex). Search for dollar sign
I have a search string.
When it contains a dollar symbol, I want to capture all characters thereafter, but not include the dot, or a subsequent dollar symbol.. The latter would constitute a subsequent ...
1
vote
0
answers
965
views
Access dollar sign in parameters in web api
I am working in Asp.Net Core Web API. I write a GET API. In API, the input parameters have come with the $ symbol from the URL. But in c#, if parameter come with dollar symbol means, not able to ...
1
vote
3
answers
958
views
How to add a Dollar $ sign to a complex formula?
I already asked several questions for this code I'm writing for work, and in another post ( here : How to insert, through VBA, a formula in a cell with special characters like "-" or "$&...
34
votes
1
answer
20k
views
What does the dollar prefix ($) mean in Vue.js?
What is the meaning of the dollar character/symbol prefix before property names in Vue.js?
For example: this.$emit('clicked', 'demo')
0
votes
0
answers
41
views
In this code, why must we insert bash after find ... -exec ? ; and what's the difference between {} and ${} references?
I've been using "find -exec" commands as in code 1 and 2:
Code 1
find . -type d -exec chmod 775 {} +
Code 2
find . -type f -exec mv {} ./.. \;
But sometimes I see people use "bash" or "sh" just ...
1
vote
0
answers
19
views
Density plots in R: differences with and without $ [duplicate]
I have a dataframe d like this
head(d)
Id Group Index
1 ID_key1 F 38.69361
2 ID_key2 A 34.01609
3 ID_key3 A 31.21704
4 ID_key4 A 30.72222
5 ID_key5 F 39.52463
6 ID_key6 ...
2
votes
3
answers
66
views
How do I change the value of the global "$" to a custom function that returns a jQuery instance?
Before I begin, I'd like to make it clear that I don't want to modify the jQuery library in any way, I just want to replace the value of the $ global with a custom function that returns a jQuery ...
0
votes
1
answer
75
views
Why use the dollar sign in Es6 class constructor
I have seen the following code in a tutorial
export default class Model() {
constructor() {
this.$collection = [];
}
}
My question is why did he use the dollar sign before the ...
1
vote
1
answer
3k
views
What does $ in CJNE and SJMP in 8051 assembly mean?
I see $ in SJMP, CJNE and other instructions in 8051 assembly code and don't know what it does. Here
CJNE A,#'A',$+5
SJMP $
Can you tell me the purpose of it?
0
votes
1
answer
936
views
In Hive, how to properly use get_json_object to extract value when there is a `$` sign in the path
value
{"$screen_width":375,"$app_version":"2.5.0"}
Suppose I have a table shown above. The value "2.5.0" is what I want.
I try to use get_json_object but it fails.
Because the path "$app_version" ...
0
votes
2
answers
485
views
What does $ function means in vanilla (no libraries) JS?
I was wondering what does $ sign function means.
Is it just a shortcut to document.querySelector or does it have more uses.
I went to about:blank page and typed in console $.
Result in Firefox was:...
0
votes
1
answer
2k
views
Removing parenthesis & dollar sign using gsub() in R?
I've imported a csv file to r. Few of my columns contains currency data (ex. starts with '$'). To remove the '$' and convert the into numeric type, I've used gsub() function and it works fine.
Sample ...
0
votes
1
answer
2k
views
jQuery functions in Vue components in Quasar-Framework
I'm new to web app development and I have some basic queries about jQuery and Vue, the answers to which I just can't seem to find. I have an app made in a Quasar-Framework which often uses functional ...
4
votes
2
answers
217
views
How to "overload" dollar operator in Haskell
First of all, sorry if this question was already asked, I simply couldn't find the proper english terms to express what I meant.
I was wondering if there was any Type Class in Haskell representing ...
1
vote
2
answers
577
views
Universally escape dollar sign
I'm working on embedded project, which consists of my own code as well as 3rd party libraries and executables. To build all the parts consistently, I've written a script, which sets environment ...
1
vote
1
answer
193
views
How to construct regex to identify dollar ($) money sum
I'm trying to create a regex that can identify sum of money (in dollars).
The problem is that the data is generated by OCR on scanned PDF files, so the data is not precise:
$ can be represented by ...
3
votes
2
answers
2k
views
Dollar and exclamation mark (bang) symbols in VTL
I've recently encountered these two variables in some Velocity code:
$!variable1
!$variable2
I was surprised by the similarity of these so I became suspicious about the correctness of the code and ...