Calculating length

is it possible to calculate the lenght of a variable excluding the space?
Eg variable ='12345 ';
How do i get the lenght of the varible , excluding the
spaces after the numbers?
meaning i only want to calculta the lenght until number 5.

Hi,
Look at the example below....
create table t
(n varchar2(10));
insert into t values ('abc');
insert into t values ('pkr ');
select n,length(n) from t;
N LENGTH(N)
abc 3
pkr 7
select n,length(trim(n)) from t;
N LENGTH(TRIM(N))
abc 3
pkr 3
Hope this solves your problem....
Regards.

Similar Messages

  • Calculating Length of Service - Splitting out the months from the years

    Hi folks,
    I was wondering if anyone might have the answer to a little employee length of service conundrum. I'm trying to construct a calculation that will calculate an employee's length of service in whole Years worked only. I also need to produce a second calculation to calculate length of service in whole months worked only but with the whole years worth of months deducted from it.
    For example if a persons hire date is 05-Feb-2001 the two calculations would return:
    Length of service Years 7
    Length of service Months 6
    The following calc will generate length of service as a decimalised number:
    MONTHS_BETWEEN(SYSDATE,Hire Date) /12
    So for my example person I get 7.64 years.
    I need to somehow round this down to the nearest 1 to get whole years service. I cannot use the ROUND function because it rounds to the nearest, so when a number is n.5 or higher it'll round up and will only round down when the number is n.49 or lower. grrr.
    My next mission is to work out months service based on whats after the decimal place. If I could round the Length of service Years down I think I could achieve this. I would just do:
    ROUNDDOWN(((MONTHS_BETWEEN(SYSDATE,Hire Date) /12) - (+ROUNDDOWN+(MONTHS_BETWEEN(SYSDATE,Hire Date) /12))*12)
    ROUNDOWN being my non-existent function!
    Any advice on this is greatly appreciated.
    Lloyd

    Hi,
    TRUNC is the function I always use to round down. It is more flexible than FLOOR as you can use it to round down to a number of decimal places.
    You should also understand that Oracle's definition of MONTHS_BETWEEN does not meet everyones expectations. For example MONTHS_BETWEEN('28-JAN-2001', '28-FEB-2001') is exactly 1 so is MONTHS_BETWEEN('31-JAN-2001', '28-FEB-2001') unless it is a leap year when it is slightly less. That's because Oracle treats the last day of the month as different when it calculates the months between 2 dates.
    Rod West

  • Calculating length of a number field

    Hello,
              I have a DESKI report containing a column named 'Mobile number', which is a numeric field. I want to calculate the lenght of the mobile number. However, since it is a numeric field (in the universe itself), I cannot use the 'Length' fuction, since the 'Length' function can only be used on characters. Neither there is any function like 'ToText' in DESKI, which can be used to convert numeric values to text. Thus, any suggestion for achieving the above described requirement, would be greatly appreciated.
    Best Regards,
    Alok.

    This works for me:
    Create a dimension variable called ToString which converts the telephone number to a string:
    =<Telephone Number> + ""
    Create another variable which retrieves the length of this new string dimension:
    =Length(<ToString>)
    Cheers,
    Fritz

  • Calculating length of iphoto slide show

    I've created an album with 82 photos which will each display for 3 seconds. I now want to create a slideshow with a playlist of 2 or 3 songs for the background. If my math is correct, I need a soundtrack that plays for 246 seconds (82 x 3. I don't have a stopwatch to measure the actual time of the slideshow but does my estimate include the time necessary for transitions from one slide to the next? Also, is there another way to get the actual time from the program? I've poked around in I iphoto but can't find any info.
    Thanks

    scott:
    If you have a watch with a second hand just do a rough test, starting when the hand is at 12. That will be close enough to let you create the playlist within a few seconds. I always add a blank slide at the end so the music will trail off to a black screen. That can buffer any differences in playing time and playlist time.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Unencrypted password length vs. Encrypted password length

    Hi,
    Can anybody share the formula to get the resulting String length of an encrypted password.
    For example: how long will the encrypted String be given a 5 letter unencrypted password?
    Will this change across different algo? e.g. MD5/SHA1 and two way hash...
    Need this to make sure the database field is of the correct size for the encrypted password...
    based on prior experience, the resulting encrypted String is always longer than the inputted password but I cannot find a reference stating the formula...
    Thanks in advance

    A few things to keep in mind:
    1) Do not think of Strings when you are using cryptography. Always think in byte buffers (byte[]). Strings can perform implicit character conversions that will mess up your encryption (and decryption).
    2) Do you really need to encrypt the password? Most password files are simply hashed. You can go one step better by adding 'salt' prior to taking the hash.
    As for calculating lengths, it depends on the algorithm. But in all likelihood, rather than trying to calculate the exact, expected size, just make the database field larger. (I know, sloppy programming, but space is cheap, especially for storing a password).
    - Saish
    "My karma ran over your dogma." - Anon

  • Length () error !!!

    Hi
    when i clicked an exit button inside ActionListener the program will automatically quits...
    Ok , i add a JTextArea in main function did so...
    String textenter = textarea.getText();  //textarea object of JTextArea
    int len = textenter.length(); i calculates the length of textarea...
    and when user clicks exit button..
    class ExitListener implements ActionListener
         public void actionPerformed(ActionEvent evtexit)
              if(len >=1)
              System.out.println("Success " + len);
         }But i am getting errors its not calculating length at runtime....
    Would anybody help me...

    if you really want to use the len variable
    then you should create the object with the len as:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.JTextArea;
    public class Pad
    static JFrame frame;
    static JMenuBar menuBar;
    static JPanel panel;
    static JTextArea textarea;
    //main
    public static void main(String args[])
         frame = new JFrame();
         frame.setTitle("Pad");
    //menubar
         menuBar = new JMenuBar();
    //menu
         JMenu file = new JMenu("File");
         menuBar.add(file);     
         JMenuItem exit = new JMenuItem("Exit");
         textarea = new JTextArea(35,30);
         textarea.setText("He testing...");
         file.add(exit);
         panel = new JPanel();
         panel.add(textarea);
        String textenter = textarea.getText();
        int len = textenter.length();
         frame.getContentPane().add(panel);
         frame.setJMenuBar(menuBar);
         frame.setDefaultCloseOperation(3);
         frame.pack();
         frame.setVisible(true);
         frame.setSize(500,300);
    //exit button
         ExitListener exobj = new ExitListener();
         exobj.setLen(len);
         exit.addActionListener(exobj);
    class ExitListener implements ActionListener
         private int len;
    public void actionPerformed(ActionEvent evtexit)
         if(len >=1)
         System.out.println("Success " + len);
         System.exit(0);
    public int getLen() {
         return len;
    public void setLen(int len) {
         this.len = len;
    }you can change the variables of EXitListenerObject
    ayberk cansever

  • Create a table calculating amount of days in InfoPath form

    Hello,
    I am creating an InfoPath form and I want to have a table that will calculate the days needed to complete a project, it will allow the user to enter start dates and end dates and as that happens one row will have the calculated length of days it will take
    to complete based on use input and it would be real-time so no need to manually press a button to update.
    Here is my table for example:
    The first row will be the row that has the Total project time with the start time and end time based on user input.
    Is this something that can be done in InfoPath without any code? I am unable to use code so unfortunately that isn't an option.

    Hi compuluv,
    Based on your description, my understanding is that you want to Calculate the length between two date picker controls in InfoPath using rules and formulas - no code!
    Use rules, conditions, and the number(), floor(), and
    substring()   functions in formulas to calculate the difference between two date picker controls in InfoPath.
    Here is an article about it, you can use as a reference:
    http://www.bizsupportonline.net/infopath2007/calculate-date-difference-infopath-rules-formulas.htm
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Lisa Chen
    TechNet Community Support

  • Help with ORA-01403: no data found please.

    First off I'd like to apologise for my lack of PL/SQL experience, what follows may seem naive, but I guess we all have to start somewhere.
    I'm trying to create a function which determines an employee's Annual Holiday Entitlement by comparing their length of service against a lookup of entitlement values. Due to the complexity of the application I'm targeting there are a number of other factors to be take into consideration, but this is the basic idea of what I want to achieve.
    I've started by taking a working SQL Server 2005 function and converted this using the translation scratch pad in SQL Developer 1.5.1 I'm now hand cranking the subtleties into the script but when I debug the code I'm getting "ORA-01403: no data found" at almost every SELECT. In fact the only successful select is from the ABS_SYSTEM_CONTROLS table. I can handle the first few failures by setting default values in the variables that I'm trying to load, but this isn't an option when it comes to selecting the DATE_OF_START from the PERSON table.
    I've sure I've probably made some fundamental error, but can't spot it myself. Any help would be most welcome.
    I've included the entire script below for your entertainment ;-)
    Thanks
    Phil.
    create or replace
    function mygetannualholidayentitlement
    ( v_empNo in varchar2
    , v_inputDate in DATE
    ) return number as
       -- Declare variables here
       v_entitlement FLOAT(53);
       v_holidayPlan VARCHAR2(20);
       v_contServiceOption VARCHAR2(255);
       v_postNo CHAR(16);
       v_lengthOfService NUMBER(10,2) ; -- Need to give this a default value else the CURSOR (below) won't initialise.
       v_empStartDate DATE;
       -- Load up our loacal variable for each row in the loop and the final value is the one we want.
       v_selectedLOF FLOAT(53);
       v_selectedDateEffective DATE;
       v_selectedAmount FLOAT(53);
       v_effectiveDate DATE;
       -- Cursor declaration
       -- Holiday plan details are also keyed on DATE_EFFECTIVE.  Need to identify which row is active as at our @effectiveDate.
       CURSOR holDefCursor
         IS SELECT length_of_service,
       date_effective,
       amount
         FROM holiday_plan_def
          WHERE hplan_code = v_holidayPlan
         AND length_of_service < v_lengthOfService
         ORDER BY date_effective ASC,
       length_of_service ASC;
    BEGIN
       -- Initialise variables --
       -- truncate any hours/Mins & secs from effective date
       v_effectiveDate := trunc(v_inputdate);
       v_entitlement := 0;
       v_contServiceOption := 0;
       v_lengthOfService := 0;
       BEGIN
       SELECT HPLAN_CODE
         INTO v_holidayPlan
         FROM APPT_HOLIDAY_BALANCE
          WHERE emp_no = v_empNo
                  --          post_no = @postNo and
                  AND ( v_effectiveDate BETWEEN HOLIDAY_YEAR_START AND HOLIDAY_YEAR_END );
       EXCEPTION
       WHEN NO_DATA_FOUND THEN
          v_holidayplan:=NULL;
       WHEN OTHERS THEN
           raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
       END;
       -- Still no hoildayPlan? Then use the default plan code from ABS_SYSTEM_CONTROLS.
       IF v_holidayPlan IS NULL THEN
          SELECT HPLAN_CODE
            INTO v_holidayPlan
            FROM ABS_SYSTEM_CONTROLS ;
       END IF;
       BEGIN
        SELECT OPTION_VALUE
          INTO v_contServiceOption
          FROM PS_OPTIONS
           WHERE OPTION_NAME = 'CONTINUOUS_SERVICE_OPTION';
       EXCEPTION
       WHEN NO_DATA_FOUND THEN
          v_contServiceOption := 'N' ;
       WHEN OTHERS THEN
           raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
       END;
       IF v_contServiceOption = 'Y' THEN
       BEGIN
          -- Need to take into account the employees CONTINUOUS_SERVICE_DATE when calculating length of service
          BEGIN
          SELECT CONTINUOUS_SERVICE_DATE
            INTO v_empStartDate
            FROM person
             WHERE emp_no = v_empNo;
          EXCEPTION  
            WHEN NO_DATA_FOUND THEN
              v_empStartDate := NULL;
            WHEN OTHERS THEN
              raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
          END;
          -- If we can't get a CONTINUOUS_SERVICE_DATE we will fall back to PERSON.DATE_OF_START
          IF v_empStartDate IS NULL THEN
          BEGIN
             SELECT DATE_OF_START
               INTO v_empStartDate
               FROM PERSON
                WHERE emp_no = v_empNo;
          EXCEPTION  
            WHEN OTHERS THEN
              raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
          END;
          END IF;
       END;
       ELSE
       BEGIN
          -- Need to use employees DATE_OF_START when calculating length of service
          SELECT DATE_OF_START
            INTO v_empStartDate
            FROM PERSON
             WHERE emp_no = v_empNo;
       END;
       END IF;
       -- Now we can get length of service
       v_lengthOfService := sqlserver_utilities.datediff('MONTH', v_empStartDate, v_effectiveDate) / 12.00;
       OPEN holDefCursor;
       FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
       WHILE ( sqlserver_utilities.fetch_status(holDefCursor%FOUND) = 0 )
       LOOP
          BEGIN
             IF v_selectedDateEffective < v_effectiveDate THEN
                v_entitlement := v_selectedAmount;
             END IF;
             -- Get the next value.
             FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
          END;
       END LOOP;
       CLOSE holDefCursor;
       -- Return the result of the function
       RETURN v_entitlement;
    END;Edited by: user4395499 on 27-Oct-2008 04:04
    Edited by: user4395499 on 27-Oct-2008 04:05
    Edited by: user4395499 on 27-Oct-2008 07:10

    Your code is extremely procedural - whilst you could ultimately get it to work like this, it is not the most efficient way of doing it.
    You should think about reducing your code to one sql statement if at all possible - this reduces the amount of context switching that needs to take place (eg. Going from PL/SQL to SQL back to PL/SQL to SQL, etc) and is usually much easier to maintain and test. You could do this by joining the various tables together, (and you might want to think about using nvl() to combine the two queries on the PERSON table!).
    Also, you've labelled your parameters "v_" and your variables "v_" ... common convention uses "p_" for parameters, to allow for easy distinction between parameters passed in and variables declared during the course of the procedure/function.
    As to the char() defined column - is there any chance that you could change that? As you've found out, chars are usually not a good datatype to use! Storing numbers in a char/varchar2 column is a no-no too, as you then run the risk of having invalid numbers stored in the column.

  • Report to know an employees service in a company

    Dear All,
    Is there any standard report to see the seniority level of the employees in a compay?
    We store an employees date of joining in IT0001, can we get his total year of service in any report.
    Can we sort the company employees by year of service (seniority) ?
    Regards
    ET

    Hi,
    The report displays the values if the corresponding configuration is maintained.
    If you have set up "Calculation of Employment Period" in the Implementation Guide (IMG), and if table T77S0 contains the entry SENI with group ADMIN and semantic abbreviation LORSV, the system calculates the value according to your Customizing for calculating length of service.
    For further information, see the IMG for Personnel Administration under Personnel Administration -> Evaluation Basis -> Calculation of Employment Period.
    If there is no entry in table T77S0 with group ADMIN and semantic abbreviation LORSV, the system calculates the value according to your entries in the ENTRY feature.For further information, see the feature documentation: ENTRY.
    Please check your configuration settings and do the needful so that report displays the number of years.
    Regards
    Sreekanth

  • Decimal Places of Key Figure not displaying Correctly

    Hi BW Gurus,
    I have a key Fig ZLENGTH of type Quantity. I am calculating length in Kilo Meters with this.When I am trying to load the data in my cube with flat file say if value for length is 8.123 Km it is showing in Cube 8.000 . As cklient requirement is for three decimal places I want to show exact value i.e. 8.123KM
    Pls. help. Matter Urgent
    Regards,
    MANDAR

    Hi,
    in CUNI select LENGTH in front of Units of Measurement, click the button and then double click the KM row to open its properties.
    Deciaml rounding should be empty there; if this is the case you'll have to simulate your update in order to see where the system is removing the decimals.
    Check that the original record in the PSA has decimals.
    Check that the communication structure record has decimals.
    Finally the data target record.
    It must happen somewhere in the dataflow.
    hope this helps...
    Olivier.
    Message was edited by:
            Olivier Cora

  • Alignment problem at header level as well as in lines item level

    Hello Experts,
    I am facing problem in alignment of text in script.
    Account Statement from 01/06/2010 to 30/06/2010   Opening Bal:      xxxx
    Currency      KES     Dr Balances:     xxxx
    Customer SAP Account No 100000 Cr Balances:     xxxx
    I have given T1 as paragraph element  with 2 tabs for header level like for above part
    and given T2 with 9 tabs for all columns in item level by calculating length.
    for
    Doc.              Doc           Trans type Reference (Physical      Dr             Cr     .             Bal       Clearing document No
    Date                  Num(SAP) Bal B/F      Invoice No)            
    28/05/2010  19000000     NIV          KGN 200000                                 1200000
    29/05/2010  15000000     PYT            19000000      200000-           Nil       1200000
    But i am getting op like above.
    Can you plz help me for maintaining the space?
    wat should i do?
    Thanks & Regards,
    Manisha

    If you're trying to control placement with spaces, that will always be a problem, IMO. 
    Suggest you rely on tab (,,) without putting in spaces,  and alignment settings for the tab, and create as many paragraph formats as are needed.

  • Reg: Replacement of second occurance of character in string

    Hi,
    Consider one string1 =  'ABCDAE' OR  string2 = 'SHEETAL'.
    I want to replace the second occurance of A in above string1.and second occurance of E in above string2 with any differnt character.
    I tried with offset calculation , length , replace , split stmts.
    but always first occurance is getting replace.
    Please provide your ideas.
    Regards,
    Shital

    Hi,
    Try this.
    data: string1 type char10 value 'ABCDAE',
            len     type i.
      write: / string1.
      search string1 for 'A'.
      if sy-subrc = 0.
        add 1 to sy-fdpos.
        len = strlen( string1 ) - sy-fdpos.
        replace 'A' in string1+sy-fdpos(len) with '!'.
        write: / string1.
      endif.
    Darren

  • Help with do while loop

      This program that reads a character representing a geometrical
      figure, then asks the user to enter the required data (ex. Radius for
      a circle, length and height for a rectangle, etc.  ...) .
      The program should then print the area and circumference.   Figures are: circle(c), square(s), rectangle(R), triangle (t).
      The program should repeat until a figure with area <10 are read
       import javax.swing.JOptionPane; // program uses class JOptionPane
        public class Sh7q6
       // main method begins execution of Java application
           public static void main( String args[] )
             String outputStr; // The output string
             String str; // The entered characher
             char n; // The character entered
                   double a; // aera
             double radius; // the radius of a circle
             double area; // the area of a circle, square, rectangle, triangle
             double circumference; // the circumference of a circle
             double m; // The square side length
             double circumference1;  //  the total for a * a
             double length;  // the length of a rectangle
             double width;  // the width of a rectangle
             double circumference2;  //  the total for 2*(length + width)
             double base; // the base of a triangle
             double side1; // the first side of a triangle
             double side2; // the second of a triangle
             double hight;
             double circumference3;  //  the total for ( base + side1 + side2 )
             do
             // display the information in a JOptionPane message dialog
                str = JOptionPane.showInputDialog("Enter a character specifying a geometrical shape" +
                   "\n" + " Circle = c" + "\n" + "Rectangle = R" + "\n" + "Square = s" + "\n"
                   + "Triangle = t" );
                n = str.charAt(0); // return the caracter
                switch (n)
                   case 'c':
                   case 'C':
                   // convert String inputs to double values for use in a calculation
                      radius = Double.parseDouble(
                         JOptionPane.showInputDialog("Enter the radius of a circle:"));     
                      area = 3.14 * Math.pow ( radius, 2); // calculate the area      
                      circumference = 2 * 3.14 * radius;// calculate the circumference
                      outputStr = String.format("The area of a circle is: %.2f%n" +
                         "The circumference of a circle is: %.2f", area, circumference);
                   // display result in a JOptionPane message dialog
                      JOptionPane.showMessageDialog(null, outputStr , "The result",
                         JOptionPane.INFORMATION_MESSAGE);
                      break;
                   case 's':
                   case 'S':
                   // convert String inputs to double values for use in a calculation
                      m = Double.parseDouble(
                         JOptionPane.showInputDialog("Enter the square side length:"));     
                      area = Math.pow ( m, 2); // calculate the area         
                      circumference1 = 4 * m;// calculate the circumference
                      outputStr = String.format("The area of a square is: %.2f%n" +
                         "The perimeter of a square is: %.2f", area, circumference1);
                   // display result in a JOptionPane message dialog
                      JOptionPane.showMessageDialog(null, outputStr , "The result",
                         JOptionPane.INFORMATION_MESSAGE);
                      break;
                   case 'r':
                   case 'R':
                   // convert String inputs to double values for use in a calculation
                      length = Double.parseDouble(
                         JOptionPane.showInputDialog("Enter the length of a rectangle:"));
                      width = Double.parseDouble(
                         JOptionPane.showInputDialog("Enter the width of a rectangle:"));     
                      area = length * width ; // calculate the area     
                      circumference2 = 2* (length + width); // calculate the circumference
                      outputStr = String.format("The area of a square is: %.2f%n" +
                         "The perimeter of a square is: %.2f", area, circumference2);
                   // display result in a JOptionPane message dialog
                      JOptionPane.showMessageDialog(null, outputStr , "The result",
                         JOptionPane.INFORMATION_MESSAGE);
                      break;
                   case 't':
                   case 'T':
                   // convert String inputs to double values for use in a calculation
                      base = Double.parseDouble(
                         JOptionPane.showInputDialog("Enter the base of a triangle:"));
                      side1 = Double.parseDouble(
                         JOptionPane.showInputDialog("Enter the first side of a triangle:"));
                      side2 = Double.parseDouble(
                         JOptionPane.showInputDialog("Enter the second side of a triangle:"));
                      hight = Double.parseDouble(
                         JOptionPane.showInputDialog("Enter the hight of a triangle:"));     
                      area = 0.5 * base * hight; // calculate the area      
                      circumference3 = base + side1 + side2;// calculate the circumference
                      outputStr = String.format("The area of a triangle is: %.2f%n" +
                         "The circumference of a yriangle is: %.2f", area, circumference3);
                   // display result in a JOptionPane message dialog
                      JOptionPane.showMessageDialog(null, outputStr , "The result",
                         JOptionPane.INFORMATION_MESSAGE);
                      break;
                   default:
                   // display result in a JOptionPane message dialog
                      JOptionPane.showMessageDialog(null, " The letter you entered doesn't " +
                         "represent either a circle or a rectangle or a square" , "ERROR",
                         JOptionPane.ERROR_MESSAGE);
             while (  area > 10 );
             System.exit(0);
          } // end method main
       } // end class Sh7q6the Q is how can i say when the area < 10 stop the loop in the while logical expression..

    the Q is how can i say when the area < 10 stop the loop in the while logical expression..You're almost already doing that. You're doing this:
             while (  area > 10 );As soon as the area is 10 or below, that expression will evaluate to false and the loop will end.
    If you want to still loop when the value is 10, then change it to:
             while (  area >= 10 );

  • How is the length of a string calculated in Java?  and JavaScript?

    Hi all,
    Do any of you know how the length of a string is being calculated in Java and JavaScript? For example, a regular char is just counted as 1 char, but sometimes other chars such as CR, LF, and CR LF are counted as two. I know there are differences in the way Java and JavaScript calculate the length of a string, but I can't find any sort of "rules" on those anywhere online.
    Thanks,
    Yim

    What's Unicode 4 got to do with it? 1 characteris 1
    character is 1 character.
    strings now contain (and Java chars also) is
    UTF-16 code units rather than Unicode characters
    or
    code points. Unicode characters outside the BMPare
    encoded in Java as two or more code units. So it would seem that in some cases, a single
    "character" on the screen, will require two charsto
    represent it.So... you're saying that String.length() doesn't
    account for that? That sux. I don't know. I'm just making infrerences (==WAGs) based on what DrClap said.
    I assume it would return the number of chars in the array, rather than the number of symbols (glyphs?) this translates into. But I might have it bass ackwards.

  • 3d length calculation

    I have some road data in Gauß-Krüger zone 5 projection with the associated mean-sea-level heights.
    I've defined a compound coordinate system taht consists of a vertical and projected coordinate system. Taking the transverse-mercator projection into account is it mathematically correct to calculate 3d length of those lines using the heights stored with the projected geometries? Or would it be more accurate to convert the data back to the geographic coordinate reference system (WGS84 for instance) with ellipsoidal heights to do this calculation? Will Spatial do 3d length calculation with geographic coordinate system?

    Hi,-
    Sure, it is sound to do 3D length calculation. I was not meaning the opposite.
    The question is how to define the 3D length in your geographic coordinate system.
    You just gave one example: 2d projected coordinates and mean-sea-level heights (basically height above the geoid).
    However, this may not serve general purpose as you also mentioned.
    That is why i mentioned once you define your 3D length, then we can start talking about accuracy.
    If you do calculations on small segments, you can stick to projected space as i mentioned previously.
    Can we ask what your application is about? Maybe we can suggest more depending on your application
    which tries to compute the 3D length.
    Thanks

Maybe you are looking for

  • Nomad Jukebox Zen Xtra PLEASE HE

    My player was locked on the EAX screen, and I figured out how to get to the rescue mode, and I clicked "Clean Up" and then pressed the check, and then it went back to the rescue mode screen and nothing's happening. Where do I go from here? What does

  • ConditionSortStep with measure based sorting

    Hi, i have problem with ConditionSortStep with measure based sorting. I use this code : Selection sel = query.findSelection(dimensionID); OlapQDR qdr = new OlapQDR(measureDim.getUniqueID()); qdr.addDimMemberPair(dimTime.getUniqueID(),"YR2004"); qdr.a

  • Applet's Packages attribute is null

    Hi ! I'm working on a JavaFX applet for a long time, and today I'm facing a really strange problem. The javascript object I get with document.getElementById("APPLET_ID") has no Packages attribute under Windows. I run my tests on Windows XP with IE8,

  • Wireless - Laserjet P1102w

    We have a HP Laserjet P1102w and when I reset it, I'm not able to reconfigure wireless. When I print a device config page wireless is enabled, not connected and ip configured by = manual with all zeros. How can I configure the printer to connect the

  • PowerPivot excel chart in SharePoint 2013

    Hi, I would like to know to see the powerpivot chart in SharePoint using Excel Web Access wepart, do we need to install Powerpivot feature in SharePoint. In my Environment, we have excel service application is configured therefore we have one excel f