Getting vector data in tokenizer problem...

the data is something like this
6045992222 black Brown James 0.0 0
6045992100 blue Taylor Elizabeth 3.99 1 1001
6042981234 red Pitt Brad 9.98 0 0
6044956859 dog Spears Brittany 0.0 0
what if the last piece of data is change into vector??like...
6045992222 black Brown James 0.0 [0]
6045992100 blue Taylor Elizabeth 3.99 1 [1001]
6042981234 red Pitt Brad 9.98 0 [1003,1004]
6044956859 dog Spears Brittany 0.0 [0]
how do I write my tokenizer so I can get the vector and save it into a
vector....
for now.. I have something like this...
public Customer(String allData)throws NotFoundException{
  rentals = new Vector(5);
  StringTokenizer tokenizer = new StringTokenizer(allData);
  String token;
  if(tokenizer.hasMoreTokens()){
   phone = tokenizer.nextToken();
   password = tokenizer.nextToken();
   lastName = tokenizer.nextToken();
   firstName = tokenizer.nextToken();
   token = tokenizer.nextToken();
   balance = Double.parseDouble(token);
   token = tokenizer.nextToken();
   numVideos = Integer.parseInt(token);
   if(tokenizer.hasMoreTokens()){
    inputString = tokenizer.nextToken();
    temp = Integer.parseInt(inputString);
    rentals.addElement(new Integer(temp));

You can pass StringTokenizer the characters to use during tokenization. You can include left and right square brackets in that list. Also you can make StringTokenizer send the separators back as part of the token list, if that helps your parsing.
Or, you could use the same tokenizer, so that the final tokens could look like "[0]". Then you could use a second tokenizer to tokenize that token.

Similar Messages

  • BUFFERIMAGE AND VECTOR DATA FILE DRAWING PROBLEM

    THERE IS A VECTOR DATA FILE OF A COUNTRY/REGION OF CERTAIN PORTION. THAT IS FILE CONTAINS ONLY DATA IN (X,Y,Z) FORMAT OR ITS COLOR CODING OR WHAT TYPE OF SHAPE IT IS GIVEN BELOW
    shape: Line, Color: red
    no of vertices: 3
    (234,543,45)
    (34,567,345)
    (76,234,345)
    like above. a vector file exists. file is very heavy with lot of information. one needs to read the file and draw in java.
    My problem is: i am reading the file properly, in paint function i have created BufferedImgae, createGraphics all necessary actions. i have also used rubber binding. using rubber binding when i select few portion of the map i found it is taking
    lots of time to draw. once it is drawn when next time i am using RUBBER BAND SELECTION EXCEPTION occurs saying HEAP OUT OF MEMORY like.
    one more thing if i used affinetransform it is simply zooming completely distorting my map defeating entire purpose.
    how i can solve above problem using bufferedimage such that i can draw vector data file which should be faster when redrawing also using rubber band as well.
    thanks in Advance
    Roy

    I have completely no idea what you mean by rubber banding. But you shouldn't be creating a BufferedImage and parsing a file inside of a gui component's paint function.
    one more thing if i used affinetransform it is simply zooming completely distorting my map defeating entire purpose.AffineTransform is a transformation from one 2D coordinate system to another. It probably wont be as useful in a 3D environment such as your vector data file.

  • Problem getting correct data from MS Access after doing an Update

    Hi all,
    I have a problem getting correct data after doing an update. This is the scenario
    I am selecting some(Eg: All records where Column X = �7� ) records and update a column with a particular value (SET Column X = �c� ) in all these records by going through a while loop. In the while loop I add these records to a vector too, and pass it as the return value.
    After getting this return value I go through a for loop and get each record one by one from the DB and check if my previous update has actually happened. Since No errors were caught while updating DB, I assume all records are updated properly but my record set shows one after another as if it has not been updated. But if I open the DB it is actually updated.
    This does not happen to all records, always it shows like this
    1st record     Mode = �c�
    2nd record     Mode = �7�
    3st record     Mode = �c�
    4nd record     Mode = �7�
    9th record     Mode = �c�
    10th record     Mode = �7�
    I am relatively new to java and this is someone elses code that I have to modify,So I am not sure if there some thing wrong in the code too
    //Here is the method that gets records and call to update and add to vector
    public static Vector getCanceledWorkOrders() throws CSDDBException{
    //Variable declaration
      try {
        objDBConn = DBHandler.getCSDBCon();
        strSQL  = "SELECT bal bla WHERE [Detailed Mode])=?)";
        objStmt = objDBConn.prepareStatement(strSQL);   
        objStmt.setString(1, '7');
        objWOPRs = objStmt.executeQuery();
        while (objWOPRs.next()) {
         //Add elements to a vector by getting from result set
          //updating each record as PROCESSING_CANCELLED_WO(c)
          iRetVal = WorkOrderDetailingPolicy.updateRecordStatus(objPWODP.iWorkOrderNumber, objPWODP.strPersonInformed, EMSConstants.PROCESSING_CANCELLED_WO);
          if (iRetVal == -1) {
            throw new NewException("Updating failed");
      catch (Exception e) {
        vecWONumbers = null;
        throw new CSDDBException(e.getMessage());
      }finally{
        try {
          objWOPRs.close();
          objStmt.close();
          DBHandler.releaseCSDBCon(objDBConn);
        catch (Exception ex) {}
      //return vector
    //here is the code that actually updates the records
    public static int updateRecordStatus(int iWONumber, String strPerInformed , String strStatus) throws CSDDBException{
       PreparedStatement objStmt = null;
       Connection objDBConn  = null;
       String strSQL = null;
       int iRetVal = -1;
       try{
         objDBConn  = DBHandler.getCSDBCon();
         objDBConn.setAutoCommit(false);
         strSQL = "UPDATE Table SET [Detailed Mode] = ? WHERE bla bla";
         objStmt = objDBConn.prepareStatement(strSQL);
         objStmt.setString(1, strStatus);    
         objStmt.execute();
         objDBConn.commit();
         iRetVal = 1;
       }catch(Exception e){
         iRetVal = -1;
       }finally{
         try{
           objStmt.close();
           DBHandler.releaseCSDBCon(objDBConn);
         }catch(Exception ex){}
       return iRetVal;
    //Here is the code that call the records again
      public static WorkOrderDetailingPolicy getWorkOrders(int iWorkOrderNo) throws CSDDBException{
        Connection objDBConn = null;
        PreparedStatement objStmt = null;
        ResultSet objWOPRs = null;
        WorkOrderDetailingPolicy objPWODP = null;
        String strSQL = null;
        try {
          objDBConn = DBHandler.getCSDBCon();    
          strSQL = "SELECT * FROM [Work Order Detailing] WHERE [Work Order No] = ?";
          objStmt = objDBConn.prepareStatement(strSQL);
          objStmt.setInt(1, iWorkOrderNo);
           objWOPRs = objStmt.executeQuery();
          if (objWOPRs.next()) {
            objPWODP = new WorkOrderDetailingPolicy();
            objPWODP.iWorkOrderNumber = objWOPRs.getInt("Work Order No");
            //......Get Record values
        catch (Exception e) {
          objPWODP = null;
          throw new CSDDBException(e.getMessage());
        }finally{
          try {
            objWOPRs.close();
            objStmt.close();
            DBHandler.releaseCSDBCon(objDBConn);
          catch (Exception ex) {}
        return objPWODP;
      }

    Hello,
    Can you put an example of your problem online?
    Are you sure you're not having problems with case sensitive data?
    Thanks,
    Dimitri

  • Save as EPS - Include Vector Data - Printing problems

    Hey everyone
    I'm having an issue with PDFs that I send to a specific newspaper and only them. The problem only occurs in the vector data that is saved in the EPS to be distilled.
    Here's an overview of my workflow
    *Build ad in Photoshop CS3
    *Save EPS with Preview:Macintosh(8Bits);Encoding: ASCII85; Include Vector Data; all other options not checked
    *Distill EPS to Press Quality PDF
    *Send to newspaper
    The problem looks like their RIP is choking on the vector data (primarily text) in the ad. It appears to start to print the text and then just stops or prints a bunch of garbage where the text should be.
    I have their in-house Distiller settings and use those now instead of Press Quality. This should rule out any problems with the Distiller settings.
    I send dozens of PDFs a week to multiple publications and only have trouble with this one. Is it possible that the "Preview" and/or "Encoding" in the EPS is the problem? Any suggestions what the bare bones settings should be for "Preview" and "Encoding" for the EPS? I want to keep the Vector Data b/c the outputted text remains crisp.
    Thanks!

    I agree with Mike.
    A lot of newspapers are not making a lot of profit and, as a result, may not have up-to-date RIPs. This is demonstrated by your statement that this is the only publication you have problems with.
    If your only concern is file size, know that either way, you're dealing with small files. Try the direct-from-Photoshop route with the paper and see what happens. Get the production guru at the paper to work with you on solving the problem.
    Also, what happens if you Distill the file as an industry-standard PDF/X-1a file. If you see that the file is compliant, you shouldn't have a problem.
    Neil

  • Problem Using HTTP Dispatcher -- Could Not able to get the data in JSP

    Hi, I am using HTTP Dispatcher to send my events to particular URL which is a JSP page. I am trying to populate the received event through URL and populate to a oracle data base. But could not able to get the data in Oracle database.
    Code is :
    <h1>JSP Page</h1>
    <%
    long type = 0;
    String tagId = null;
    String timeStr = "0";
    String deviceName = "";
    // Get Event Parameters
    // Available Parameters: id, siteName, deviceName, data, time, type, subtype, sourceName, correlationId
    try
    type = Long.parseLong(request.getParameter("type")); // Get type
    tagId = request.getParameter("id"); // Get tagId
    timeStr = request.getParameter("time"); // Get time
              deviceName = request.getParameter("deviceName");
    catch (Exception e)
    out.println( "Error: "+e.getMessage() );
              // Write into DB.
              try {
              if ((tagId == null) || (type != 200) ){
                   // Do Nothing
                   //return;
              } else {
                   OracleDataSource ods = new OracleDataSource();
                   String URL = "jdbc:oracle:thin:@//3.235.173.16:1525/vislocal";     
                   ods.setURL(URL);
                   ods.setUser("cus");
                   ods.setPassword("cus");
                   Connection myConn = ods.getConnection();     
                   Statement stmt = myConn.createStatement();
                   String selectQuery =
                             "SELECT MAX(rfid_raw_reads_id) as max_id FROM "+
                        "cus.rfid_raw_reads ";
                   ResultSet rs = stmt.executeQuery(selectQuery);
                   String maxId = "1";
                   if (rs.next()) {
                        maxId = rs.getString(1);               
                   String selectMaxTagIDQuery =
                             "SELECT MAX(rfid_raw_reads_id) as max_id FROM "+
                        "cus.rfid_raw_reads WHERE tag_id = '" + tagId + "'" ;
                   stmt = myConn.createStatement();
                   rs = stmt.executeQuery(selectMaxTagIDQuery);
                   String maxTagId = "1";
                   if (rs.next()) {
                        maxTagId = rs.getString(1);               
                   long primaryKey = 1;
                   long tagKey = 1;
                   try {
                        primaryKey = Long.parseLong(maxId) + 1;
                        tagKey = Long.parseLong(maxTagId) + 1;
                   } catch (Exception e) {
                   long currentTime = System.currentTimeMillis();
                   long updateKey = (tagKey - 1);
                   String updateQuery = " UPDATE cus.rfid_raw_reads SET read_end_time = " + currentTime + " WHERE rfid_raw_reads_id = " + updateKey;
                   Statement updateStmt = myConn.createStatement();
                   updateStmt.execute(updateQuery);     
                   String query =
                        "INSERT INTO cus.rfid_raw_reads (rfid_raw_reads_id, tag_id,device_name,read_start_time) VALUES ("+ primaryKey + ",'" + tagId + "'," + deviceName + "'," + System.currentTimeMillis() + " )" ;
                   Statement insertStmt = myConn.createStatement();
                   insertStmt.execute(query);     
                   myConn.commit();
                   myConn.close();
              } catch (Exception e) {
    %>
    <p>For browser debug:
    <%
    out.println( "Type="+type+" ID="+tagId +" time="+timeStr );
    %>
    Kindly suggest where is the problem...
    Thanks and regards
    Mohammad Nasim Akhtar

    HI Prabhat,
    Thanx for your reply, I worked out and able to receive the data in oracle database, Actually there was some problem in insert Query. Now I have tested the same... and able to edit the same in the Database.....
    But I am facing a new problem, Http Dispatcher in SES console is displaying all the Events generated as well as event in Que but there is no events in the Event Send. I guess it is not able to send the events.....?????
    Event statical is showing like this
    Events Received: 0 (0.00/sec)
    Events Generated: 311 (0.19/sec)
    Events Sent: 2 (0.19/sec)
    Queued Events: 309 (0.19/sec)
    Kindly suggest where is the problem, Is it a JSP problem or OSES end problem.....
    Thanks and regards
    Nasim

  • The problem here is i am not able to get the data from the list

    hi all,
    i have the following code
    EnrichedProductCatalogue enrichedProductCatalogue1 = new EnrichedProductCatalogue();
    enrichedProductCatalogue1.setAssetCount(2);
    enrichedProductCatalogue1.setBlockingProduct("Weekend Freebee");
    enrichedProductCatalogue1.setBlockingReason("Compatability");
    ArrayList<String> availableActionsList = new ArrayList<String>();
    availableActionsList.add(EnrichedProductConstants.ADD.toString());
    availableActionsList.add(EnrichedProductConstants.REMOVE.toString());
    enrichedProductCatalogue1.setAvailaibleActions((ArrayList<String>)availableActionsList);
    BundleProduct bundleProduct = null;
    Product product = new Product();
    product = new Product();
    product.setProductName("International");
    product.setProductClassName("International");
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);
    bundleProduct = new BundleProduct();
    bundleProduct.setCommercialProduct(product);
    enrichedProductCatalogue1.setBundleProduct(bundleProduct);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    here i have an list called listOfEnrichProducts.
    here i am adding two objects of enrichedProductCatalogue.
    which contains a object called BundleProduct.
    which has a reference for Product class.
    here this product class has a list which contains objects of another class called UiCategory.
    the problem here is i am not able to get the data from the list which contains UiCategory objects .
    the following is the UI
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{pageFlowScope.sample1}"
    binding="#{pageFlowScope.sampleManagedBean.dataTable}"
    partialTriggers="apimethods ::apimethods">
    <af:column sortable="false" headerText="ProductName" id="c2">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productName}" id="ot15"/>
    </af:column>
    <af:column sortable="false" headerText="ProductClass" id="c12">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productClassName}" id="ot19"/>
    </af:column>
    <!--
    <af:column sortable="false" headerText="UICategoryName" id="c32">
    <af:forEach var="item" items="#{row.bundleProduct.commercialProduct.uiCategory}" >
    <af:outputText value="#{item.categoryName}" id="ot119"/>
    </af:forEach>
    </af:column>
    -->
    <af:column sortable="false" headerText="AssetCount" id="c22">
    <af:outputText value="#{row.assetCount}" id="ot1"/>
    </af:column>
    <af:column sortable="false" headerText="blockingReason" id="c3">
    <af:outputText value="#{row.blockingReason}" id="ot2"/>
    </af:column>
    <af:column sortable="false" headerText="blockingProduct" id="c4">
    <af:outputText value="#{row.blockingProduct}" id="ot3"/>
    </af:column>
    <!--<af:column sortable="false" headerText="availaibleActions" id="c1">
    <af:commandButton text="#{row.availaibleActions}" id="cb1"
    actionListener="#{pageFlowScope.sampleManagedBean.callAction}"
    partialSubmit="true">
    <af:setPropertyListener from="#{row.availaibleActions}"
    to="#{pageFlowScope.avalibleaction}" type="action"/>
    </af:commandButton>
    </af:column>-->
    </af:table>
    Can anyone pls give some solution ...

    Hi Frank,
    value="#{pageFlowScope.sample1}"
    here sample is
    Map<String, Object> flowScope1 =
    ADFContext.getCurrent().getPageFlowScope();
    flowScope.put("sample1", listOfEnrichProducts);
    this is not the problem . i am able to get all the values except the following .
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);

  • XML..: Problem getting the data in the XML-file..

    I'm developing a flash-file for my customer to use when
    displaying list of products he's selling.
    His list of products is inside a XML-file and he want me to
    display an overview of the products inside a datagrid, so when you
    click on the product you're interested in the productinfo will be
    displayed.
    But.. I'm having problems grabbing the data I want as it
    seems to me that I have to use the unik ID's for each products to
    get the data I want. I've tried adding the unik ID-code to my
    action script but it still won't work.
    Here's a part of the XML-code:
    <Tooldata>
    <Store name="N/A" zipcode="0033450" city="N/A" url="N/A"
    phone="N/A" fax="N/A" email="N/A">
    <Tool unikID="5_0022" control="14" cmnd="update">
    <Toolgroupe>Hammer</Toolgroupe>
    <Brand>Knipps</Brand>
    <Model>K55_Knipps</Model>
    <Price>35€</Price>
    <Weight>N/A</Weight>
    <Soldout>0</Soldout>
    <Color>Red/Black</Color>
    <Images>
    <Images image="5_0022.jpg" prioritet="1" gen_id="16"
    desc="MainImage"/>
    <Images image="5_0022_1.jpg" prioritet="2" gen_id="16"
    desc="Image 1"/>
    <Images image="5_0022_2.jpg" prioritet="3" gen_id="16"
    desc="Image 2"/>
    <Images image="5_0022_3.jpg" prioritet="4" gen_id="16"
    desc="Image 3"/>
    </Images>
    Now, the code above is only one item/product. But there are
    several proucts listed in the XML-file and I find it hard to get
    the product and the product info that I want to be displayed.
    Here's my action script:
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("ToolData.xml"));
    function LoadXML(e:Event):void {
    xmlData = new XML(e.target.data);
    ParseBildata(xmlData);
    function ParseTooldata(TooldataInput:XML):void {
    trace("XML Output");
    trace("------------------------");
    trace(TooldataInput.Store);
    If I want to trace the images I just write
    "trace(TooldataInput.Store.Images);
    But if I want to trace one unik tool it's impossible. Well,
    maybe not impossible.. I just don't know how to do just that.
    When you trace (TooldataInput.Store); you get all the tools
    at that store. But how do I trace only one tool using the unikID??
    Thanks a lot in advance!

    Ace,
    When using E4X if you have multiple nodes at the same level
    you should be able to access them as an XMLList. Looking at your
    XML you should be able to access each <Tool> node as:
    TooldataInput.Store.Tool[0];
    TooldataInput.Store.Tool[1];
    or as an entire list
    TooldataInput.Store.children()
    WL

  • Problem in getting EXCEL data using I_OI_SPREADSHEET

    Hello All,
    My requirement is to read data from Excel document having multiple worksheets. I am successful in getting all worksheets in the excel using the method spreadsheet->select_sheet.
    Now I face problems while using spreadsheet_get_ranges_data. I dont have any range to select from the worksheets. When my program executes contents internal table which is importing paramater from get_ranges_data method is not getting me data from EXCEL.
    Can you please give me hint or solution to solve this issue.
    Best Regards,
    Krishna
    [email protected]

    Hello Norman,
    Thanks for your response. But the solution is not really working for my case.
    Step1: call class method spreadsheet->select_sheet
    Step2: call class method spreadsheet->get_active_sheet
    Step3: call class method i_oi_document_proxy->select_all
    Step4: call class method spreadsheet->get_selection
    Step5: Call class method spreadsheet->insert_range_dim
            passing parameters selected from step 2.
    But the problem is parameters (top,left,rows,columns) values supplied in step 3 is not giving me correct rows,columns that is in my EXCEL worksheet.
    I have 3 rows and 3 columns, but I get 1 row and 1 column and 26 as top.
    Let me know whether I am doing anything wrong in my calls to class?!.
    Best Regards,
    Nagendra Krishna
    [email protected]

  • I have just reinstalled Adobe Acrobat X1 and I can't save any PDF's that are emailed to me. I just get "This document could not be saves. There is a problem reading this document (21)" and then when I click OK i get "insufficient data for image"  Help!

    I have just reinstalled Adobe Acrobat X1 and I can't save any PDF's that are emailed to me. I just get "This document could not be saves. There is a problem reading this document (21)" and then when I click OK i get "insufficient data for image"  Help!

    More information about this issue can be found here:
    https://forums.adobe.com/thread/1672655
    A "quick" fix that worked for me was to uninstall Adobe... then download the base install for Adobe Reader 11.0.
    Then download each of the individual updates and run them sequentially. 
    I've installed back up to the last security update which is version 08 and have been able to do normal Save As operations.
    You will have to disable automatic updates in order to stay at version 08 until Adobe resolves this issue in a later release.
    http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows
    Adobe Reader 11.0 - Multilingual (MUI) installer    AdbeRdr11000_mui_Std
    Adobe Reader 11.0.01 update - Multilingual (MUI) installer    AdbeRdrUpd11001_MUI.msp
    Adobe Reader 11.0.02 update - All languages    AdbeRdrSecUpd11002.msp
    Adobe Reader 11.0.03 update - Multilingual (MUI) installer    AdbeRdrUpd11003_MUI.msp
    Adobe Reader 11.0.04 update - Multilingual (MUI) installer    AdbeRdrUpd11004_MUI.msp
    Adobe Reader 11.0.05 security update - All languages    AdbeRdrSecUpd11005.msp
    Adobe Reader 11.0.06 update - Multilingual (MUI) installer    AdbeRdrUpd11006_MUI.msp
    Adobe Reader 11.0.07 update - Multilingual (MUI) installer    AdbeRdrUpd11007_MUI.msp
    Adobe Reader 11.0.08 security update - All languages    AdbeRdrSecUpd11008.msp

  • Problem in getting current Date at runtime and parsing into my own format

    Hi all,
    In my program....I want to get the Date(current Date).......
    How can I get it....
    And also I want it to change it to my own format.....
    I should get this at runtime....
    Plz tell me which class and method to use....
    Any help will be greatly appreciated...
    Thanks,

    Try looking at some of these articles:
    http://www.javaworld.com/javaworld/javaqa/2001-10/01-qa-1005-dateformat.html
    http://www.javaworld.com/jw-12-2000/jw-1229-dates.html
    http://www.javaworld.com/javaworld/jw-03-2001/jw-0330-time.html

  • Problem with getting current date and time using oracle.jbo.domain.Date

    I`d like to get current date and time using oracle.jbo.domain.Date method getCurrentDate(), but it always return current date and 12:00:00. I also need to get the current time.

    I think you should use java.sql.Timestamp domain.
    (And set database type to TIME or DATETIME.)
    Jan

  • Problem in getting the Date object based on the TimeZone

    Hi,
    I need to create a Date object that holds the time of the specified TimeZone.
    I am using TimeZone and Calendar object for that, but when I call the Calendar object's getTime() method, it returns
    a Date object that holds the local time.
    Can somebody let me know what why?
    Here is what I uses in my code.
    TimeZone tz = TimeZone.getTimeZone("IST");
    Calendar cal = new GregorianCalendar(tz);
    System.out.println("Date of "IST" TimeZone = " + cal.getTime());
    Instead of cal.getTime, if I do the following I am getting the values correctly.
    int month = cal.get(Calendar.MONTH); // 0..11
    int day = cal.get(Calendar.DATE); // 0..11
    int hour12 = cal.get(Calendar.HOUR); // 0..11
    int minutes = cal.get(Calendar.MINUTE); // 0..59
    Can somebody let me know why I am not able to assign the Date of the TimeZone specified.
    Is there anything wrong with the code?
    Seb

    Is there anything wrong with the code?No, only with your understanding of the Date class. From the API:
    The class Date represents a specific instant in time, with millisecond precision.
    The different time displayed for different TimeZones around the world are just that: a display format for the same instant in time.
    To display the "instant in time" in a different TimeZone, use DateFormat. Here's a small sample:TimeZone tz = TimeZone.getTimeZone ("GMT");
    Calendar c = Calendar.getInstance (tz);
    System.out.println(c.getTime ()); // prints Tue Mar 18 02:56:53 IST 2008
    DateFormat dtf = DateFormat.getTimeInstance ();
    dtf.setTimeZone (tz);
    System.out.println(dtf.format (c.getTime ())); // prints 9:26:53 PMIt's no different from formatting the same number in various ways: 10 decimal == 0xA hexadecimal == 012 octal == 1010 binary. Same value, different representation. Same intant in time, different local time for each zone.
    Savvy?
    cheers, db

  • Having issues with picture messaging get told to go to settings, then general, then network then cellular  data network. my problem is there is no such option my  phone is a 3gs

    having issues with MMS messaging instruction for setup,  are to gotto settings, then general, then network then cellular data network.My problem is there is no cellular data network optiion on this page have tried resetting phone , no good .Help.

    That option does not exist depending on who the carrier is.
    Who is the carrier?  Are they a supported carrier?
    Have you tried Settings > General > Reset > Reset Network Settings?

  • How to get the data from a jtable with random order??

    hi everyone,
    i have a jtable i filled with Strring and Float data, i put this data to a MySQL database, and i use vectors and iterators to filled the database. the problem is there are some cells that are empty, and the Floats' columns throws me nullpointerexceptions.
    please if anyone know how to avoid that exception i'd would be great.
    thanks for your time.

    HI Siggi,
    Thank you for your reply..
    I am also planning to do FM to get the data. But it is saying that the Cluster table ZES does not exist (ZES is the the standard table, in SE11 also).
    How can I use the Fields from the that table.?
    What can I do now, can you please explain me about this point.
    Waiting for your reply.
    Thanks and Regards
    Rajesh
    Message was edited by:
            rajesh

  • Hw can I generate XY graphs directly in a vector data format for printing ie pdf

    A further question re. Printing of Graphs
    There are many similar questions but none where the answers are acceptably adiquite or two or three were the link was broken,
    "Developer exchange forums have been moved" and a pointer to the new
    site, unfort it was hard to find or guess the rest of the link.
    So here is my angle on this problem;
    So far I have tried;
    Using property node: "App.  Printing.Default Printer" to select the printer to use, then
    Using Report Functions to print controls;
    New Report, to generate a new report reference
    Set Report Orientation
    Set Report Margins
    Set Report Font
    Set Report Header Text
    Set Report Font
    Set Report Footer Text
    loop for each page
    Set Report Footer Text,     With page number
    Append Control Image to Report,      several times
    New Report Page
    Until the end of the last page
    Print Report
    Dispose Report
    Initially using existing XY-Graph controls from the front panel.  These
    are on a page of a Tab control to hide these controls while not in use
    and allow them to be hidden while generating the printout. 
    Unfortunately when this page is hidden any graph scales set to
    autoscale don't, (normally don't need to and would otherwise be a waste
    of processor time), resulting in graph plots going off scale or
    becoming a line along the axis.
    An issue is that what is printed appears to be read from the screen, so resolution is much
    lower than required for for printing, resulting in rather pixellated
    printed versions. These prints will usually be emailed, so tried the
    pdf995 "printer driver" but the resulting pdf file size is rather large.
     Currently trying Plot-XY on a much larger picture so as to get
    adequate resolution for printing, however suspect this will result in
    much larger pdf files and probably cause other problems. 
    The preferred solution in this case will probably be to generate print
    output, instead of based on raster images (ie jpg or png), but on a
    vector format, maybe via postscript or directly in pdf format.
    Similar graphs currently printed from Excel via pdf995
    (or OpenOffice) result in files around 20 kb per page. these can be printed at any size
    (at least upto 64 times) without becoming pixellated, so assume these
    are vector based.
    Currently a page with 4 XY Graph controls uses around 40 to 45 kb per
    page but resolution is poor and overcoming that may push file size up
    to 150 to 200 kb per page, and the whole job can be 50 to 100 pages.
    Are there any functions to generate XY graphs directly in a vector data format preferably in pdf or via PostScript format.
    Cheers
    Darryl

    Hi Darryl,
    I was able to reproduce the issue you were seeing, in which a report generation was taking up a large amount of space per page in a PDF utility. I found; however, using my attached VI (notice that it is set to *.png) and the CutePDF utility (free download at http://www.cutepdf.com/) I was able to get a per page size of about 10 KB. Also using the png I found that the image quality seemed to be quite high.
    Please try incorporating this solution into your application and see if it reduces your file sizes.
    Thanks and have a good evening!
    Cheers,
    Jonah
    Applications Engineer
    National Instruments
    Jonah Paul
    Marketing Manager, Embedded Software
    Evaluate the LabVIEW RIO Platform! - ni.com/rioeval
    Attachments:
    print_XY Graph.vi ‏23 KB

Maybe you are looking for