Not reading a string

I'm trying to teach myself java so I thought up this little program. It sets the value correctly but for some reason they strings don't match.
* @(#)BasicMove.java
* BasicMove Applet application
* @author
* @version 1.00 2010/7/5
import java.awt.*;
import java.applet.*;
public class BasicMove extends Applet {
     TextField input;
     String input1;
     int xPos = 0, yPos = 0;
     public void init() {
     input = new TextField( 10 );
     add( input );
     public void paint(Graphics g) {
          g.drawString("0", xPos, yPos );
     public void play() {
          input1 = input.getText();
          if(input1 == "NORTH" ) {
          yPos += 4;
          repaint();
          if(input1 == "SOUTH" ) {
     yPos -= 4;
          repaint();
          if(input1 == "EAST" ) {
          xPos += 4;
          repaint();
          if(input1 == "WEST" ) {
          xPos += 4;
          repaint();
     public boolean action( Event event, Object o ) {
          play();
          return true;
}

STARZ wrote:
I'm trying to teach myself java so I thought up this little program. 1) Applets are a bad place to start learning Java. String comparison tests can be done in a command line program. Anything involving a GUI is an order of magnitude more complex than a command line program. An Applet is another order of magnitude more complicated than a typical non-applet GUI.
2) When posting code, code snippets, XML/HTML or input/output, please use the code tags. The code tags protect the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button.
This is how the posted code would look, inside code tags.
* @(#)BasicMove.java
* BasicMove Applet application
* @author
* @version 1.00 2010/7/5
import java.awt.*;
import java.applet.*;
public class BasicMove extends Applet {
     TextField input;
     String input1;
     int xPos = 0, yPos = 0;
     public void init() {
     input = new TextField( 10 );
     add( input );
     public void paint(Graphics g) {
          g.drawString("0", xPos, yPos );
     public void play() {
          input1 = input.getText();
          if(input1 == "NORTH" ) {
          yPos += 4;
          repaint();
          if(input1 == "SOUTH" ) {
         yPos -= 4;
          repaint();
             if(input1 == "EAST" ) {
          xPos += 4;
          repaint();
          if(input1 == "WEST" ) {
          xPos += 4;
          repaint();
     public boolean action( Event event, Object o ) {
          play();
          return true;
}

Similar Messages

  • How can i read a string with nextToken() of StreamTokenizer

    I need for my class paper to read a string from a file and i used the StreamTokenizer's method nextToken but i can not read a string with it. my code is:
    StreamTokenizer st = new StreamTokenizer(the code that gets the input from the file)
    String line;
    while ((line !=br.readLine()) != null) {
    String surname = (st.nextToken()).trim();
    but it gets me some error of:
    int can not be dereferenced
    what should I do to get the string i need?

    Look at the API for java.io.StreamTokenizer. In particular, look at the return type for nextToken().
    Good luck.

  • Reading Each String From a text File

    Hello everyone...,
    I've a doubt in File...cos am not aware of File.....Could anyone
    plz tell me how do i read each String from a text file and store those Strings in each File...For example if a file contains "Java Tchnology forums, File handling in Java"...
    The output should be like this... Each file should contains each String....i.e..., Java-File1,Technology-File2...and so on....Plz anyone help me

    The Java� Tutorials > Essential Classes: Basic I/O

  • Read AVI string in matlab

    I have saved string data in an AVI file with ''IMAQ AVI Write Frame". I have checked the saved data in Labview and when I read this AVI file with "AVI read data" it is possible to read the sting.
    However, I want to read the data into Matlab and cannot find a way to extract the string data from the AVI file. AVI data can be read with 'VideoReader', but this doesn't read the string data. Does anybody knows a method to read the string data into matlab?
    If anyone can help me it would be really great!

    Dear researchIC,
    I do not know what are the possibilities in Matlab to deal with AVI file.
    However, what I can tell you is that the data which is included in the file with the "IMAQ AVI Write Frame" is not encrypted or anything. It is simply included in a standard data stream of the AVI file. It is then potentialy possible to read back the data in a third-party application.
    The best advice I can give you is then to inform you about the AVI file format and see how you can retrieve the information contained in a stream.
    Cédric | NI Belgium

  • Reading a String with dynamic format.

    Hello,
    I'm learning Java and I'm relatively new to the scene. I decided to make a small free utility with the hope that it will help somebody. The utility is a Game Server (Call of Duty 4) connector that will help Administrators to connect to the server and execute commands without the need of running the game.
    I have made a progress so far by searching these (very useful) forums but I came across a point that I can't by pass.
    The only way to learn "Who Is" from the server is the rcon command "status". Using this command the server returns you the current map and the players playing with all their information. This is the part of the code that I need help at:
    public static void StatusReader(String StatusInput) throws IOException {
                     ArrayList line = new ArrayList();
                        BufferedReader br = new BufferedReader(new StringReader(StatusInput));
                       String s = null;
                       int l=0;
                  dokimi = StatusInput.split("\n");
             //    for(int j=0;j<9;j++){
              //        int i=0;
              //        dokimi2 = new String[0][0];
              //        dokimi2[0][0] = dokimi[0];
              //        System.out.println(dokimi2[0][0]);
                  System.arraycopy(dokimi, 0, dokimi2, 0, 1);
                for(int i=0;i<(dokimi.length/9);i++){
                        for(int j=0;j<9;j++){    
                       dokimi2 = new String[i][j];
                       System.arraycopy(dokimi, 0, dokimi2[i][j], 0, 1);
                       System.out.println(dokimi2[i][j]);
             //     while ((s = br.readLine()) != null)
                  //     line.add(s);
                   //  StatusOutput = new String[line.size()][];
                  //     for (int i = 0; i < StatusOutput.length; i++) {
                  //               s = (String) line.get(i);
                       //          StringTokenizer st = new StringTokenizer(s, "");
                  //               String[] arr = new String[st.countTokens()];
    //                       for (int j = 0; j < arr.length; j++)
      //                                arr[j] = st.nextToken();
            //               StatusOutput[i] = arr;
               //          for (int i = 0; i < StatusOutput.length; i++) {
          //                    for (int j = 0; j < StatusOutput.length; j++)
    //                         System.out.print(StatusOutput[i][j] + " ");
         //                    System.out.println();
    }I've been messing a lot with the code. +_What I want to do is to read this string that the server is sending,split it, and then place it in a 2D Array that I will attach on a table._+ So far I've made the StringTokenizer method to be able to , kind of, sort that String and put it in an array. However I usually get outofbounds errors because not always the lines have the same length. This is an example of the format that the server sends after executing the "status" command:map: mp_crossfire
    num score ping guid name lastmsg address qport rate
    2 1 84 b5e9d93e88670c6f811a033a7f925117 Davis^7 0 84.185.183.210:-1482 21249 25000
    4 15 100 e0d7c91fa7ba9549444ccab3a0e3de62 =HPX= Anogianos^7 0 91.140.25.93:28960 -10752 25000
    5 5 68 5d68298d9e16d7491d5700e6e236214f AsChIkUtAbU^7 50 84.60.215.190:17502 26401 25000
    6 115 44 cc503f50d990e27eeb990826c2cf1193 Donnergroll^7 50 91.64.153.240:28960 10086 25000
    7 141 79 cbd095d37abdc728671e2923296aa9cf souL^7 50 87.78.179.242:-10509 8432 25000
    8 116 83 4d0d1a067179516e209ef89cb0a79755 suodeth^7 0 84.250.214.156:27185 -29970 25000
    9 11 117 fc3c6777b3d9bf99df1e55b321b75e9e shpalman^7 50 62.101.126.209:-17420 -25455 25000
    10 5 82 fb2f20a9f46a212b896baf9ab4ea3eb0 =HPX=Gringo^7 50 213.5.170.94:-619 20175 25000
    11 95 68 d3d542b17ab56d9fbf107da39f245269 aga^7 50 78.2.42.253:28960 22173 25000
    12 10 100 8e6d08aec08591fb319081d0b40dedd2 madmax^7 0 79.166.47.145:2960 -7933 25000
    13 110 77 4fc4d0e24faa634dbce5c4bb4131bc4a Thunderstorm^7 50 87.78.113.218:28960 4512 25000
    14 55 67 f789227fcb95853b857115e68741df8d Robbino^7 0 89.217.12.113:28960 -192 25000
    15 118 85 b7be8ce58324d0f25c45f5cb372b30a1 Paranoid^7 50 78.1.26.32:28960 27294 25000
    16 11 90 38b59f3bbd3aa0ce3c95fccb26858931 $Hockz^7 50 87.181.101.96:-2984 24219 25000
    19 16 45 720f2abf81189890851d3e41fcbe4e21 ERASER^7 50 83.236.63.150:-32135 24704 25000
    20 145 37 a78f43bc3d3705743a190de45d37fc6a KintaKunte^7 50 88.68.237.239:28960 23539 25000
    21 60 49 a96d6a55049d11c5d7cd1c35c4d497c3 #sD|-HaZarD-^7 50 87.78.179.242:-10509 8432 25000
    8 116 83 4d0d1a067179516e209ef89cb0a79755 suodeth^7 0 84.250.214.156:27185 -29970 25000
    9 11 117 fc3c6777b3d9bf99df1e55b321b75e9e shpalman^7 50 62.101.126.209:-17420 -25455 25000
    10 5 82 fb2f20a9f46a212b896baf9ab4ea3eb0 =HPX=Gringo^7 50 213.5.170.94:-619 20175 25000
    11 95 68 d3d542b17ab56d9fbf107da39f245269 aga^7 50 78.2.42.253:28960 22173 25000
    12 10 100 8e6d08aec08591fb319081d0b40dedd2 madmax^7 0 79.166.47.145:2 0 91.3.110.248:-1185 6274 25000
    23 116 109 bfffdf9ff93425d284796532ef214bd0 ze_meedles^7 50 85.243.221.116:28960 24936 25000
    95853b857115e68741df8d Robbino^7 0 89.217.12.113:28960 -192 25000
    15 118 85 b7be8ce58324d0f25c45f5cb372b30a1 Paranoid^7 50 78.1.26.32:28960 27294 25000
    16 11 90 38b59f3bbd3aa0ce3c95fccb26858931 $Hockz^7 50 87.181.101.96:-2984 24219 25000
    19 16 45 720f2abf81189890851d3e41fcbe4e21 ERASER^7 50 83.236.63.150:-32135 24704 25000
    20 145 37 a78f43bc3d3705743a190de45d37fc6a KintaKunte^7 50 88.68.237.239:28960 23539 25000
    21 60 49 a96d6a55049d11c5d7cd1c35c4d497c3 #sD|-HaZarD-^7 50 87.78.179.242:-10509 8432 25000
    8 116 83 4d0d1a067179516e209ef89cb0a79755 suodeth^7 0 84.250.214.156:27185 -29970 25000
    9 11 117 fc3c6777b3d9bf99df1e55b321b75e9e shpalman^7 50 62.101.126.209:-17420 -25455 25000
    10 5 82 fb2f20a9f46a212b896baf9ab4ea3eb0 =HPX=Gringo^7 50 213.5.170.94:-619 20175 25000
    11 95 68 d3d542b17ab56d9fbf107da39f245269 aga^7 50 78.2.42.253:28960 22173 25000
    12 10 100 8e6d08aec08591fb319081d0b40dedd2 madmax^7 0 79.166.47.145:2As you can see the problem is that the server sends some information twice *but* it splits them with a blank line. In addition some nicknames contain spaces something that makes me wonder how I can set the nicknames to belong to the same position of the array. Something that i know is that all nicknames end with "^7" which is the in-game colour definition. Any help would be much appreciated. Thanks in advance.
    Edited by: m33ts4k0z on Dec 21, 2007 11:36 AM
    Edited by: m33ts4k0z on Dec 21, 2007 11:43 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    m33ts4k0z wrote:
    Hello DeltaGeek and thanks for your answer.
    I have 2 questions for you since you mentioned what the real problem is. The first question is how can I join 2 cells that will contain the 2 parts of the nickname in case of a space? Can I just check if the cell number x,y contains "^7" and then just copy that cell the x,y-1? Ive tried that but then I also have to move the rest of the columns to y-1 as well. Any idea how to do that?
    I was assuming you'd be processing the split string anyways, and not just tossing it into your 2-d structure. If you want to use .split(), yes. you would need to merge those cells into the original name. System.arrayCopy() would likely be useful for doing most of the heavy lifting.
    Another option you have is to tokenize the string using Scanner. That would let you pull each column out of the string individually. You'll need to populate the array manually (instead of just using what .split() gives you), but allows you to change the token delimiter between pulls.
    As for the junk lines, I can just check if they don't much the tokens number and then just not add them to the array I suppose, am I right or....?That's certainly one option. I don't know what's being given back to you, it may be important.

  • Reading a string.

    Hi experts.
    how can i read a string at a specified character.
    For ex: i have  astring like this.
    str = 'YUGFHKGHKHDKHHHGJK8HJBFXJKKFKJFJKFHJH'.
    so i have to read n.of charecters from starting of the string to charecter 8.
    Not with search option.
    Regards

    Hi,
    Thank you all.
    I know all these but in my program it is not workig..Don't know why...
    either split or search.Pls see the below sample code.
    DATA  : i_files like spflist occurs 0 with header line,
    DATA: w_files LIKE LINE OF  i_files.
    data: str1(200) type c,
          str2(200) type c.
    LOOP AT i_files INTO w_files.
        str = w_files-line.
        lin1 = STRLEN( str ).
        lin1 = lin1 - 1.(this is because there is one more '#' at the end of string)
        str = str+0(lin1).
        lin2 = STRLEN( str ).
        search str for '#'.
        split str at '#' into str1 atr2.    
        w_files-line = str.
        MODIFY i_files FROM w_files.
        CLEAR lin1.
      ENDLOOP.
    Suppose here str contains:
    str = '00000003379#212RegVNegNoticeHLA.aspx.xml'.
    So i am getting sy-subrc = 4 after search.
    and after split there are no values in str2..and str1 contains full string..
    Can any body tell me what may be the problem..?
    Regards

  • Reading a String Literally - Finding the "\" Character with a Regex

    How do I search for "\" characters in a string? Such as..
    String text = "Temp\temp.txt";
    The problem is that Java will read "\t" as a tab, so that
    System.out.println(text);
    Will return
    Temp emp.txt
    Also, searching for the regex "\\\\" will return a null result, presumably because Java interprets the "\t" as a tab character, not as a literal "\" followed by a literal "t".
    How do I get Java to read the string without interpreting it?
    Thanks in advance

    Try also this:
    public static void main(String[] args) {
              String test1 = "String with a\\t which is not a tab but a t preceeded with a \\ character";
              String test2 = "String with a \t which is a tab";
              System.out.println("This are the Strings as user sees / enters them:");
              System.out.println(test1);
              System.out.println(test2);
              System.out.println("");
              System.out.println("***********************************************************");
              System.out.println("");
              System.out
                        .println("Splitting first string using a \\\\\\\\ regex which will be interpreted by the regex engine as \\\\ which will represent a \'\\\' character:");
              System.out.println("");
              for (String s : test1.split("\\\\")) {
                   System.out.println(s);
              System.out.println("");
              System.out.println("***********************************************************");
              System.out.println("");
              System.out.println("Splitting the second string just the same way:");
              System.out.println("");
              for (String s : test2.split("\\\\")) {
                   System.out.println(s);
         }and read the console output.
    It should be:
    This are the Strings as user sees / enters them:
    String with a\t which is not a tab but a t preceeded with a \ character
    String with a       which is a tab
    Splitting first string using a \\\\ regex which will be interpreted by the regex engine as \\ which will represent a '\' character:
    String with a
    t which is not a tab but a t preceeded with a
    character
    Splitting the second string just the same way:
    String with a       which is a tab

  • Error: Could not read Header Mapping in Receiver Agreement

    Dear SAP experts,
    Newly installed SAP G7A PI 7.1(Acceptance box) was already released to customer.
    We are doing an initial test (BAT phase), wherein, our end-to-end scenario is, from a EP Portal application  --->  G7A PI 7.1   -->  Trading Partner via AS2 protocol.
    G7A PI is connected to Trading Partner via AS2 protocol.
    Currently, our EP Portal application is in-active at the moment, that's why we used 'manual XI submitter', to send a message from G7A PI itself going to Trading Partner.
    The message was success in the Integration engine of  G7A PI, and the output message was produced.
    As the message reached the Adapter Engine layer of G7A PI, we encountered a specific error,
    Delivering the message to the application using connection AS2_http://seeburger.com/xi failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException: Fatal exception: com.seeburger.xi.connector.queue.TaskBuildException: Could not create CPAObjectMapper: InvocationTargetException caused by Could not read Header Mapping in Receiver Agreement: while trying to invoke the method com.sap.aii.af.service.cpa.Party.getParty() of an object returned from com.sap.aii.af.service.cpa.NormalizationManager.getXIParty(java.lang.String, java.lang.String, java.lang.String), Could not create CPAObjectMapper: InvocationTargetException caused by Could not read Header Mapping in Receiver Agreement: while trying to invoke the method com.sap.aii.af.service.cpa.Party.getParty() of an object returned from com.sap.aii.af.service.cpa.NormalizationManager.getXIParty(java.lang.String, java.lang.String, java.lang.String)
    Basically, "Could not create CPAObjectMapper - InvocationTargetException caused by Could not read Header Mapping in Receiver Agreement"
    I am thinking, one of the possible cause is that we used manual XI submitter, in G7A PI, instead of the utilizing the actual Sending system (EP Portal application).
    Or possible cause is that the AS2 adapter in G7A is not yet stable, thus causing the issue.
    We've already done successful connection when we're in GDD PI (Development box) during our SIT phase.
    Objects in G7A were mirror of GDD PI.
    Kindly advise for your inputs.
    Thanks!
    Gerberto

    Hi,
    It seems that the cause of the error is the unstable performance of the PI box, since, this was newly installed and there were patches that were not yet added.
    Thanks for the support!
    Gerberto

  • Status bar text is not read by Screen reader.

    Dear Colleagues,
    In my Java application(Java Swings), I use a status bar to show the status of application for user. In String XML file, I use the status message type as 'XMSG'. This perticular text is not read by the SCREEN READER. This is tested during the 'Accessibility Testing'. Could some one tell me the reason for the text being not read by Screen reader? Any special settings needed in xml file or any other place, which enables the text to be read by the screen reader?
    Thank you very much for your help.
    Regards,
    Pradeep

    Hi Anup,
    Thank you for your responce.
    Yes, I am able to access the XML in browser properly, without any error/warnings.

  • File adapter not reading file suddenly

    Hi,
    My File to IDOC scenario was working properly. Suddenly the file adapter is not picking the file from the location. I have not changed any code. I checked all users, are in unlocked mode only. The log file throws error. Let me know any solution to resolve this
    ========
    1.5#001A4B4C508E007400000577000019F40004558D5E8AFB9D#1219965571787#/Applications/ExchangeInfrastructure/AdapterFramework/Services/Trex##com.sap.aii.af.service.trex.impl.Util.Util: getIndex()#J2EE_GUEST#0####02305f1074b511ddaa1a001a4b4c508e#SAPEngine_Application_Thread[impl:3]_27##0#0#Error#1#com.sap.aii.af.service.trex.impl.Util#Java###SLDException couldn't get the SLD instance name. Therefore the index ID couldn't be inititialized. - Message: ; To-String: .#2#Could not read SLD instance name, due to: undefSldAccessor#com.sap.aii.af.service.sld.SLDException: Could not read SLD instance name, due to: undefSldAccessor#
    #1.5#001A4B4C508E007400000579000019F40004558D5E8AFCB3#1219965571787#/Applications/ExchangeInfrastructure/AdapterFramework/Services/Trex##com.sap.aii.af.service.trex.TrexManager.TrexManager: getTrexConfiguration()#J2EE_GUEST#0####02305f1074b511ddaa1a001a4b4c508e#SAPEngine_Application_Thread[impl:3]_27##0#0#Error#1#com.sap.aii.af.service.trex.TrexManager#Java###TrexException: thrown by any problem related to the DataAccess: Message: .#1#Class: com.sap.aii.af.service.trex.TrexException : SLDException in Method: Util: getIndex(). Couldn't get the SLD instance name. Therefore the index ID couldn't be inititialized. - Message: Could not read SLD instance name, due to: undefSldAccessor; To-String: com.sap.aii.af.service.sld.SLDException: Could not read SLD instance name, due to: undefSldAccessor#
    #1.5#001A4B4C508E00740000057B000019F40004558D5E8AFDE1#1219965571787#/Applications/ExchangeInfrastructure/AdapterFramework/Services/Trex##com.sap.aii.af.service.trex.TrexScheduler.TrexScheduler: run()#J2EE_GUEST#0####02305f1074b511ddaa1a001a4b4c508e#SAPEngine_Application_Thread[impl:3]_27##0#0#Error#1#com.sap.aii.af.service.trex.TrexScheduler#Java###TrexException: thrown by any problem related to the Trex processing. Message: .#1#Class: com.sap.aii.af.service.trex.TrexException : TrexException in Method: TrexManager: getTrexConfiguration(). Thrown by any problem related to the DataAccess. Message: Class: com.sap.aii.af.service.trex.TrexException : SLDException in Method: Util: getIndex(). Couldn't get the SLD instance name. Therefore the index ID couldn't be inititialized. - Message: Could not read SLD instance name, due to: undefSldAccessor; To-String: com.sap.aii.af.service.sld.SLDException: Could not read SLD instance name, due to: undefSldAccessor#
    ========

    Hi,
    1)Stop and start the Communication Channels.
    2) Activate the scenario.
    3) If u r using FTP may be ur credentials wereexpired.check the credentials.
    "Award Points if helpful"
    Regards,
    jayasimha

  • Labview not reading csv file properly.

    I'm trying to use the read spreadsheet file vi to read the attached csv.
    It does a few things incorrectly:
    1) the first cell of the resulting array has ÿþ appended to the front of it, seems like labview is grabbing some special character it shouldn't? (Notepad, notepad++ and excel can all open the file without issue and none show ÿþ or anything like it).
    2) It's mistreating the EOL characters as two line feeds, resulting in blank rows between each data row. (Looking at the csv in notepad++ confirms that the lines are ended with a CR and a LF (same as EOL).
    3) I'm reading it in as a string, because one of the columns is non-numeric, but then I strip that column out and attempt to convert the remaining string array into a numeric array (this fails). It also fails if I pull out an individual element of the array and attempt to convert it to a number (in both cases using fract/exp string to number), below I have an example of trying to read the 2nd column of the 1st row (index: 0,1) which is formatted as a string: "1.37238168716431" and converting that into a number gives 0 as you can see in the snapshot of the front panel.
    Solved!
    Go to Solution.
    Attachments:
    REPORT02.CSV ‏4 KB

    I guess the file is in unicode, that doesn't help me very much.
    I don't use the "Read from Text File Function" - at least not directly, although it is called in Read from Spreadsheet File. Where is it called, however, right-click doesn't show an option for Convert EOL, instead it's a terminal and it's default is F and as the terminal is disconnected, I'm assuming it's not converting EOL. So it's already "unchecked" in a sense.
    No idea how to convert the unicode string to ascii. (no functions show up when i search unicode or ascii in the manager). It displays it just fine in the text box, so I'm not sure why it's able to display it without issue but not read it as a number.
    Using Labview 8.6, by the way.

  • Error: Could not read reports properties.  java.lang.NullPointerException

    Hi All,
    I am facing Could not read reports properties. java.lang.NullPointerException while trying to run the report using below string
    String:_
    /rcrmap2/weblogic/bea/ORA_PFRD/bin/rwrun module=/rcrmkr1/exe_dir/CA_PG1_T.rdf CUSTGRPID=''001139'' CANO=104 CACOPY=''F'' OPTION=''W'' CCODE=''KR'' USERID=apl_D_RCRMNIU3/Q5e3C4l1FPjrG6epG6f3C4dqFMgsDP@krcrmd DESTYPE=FILE DESNAME=/rcrmkr1/crms_RG/rep_dir/gcapg1_to_test_20110112_121902.rep BATCH=YES MODE=CHARACTER DESFORMAT=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/wide.prt pagesize=132x80
    Environment Variables :*
    export ORACLE_LOCALPREFERENCE=/rcrmap2/weblogic/bea/rcrms/config/FRComponent/frcommon/tools/admin/
    export WIDE_DEF=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/hplwide.prt
    export WIDE_VIW=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/wide.prt
    export REPORTS_FONT_DIRECTORY=/rcrmap2/weblogic/bea/rcrms/reports/fonts
    export REPORTS_TAGLIB_URI=/WEB-INF/lib/reports_tld.jar
    export REPORTS_NO_DUMMY_PRINTER=TRUE
    export REPORTS_TMP=/tmp
    export RW=/rcrmap2/weblogic/bea/ORA_PFRD/reports
    export LD_LIBRARY_PATH=/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64/classic:/rcrmap2/weblogic/bea/ORA_PFRD/lib:/usr/dt/lib:
    export LIBPATH=/rcrmap2/weblogic/bea/ORA_PFRD/lib:/usr/dt/lib:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64/classic:/usr/lpp/cobol/lib:/oracle/oracle/11.1.0.7/lib:/oracle/oracle/11.1.0.7/lib32:/rcrmkr1/exe_dir/pvcs_12july/pco:.
    export LDR_CNTRL=USERREGS@MAXDATA=0x80000000
    export TK_ICON=/rcrmap2/weblogic/bea/ORA_PFRD/reports/plugins/resource
    export REPORTS_DEFAULT_DISPLAY=NO
    export REPORTS_CLASSPATH=/rcrmkr1/exe_dir:/rcrmap2/weblogic/bea/ORA_PFRD/reports/jlib/rwbuilder.jar:/rcrmap2/weblogic/bea/ORA_PFRD/reports/jlib/rwrun.jar:/rcrmap2/weblogic/bea/ORA_PFRD/jlib/zrclient.jar:/rcrmap2/weblogic/bea/ORA_PFRD/modules/oracle.jsp_11.1.1/ojsp.jar:/rcrmap2/weblogic/bea/ORA_PFRD/javacache/lib/cache.jar:/rcrmap2/weblogic/bea/ORA_PFRD/modules/oracle.javacache_11.1.1/cache.jar
    Please help to provide your inputs
    Regards,
    Harish

    Hi,
    The problem was resolved by setting proper acl's to the corresponding directories (cache directory) in the application server
    Regards,
    Harish

  • Server Socket does not read data input stream

    Hi all,
    I am very newbie to Java Network programming with sockets and multi-threading.
    But I am obliged to develop a chat system written in Applets which can be placed on the website and used by visitors who come to my website.
    In order to understand this, I have tested a basic web chat program I downloaded from the Internet which use sockets and multi-threadings. The program work fine, no bugs at all at both compilation and run time. I noticed that all three streams for Client side (i.e. first one is input stream used receiving data from User; the second one is socket input stream used for receiving data from Server socket, and the third is socket output stream used for writing data to server socket) were established. And the same, two socket streams (input & output) for Server side were also connected when running program giving right port number and IP address of the server.
    The problem is both server and client sockets do not read data using the following stream classes:
    1. DataStreamInput: I use input.readUTF() method
    2. or BufferedReader: I use input.readLine() method
    The example of the codes are below:
    private BufferedReader input = null;
    private PrintWriter output = null;
    private Socket socket = null;
    public void open() throws IOException
    {  input = new BufferedReader(new
    InputStreamReader(socket.getInputStream()));
    System.out.println("Server socket input stream was created, and");
    output = new PrintWriter(socket.getOutputStream());
    System.out.println("Server socket output stream was created");
    public void run()
    {  System.out.println("Server Thread " + clientPort + " running.");
    while (true)
    {  try
    System.out.println("Server is reading data from Client, wait...");
    String fromClient = input.readLine();
    System.out.println("Server received a message on " + clientPort + ".");
    catch(IOException ioe)
    {  System.out.println(clientPort + " ERROR reading: " + ioe.getMessage());
    server.remove(clientPort);
    stop();
    The problem is at the line: String fromClient = input.readLine(); in the run() method? What is wrong with the codes above?
    Note: I also try to use original codes which use readUTF() method in DataStreamInput class instead using readLine() in BufferedReader. Both methods dont read data from inputstream socket?
    I very appreciate any help/advice from experienced developers.
    Best regards

    Hi,
    Yes. The readLine() method hangs! After the test, the execuation of the program is stopped at the line of readLine() method; it does not pass it?
    There is no problem with writing to Server socket. After the test, the program pass through flush() method. Here is the code for writing to sever socket within ChatClient (client side socket) class:
    private BufferedReader input = null;
    private PrintWriter           output = null;
    public ChatClient(String serverName, int serverPort)
    {  System.out.println("Establishing connection. Please wait ...");
    try
    {  socket = new Socket(serverName, serverPort);
    System.out.println("Connected: " + socket);
    start();
    catch(UnknownHostException uhe)
    {  System.out.println("Host unknown: " + uhe.getMessage()); }
    catch(IOException ioe)
    {  System.out.println("Unexpected exception: " + ioe.getMessage()); }
    public void start() throws IOException
    {  input   = new BufferedReader (new
                             InputStreamReader(System.in));
    System.out.println("Client User input stream was created,");
    output = new PrintWriter(socket.getOutputStream());
    System.out.println("Client Socket output stream was established, and");
    if (thread == null)
    {  client = new ChatClientThread(this, socket);
    thread = new Thread(this);
    thread.start();
    public void run()
         while (thread != null) {
         String fromUser;
              try{
                   while((fromUser = input.readLine())!= null)
                   System.out.println("Client wasreading a data from User, and");
    output.println(fromUser);
         output.flush();
         System.out.println("Client has written a data to Server");
    catch(IOException ioe)
    {  System.out.println("Sending to server error: " + ioe.getMessage());
    stop();
    etc.
    Here is a piece of codes for reading data from the Client Socket in the ChatServer Class (Server Side socket):
    public void run()
    {  System.out.println("Server Thread " + clientPort + " running.");
    while (true)
    {  try
    {  //server.handle(clientPort, input.readLine());
    System.out.println("Server is reading data from Client, wait...");
    String fromUser = input.readLine();
    //while((fromUser = input.readLine()) != null)
         System.out.println("Server received a message on " + clientPort + ".");
    catch(IOException ioe)
    {  System.out.println(clientPort + " ERROR reading: " + ioe.getMessage());
    server.remove(clientPort);
    stop();
    etc. Please advice why the readLine() method hangs; does not read data from the input stream received from the CLIENT?

  • My USB super drive is not reading DVD

    when i connect my usb super drive is not reading DVD

    External SuperDrive DVD player fix - RESOLVED!
    This solution worked for my Superdrive, which I had installed in a USB external case, so now it can play movies using Apples DVD Player App, but additional steps may be needed, as I outline below.  I had removed the SuperDrive from my mid-2009 Macbook Pro 15" 2.53 ghz to install a second hard drive with Other World Computing's "Data Doubler" adapter, and mounted the SuperDrive in an OWC Value Line SuperSlim external case.
    I don't know if the first two steps below are necessary, but I had done them first, because others suggested them as fixes before I found the solution in the 3rd step.
    1) I installed Apple's SuperDrive Firmware Update 3.0, which is on Apple's support site at http://support.apple.com/en-gb/HT201953
    2) Then I applied a fix on this page, http://www.hardturm.ch/luz/2011/10/how-to-make-the-macbook-air-superdrive-work-w ith-any-mac/comment-page-12/#comment-106449, using Text Wrangler to edit the preference file at /Library/Preferences/SystemConfiguration/com.apple.Boot.plist by adding code mbasd=1 between the two string values. However, that still did not resolve the problem. I left the preference file with the code “mbasd=1″ included, as outlined on that site.
    3) Then, I used the fix at http://macriot.com/mcrt/?p=2294 which requires modification of some code embedded into OS X’s DVDPlayback framework; essentially replacing the words “internal” with “external”
    Now my external Superdrive plays movies using DVD Player. 

  • Special Characters in the QueryString not read by Dreamweaver

    Hello,
    How do I get Dreamweaver to read the encoded url characters in the query portion of the url?
    I have a form variable (stück) that is passed with get.  This turns into st%FCck in the query portion of the URL. When I try to $_GET['stück'] in Dreamweaver, it does not work.  I used $_SERVER['QUERY_STRING'] to see what DW was seeing and it shows only (stck). If I $_GET['stck'] it works, however this breaks the code on my server and home server because they both see 'stück' in the $_GET.
    I see the easiest way is to not use german words spelled with umlauts or eszett. I only have one German site so far, but in the long run it is not practical due to the thousands of German words that have these characters. Is there an option somewhere that I need to click off/on to make this read the %FC?  I gave a good 5 hours of googling but no luck.  I may just be hitting the wrong combination in search terms.

    Thought I would expand this a little as I am still not having much luck.  I use Apache Server and Windows XP for testing.  I use Apache/Unix from my Host.
    The below code demonstrates what I am talking about with the dreamweaver not reading (or perhaps better said truncating) the query string.
    ======= Example Code =======
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <a href="mytestform2.php?stück=1">links</a>
    <br />
    <?php   
    echo $_GET['stück'] . "<br / >" . $_SERVER['QUERY_STRING'];
    ?>
    <body>
    </body>
    </html>
    ======= End Example Code ======
    My server prodices this:
    links
    1
    st%C3%BCck=1
    Dreamweaver procuces:
    links
    Notice: Undefined index: stück in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\Ferdl_Live\mytestform2.php on line 10
    stck=1
    On a side note, I was able to get my site code to display the correct pages based on user input in Dreamweaver.  But then the pages do not work on my test or live sever.  Seems DW and my server handles URL encoding differently.  Might try the php boards, may be some ini setting I need to uncomment. 

Maybe you are looking for

  • Installed New RAM, something went wrong after

    OK, so my sister handed down her old iBook G4 to my other sister. After buying 1 GB for the old iBook, it stopped booting and just caught itself up in an endless loop or trying and failing to load the system. So we took out the memory and called it a

  • How do I fix errors in the document I converted from PDF to Word?

    It converted easily but it has all kinds of strange lettters and numbers making it difficul to read.

  • Where to store the url of a webpage for indexing and searching?

    Dear Java gurus, We have a set of html files stroing in a file system. We can use Lucene to index those files with two fields "path" and "content ". Then using Lucene we can search and the result will be the relevant content and its path (path in the

  • Is there a keyboard shortcut to Insert Link?

    So some options like Bold, Underline, Italics have keyboard shortcuts. Has any one figured out a keyboard shortcut to Insert Link? What about Insert Photo? What about a keyboard shortcut for pasting the text in the clipboard in as plain text?

  • Min and NVL with subquery

    Hello, Below is my query                  select  nvl( min(csp.coeficient_value),  (select csp1.coeficient_value                                                              from csp csp1                                                             wh