Questions tagged [trailing]

Trailing characters are characters at the end of a string that should be removed for reason (eg. trailing zeros in "0.5000", trailing spaces in "hello ", trailing slash in a URL, trailing newline character, etc.).

This tag should be used for questions related to strings formatting issues, either when the goal is to parse the string or to display it. However context may be very different from one question to the other, and this tag covers a wide area.

217 questions
0
votes
0 answers

Pinescript Trailing Stop Loss after Signal is given until new signal is given or SL hit

I need help here with my pinescript code...(first time coding with Pinescript, sorry for the messed up code). For my indicator I want to give out Buy/Sell signals - that works so far good! additionally it should calculate a trailing Stop loss, when…
FloKl
  • 25
  • 5
0
votes
1 answer

Automatically strip trailing whitespace when fetching data with `DBI::dbGetQuery()` in R?

I work with a database (of which I am not the DBA) that has character columns of length greater than the actual data. Is it possible to automatically strip trailing whitespace when fetching data with DBI::dbGetQuery()? (i.e. something similar to…
Thomas
  • 457
  • 2
  • 12
0
votes
1 answer

"Unexpected token" or "JSON parse error - trailing comma" when doing API call with PowerShell

I have the following PowerShell API script: $VMname = "abcd" $IP_address = '2.2.2.2' $url = "https://ansibletower.xyz.com/api/v2/job_templates/12321/launch/" $token = "9998980fsfdfsdfdf" $headers = @{Authorization = "Bearer $token"} $contentType =…
LJS
  • 317
  • 1
  • 9
0
votes
0 answers

How to pass query to api server located in nginx proxy_pass?

Proxy_passed nginx through the trailing path to api-server.com using rewrite. server { listen 80; server_name localhost; location / { root html; index index.html index.htm; } location /api/ { …
0
votes
3 answers

How to "Fix" the ATR trailing stop in Pine Script

I would love your help. I'm coding a trading strategy that goes **long** on the break of a 40-day high, and closes that long position when a trailing stop is hit. That trailing stop is 3*ATR which begins under the low of the entry candle and trails…
0
votes
0 answers

Generating A Trailing Stop Strategy in Pandas But Cannot Prevent Re-issue Signal

I am relatively new to Python & Pandas. I am trying to generate a trailing stop strategy where once the total p&l of the position reaches either ultimate stop loss level, or the trailing stop level, position will be reset to zero, and will REMAIN…
0
votes
1 answer

"Extra trailing closure passed in call" Error while passing multiple bindings

I am creating a simple Taskmanager for a schoolproject similar to apple's scrumdinger. I created two filesafer for each struct. But if I try to pass them further I always get the error "Extra trailing closure passed in call". Can someone help…
0
votes
1 answer

How can I sorting ListView by trailing value in Flutter?

I have a ListView in Flutter shows stores location information from firebase after that a function works to calculate a distance between customer location and stores locations and show distance value in the trailing of ListView, now I want to sort…
0
votes
0 answers

SQL trailing spaces removal to fit certain length

I have a SQL column of Employee City and the file output requires 40 characters in length. The system retrieves a value that is 58 characters. This city value can change in length (Chicago, Warrenville), but will always need to be 40 characters in…
0
votes
1 answer

(Inside ListView.builder) Every time I press the ExpansionTile, the trailing icon of the ExpansionTile changes also on other ExpansionTiles

I have ListView.builder which returns ExpansionTile. Inside of this ExpansionTile, I used trailing with row widget. When I use row inside of the trailing, I lost the animation effect, therefore I used AnimatedRotation widget. But now every other…
0
votes
1 answer

How can I locale-format a python Decimal have a fixed number of decimals with trailing zeros

I'm using Python 3.10.x So I would like to have all my numbers/floats the same amount of decimals and make it a locale format with or a dot or a comma as separator (I would like to have users choose their own locale). Let's say I have this…
tvdsluijs
  • 127
  • 11
0
votes
1 answer

Format DataFrame to Achieve Equal Number of Digits in Each Column

I would like to format the DataFrame Col1 Col2 Col3 -0.012 3.2 nan 0 -1 15.2 0.5 7.53 76.88 using trailing zeros, such that all values in each column have the same number of digits. The result should look like…
Michael
  • 357
  • 1
  • 13
0
votes
1 answer

IIS URL rewrite not work for remove trailing slash

I need to add "Remove trailing slash" if this slash is 2 or more. Using this Regex pattern (.*)/{2,}$ works in test pattern but does not work on live environment. For example: https://test.com/ => https://test.com/ https://test.com// =>…
0
votes
2 answers

How do I remove a trailing slash?

I just want to remove a trailing slash from a directory. For example I want /p/page/ to show up as /p/page. It just looks better, doesn't it? However I've tried many different kinds of mod_rewrites but none have worked or something happened. I just…
0
votes
1 answer

Return value isn't returning double with two decimal places

This question goes towards both my class method and my test cases. I have tried searching it up and implemented some of the methods I found online, but in my test case, it shows as Expected: 10.0 Actual: 11.0 when I want it to show Expected: 10.00 …