Truncation is the term for limiting the number of digits right of the decimal point, by discarding the least significant ones.
Questions tagged [truncated]
256 questions
0
votes
1 answer
How do I find a matching subtree?
I have a large binary tree, T. T "matches". Some number of subtrees of T will also match. In fact, the matching subtrees need not even be full subtrees: they can be truncated, too. By truncated subtree, I mean that nodes in the subtree may not…
JoeF
0
votes
4 answers
div shown with jquery is cropped
I'm trying to fight a strange behaviour - and any help is appreciated.
I have a long and complex HTML page with general structure about like this:
+------------------------------------------+
| Page header …

Aleks G
- 56,435
- 29
- 168
- 265
-1
votes
1 answer
Inconsistent MYSQL behaviour when updating table with different column lengths and comparing text to integer
If I have a table like
create table test
(
id varchar(255) not null
primary key,
price varchar(10) not null,
link varchar(255) not null
);
and it has this data:
id
price
link
1
50
text
2
50
text
3
50…

Lehren
- 99
- 2
- 11
-1
votes
1 answer
Why try-with-resources causes Truncated chunk error with CloseableHttpClient?
Could you please help me with the following:
I have the following method:
public static CloseableHttpResponse getRequest (String url) {
try (CloseableHttpClient httpClient = HttpClients.createDefault();){
HttpGet httpget = new…

Lord Barrington
- 11
- 4
-1
votes
1 answer
a.exe: file not recognized: File truncated
It was working perfectly for others c file but in this file it fail to run . Please do explain , as i am new to Programming world.
C:\Desktop\C Basic\recursiveFunction> gcc .\pratice.c
PS C:\Desktop\C Basic\recursiveFunction> gcc .\a.exe
.\a.exe:…

Suraj Gaire
- 9
- 1
-1
votes
3 answers
MySQL: Error Code: 1292. Truncated incorrect DOUBLE value
I'm trying to create a stored function which tests for the existence of multiple things in a database returning boolean statement of false if at least one exists and true if none exist.
Specifically there's multiple tables I'm joining namely:…

RickPeck
- 165
- 2
- 14
-1
votes
2 answers
Subtracting Truncated Numbers: Result isn't truncated?
I'm trying to create a function that will divide a number into categories based on a specified percent (okay, a budget.)
I've taken the divided floats, grabbed a test truncate function off the web, and truncated everything after the hundredth place.…

WatcherMagic
- 11
- 5
-1
votes
1 answer
Varchar and int columns join in sql
I tried this query
insert into Dimension_DDTU (BI_Id, BI_Name, DBI_Id, dBI_Name)
select
ds.BI_ID,
dvo.name,
ds.BI_Id + '' + dm.DBI_Id as DBI_Id,
dso.dname
from
Census.dbo.SMaster sm
full outer…

see sharp
- 79
- 1
- 1
- 9
-1
votes
1 answer
truncate all lines in a file while preserving whole words
I'm trying to shorten each line of a file to 96 characters while preserving whole words. If a line is under or equal to 96 chars, I want to do nothing with that line. If it over 96 chars, I want it cut it down to the closest amount less than 96…

user3643012
- 42
- 4
-1
votes
1 answer
Modify column length in MySql
I'm issuing the following command:
ALTER TABLE `table_name` MODIFY `column_name` VARCHAR(1022)
At the moment it's VARCHAR(1024), however I'm getting this error:
Error Code: 1265 Data truncated for column mysql
I guess it's because some rows are…

Rafael
- 1,099
- 5
- 23
- 47
-1
votes
1 answer
Ruby programming: How to truncate IP address?
For various purposes I find myself needing to truncate an IP address, I need to alter an IP address within my program from (xx.x.x.x) to (xx.x.x.1) by changing the last number after the final "." in the string to the value of 1.
I theorise that this…

user4493605
- 391
- 2
- 18
-2
votes
1 answer
Challenge to iterate truncated md5 hash
i need an help to this challenge of programming.
"With this string: NzQwZjgxMTU2YzI3NjM1NA==
MD5 hash it and remove the last 16 characters of the hash. Iterate
this process 50 times and submit the final truncated hash below."
What language can i…

heroes12
- 1
-2
votes
2 answers
Truncated If Statement C++ (Turning letters to numbers)
I am trying to change a series of letters into numbers with C++ and have started by making this code.
However, it appears that the math that calculates the digit1 variable is never getting executed.
Any thoughts?
#include
#include…

Lucas
- 5
- 1
-2
votes
1 answer
Parameter estimation (MLE) of a truncated Pareto distribution
i'm new here and i am super desperate so i really hope anyone of you can help me....
i have a sample of random data x_1....x_n and i want to fit a truncated pareto distribution to the data.... to fit a generalized pareto distribution is super easy…

keep_isi
- 1
- 1
-3
votes
2 answers
Truncate not workng in MySQL
I guess the correct way of truncating a value in MySQL is truncate(value,limit); but that doesn't seem to be working here it needs an extra table name;
select truncate(94204.27348,2);
ERROR at line1:
ORA-00923: FROM keyword not found where…