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

Keep trailing blank in string

I have the following temp dataset with 2 observations. The second observation contains a trailing blank.In the data _null_ step I read the value from the second observation with call symput. In the put statement the value is written to the log with…
zuluk
  • 1,557
  • 8
  • 29
  • 49
1
vote
0 answers

Trailing slash duplicate content

I don't know what i've done wrong here but can someone look at my .htaccess code and work out why I keep have duplicate content with a trailing / I just want to redirect all http to https without www and its duplicating my content. Im running my…
JAIP
  • 11
  • 2
1
vote
2 answers

Finding natural numbers having n Trailing Zeroes in Factorial

I need help with the following problem. Given an integer m, I need to find the number of positive integers n and the integers, such that the factorial of n ends with exactly m zeroes. I wrote this code it works fine and i get the right output, but…
ranger_sim_g
  • 160
  • 1
  • 10
1
vote
3 answers

removing trailing zeroes for a float value c++

I am trying to set up a nodemcu module to collect data from a temperature sensor, and send it using mqtt pubsubclient to my mqtt broker, but that is not the problem. I am trying to send the temperature in a format that only has one decimal, and at…
Benja0906
  • 1,437
  • 2
  • 15
  • 25
1
vote
0 answers

Subdirectory doesnt work without slash ("/" symbol)

haberimyok.com/tr doesnt work, haberimyok.com/tr/ works. .htaccess is in the /web/tr directory RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?haberimyok.com$ RewriteCond %{REQUEST_URI} !^/web/tr RewriteCond…
haberimyok
  • 13
  • 3
1
vote
1 answer

How can I force the ".0" portion of a value to explicitly display (Chart.JS)?

I have got this data for my chart: datasets: [ { label: "Price Compliant", backgroundColor: "rgba(34,139,34,0.5)", hoverBackgroundColor: "rgba(34,139,34,1)", data: [99.0, 99.2, 99.4, 98.9, 99.1, 99.5, 99.6, 99.2, 99.7] }, { …
1
vote
1 answer

Function return an array

I know a function cannot return an array, but this function declaration auto fun(/*...*/) -> int [2] can pass the compilation. Why!?
tocrafty
  • 561
  • 4
  • 9
1
vote
2 answers

What Is The Python 3 Equivalent to This

What is the Python 3 equivalent to Python 2's statement: print x, I am aware of Python's 3 print(x,end=' ') However this is not exactly the same as I will demonstrate. So lets say I had a list of items I wanted to print out all on one line with…
Blued00d
  • 170
  • 4
  • 23
1
vote
1 answer

Matlab trailing singleton dimension

I have the following code o = ones(4,3,2) c = cellfun(@squeeze,num2cell(o,[2 3]), 'UniformOutput', false) which gives as expected the 4 cells, each containing 3x2 matrixes. But if I reduce the last dimension of o to one, the behavior is totally not…
W. Alpha
  • 177
  • 1
  • 5
1
vote
1 answer

MS Sql Server: Trailing spaces and disk space in a varchar column in a table

Does removing trailing spaces in a Varchar column values save any disk space?
piyush varma
  • 15
  • 1
  • 5
1
vote
2 answers

Regex that removes the 2 trailing letters from a string not preceded with other letters

This is in C#. I've been bugging my head but not luck so far. So for example 123456BVC --> 123456BVC (keep the same) 123456BV --> 123456 (remove trailing letters) 12345V -- > 12345V (keep the same) 12345 --> 12345 (keep the same) ABC123AB -->…
exevio
  • 43
  • 6
1
vote
2 answers

Sqlite - Remove trailing zeros in decimal

select round(836.0) returns 836.0 How can i remove the trailing zeroes in an sqlite query. 836.00 should be 836 836.440 should be 836.44
user584263
  • 375
  • 5
  • 18
1
vote
1 answer

trailing zeros calculation in jquery with points values

Hi I'm trying to calculate values with standard way like 12,000.00 or 1,678,900.00 or 0.36 values but its not calculating my values if comma or point exists. here is my code jsFiddle for example I'm giving the values Payment Sent 1:…
user3833682
  • 263
  • 5
  • 20
1
vote
1 answer

standard trailing zeros in jquery which support cents and string

I use the code to add zero after my values and take help from internet and found this code $(document).ready(function() { //var number = 258.20; var number = 2; var rounded = number.toFixed(2); // rounded = 258.20 …
user3833682
  • 263
  • 5
  • 20
1
vote
1 answer

Intersystems Caché SQL. Different behaviour trailing withespaces vs leading withespaces

Given: A table tA with an "ID" and a "Description" columns "Description" is a string column. The contents of the table are: ID || Description 1 || "String1" 2 || "String2" 3 || "String3" If I execute the following SQL…