Possible to read input directly to double?

i know how to parse double/ int and all that stuff from a string,
but i was wondering (for future reference) if there is a quicker way to just go from input to double.
i know this way
string1 = stdin.readLine( );
int1 = Integer.parseInt (string1);

Have a look at the Double class:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html

Similar Messages

  • Is it possible to upload photos directly from a digital camera to the Zen Sle

    Hello
    My girlfriend and I are going to South America. Therefore, I am not only looking for a MP3-player, but also a place to store photos. The Zen Sleek court my attention.
    Though, I would like to know whether it is possible to upload photos directly from a digital camera to the Zen Sleek? Does it require any extra cables or software? Or is it only possible to store photos through a ordinary computer and then transfer photos to the harddisc on the Zen Sleek?
    Regards
    Mads Lyngby Petersen

    Short answer, I've never seen anyone try it.
    Long answer, it might be possible using one of these USB bridge devices. Some of these devices are supposed to be able to bridge between a camera and a USB mass storage device, and then deal with hosting the connection and moving/copying the files.
    I would be intruiged to know if someone's managed it, but as mentioned so far I've not seen anyone mention it.

  • 1.is it possible to read a .xls file and load it into an oracle table

    1.is it possible to read a .xls file and load it into an oracle table, using oracle database or oracle forms i.e. either utl_file, or text_io, or any other oracle tool.
    As far as I know we need a csv file or a txt ( tab delimited) file ?
    2.Are there any windows tools for the same

    Hi,
    If you want to use the DDE package to read the XLS file then yes, you will neeed to know the number of rows and columns in the input file.
    i.e. How will you know :
    1) How many columns are there in the input file.
    If I have a XLS file with the following data :
    R1C1 R1C2 R1C3 R1C4 R1C5 R1C6 R1C7
    xxx xx x
    Where R represents row and C represents column, then how will you know the each row has 7 columns. If you know the answer upfront, then it's not a issue.
    Using the DDE apprach, you will have to specify the RowNum and the ColumnNo of each idividual cells to read/write data from xls sheet.
    Look at the syntax in my ealier post.
    using the other approch (i.e. comma delimited text file - CSV file) , you need not know the number of columns as you can loop thru the input record till the last column is read.
    All you have to do is to look for the 'n' occurances of the field delimiter say ',', do a substr from the current position to the point where the ',' was found.
    This process is to be repeated in a loop till all columns are read.
    The TEXT_IO package can trap for EOF (End Of File).
    Hope I made myself clear.
    -- Shailender Mehta --

  • Problem reading input stream of urlconnection within portal

    Hi,
    This may be a generic server issue rather than portal but since it's my portal app that's displaying the problem I'll post it here.
    Part of my Portal attempts to POST to a remote server to retrieve some search results.
    In environments A & B (both standalone instances) this works fine.
    In environment C this works on the managed instances in the cluster but not the admin instance.
    In environment D (again standalone) it fails, but if I add a managed instance it works from the managed instance.
    The problem I'm seeing is that I get a stuck thread and the thread dump shows it is blocked attempting to read the resulting input from a urlconnection. (Using a buffered input stream).
    I've copied the code to a standalone class that runs fine from the same server(s). I've pasted this code below, the contents of the test() method were copied directly from my webapp (urls changed here for clarity).
    Does anyone know of any securitymanager issues that may cause this?
    Or anything else for that matter?
    Code sample:
    package src.samples;
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLConnection;
    public class POSTTest {
         public static boolean test()
         URL url = null;
         try {
         url = new URL
    ("http://hostx:80/myapp/search.html");
         catch (MalformedURLException e)
         e.printStackTrace();
         return false;
         URLConnection urlConn;
         DataOutputStream printout;
         BufferedReader input;
         urlConn = null;
         try {
         urlConn = url.openConnection();
         catch (IOException e)
         e.printStackTrace();
         return false;
         // Let the run-time system (RTS) know that we want input.
         urlConn.setDoInput (true);
         // Let the RTS know that we want to do output.
         urlConn.setDoOutput (true);
         // No caching, we want the real thing.
         urlConn.setUseCaches (false);
         // Specify the content type.
         urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
         // Send POST output (this is a POST because we write then read as per the JDK Javadoc)
         printout = null;
         String body = "";
         try {
         System.out.println("url=" + url.toString());
         printout = new DataOutputStream (urlConn.getOutputStream ());
         String content = "param1=A&param2=B&param3=C&param4=D&param5=E";
         System.out.println("urlParams= " + content);
         printout.writeBytes (content);
         System.out.println("written parameters");
         printout.flush ();
         System.out.println("flushed parameters");
         printout.close ();
         System.out.println("closed parameter stream");
         // <b>Get response data - this is where it blocks indefinitely</b>
         input = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
         System.out.println("got input");
         String str;
         while (null != ((str = input.readLine()))) {
         body = body + str + "\n";
         System.out.println("read input:");
         System.out.println(body);
         input.close ();
         System.out.println("closed input stream");
         catch (IOException e) {
         System.out.println("IOException caught: read failed");
         e.printStackTrace();
         return false;
         return true;
         * @param args
         public static void main(String[] args) {
              System.out.println("Test result= " + test());

    In your recuperar() method, read the FTP input stream into a byte array. (You can do that by copying it to a ByteArrayOutputStream and then getting the byte array from that object.) Then, return a ByteArrayInputStream based on those bytes. After you call completePendingCommand(), of course.
    That's one way.
    PC&#178;

  • Is it possible to rate songs directly on the iPod touch?

    Is it possible to rate songs directly on the iPod touch?
    Also, is it possible to rate videos directly on the iTouch?

    Hi jackhowson,
    As Micromen said, you can rate songs directly on your iPod Touch.
    However with videos, currently you can't! You'll have to rate them on your computer. If you would like to ask Apple this feature, click [Name|http://www.apple.com/feedback/ipodtouch.html] and fill out the form.

  • HT3669 I have an imac running OS10.6.8 and an Apple laserwriter 16/600PS.  Is it possible to connect these directly without networking?  Where can I find the printer driver?

    I have an imac running OS10.6.8 and an Apple laserwriter 16/600PS.  Is it possible to connect these directly without networking?  Where can I find the printer driver?

    It turned out that WD is the big bad guy in this game.
    According the data rescue company where I asked for an inspection, both of the drives had their reader head loose. And in the one, which was my already-in-use disk its even damaged the platters... xxxxx
    So its time to pay bunch of money to recover, and take a walk to wd service to bang on the desk.
    Also note - it may be somehow related to intellispeed technology - since macs not really friendly with wd-s built-in solutions.
    On the other hand, with WD GP 1Tb there is no problems at all for ages.
    thanks guys, thread is closed

  • Reading inputs in console from user

    I wanted to know if its possible to capture inputs from user in console apps. Can you just do "System.in.read(variablename);" ????

    If you're just starting, I recommend that you learn to use the Scanner class methods. The class documentation has examples. It will read from the console, as well as any other source that exists, and allows much more flexibility. (The class is new whit Java 5.)

  • Is it possible to install Panther directly onto ibook w/ OS9

    Is it possible to install Panther directly onto a clamshell ibook with OS9, or do I have to install the various versions of X prior?
    PM

    Hi Paul,
    if your iBook meets the 10.4 System Requirements (e.g. Built-In Firewire, 256 MB RAM,...) then you can directly install 10.4 without going through all the previous versions. However, be aware that you cannot use the install disk that came with your MacBook Pro!!! These are hardware specific and also specific to the Intel-CPU.
    If this answered your question please consider granting some stars: Why reward points?

  • Is it possible to do a direct transfer of photos from iphone 4s to ax external hard drive?

    I would like to be able to free up space on an iphone 4s. Too many photos on there to be stored on icloud.  I was thinking of buying and external hard drive to store the photos onto.  Is it possible to do it directly without using a computer?  If so is one hard drive better than any other? Any replies in simple english, as I am not a tech savvy, would be very apprecitated.

    In general, most external hard drives out there do not support what you need to do what you want.  I have read about a very few which support connecting to them via wifi, but I do not know if they will work for what you want.  The iPhone (or iPad for that matter) does not support transferring pictures other than via sync or via iCloud.  You may be able to get it to work using something ele, but it will be kludgy and might not work after the next iOS update.  THis is probably not what you are looking for in the long term.

  • Possible to convert a Direct Access server?

    Is it possible to convert a Direct Access server ( Windows 2012 server) residing in ESX 5.1 to a Hyper V version ( Windows 2012 R2 Datacenter) by a "normal" conversion process?  The optimal result is that all the configuration of the Direct
    access part is transferred correctly.
    Thanks.

    hey .. funny how expert opinions vary ... i have a handfull of IT and software RAID experts who disagree with you ... in my case, i'd rather get rid of it ... ( however i still have to find a solution to clone my boot drive that works flawlessly with all my software ... )
    anyways ... how exactly do i go about splitting the RAID, to make sure i don't mess it up ....
    1. restart from CD
    2. Delete the mirrored RAID set
    3. remove one of the HDs with the raid slice on it (i'll keep it as a backup 4 the moment just in case)
    4. restart from the remaining slice disc
    5. ... ?
    do i need to do anything specific ... ? what about the name of the Volume .. for the moment my startup disk (the RAID) is called 'BootRAID' ... the slices are called 'RAID Slice (disk0s2)' and 'RAID Slice (disk1s2)' .. in order for everything to work properly, don't i have to rename the new startup disk ?
    i'm scared ...
    here's a screenshot of my setup: http://kinkajou.net/diskUtility_RAID.jpg
    <Edited by Moderator>

  • FV50 - Parking not possible during batch input

    Dear SDN,
    our client has a custom program for GL Document batch input through TCode FV50.
    Though the answer should not be, the question here is very straightforward: why, in this program, the mentioned error occurs for some users, but not for others, giving ALL the input parameters are the same???
    1 - Batch input runs
    2 - FV50 is displayed
    3 - (Menu) Document -> Park
    4 - Error: FP140 - Msg: "Parking not possible during batch input"
    Note: User who gets the error has ALL the authorizations that users who don't get the error have.
    Any suggestion is highly appreciated.
    Regards,
    Fabio

    This message is triggered in SAPMF05A program - MF05AFB0_BELEG_PARKEN include.
    keep a breakpoint at this line and check in debug mode.
    Also since you are using a custom program to call FV50 transaction,
    check if CTU_PARAMS structure is used and try using NOBINPT = 'X' option.
      if sy-binpt ne space.
        call function 'CUSTOMIZED_MESSAGE'
          exporting
            i_arbgb = 'FP'
            i_dtype = 'E'
            i_msgnr = '140'.
        if 1 = 2.
          message e140(fp).
        endif.
      endif.

  • PARK is not possible during batch input.

    i am using FB60 ( and only can use FB60 )
    when bdc recording i push at the pushbutton PARK
    it give me the error
    PARK is not possible during batch input.
    anyone has any solution to help me solve this problem.
    btw i only can use FB60.
    thanks you

    Hi,
    have a look at: BAPI_INCOMINGINVOICE_PARK
    Best regards.

  • I have an external hard drive, from Iomega. However, I cannot copy or save any file to it. On my PC it says that is possible to read and write in it, but in my Mac, it says I can only read. can somebody help me?

    I have an external hard drive, from Iomega. that I can open and see my files. However, I cannot copy or save any file to it. On my PC I have it says that is possible to read and write in it, but in my Mac, it says I can only read. can somebody help me?
    Also, Im a photographer, so I like to name a lot of files at the same time (used to do in on PC and it was very usefull.) cannot find out how to do it on my Mac. Really appretiate if some one can give me a solution! Thanx

    Your drive is formatted with the NTFS file system.  OS X can read but not write to the NTFS file system.  There are third party drivers available that claim to add the ability to OS X to write to an NTFS partition.  I have not tried them and don't know if they work.
    The only file system that OS X and Windows can both write to natively is the FAT32 file system.

  • Sychronisation AD - OID: Is it possible to read the user password from AD?

    Hi.
    We are using the Oracle Internet Directory shipped with the Oracle 9i Database Rel. 2 (9.2.0.1).
    I try to synchronise the user accounts from AD to OID using JAVA JNDI. I'm able to read all necessary user information except the user password (MD5 value). Even if I connect to the AD using SSL, it's not possible to read the attribute userPassword.
    Is anybody out there who got this work or knows a way (may also be by the use of another programming language or tool) to get the user password out of AD? Is this possible? How does the Oracle Integration Agents accomplish this?
    Thanks in advance.
    Hermann S.

    Hermann,
    I am working with this as well, though from AS10g, not RDBMS. According to the OID Administrator Guide chapter 43, page 43-52:
    <snip>
    Synchronizing passwords from Microsoft Active Directory to Oracle Internet Directory is not possible in the Oracle Application Server 10g release because passwords in Microsoft Active Directory are not accessible by LDAP clients. However, if a deployment requires passwords to be available in Oracle Internet Directory, then the following two methods are recommended:
    Build a custom plug-in for Microsoft Active Directory that captures a password change and synchronizes it with Oracle Internet Directory
    Manage Active Directory passwords from the Oracle environment. This enables passwords to be available in both Oracle Internet Directory and Microsoft Active Directory because the Active Directory connector can synchronize passwords from Oracle Internet Directory to Microsoft Active Directory.
    </snip>
    As10g can however look up the password in AD using the "Active Directory External Authentication Plug-In". This is documented in the same chapter.
    Hope this helps,
    Jens

  • Possible to read data from a web browser into java?

    Is it possible to read data from a web browser such as IE or Mozilla into a java applet for use and manipulation? If it is, could someone please post some documentation I could look at or a snip-it of code I could use? Thanks.

    This will read the content from a site:
    import java.net.*;
    import java.io.*;
    class Test {
         public static void main(String[] argv) throws Exception {
              URL u = new URL("http://www.google.com");
              URLConnection uc = u.openConnection();
              BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
              String text;
              while( (text = br.readLine()) != null ) {
                   System.out.println(text);
    }

Maybe you are looking for

  • TypeError: Error #1034 - Want to display a swf

    Hi, I´m new to AS3 and try to load/display swf´s on the stage. The swf´s should run and if the user clicks a button the next swf should be displayed. That works so far if I use some swf´s that are created also with FlashPlayer 9 and AS3. But if I use

  • Quick time upgrade to quicktime pro

    i have quicktime 7 and i bought final cut pro hd,it came with quicktime pro and its serial #, and code,im tryng to download or upgrade to qt pro to convert my home movies to put in my ipod, how do i do it

  • Can't Download Adobe Flash Player

    I am using WIndows 7 64 bit - IE 9 - Firefox 9.0.1 - Chrome v27 When ever I try to download it sits at either 7%, 8% or 23%..And never progresses. I am not restriced to downloading anything this as it's a personal computer. Firewall is not preventing

  • Delivery addresses in SRM 7

    Hi all, Im in SRM 7.0.1. I need to create the delivery addresses and assign it to users in PPOMA_BBP. In SRM 5,the transaction for creating "Delivery address" was "EDIT INTERNAL ADDRESSES"(web) and BBPADDRINTC(SAPGUI). However in SRM 7,even with the

  • SQL query to get transaction detail from DEFERRED_TRAN_ID

    Hi, I'm using Oracle Advance Replication and get the transaction detail from Enterprise Manager Console. So instead of using the console. Is there a way any SQL query which get transaction details like SQL query fired, old and new column value etc fr