Any way to control money input?

Is there any way to control money input, I mean for example
If someone inputs 12.52356 dollars I have to control it until the user inputs 2 digits after the decimal dot.

BTW using floating point numbers to represent money is not very accurate. You would be better to use whole numbers and then only convert to floating point when you want to display it. So for 12.87 you would actually use 1287 instead. Check out the following.
double dollars = 12.87;
double change = dollars - 4 * .45;
System.out.println(change);
int money = 1287;
int remainder = money - 4 * 45;
System.out.println(remainder / 100.00);Output:
11.0699999 - inaccurate
11.07 - accurate

Similar Messages

  • Is there any way to control the volume on my Apple TV?

    Here's the scenario: I have a small amplifier under my couch that controls the speakers connected to my Apple TV. When I use Airplay from my iPhone to listen to music, I'm able to control the volume right from the music App on my phone- this is perfect because I don't like to reach under the couch to change the volume. However, there are two scenarios when I cannot seem to adjust the volume anywhere except on the amp. These are:
    First: Using Airplay while playing a video from my MacBook Pro to the Apple TV. In this case, the volume slider in iTunes suddenly has a little lock icon on it and is unadjustable. Is there any way to unlock the volume?
    Second: When using the Apple TV directly to play any media- music or movies. The volume up and down buttons on the Apple TV don't control the volume. I'm forced to reach under the couch to adjust the volume- which happens quite frequently. Is there any way to control the output volume of the Apple TV?
    The lack of volume control has been super disappointing. I've been a (multiple) airport express user for years so kind of expected Airplay to work the same for video- with the ability to control the volume from whatever device was transmitting. Can anyone help me?

    Andrew- this is how I would expect things to work. However, when I use airplay from my iPhone to say, play a youtube video, the volume on the phone is suddenly rendered useless and I'm forced to adjust the amplifier. When I just play audio from the phone, the volume works.
    It's the same on my macbook pro. If I mirror the screen, my computer's volume affects the speakers volume. However, if I am in itunes and play a movie and use airplay for that, I get a lock on the volume. Is this a setting somewhere?

  • Non-Apple Keyboard: any way to control system audio volume?

    I have a non-Apple Keyboard on my new Mini Lion 7.2.1
    Is there any way to control system audio volume via the keyboard ?

    Well. I can do this. But just because, on my Apple keyboard, there are the keys that do the job. There's a key to mute, and the keys to adjust low and high the sound. But keyboard shortcuts, I don't think exist. The aren't in keyboard shortcut in Keyboard panel, within System Preferences. The bottom line is that isn't a menu item in Finder for lower sound and higher sound. The only option would be an AppleScript that you save as an applet within Scripts menu (activated in Finder via Script Editor) and you invoke with a shortcut... Well, you can do it, if you open the script Set Output Volume in UI Elements Script folder within Scripts folder. Try it out!

  • Is there any way to control automator through voice commands?

    is there any way to control automator through voice commands?
    Im simply trying to program my macbook pro early 2011 8gigs ram to resound to voice commands using automator but I haven't found any discuss on the subject.

    I have some AppleScript that expects a Pages (v5.2.2) document opened. It will then then speak the document name, and the count of words in the document. Or, I can trigger Speakable items and tell it to, "Switch to Pages" which it does immediately, because this is part of its repertoire of built-in commands. Then speak Word Count?
    In Automator, I created an Application, in which I dragged/dropped the Library > Utilities > Run AppleScript action into the workflow window. I replaced the AppleScript boilerplate with my existing AppleScript code that speaks the word count, and saved the Application into <login dir>/Library/Speech/Speakable Items folder as Word Count? (without the .app extension). It can also be saved in the Application Speakable Items > Pages sub-folder under the general Speakable Items folder.
    Next, I turned on Speakable Items in System Preferences > Accessibility > Speakable Items.
    It took several tries to get a spoken result from the Automator application, but it did work. Even with a calibrated microphone, and speaking about 18 inches from it. About 2 successes for ten tries. If I just put the AppleScript (without extension) in the same folder, my success rate would improve to 5/10. You may grow very weary of the repetition necessary to get Speakable Items to work. A small pink text banner also appears with the spoken content in it — below the Speakable Items monitor on the screen.
    Automator is scriptable. This means that in AppleScript, you can dynamically build an Automator workflow, and then execute it.

  • PLW-07203, any way to control the PLSQL_WARNINGS values specified by Raptor

    While debugging some packaged code and compiling the specification through Raptor, I got the PLW_07203 warning, which was deemed to be an error and therefore prevented me from compiling the code successfully in Raptor.
    First, is it correct for Raptor to consider these types of compilation warnings to be errors?
    Second, since Raptor sets the PLSQL_WARNINGS parameter for the session, is there any way to control that parameter setting? For now, it seems to always specify it by executing ALTER SESSION SET PLSQL_WARNINGS = 'ENABLE:ALL'.
    Third, is it possible for Raptor to tell that I've loaded the source for a package specification or body from the data dictionary and have made no changes to it before I ask it to be compiled? Now, it seems that Raptor always is recompiling the package code by using the CREATE OR REPLACE construct, so it will overwrite any existing PLSQL object settings that may have been defined for the code previously. If you could detect that I'm simply asking you to recompile the source (primarily to simply get it compiled with debug information), then you could use the ALTER PACKAGE syntax for the recompilation. That with the ability to specify whether or not the REUSE SETTINGS clause would allow people to compile packages without getting into problems from Raptor changing the PLSQL_WARNINGS session parameter.

    1) It's already bugged.
    2) This is planned for production
    3) There's a right click compile from dictionary which just does an alter ... compile. The new drop coming this week will change how browsing code works so that there's a read-only copy with an edit button to launch the editor.
    -kris

  • Is there any way to control or change the email notification format deliver

    Hi,
    Is there any way to control or change the email notification format delivered by iBots? I have created an iBot to deliver the scorecard report to the team with type chosen as 'Attachment (HTML)' option. With this definition of iBot - notification being sent in MIME HTML (.mht) format. Due to some security settings at my email client - the attachement gets quratined because of .mht format. So, I am looking for an option to send the notification only in HTML (.htm) format with which I don't have any issues with my email client?
    Any help is really appreciated.
    Thanks,
    Vency

    Hi,
    You try this
    change format of to whichever you required in this file.. I havn't tested it yet..
    I hope it will help you..
    thank you
    E:\OracleBI\web\app\res\b_mozilla\delivers\deliverycontenteditor

  • Any Way To Control Fans Under XP With MBP?

    Is there any way to control the fans under XP of a MBP?
    To stop the thing getting so hot - in OSX I use various - but XP?

    Also i want to say than you MUST control your fan in MBP not just in xp also in osx.
    And you can install Core Temp for see the current temp
    http://www.alcpu.com/CoreTemp/

  • Inspire T5400. Lost Volume Control. Any way to "hack" the input for the Volume Control?

    Hey. I've lost the volume control for my Inspire T5400. Is it possible in any way to "hack" it to make the volume on the loudest? I dont have to be able to lower the volume.. I'll just do that on my pc.
    Thanks
    SpiXe - And sorry for my english ^^,

    prvs wrote:
    Dear Altenbach,
    The VI that you have posted in (Max8Discard.vi) in Limiting Input String Length
    limits the entry of string control to required length but it doesnt limit the entry of special characters.
    If you have any simple way to do the same it will be very helpful
    Thanks in advance...!!!
    Regards,
    Praveen PRVS
    Just change the check after the Lexical Class function.  If you just want numbers and letters, then use the In Range & Coerce function to check for class numbers 3 through 5.  Play around with the logic some more until you get what you need (I'm thinking that AND should be an OR).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Any way to control mouse movevment?

    I'd like to create a program that can automate certain activities, but I want it to do this by acutally controlling the mouse motion and clicks, rather thn directly interacting with anything via messages etc.
    i.e, I'd like it to work something like this
    Java Program is started
    Mouse moves to co-ordinates (x,y) on the monitor, and double clicks
    Mouse then moves to (x2, y2), and single clicks
    and so on.
    Is there any way to do this in Java? I can find plenty of classes related to recieving mouse events, but none that seem to be able to send commands to the mouse, as it were.
    If I'd need specialised software to be able to do this, any pointers in the right direction would be much appreciated....

    Look at the Robot class.

  • Any way to control the order in which data is exported?

    I found it surprisingly easy to set up a form to submit its contents via a formmail script -- perhaps too easy...
    Using Acrobat 9 (and the demo version of Acrobat X), I've modified a form that students fill out so that when they hit the submit button it pushes the form contents to a script which relays it to an e-mail address specified on the form -- no problems there.
    But the order in which those fields are listed in the e-mail bears no relation to the order the fields appear in the form -- or alphabetical order of the field names or data values or the tab order. It's the same order every time. And as far as I can tell the mailing script isn't doing anything to change the order of the data.
    This is mostly an issue of making the e-mail friendly for the supervisor who has to look at the e-mails as they come in. (I've done a number of searches on Google and here in the forums before posting and haven't found any references to similar problems, so maybe I do have a funky script.)
    I'm wondering if a) there's something native to the form that could change the order of the data and b) there's some straightforward way of controlling that. (I imagine I could write some JavaScript to control the output I had to, but it seems like a needless step.)
    Thanks for any insight anyone can provide.

    function(){return A.apply(null,[this].concat($A(arguments)))}
    A solution would be to modify the server script to output in the order you want, as opposed to just looping over the collection of fields present in the incoming data as formmail type scripts typically do.
    That is what I wound up doing -- making a copy of the mailing script and reformatting the message body string to contain just the data responses my colleage wanted in the order he wanted. It beats the old method of requiring users to fill out the PDF, save the document and then e-mail in the PDF as an attachment.

  • Is there any way to control an iPod with a lock via USB cable?

    I have an iPod touch 4th generation, but I dropped it. The touchscreen no longer works, which is most likely a hardware error (I've tried resetting it). I plan to get a new device, but before that, I would like to be able to unlock it to access certain files and transfer codes inside. I know the lock password to my iPod; is there any way I could control it with my computer?
    Thanks.

    You may be able to get some info from the restored/erased iPod by:
    How to perform iPad recovery for photos, videos
    Wondershare Dr.Fone for iOS: iPhone Data Recovery - Wondershare Official     
    http://www.amacsoft.com/ipod-data-recovery.html
    iPod recovery software to restore lost music files      
    http://www.pcrecoverytools.com/ipod-data-recovery.html
    -iPod touch Deleted Photo Recovery Tips You Should Know

  • Any way to boost audio input when recording?

    Hi; I have been recording speech interviews with Audio-Technica mics on a ProTools set-up and they've sounded great.
    I've recently tried recording using the mics in Garageband using a M-Audio Mobile Pre USB, but the audio levels are always too low unless the subject is an inch or two from the mic, which isn't the best way to get quality audio.
    Is there any way to boost the audio input when recording in GB or any other tricks people know of?
    thx, Charlie

    I'm actually having the same problem, except I'm recording straight into the computer (no interface).
    I tried using an MBox, but the computer won't even recognize it...(if anyone's got suggestions for why that is, I'll gladly take them...).
    My main question is the same as Charles's, however - how come the input level is so soft when recording using the "Built-In Input" (where I can use a mic, and have mobility) as opposed to the "Built-In Microphone"?

  • Is There Any Way To Control My iPhone With My iMac?

    Hello. Firstly, I'd like to say that I broke my screen, so I can't download apps and such.
    Anyways.. I have an iPhone 4S which I actually bought about a year ago. It broke about 4-6 months ago, and I've been using a different iPhone since. Unfortunately, I can't access anything on the phone, but I'd still like to use it. Is there any way to remotely control it through my iMac?

    Read https://discussions.apple.com/message/18530225#18530225

  • Is there any way to control my laptop powerpoint presentation from my iphone using bluetooth only?

    I occasionally host pub quizzes. I usually link my laptop to a projector and use powerpoint to display questions and play music clips etc. This means that I need to sit underneath the projector in order to click the laptop keyboard.
    Is there any way to do this using my iPhone (4S) as a remote control for the laptop WITHOUT having a home network or router available at the location?
    Thanks

    Hi Paul,
    Thanks for visiting Apple Support Communities.
    The closest way I know of accomplishing a task like this is by using the Keynote application on a Mac and Keynote Remote on an iOS device, which works over bluetooth. See this article for more information:
    Using Keynote Remote
    http://support.apple.com/kb/ht3325
    Cheers,
    Jeremy

  • Is there any way to control table indentation via a style?

    Experts-
    HI. I'd like to see if there's a way to control the indentation of tables in a document by simply adjusting the margin-left value via a (Table?) style?
    I finding that table indentation is adjusted in a table's properties settings:
    <table class="AlternateBlueColorGrid" style="padding-left: 6.00pt; padding-top: 6.00pt;
             padding-right: 6.00pt; padding-bottom: 6.00pt; margin-left: 40px;"
             cellspacing="0" width="577">
    This is fine for adjusting a single table. But supposing I want to indent all tables in a document or, better, all tables of a certain style. There doesn't seem to be a way to make the indentation setting part of a table style to facilitate this action, at least not through the table settings dialog.
    I see that I can specify margins in a div style, but I can't seem to apply a div style to a table (or paragraphs for that matter. I need to read up on div styles.)
    Thanks in advance?
    -Kurt

    You can do this by manually editing the CSS with notepad, as I don't
    think the RoboHelp CSS editor supports this. What you can do is just
    take the margin-left style and put it in the selector for the table. In
    the example, look foor
    table.AlternateBlueColorGrid {
    If it doesn't exist, you can just add this to the CSS.
    Kind regards,
    Willam

Maybe you are looking for

  • Converting cursor to ref cursor in Report builder pl/sql

    Hi, I am trying to use dynamic sql in My report 's pl/sql code. I can not use execute Immediate statement since this feature is not suppoerted at client side and i am doing the coding In my local mchine and running the report loaclly.......??? Anothe

  • MIGO - Distribute quantities via an interface.

    Hi All, We currently use subcontracting to record the consumption of components in a BOM via a goods receipt.  Where a component of a BOM is batch managed, we can use the distribute quantities button against a line item to allocate more than 1 batch

  • XI Receiver Channel - Dynamic Logon Language

    Hello, Is there any way to define dynamically the logon language in XI Receiver Channel? Our cenario is an ECC -> PI -> ECC integration using XI sender and receiver channel. Depending on a specific element in message payload we want to define the cor

  • Stub for web service in JSP

    How do i embed a scriptlet inside my JSP page for the stub of my web service? is there any examples that i can refer to? Thanks in advance. ;)

  • No Range proble for J_1IINTPR2

    hi When trying to maintain number range for J_1IINTPR2 through J1I9 i am not finding my Series group in the dropdown. i checked all my confic. its perfect. can any one suggest where could me the mistake Jai