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
2 answers

Number Input - Step Attribute - format value to 2 decimal places

I am creating a currency input and I want my counter to be able to go up in pence, however, I currently have an issue: at the moment when I click the step, I get something like 0.38, 0.39, 0.4, 0.41, 0.42 I would want the "0.4" to actually be 0.40,…
Wobbulaxx
  • 1
  • 2
0
votes
4 answers

Center the trailing icon of expansion tile in Flutter

I would like to horizontally center the trailing icon of my expansionTile, Here is my expansionTile with the trailing on the bottom right : I already tried to encapsulate the Icon in a Align and a Container but doesn't work, I also tried Padding…
JS1
  • 631
  • 2
  • 7
  • 23
0
votes
0 answers

toad formatter starts next line under trailing comments

I find that toad formatter starts the next line of code under trailing comments. Is there a way to change this. This happens regardless of wrapping/stacking options. e.g. Original SQL: SELECT C1, C2, C3, C4, C5 FROM DUAL Now I add a trailing…
0
votes
1 answer

Pine script - Trailing Profit calculation error in secondary entry

I wrote a strategy that includes trailing profit by following examples of another coders. However, when the entry conditions are still valid and the strategy entry executed second time, it still takes the previous position's trailing profit price.…
sakcali
  • 1
  • 1
0
votes
2 answers

Length of a float without trailing zeros (python)

I want to print the length of a float number without trailing zeros using python. examples: 0.001000 >>> I want to get length=5 0.000100 >>> I want to get length=6 0.010000 >>> I want to get length=4 any suggestions?
0
votes
1 answer

how to round down numbers with a trailing zero in python

In excel, there is this formula: =ROUNDDOWN(D28-D33-D34, -2) and I got the results ==> 166400. But the result without the Rounddown formulas is ==> 166468.50. My question is how to get the same in python. When I do round (n, -2) I get ==>…
0
votes
1 answer

Stop Loss function does not work in my Strategy Tester

In below Short position strategy tester, the tester opens the short position which is fine. If position makes a profit, "Take profit trailing stop" works just fine. But somehow if position makes a loss, STOP LOSS does not work. Can someone tell me…
Ovgu Sayan
  • 11
  • 1
0
votes
3 answers

Excel Graph should not have trailing empty cells take up space on axis

Want to draw a graph on a range of data which length can change depending on user input. So, empty cells at the end of the range should not appear on the graph, and the axis should not have these values at all. Detail: Compound interest calculator.…
Yster
  • 3,147
  • 5
  • 32
  • 48
0
votes
1 answer

VBA identical nrs not matching in if statement

I apologise, I realise this may have been asked a gazillion times already but I've tried looking and I can't find a situation like mine. I'm still learning, and I've never posted here before either so please be gentle with me. I am working in Excel…
Ursula
  • 3
  • 3
0
votes
1 answer

How to eliminate trailing space in AutoHotKey scripts

AutoHotKey v. 1.1.33.09. Windows 10, Firefox, Edge, Chrome, multiple applications I have several lengthy email addresses associated with some non-profit work I do. I am creating shortcut keystrokes in an autohotkey script for each email address,…
0
votes
1 answer

I am trying to write up a trailing value that only adjusts to a new value when a condition is met in ThinkScript

Similar to the PreDefined Study "PriceChannel" that only changes it's value if there is a new low or a new high, I want it to only change it's value when a condition is met, then keep that value until it is met again. This is the code I have so far,…
0
votes
1 answer

Data Migration from DB2 to PostgreSQL using AWS DMS - Varchar fields are showing trailing spaces

We are migrating DB2 data to PostgreSQL 11.x using AWS DMS, we have varchar fields in db2 with trailing spaces and without any TRIM these fields working fine when we are using these fields in a WHERE clause. I think DB2 internally trimming them as…
vijay
  • 1
0
votes
2 answers

Removing trailing zeros - c++

This code: cout<< to_string(x) + "m ----> " + to_string(x *0.001)+ "km"<
0
votes
3 answers

How to round and format a number in JavaScript without trailing zeros?

I have two inputs that get multiplied and I need the result to be rounded down without trailing zeros. I have tried a few different built-in methods, such as number.toFixed(2), but they did not produce the desired result. This issue can be…
0
votes
1 answer

Java Remove Trailing 0s

I was wondering on how to remove trailing 0s from whole numbers in my java program For example: 100.0 -> 100 However, for numbers like 1285.71 to remain the same. I just need the trailing 0's from whole numbers removed, while still retaining the…
utnicho
  • 49
  • 7