Does readLine return null at end of file?

My program is reading lines from a file in groups of 5. I want it to stop reading when it has reached the end of the file. Does readLine return null when there are no more lines or is there another way to end a loop like this?
Thanks!
try {
String a, b, c, d, e;
a = BR.readLine();
b = BR.readLine();
c = BR.readLine();
d = BR.readLine();
e = BR.readLine();
while (a != null){
a = BR.readLine();
b = BR.readLine();
c = BR.readLine();
d = BR.readLine();
e = BR.readLine();
}                              

readLine returns null at end of file. I actually use the following to end my loop...maybe this would help you.
FileReader file = new FileReader("bkupcandilist.bin");
BufferedReader buff = new BufferedReader(file);
boolean eof = false;
while(!eof) {     //retrieve all candidate names          
     scandi = buff.readLine();
     if(scandi == null) {
        eof = true;
     } else {
        atally = new String[2];
           atally[0] = scandi;
           atally[1] = "0";
           listtally.add(atally);
buff.close();          

Similar Messages

  • Why ResultSet getDate() method returns null when querying .csv file?

    Here is the full code:
    import java.sql.*;
    import java.sql.Types;
    import java.sql.Date;
    import myjava.support.CachedRowSetMaker;
    import javax.sql.rowset.CachedRowSet;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    class jdbc2{
    final private String s1="SELECT top 10 [DATE], [ADJ CLOSE] FROM [vwo-1.csv]";
    private ResultSet result=null;
    private Connection conn=null;
    public static void main(String[] args) throws SQLException{
    jdbc2 db=new jdbc2();
    try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              db.conn = DriverManager.getConnection("jdbc:odbc:STOCK_DATA");
              PreparedStatement sql=db.conn.prepareStatement(db.s1);
              db.result=sql.executeQuery();
    // check column names and types using the ResultSetMetaData object.
              ResultSetMetaData metaData = db.result.getMetaData();
         System.out.println("Table Name : " + metaData.getTableName(2));
         System.out.println("Field\t\tDataType");
         for (int i = 0; i < metaData.getColumnCount(); i++) {
         System.out.print(metaData.getColumnName(i + 1) + "\t");
         System.out.println(metaData.getColumnTypeName(i+1));
         System.out.print(metaData.getColumnName(1) + "\t"+metaData.getColumnName(2)+"\n");
              while (db.result.next()){
                   System.out.print(db.result.getDate("DATE", Calendar.getInstance()));
                   System.out.format("\t%,.2f\n", db.result.getFloat("Adj Close"));
    catch (Exception e) {
    System.out.println("Error: " + e.getMessage());
         finally {
              db.result.close();
              db.conn.close();
    Everything works well, until getting to the block
              while (db.result.next()){
                   System.out.print(db.result.getDate("DATE", Calendar.getInstance()));
                   System.out.format("\t%,.2f\n", db.result.getFloat("Adj Close"));
    The getDate("DATE", Calendar.getInstance())); always returns null, instead of the date value in the vwo-1.csv.
    Even though I change it to
    java.sql.Date d=db.result.getDate("DATE") and convert to String using .toString(), I still gets nulls. The dollar amount in "Adj Close" field is fine, no problem.
    The .csv fils is downloaded from YahooFinace.
    Can anyone review the code and shed some light as to what I did wrong?
    Thanks alot.

    CREATE TABLE `login` (
    `username` varchar(40) DEFAULT NULL,
    `password` varchar(40) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `amount` (
    `amountid` int(11) NOT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `loanid` int(11) DEFAULT NULL,
    `amount` bigint(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `paymentid` int(11) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL,
    PRIMARY KEY (`amountid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `applicationfee` (
    `applicationfeeid` int(11) DEFAULT NULL,
    `applicationamount` int(11) DEFAULT NULL,
    `applicationfee` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `category` (
    `categoryid` int(11) DEFAULT NULL,
    `categoryname` varchar(40) DEFAULT NULL,
    `categorydescription` varchar(500) DEFAULT NULL,
    `cattype` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `commission` (
    `commissionid` int(11) DEFAULT NULL,
    `bussiness` int(11) DEFAULT NULL,
    `commission` int(11) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `customer` (
    `cacno` int(11) NOT NULL DEFAULT '0',
    `name` varchar(40) DEFAULT NULL,
    `age` int(11) DEFAULT NULL,
    `cphone` varchar(40) DEFAULT NULL,
    `cmobile` varchar(40) DEFAULT NULL,
    `caddress` varchar(500) DEFAULT NULL,
    `cstatus` varchar(20) DEFAULT NULL,
    `cphoto` longblob,
    `pid` int(11) DEFAULT NULL,
    PRIMARY KEY (`cacno`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `daybook` (
    `closingbal` varchar(40) DEFAULT NULL,
    `date` date DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `extraincome` (
    `categoryid` int(11) NOT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `employee` (
    `empno` int(11) DEFAULT NULL,
    `empname` varchar(40) DEFAULT NULL,
    `age` int(11) DEFAULT NULL,
    `sal` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `image` (
    `id` int(11) DEFAULT NULL,
    `image` blob
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `loan` (
    `loanid` int(11) NOT NULL DEFAULT '0',
    `loanamt` varchar(40) DEFAULT NULL,
    `payableamount` double DEFAULT NULL,
    `installment` int(11) DEFAULT NULL,
    `payableinstallments` int(11) DEFAULT NULL,
    `monthlyinstallment` varchar(20) DEFAULT NULL,
    `surityname` varchar(20) DEFAULT NULL,
    `applicationfeeid` int(11) DEFAULT NULL,
    `interestrate` float DEFAULT NULL,
    `issuedate` date DEFAULT NULL,
    `duedate` date DEFAULT NULL,
    `nextduedate` date DEFAULT NULL,
    `cacno` int(11) DEFAULT NULL,
    `cname` varchar(20) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL,
    `interestamt` double DEFAULT NULL,
    `pendingamt` float DEFAULT NULL,
    PRIMARY KEY (`loanid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `md` (
    `mdid` int(11) NOT NULL DEFAULT '0',
    `mdname` varchar(40) DEFAULT NULL,
    `mdphoto` varchar(100) DEFAULT NULL,
    `mdphone` varchar(40) DEFAULT NULL,
    `mdmobile` varchar(40) DEFAULT NULL,
    `mdaddress` varchar(500) DEFAULT NULL,
    PRIMARY KEY (`mdid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `partner` (
    `pid` int(11) NOT NULL DEFAULT '0',
    `pname` varchar(40) DEFAULT NULL,
    `paddress` varchar(500) DEFAULT NULL,
    `pphoto` varchar(100) DEFAULT NULL,
    `pphone` varchar(40) DEFAULT NULL,
    `pmobile` varchar(40) DEFAULT NULL,
    `pstatus` varchar(20) DEFAULT NULL,
    `mdid` int(11) DEFAULT NULL,
    `mdname` varchar(40) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `nextpaydate` date DEFAULT NULL,
    PRIMARY KEY (`pid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `partnerinvested` (
    `pid` int(11) DEFAULT NULL,
    `pname` varchar(20) DEFAULT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `amountinvested` int(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `payments` (
    `paymentid` int(11) NOT NULL,
    `categoryid` int(11) DEFAULT NULL,
    `particulars` varchar(100) DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL,
    `paymentdate` date DEFAULT NULL,
    PRIMARY KEY (`paymentid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `receipts` (
    `receiptid` int(11) DEFAULT NULL,
    `paiddate` date DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL,
    `loanid` int(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `installment` int(11) DEFAULT NULL,
    `cacno` int(11) DEFAULT NULL,
    `cname` varchar(40) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

  • Remote Desktop on the OS Mac during connection to the Windows 8.1 PC returns a warning "End of file" and quits

    I start the Microsoft Remote Desktop app on the MAC.  A verify Certificate comes up - I click continue.  An alert pops up "End of file".  I have allowed remote access on the Windows 8.1 PC.  I have also allowed the Remote Desktop
    to work through the firewall.
    I have the correct default gateway ipv4 address.  I believe I would not get to the verify Certificate window if not.  What am I missing?

    Hi,
    I notice that you mentioned the correct default gateway ipv4 address. Please let us know why and how you use this IP address.
    In the settings of the remote desktop client App, the gateway refers to the Remote desktop gateway, not the default gateway.
    In other word, if you do not have a RD gateway, just leave the setting blank.
    If issue persists, please provide us log file for further research.
    Microsoft Remote Desktop -> About Microsoft Remote Desktop -> Send log via email
    Getting Started with Remote Desktop Client on Mac
    http://technet.microsoft.com/library/dn473012
    Thanks.
    Jeremy Wu
    TechNet Community Support

  • BufferedReader.readLine doesn't return null

    Hi there,
    I'm trying to put together a simple Chat client/server application. The issue I'm having is with the Server app. I have a class that extends Thread which contains this call:
    temp = input.readLine()
    in the run() method. Everytime I connect with the client side app, an instance of this class "ReceivingThread" is created and is supposed to read in any messages coming in using a BufferedReader. That's the input variable type. According to the API readLine() is supposed to return null when there's nothing more to read in. In my code I check for null but it never seems to leave the while loop.
    Please advise,
    Alan
    package vcserver;
    import java.io.*;
    import java.net.*;
    import java.util.StringTokenizer;
    public class ReceivingThread extends Thread
      private BufferedReader input;
      private MessageListener messageListener;
      private boolean keepListening = true;
      public ReceivingThread(MessageListener listener, Socket clientSocket)
           super("ReceivingThread: " + clientSocket);
           messageListener = listener;
           try
                clientSocket.setSoTimeout(5000);
                input = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
           catch(IOException ioe){ioe.printStackTrace();}
      public void run()
           StringBuffer messageBuffer = new StringBuffer();
           String temp = "";
           try
              START:
              while(keepListening)
                 while(true)
                    try
                                  temp = input.readLine();
                    catch(InterruptedIOException iioe)
                                  continue;
                    catch(IOException ioe){break;}
                       if(temp != null)
                    try
                       System.out.println("temp: " + temp);
                       messageBuffer.append(temp);               
                     catch(Exception e)
                       e.printStackTrace();
                       break START;
                    else
                    break;
                 System.out.println("out of while loop...message:\n" + messageBuffer.toString());
                 String message = messageBuffer.toString();
                 StringTokenizer tokenizer = new StringTokenizer(message, Constants.MESSAGE_SEPERATOR);
                  if(tokenizer.countTokens() == 2)
              System.out.println("message received");
              messageListener.messageReceived(tokenizer.nextToken(), tokenizer.nextToken());
                  else
              if(message.equalsIgnoreCase(Constants.MESSAGE_SEPERATOR + Constants.DISCONNECT_STRING))
              stopListening();
             input.close();
           catch(IOException ioe){ioe.printStackTrace();}
      public void stopListening()
           keepListening = false;
    }Edited by: ashiers on Nov 20, 2007 10:51 AM

    Not to mention garbage ...
    readLine() returns null when there is nothing more to read, i.e. when the other end has closed its socket. If the other end hasn't closed its socket it won't return null, it will block. There might be more data coming later, at which time readLine() will unblock and read it and return it.

  • A getName method allways returns null, why?

    I have an
    ArrayList<Animals> array_list = new ArrayList<Animals>();
    LinkedList<Animals> linked_list = new LinkedList<Animals>();
    I want the getName() method in class NewListener to be accessed from the class NextListener which extends NewListener, and therefor should get access to the method. But when I run the program, it allways returns null. Why?
    class NewListener implements ActionListener
              public String name;
              public void actionPerformed(ActionEvent e)
                   String str_name = showInputDialog(this,"Animal name: ",null);
                   if(str_name == null)
                        return;
                   for(int i=0; i<array_list.size(); i++)
                        if(array_list.get(i).getName().equalsIgnoreCase(str_name))
                             setName(str_name);                   // set the name with the setName() method
                             linked_list.add(array_list.get(i));
              public void setName(String name)
                   this.name=name;
              public String getName()
                   return name;        // this line returns "null"
                         // return "Hello";    // this line works and returns "Hello"
         class NextListener extends NewListener implements ActionListener
              public void actionPerformed(ActionEvent e)
                   try
                        linked_list .removeFirst();
                   }catch(NoSuchElementException er)
                        System.out.println("Numerical value");
                   String info =  getName()+" is in line";   // Why does the getName() method in the NewListener allways return a null?
                   showMessageDialog(this, info, "Notice", INFORMATION_MESSAGE);
         }{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Roxxor wrote:
    Ok, I changed the name to private and I also tried with
    public void setName(String name)
    System.out.println("setting name on " + this + " to " + name); // <--- ADD THIS LINE
    this.name=name;
    }and it works. So this.name SHOULD get the value of name, but it doesn�t.
    So the question is: why does getName() return null?Your code is doing exactly what you're telling it to do. One or more of your assumptions is wrong. Keep digging. Add more print statements.
    Above all, you must drop the attitude that "it should work." There's a bug in your code. You have to find it. Repeating the mantra "It should work" is simply going to put blinders on and make it almost impossible to find your error. Instead, you have to think, "What did I do wrong?" and "If getName is returning null, then setName was never called or was called with null."

  • Looks like some Exceptions' getMessage() methods return null

    Looks like some Exceptions' getMessage() methods return null instead of the message.
    -Andrew

    snidely_whiplash wrote:
    Looks like some Exceptions' getMessage() methods return null instead of the message.
    -AndrewDoes it return a null object, or does it return "null" as a String? The latter may be a case of using the message from a wrapped exception, which in case of a NullPointerException is frequently null (if the NPE was not constructed intentionally with a message).
    BR,
    Robert

  • Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?

    iPLANET ISSUE
    Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?
    CODE
    ServletContext context = mpiCfg.getServletConfig().getServletContext();
    // Debugging
    out.print(context.getServerInfo());     // Get server info
    out.print(&#8220;getRealPath = &#8221; + context.getRealPath("WEB-INF/xsl/RedirectToAcs.xsl"));
    String strXslName = "RedirectToAcs.xsl";
    InputStream is = context.getResourceAsStream("WEB-INF/xsl/"+ strXslName);
    TRACE FROM THE LOG
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]getServerInfo() = iPlanet-WebServer-Enterprise/6.0, getRealPath() = C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl\RedirectToAcs.xsl
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]strXslName = RedirectToAcs.xsl, is = null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][16]ResourceAsStream is null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][30]Problem reading XSL file.
    DIRECTORY DUMP
    C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl>dir
    Volume in drive C has no label.
    Volume Serial Number is 9457-EBF4
    Directory of C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl
    07/22/2002 05:54p <DIR> .
    07/22/2002 05:54p <DIR> ..
    07/22/2002 05:54p 3,086 RedirectToAcs.xsl
    07/22/2002 05:54p 3,088 Response.xsl
    2 File(s) 6,174 bytes
    2 Dir(s) 1,797,405,696 bytes free

    I think there's supposed to be a forward slash before WEB-INF.
    InputStream is = context.getResourceAsStream("/WEB-INF/xsl/"+ strXslName);

  • Binding for "File Content Repository Path" is returning null value

    I have created a data control for file based content repository based on an existing file system path. *But when this data contol is invoked the command "#{bindings['getURI_returnURI'].inputValue}" is returning null.*+
    Please advice what are possible scenarios. I have performed the following
    #1. Create a file system folder in windows XP named "C:\CPContentRepository" and add some html pages into this folder.
    #2. Create a "content" project in the application.
    #3. Create a "Content Repository Data Control" named "CPFileContentRepository". Repository Type : "File System", Base Path : "C:\CPContentRepository". Test & Registration is successful.
    #4. Add a "panel horizontal" into jsf jsp "ContentTest" page & drap-dop data control "CPFileContentRepository--> getURI(String)--> Return--> URI". select return type as "ADF Output Text".
    #5. Edit Authorization of the "ContentTest" page definition for "View --> anyone".
    #6. Edit Authorization of the "ContentTest" page definition bindings "getURI" for "Invoke --> anyone".
    #7. Run the "ContentTest" page. The output for the page is empty.
    Regards,
    Vikki

    There're two major problems in your code. One you have used different names to get your parameters like in your first jsp they're like
    <input type="text" name="did" size="20" </p>
      <p align="center"> </p>
      <p align="center"><b>Name        </b>          
      <input type="text" name="name" size="20"></p>
      <p align="center"> </p>
      <p align="center"><b>Specialist In         
      <input type="text" name="specialist" size="20"></b></p>
      <p align="center"> </p>
      <p align="center"><b>Address                
      <input type="text" name="address" size="20"></b></p>
      <p align="center"> </p>
      <p align="center"><b>Phone no.            
      <input type="text" name="phno" size="20"></b></p>
      <p align="center"> </p>but when you're getting you're doing it like this
    String name = request.getParameter("name");
         String did = request.getString("did");
         String add = request.getParameter("add");
         String specilist = request.getParameter("specilist");
         String phno = request.getParameter("phno");First get them with same name as you have them in your first jsp. another thing in that you're not used form tag in write way... You have created submit button in some other form
    and when you're pressing submit button actully you're submitting only that form value and your form1 is not submitted that's why you're getting null values for
    those parameters you're getting with right name

  • BufferedReader readLine() not returning null

    I'm trying write an SMTP client using Socket.
    I'm sending EHLO command to the SMTP server is is returning multiline response. When I tried to read this multiline response using the BufferedReader in a while loop, it is never returning null.
    Following is my code snippet
    while(true)
                    data=reader.readLine();
                    multilineData +=data+"\r\n";
                    if(data==null )
                        break;
                    }why it is not returning?

    I have written debug statements.
    It is printing the following lines and it still expecting something from the server even though server has finished sending all the response.
    250-mail.merakdemo.com Hello <hostname>, pleased to meet you.
    250-ENHANCEDSTATUSCODES
    250-SIZE
    250-EXPN
    250-ETRN
    250-ATRN
    250-DSN
    250-CHECKPOINT
    250-8BITMIME
    250-AUTH CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
    250-AUTH=LOGIN
    250-STARTTLS
    250 HELP
    This is the end of response from server.
    And even I tried to break the while loop by checking the "HELP" String in the response. It is breaking the loop, but it is never returning the control.
    Following is the Code snippet:
    private String pullMultilineData(BufferedReader reader) throws CommunicationException
           String multilineData="";
           String data="";
            try
                while(true)
                    data=reader.readLine();
                    multilineData +=data+"\r\n";
                    // as per SMTP Protocol last line is without "-"
                    if(data==null || data.equals("") || data.indexOf("-")==-1)
                                        break;
                   logger.log(Level.DEBUG, "Data: "+data);
            catch(IOException ioe)
                logger.log(Level.ERROR, "I/O exception: "+ioe);
                throw new CommunicationException("unable to pull the respose, i/o error occured");
           return multilineData;
        }

  • Adding carraige Return at the end of the file

    The following is my Shell script which will transfer the File from one path to another:
    The file is having /n(Line Feed) at the end of earch line,but the client required a Carraige Return /r along with Line Feed for all the lines in the Output File.
    Please guide me how to add Carraige Return before Line Feed
    The following is the Shell Script:
    #!/bin/bash
    login_usr_pwd=$1
    conc_user_id=$2
    conc_user_name=$3
    requestid=$4
    prev_req_id=$5
    report_type=$6
    batch_name=$7
    file_name="o$prev_req_id.out"
    echo $report_type
    echo $batch_name
    echo $file_name
    if [ "$report_type" = "EFT" ]
    then
    file_1="$batch_name.aba"
    echo "EFT-----------"
    echo $file_1
    echo "-----------"
    tr -d '<#***#>' < $COMMON_TOP/admin/$APPLOUT/$file_name > $XXAP_TOP/out/"$file_1"
    chmod 777 $XXAP_TOP/out/"$file_1"
    else
    file_1="out_1_$prev_req_id.txt"
    echo $file_name
    echo $file_1
    tr -d '<#***#>' < $COMMON_TOP/admin/$APPLOUT/$file_name > $XXAP_TOP/out/$file_1
    chmod 777 $XXAP_TOP/out/$file_1
    fi
    Best Regards,
    Mahi

    add chr(10)+chr(13) (dos/windws line ending): unix2dos <file>remove chr(10)+chr(13), make end of line only chr(10): dos2unix <file>

  • Does anyone have a simple program that will return the size of a file

    Does anyone have a simple program that will return the size of a file?

    I quite hate it when I receive the incorrect amount of yoctocandela per metre squared. Swarthy people
    can't properly convert poundal feet to barleycorn; throws off the whole conversion! Aaah, you get what
    you paid for.I recognize those figures; you've got your outsourced file sizes from Zanzibar; admit it! I always apply
    the scientific approach when I've got file sizes back from Zanzibar: I simply divide those numbers by
    pi (very scientific) and drop the eleven (ueber scientific, because 11 is prime even when looked upon
    as a binary number) least significant bits. And remember: never compare two floating point numbers
    for equality. (<--- that's a free tip)
    Jos ;-)

  • Why does getParameter("uri") returns null ???

    Hi !
    JAVA can be rather frustrating and I have run of of dukes. How about IOU ?
    Unfortunately none of the previous questions in the db shed light on my problem.
    I am trying to get at the "uri" and I have the following code fragment :
    package com.developer;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    public class proptest extends HttpServlet
      public void doGet( HttpServletRequest req,  HttpServletResponse resp)
        throws ServletException, IOException
        PrintWriter out = resp.getWriter();
        out.println("Parameter Name: " + req.getParameter("uri"));
      public void init() throws ServletException
        // initialie the servlet here. Use ServletConfig object to get
        //    initialization parameters...
        ServletConfig config = getServletConfig();
        // ... more stuff ...
      }

    Hi!
    In case anyone stumbles upon this in the database, I worked aroung it by using req.getRequestURI().
    However I still do not know why getParameter() returns null. It would be useful e.g. if you want to display a list of all request params e.g.:
    // stub code follows...
    java.util.Enumeration enum = rea.getParameterNames();
    while (enum.hasMoreElements())
    String name = (String) enum.nextElement();
    System.out.println("Parameter "+name + " " + req.getParameter(name))
    ...For me, nope, all nulls. If it works for you , do tell me.
    Also if you look at the "bugs db" there seems to be a number of issues concerning getParameter().

  • How does labview detect end of file?

    Hello!
    My question is how labview detects the end of file at the Read from Spreadsheet File VI.  What I would like to do is basically to read from a  text file a number of numeric values and afterwards build an array containing these values. Till now I have made a vi that uses the aforementioned vi and put it in a while loop that its conditional terminal is connected to the EOF? but it never stops. Could you please suggest a solution to my problem? (I have already seen a similar question in this forum but the answers didn't help me..) The VI along with an example file to read are attached.
    Thank you very much
    Attachments:
    readfromfile.vi ‏9 KB
    Book1.txt ‏1 KB

    Please take off the while loop. and directly connect the indicator to the all rows output of the VI.
    That will give you a 2D array of whatever is there in the spreadsheet.
    Hope this helps. 

  • End of file on communication channel when doing a (hash) join

    I'm having a problem with a simple join between two tables (hash join, from the explain), one containing about 650k rows, the other 730k.
    The query runs fine until I add to the select list a geometry field (oracle spatial). In that case I receive an end-of-file error, which seems to be caused by a memory saturation. I'm not sure about this, as I can't understand the trace very well...
    I've increased the pga_aggregate_target and the pgamax_size but this have little effects on the problem...
    Any hint? Could it be caused by the geometry field size?
    thanks,
    giovanni

    Thanks for the quick reply. Here it is what you asked:
    select from v$version;*
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    an excerpt from the trace file:
    *** ACTION NAME:() 2010-04-16 12:48:17.796
    *** MODULE NAME:(SQL*Plus) 2010-04-16 12:48:17.796
    *** SERVICE NAME:(ABRUZZO) 2010-04-16 12:48:17.796
    *** SESSION ID:(149.10) 2010-04-16 12:48:17.796
    *** 2010-04-16 12:48:17.796
    ksedmp: internal or fatal error
    ORA-07445: trovata eccezione: dump della memoria [ACCESS_VIOLATION] [_kokekd2m+24] [PC:0x11CF9E0] [ADDR:0xBA8C193C] [UNABLE_TO_READ] []
    Current SQL statement for this session:
    select g.cr375_idobj,g.cr375_geometria,t.cr374_codicectr,t.cr374_scarpt_cont
    from DBTI.Cr374_Scarpata t, DBTI.Cr375g_a_Scarp g
    where t.cr374_idobj=g.cr375_idobj
    check trace file c:\oracle\product\10.2.0\db_1\rdbms\trace\abruzzo_ora_0.trc for preloading .sym file messages
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    _kokekd2m+24                  00000000            
    kokeq2iro+178       CALLrel  kokekd2m+0 99384C8 9937624 BA8C18D8
    9968588 3660D954 3A52AC00
    __VInfreq__rworupo+ CALLrel _kokeq2iro+0         9968218 A05C810 EA7
    321
    _kxhrUnpack+71       CALLreg  00000000             99693C8 A05C810 0 9 0
    qerhjWalkHashBucke  CALLrel  kxhrUnpack+0 9967DD0 99693C8 9 A05C810 0
    t+210
    __PGOSF352__qerhjIn CALLrel _qerhjWalkHashBucke  A05CED4 99693C0 8
    nerProbeHashTable+4 t+0
    78
    _kdstf0000101km+230  CALLreg  00000000            
    kdsttgr+1263        CALLrel  kdstf0000101km+0

  • GetDocumentBase returns null in Update 40

    The change to make getCodeBase() and getDocumentBase() return null has broken our FindinSite-CD signed applet which is out in the field on many data CDs and similar, ie running locally.  It doesn't provide any more security as our all-permissions applet can still access the same information (once it knows where it is).  The trouble is, the CD may be run from anywhere so I do not know the absolute path in advance. I have found that I can add code so that JavaScript is used to pass the current URL as a PARAM to the APPLET.  However this should not be necessary.
    Can you provide a better fix that does not break all our existing users who update to Update 25 or 40?
    I would be happy for our applet to have access restricted to its own directory or lower.
    Or for an all-permissions applet, make getCodeBase() and getDocumentBase() return the correct values.
    Please see the second link below for a further discussion.
    Bug ID: JDK-8019177 getdocument base should behave the same as getcodebase for file applets
    Oracle's Java Security Clusterfuck
    PS  There is a separate Firefox 23 issue stopping access to local Java applets - this should be fixed this week in version 24.
    Chris Cant
    PHD Computer Consultants Ltd
    http://www.phdcc.com/fiscd/

    Our company uses the above FindinSite-CD software to provide search functionality on our data CDs and we have done so successfully for many years.  These latest changes in Update 40 have now broken this vital component on our product and will cost us considerably in technical support time and replacing the discs when a fix comes out. Just an end user's perspective!

Maybe you are looking for

  • Getting Date in the form in JSP

    Hi, I am working on a form created in JSP that gets the date from the user, just in case the user wants to modify the date (default is current date), i wish to provide an option for that. Is there any other way apart from using list boxes asking for

  • Placing an pdf in Indesign

    Hi Indesign (cc) users, I got a pdf file with 2 page's what i want to import in indesign. Now i want to import both pdf pages, but that's not wat happend. He uploads only the first page. What can i do to import all pdf pages in ones? Thanks for helpi

  • Deploying standard changes to SSIS packages

    A couple glitches were discovered in our SSIS template.  Approximately 100 packages were built from the template.  Is there a mechanism to update all packages with the changes?  Or do I have to open each one and manually change?

  • Master Database Rebuild failed

    Hi All, We have master Database corruption and there is no backup of it, so I have to rebuild the master database..And when i gave the command to rebuild  1. No error was thrown in Command prompt 2. SQL server started to run again. 3. I am unable to

  • How to display video in Java?????????????????????

    hello everybody. this is my first time i post a qestion and i hope that you will help me. I started to make a project where I have to display video when I choose from a combo box. I had two problems is how to display in arabic and I solved this probl