Questions tagged as 'decimal'

1
answer

BigDecimal error can not find symbol

Given an amount in R $ convert it to dollar. Well, based on this context, the teacher asked us to use the object-oriented paradigm. Before I should clarify that I use BlueJ ide to solve the problem, according to my teacher it is better for di...
asked by 23.04.2016 / 22:55
1
answer

Code that leverages decimal value in C # for Java / Android

I have a code that rounds a value of type decimal to homes I want, and I would like to implement it in Android in Java but I'm having some difficulties, here's the code below in C #. public static class Valor { public static decimal...
asked by 16.12.2015 / 18:37
0
answers

C # - 5 significant numbers with at least 2 decimal places

Well, someone knows a way that I can transform a number with at least 5 significant digits and added to this factor, should have at least 2 decimal places. Example: -0,00012 >> -0,00012000 12345687,00 >> 12345687,00 123,00 >&...
asked by 27.09.2017 / 22:49
1
answer

How do I add decimal places in a counter?

I need a countdown timer but since my knowledge is still timid in js , in that code I do not know how to add "0" in the hour, minute, and second fields. As it returns me only full numbers (ex: 0: 1: 7). In math.floor how do I add...
asked by 21.03.2017 / 20:37
2
answers

Complete decimal places, "00" JavaScript

People I have the following function that I am using to use Currency masks <input class="valr-parc" type="text" name="valr-parc" /> <script> String.prototype.Moeda = function() { var v = this; v = v.re...
asked by 01.11.2017 / 06:06
1
answer

Import decimal with comma

In SQL Server, I am trying to execute a SELECT in a * .csv file as follows: SELECT * FROM OPENROWSET(BULK 'C:\Minha_Pasta\meu_arquivo.csv', FORMATFILE = 'C:\Minha_Pasta\format.xml') AS Contents meu_arquivo.csv...
asked by 23.02.2017 / 22:26
2
answers

Converting a variable with replace to decimal

I am having a small question, I pass a 0,05 decimal value to a A variable of type string . After this variable receives this value, it converts , to point . , which is 0.05 After I do this replace, I co...
asked by 04.01.2016 / 18:58
2
answers

Working with binary data

I have a function in C that receives two bytes one with the highest significant value (msb) and one with a smaller value (lsb) and then converts them to decimal. int get_pea(char *buffer) { char lsb[8], msb[8], pea[16]; unsigned int i;...
asked by 04.04.2018 / 02:07
3
answers

Inserting numeric data into the database

I am having trouble inserting into the database the field is formatted as DECIMAL(10,2) ), when I try to enter the direct monetary value through MySQL it works with the end point instead of the comma ex: 135.45 - The bank addresses the...
asked by 11.09.2017 / 16:58
2
answers

Decimal to hexadecimal conversion

I need to make an algorithm in python to make a converter from decimal to hexadecimal. But I can not use ifs nor ready functions, like hex (). I did, but when I was printing the value in hex, I used print ("% X"% h) to print the letters without...
asked by 30.06.2017 / 22:40