How to gather a set of floating point numbers from a web page form?
I am pretty new to Java and I am working on a project to apply Benfords law to find the probability of digits submitted by the user. My first step is to gather set of floating point numbers from a web page. How do I go about doing this? Any suggestion or a proper site where I can learn this stuff will be highly appreciated.
I am using NetBeans IDE 5.5.1 and for this project. I have realized that the first question was not well phrased.
I created a web project with 2 jsp files and a class file in it. When my jsp file runs I ask the user to enter a number for finding the probablility based on Benfords law.
This is what I got so far:
This is input.jsp
<h1></h1>
Please enter a number to be checked
<form action="result.jsp" method="post">
<input type="number" name="number" >
<input type="submit" value="Check number">
</form>
</body>
</html>
This is result.jsp
String number=request.getParameter("number");
Similar Messages
-
How to call an ABAP based web service from a web page (form)
Hi,
I am trying to figure out how I can call my own developed ABAP based web service. I was able to successfully test it in the WS navigator and am now wondering what I need to do to embed the service call in a plain simply web page (form). Basically I'd like to create a web form allowing to specify the parameters and with a 'Submit' button pass the parameters to the web service and launch it.
Is this possible or do I need some kind of SDK to accomplish this?
Thanks for any hints and tips.
WolfgangHi,
refer the following link and this is for cosuming the web service form Web dynpro Java
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d70a19-45a3-2b10-bba0-807d819daf46&overridelayout=true
and please go throught the following link if you want to cosume it through web dynpro abap and find the answer given by the Moderator Thomas Jung
regards
Manohar -
How to set text size when printi from a web page
can't increase text size when printing a web page
If you're using IE, click on View, Text Size and then whatever size you'd like. You'll see the changes on the screen and it should print out the same way.
Hope that helps.
Say Thanks by clicking the Kudos thumbs up. Please mark the post that solves your problem as an Accepted Solution so other forum users can utilize the solution.
I am an HP employee. -
Serial Communicat​ion(CAN) of Floating Point Numbers
Hi,
I have ran into a situation were I need to use floating point numbers(IEEE Floating Standard) when communicating. How can I send and recieve floating point numbers? What converstions need to be made? Is there a good resource on this?
Thanks,
KenHi K.,
in automotive a lot of fractional values are exchanged via CAN communication, but still the CAN protocol is based on using integer numbers (of variable bit size)…
We are thinking we need to use single SGL floats ... that require a higher resoultion and precision
What is the needed resolution and "precision"? SGL transports 23 bits of mantissa: you can easily pack them into an I32 value!
Lets make an example:
I have a signal with a value range of 100…1000 and a resolution of 0.125. To send this over CAN I need to use 13 bits and scale the value with a gain of 0.125 and an offset of 100. Values will be send in an integer representation:
msgdata value
0 100
500 162.5
501 162.625
1000 225
5000 725
7200 1000
The formula to translate msgdata to value is easy: value := msgdata*gain+offset.
Another example: the car I test at the moment sends it's current speed as 16 bit integer value with a range of 0…65532. The gain is 0.01 so speed translates to 0.00…655.32 km/h. The values 65533-65535 have special meanings to indicate errors…
So again: What is your needed resolution and data range?
Another option: send the SGL as it is: just 4 bytes. Receive those 4 bytes on your PC as I32/U32 and typecast them to SGL…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How does Java store floating point numbers?
Hello
I'm writing a paper about floating point numbers in which I compare an IEEE-754 compatible language [c] with Java. I read that Java can do a conversion decimal->binary->decimal and retain the same value whereas c can't. I found several documents discussing the pros and cons of that but I can't find any information about how it is implemented.
I hope someone can explain it to me, or post a link to a site explaining it.
Cheers
HuttuSo it is a myth.
I still ask because I observed a oddity: When I store 1.4 in c and printf( %2.20f\n",a); it I get 1.39999999999999991118. If I do the same in Java with System.out.printf( %2.20f\n",a); I get 1.4. If I multiply the variable with itself I get 1.95999999999999970000:
double a=1.4;
a=a*a;
System.out.printf( %2.20f\n",a);
{code}
Does this happen because of the rounding in Java? -
How to read binary floating point values from TCP/IP
I am attempting to use a LabView application to read an array of binary single precision floating point numbers transferred through a TCP/IP connection from a Windows C++ program. The endianization occurs before the values are sent to the Labview application. When I read the values in LabView, some values are interpreted correctly, some are not. For instance, the C program is sending a 6 as one element, and 7 as another. Labview interprets both as 6. The difference between 6 and 7 in binary format is 1 bit (bit #21 if counting from 0 in LabView format). There are 2 other values that show the same error- 459.67 is being sent, 395.67 is read by labview (1 bit difference, exact same bit... 7.5 is being sent, 6.5 is being read by LabView (1 bit difference, exact same bit). LabView reads that bit as 0, when it should be 1.
This seems very odd to me because most values are being read correctly, including other values with that same bit on. There are values being read correctly that are both before and after the incorrect values in the array, so it's not just an issue with an offset or something in the bit stream. Additionally, when attempting to read an array of values with all bits on, I get a strange pattern of 111110011111100111111001111110.
We have also verified that the binary representation for the values is the same on both machines, once you account for the byte swapping. What am I missing here? How in the world can some values come across correctly and others incorrectly? Any help would be greatly appreciated! Our fallback is to transfer everything in ASCII, which is going to greatly increase packet sizes.
Thanks,
JasonUpdate:
Problem fixed. I say fixed and not solved because I don't know why it's fixed. I had been storing the TCP/IP read in a string and passing it through a shift register after each read. I would then concatenate it with the TCP/IP read result in the next loop. After each read, it would search the concatenated string for ASCII flags. When it found them, it would strip off the flags and then type cast the rest as single precision floating points.
I knew I would be getting the same number of bytes each time, so I ditched the ASCII flags and had just the binary values sent. This way, I expect to get all of the values in one TCP/IP read. No values are passed through a shift register to the next loop and there is no concatenation of the string outputs from TCP/IP read.
I'm not sure if it was the ASCII flags being included or something with the way I was manipulating the string that was causing the binary values to be interpreted incorrectly. Hope this helps someone else.
Jason -
Separator for floating point numbers
Hello,
I work with oracle 9 and have a problem with the entry of floating point numbers.
The separator for floating point numbers in my data is a point (5.60).
The pre-setting of oracle is a comma (5,60).
By inserting I get the error message:
01722. 00000 - "invalid number"
How can i change this setting
Thanks for Help
F.Hi,
I'm not sure if I understood your problem, however the NLS_NUMERIC_CHARACTERS variable specifies the characters to use as the group separator and decimal character.
SQL> create table t1 (val number);
Table created.
SQL> select * from nls_session_parameters;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY BRAZIL
NLS_CURRENCY R$
NLS_ISO_CURRENCY BRAZIL
NLS_NUMERIC_CHARACTERS ,.
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD/MM/YYYY
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY Cr$
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
17 rows selected.
SQL> insert into t1 values (1.50);
1 row created.
SQL> select * from t1;
VAL
1,5
SQL> alter session set nls_numeric_characters='.,';
Session altered.
SQL> select * from t1;
VAL
1.5Cheers
Legatti -
IEEE 754 standards for representing floating point numbers
HI All..
Most of us are not awared how the actually Floating point numbers are represented . IEEE have set standards as how should we represent floating point numbers.
I am giving u the link with which u can know how actually these are represented.
http://en.wikipedia.org/wiki/IEEE_754
If u have any doubts u can always reach me.
Bye
Happy learning
[email protected]A noble but misguided attempt at dispelling the recurring problems the programmers have over and over again. There have been repeated posts to links about the IEEE standard, to little or no avail. The newbies who run into the problems will continue to do so, without regard to yet another post about it here.
-
SQL Loader and Floating Point Numbers
Hi
I have a problem loading floating point numbers using SQL Loader. If the number has more than 8 significant digits SQL Loader rounds the number i.e. 1100000.69 becomes 1100000.7. The CTL file looks as follows
LOAD DATA
INFILE '../data/test.csv' "str X'0A'"
BADFILE '../bad/test.bad'
APPEND
INTO TABLE test
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
Amount CHAR
and the data file as follows
"100.15 "
"100100.57 "
"1100000.69 "
"-2000000.33"
"-100000.43 "
the table defined as follows
CREATE TABLE test
Amount number(15,4)
) TABLESPACE NNUT050M1;
after loading a select returns the following
100.15
100100.57
1100000.7
-2000000
-100000.4
Thanks in advance
RussellActually if you format the field to display as (say) 999,999,999.99, you will see the correct numbers loaded via SQL Loader.
null -
How do I set a new account as default in safari when I send emails from a web page
how do I set a new account as default in safari when I send emails from a web page
thanks in advanceIn the Composing pane of Mail's preferences window, look for the pop-up menu labeled "Send new messages from." Select the desired account there.
Note, though, that this won't change the behavior when replying to a message... in that case, the reply will be sent from the account that received the message, unless you specify differently at that time. -
OS X Mavericks Contacts phone numbers shown as Floating point numbers
After installing Mavericks on MBP, I notice that some phone numbers in contacts are shown as floating point numbers, and are unreadable. I am guessing that these are numbers which were proceeded by "+" previously.
An example is 4.9161E+12, which is for a German contact, and the number would be +49 161...
I can't see any way to change the format, and the floating point display is useless, as the last digits are lost.
Would appreciate any advice on the matter.
Many thanks,
Michael.Music and pics are one way sync - computer to iphone. The iphone is not a storage device.
Only itunes purchased music can be transfered. With iphone attached to itunes, click file>transfer purchases.
Pics are optimized for viewing on iphone, reducing the quality of the pic on the iphone. Only pics taken with iphone and in the Camera Roll can be imported from iphone. This is done as with any other digital camera. You can e-mail the other pics to yourself one at a time. They will not be of the original quality though.
You really should back up your info/pics/music as hard drives can and do fail. -
Single Precision Floating Point Numbers to Bytes
Ok here is some code that i have written w hile back with some help from the support staff. It is designed to take in precision floating point numbers that are stored as 4 bytes and convert then to a decimal value. It works off of a udp input string and then also reformats the string. I have the ability to look at up to 4000 parameters from this one udp string. But now what i want to do is do the opposite of what i have written, and also perhaps get rid of the matlab i used in it as well. What i would like to be able to do is input a decimal value and then have it converted in to the 4 byte groupings that make up this decimal nd then have it inputed back in to a single long string witht hat grouping of bytes in the right order. A better explanation of what was done can be found on this website
http://www.jefflewis.net/XPlaneUDP_8.html
as the original code followed the "Single Precision Floating Point Numbers and Bytes" example on that site but what i want to do is "Going from Single Precision Floating Point Numbers to Bytes". The site also explains the udp string that is being represented. Also attached is the original code that i am trying to simply reverse.
Attachments:
x-plane_udp_master.vi 34 KBPerhaps what you are doing is an exercise in the programming of the math conversion of the bytes.
But if you are just interested in getting the conversion done, why not use the typecast function?
If the bytes happen to be in the wrong order for wherever you need to send the string, then you can use string functions to rearrange them.
Message Edited by Ravens Fan on 10-02-2007 08:50 PM
Attachments:
Example_BD.png 3 KB -
Floating point numbers into XML file
Hi,
I am a learner in Labview and I am using Labview 8.5 version.
when I use FlattentoXML component to convert floating point numbers ( having more than 5 decimal points) into XML, the output contains alway 5 decimal points.
But, I want exact decimal number to be displayed as XML. i.e 0.263746 should not be displayed as 0.26375 in XML.
Do you have any suggestions ?
Attachments:
Float_to_XML.vi 7 KBI tested it and could not see your problem in Labview 2009. So it is perhaps a bug in your Labview version. You can use this VI as a workaround.
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Attachments:
Float_to_XML[2].vi 8 KB -
Floating-point numbers: min value
Hi,
the number wrapper classes each define a MAX_VALUE and a MIN_VALUE constant. While the MIN_VALUE of non-floating point numbers are negative numbers, the MIN_VALUE of the floating point numbers are the smallest postive numbers.
From the Javadoc:
Float:
MAX_VALUE:
A constant holding the largest positive finite value of type float, (2-2-23)�2127. It is equal to the hexadecimal floating-point literal 0x1.fffffeP+127f and also equal to Float.intBitsToFloat(0x7f7fffff).
MIN_VALUE:
A constant holding the smallest positive nonzero value of type float, 2-149. It is equal to the hexadecimal floating-point literal 0x0.000002P-126f and also equal to Float.intBitsToFloat(0x1).
MAX_VALUE:
A constant holding the largest positive finite value of type double, (2-2-52)�21023. It is equal to the hexadecimal floating-point literal 0x1.fffffffffffffP+1023 and also equal to Double.longBitsToDouble(0x7fefffffffffffffL).
MIN_VALUE:
A constant holding the smallest positive nonzero value of type double, 2-1074. It is equal to the hexadecimal floating-point literal 0x0.0000000000001P-1022 and also equal to Double.longBitsToDouble(0x1L).
Can someone tell me the MAX_NEGATIVE_VALUE (the finite negative value with the largest absolute value) and the MIN_NEGATIVE_VALUE (the negative value with the smallest nonzero absolute value) of float and double (using the xxxBitsToXxx-methods)?
Thanks!
-PuceThe IEEE754 format is symmetric with respect to the sign, so -MAX_VALUE
and -MIN_VALUE are the values you're looking for.
kind regards,
Jos -
How to download an animated .gif from a web page
how do i download to my mac an animated gif that is on a web page....when i want a picture or text or something like that i just ...apple shift 4 and "take a picture of it" ...but i want the animation..i have never had to do that on this mac.....a windoze person from the site(chat site) said just right click but my wireless mac mouse doesnt do that....i would appreciate any help.....i do know how to down load from a site that has downloadable .gifs...you just click the download sign they have and no problem....but this is just a random animated .gif from a web page ....i hope my ques is clear....thank you
Drag and drop it from the webpage onto your desktop. Note that it won't remain "animated" while you're looking at the file's icon, but it should work if you build it into a new website.
And you can right-click with a Mac mouse - you just have to set it up to do so in System Preferences. (Set the right side of the mouse to be a "secondary click".)
Matt
Maybe you are looking for
-
Is it possible to re-install itTunes on computer without losing music library?
Having troubles adding tracks to library - very slow burns - and can't access iTunes store anymore. Thinking of re-installing iTunes on home computer but afraid to lose +6,000 songs. Any advice?
-
Ordering Book- Problem Occured
I've been trying to order a book countless times. Each time when I go through the account setup process to add in a shipping destination, and proceed- a problem or unknown error occurs and it instructs me to try again later. With each continued attem
-
Block Sales document if License is missing under any license type
Hi, We have a scenario where we using multiple license types for a legal regulation. If any license is missing for any license type that determined while screening, the order should be blocked. For example, For Legal Regulation EAR, we have two Licen
-
What is meant by the term redundancy in respect to High availability?
What is meant by the term redundancy in respect to High availability?
-
Interactive Report with 2 tables
I want to create an Interactive Report (and Form) based on 2 tables which are joined together with FK_MODULE from FORM table 2 PK_ID from MODULE table. Do I just edit the SQL that got created from the wizard (which only asked for 1 table) to display