Converting feet to inches

I need to conver feet to inches, in my code, I am picking up feet and inches in the input file, and need to convert it all to inches on the output file, for example, a person is 5 07, this needs to be converted to 67 inches....Any suggestions

Angel_74 wrote:
I need to conver feet to inches, in my code, I am picking up feet and inches in the input file, and need to convert it all to inches on the output file, for example, a person is 5 07, this needs to be converted to 67 inches....Any suggestionsExcuse me for being late, a just got back from a doctor's appointment.
So your project is really all about reading text from one file, and writing text to another file right? In that case, you should think about how your program handles the input. Most input comes in the form of a java.lang.String (but not always, depends on your InputStream), then your program needs to convert those String values into int values before you can use the mathematical formulas given above. Then depending on the OutputStream, you may or may not need to convert int back to String or whatever.

Similar Messages

  • Converting feet and inches to pixels

    I design Video Content for live shows. Often my set designer comes up with bizarre screen sizes. I am looking for a simple app that converts feet and inches into pixels. I want to be able to determine the pixel equivilent of his screen dimensions so that I can create a mask. I have done this using Photoshop, but it would be so much easier if I could simple input the dimensions and then get my results.
    Here's a typical size he would give me...8' by 100 yards ( I know that's insane) or 37' by 17 '
    Any help would be apprecitated

    Johnny,
    Trust me ... I'm no mathematical wizard or
    technoguru, but it seems that as long as you know the
    aspect ratio of the screen you need to fill and you
    match that, the actual pixel dimensions would be more
    of a issue of the display device (a projector, I'm
    assuming).
    For example, I output 720 x 480 (NTSC DV) to tape or
    640 x 480 (DVD-Video) all the time that is later
    projected on a variety of different sized screens.
    If the screen is a 4:3 aspect ratio, my video fills
    the screen if the projector is positioned correctly
    and the right lens is used.
    -DH
    Thanks for the replies guys.
    The problem is that he never gives me ratios, he just gives me stratight sizes.
    I build these in 720 x 480 and they are sent through some unexplicable beta/do-ray-me configuration to output on giant LED walls. The resolution doesn't matter. This strange output configuration only reads my video the same as if I was outputting straight from FCP.
    On one job he gave me the simple 16:9 ratio and I simply put a 16:9 matte on everything within a 720 x 480 using Joe's Filter Beta "Joe’s Aspect Matte RT".
    That was easy. What gets tricky is when he gives me some strange size like
    37 feet high by 6 feet wide. Is there an easy way to figure out this ratio and then build it within 720 x 480 using a matte. If I knew the pixel numbers of 37' by 6' I could just adjust my matte accordingly.

  • Convert Feet and Inch to cm (and vice versa)

    I need some help with conversion of height. The form was designed by the department and there is a field where one need to enter the height of the participant.
    The height can either be in cm or in Feet + Inches (not just inches). Once a value has been entered in cm, it converts it automatically to feet and inches. If the user enter the height in feet and inches, it converts it immediately into cm. Much like the kg to lbs conversion fields in the attached document. I have been able to convert the height in cm into Feet and inches e.g. 165 cm = 5'5". However I am not sure how to do the opposite.
    The problem is the way it has been designed as there is a box for Feet and another box for Inches. If the other measure was in Inches only, it would have been easier and that would be like the kg to lbs conversion.
    I have tried multiple way to try to the conversion, but none would do it exactely like the kg to lbs conversion.
    Here is the form:
    https://workspaces.acrobat.com/?d=j8kksFor3eVIg6M07CdkmA

    I tried the following code, but obviously does not work. The problem reside in the fact that I have to reunite 2 fields to get the height in cm and am not sure how to handle that.
    var v1 = (function () {
        var f_source = getField("Feet");
        var result;
        if (event.source && event.source === f_source) {
            result = f_source * 30.48  ;
            event.value = result == 0 ? "" : util.printf("%.0f", result);
    var v2 = (function () {
        var f_source = getField("Inches");
        var result;
        if (event.source && event.source === f_source) {
            result = +f_source  * 2.54 ;
            event.value = result == 0 ? "" : util.printf("%.0f", result);
    event.value = v1 + v2;

  • Feet and inches ' and "

    I have an application that requires height in feet/inches.
    Obviously php/mysql will have an issue with something like 6'2"
    because of the ' and ". What they best way to handle this so I can
    still express it this way... or is it not worth it and just use
    feet and inches, the words?

    jsteinmann wrote:
    > I have an application that requires height in
    feet/inches. Obviously php/mysql
    > will have an issue with something like 6'2" because of
    the ' and ". What they
    > best way to handle this so I can still express it this
    way... or is it not
    > worth it and just use feet and inches, the words?
    >
    I would store the value as inches:
    <script>
    convert=function(input){
    x=input.split(/[^\d]/);
    return x[0]*12+ +x[1];
    </script>
    Mick

  • Conversion from "feet to inches"to"meter and centimeters"

    hi,
    i need this answer urgently!!!!
    i'm trying to write a java program that reads lenghts in feets and inches(or meters and centimeters(or feet and inches). the program askes the user if he/she wants to convert from "feet to inches" to "meters and centimeters" or from "feet to inches". The program then preforms the desired conversion.having the user respond by typing the integer 1 for one type of conversion and 2 for the other conversion.The program reads the user's answer and then executes an if-else-statement. each branch of the if-else statement will be a function call. Include a loop that lets the user repeat this computation for new input values until the user says he or she wants to end the program. Use as many method that are logically needed. The main method should do as little as possible.

    I love these questions - especially the little bits at the end that clearly point out it is a homework question.
    As joeldi says, show us that you've had a decent go at it and we'll be more interested in helping out.
    Regards,
    Tim

  • Height in feet and inches

    I have a string value for height in the database that I would like split out into feet and inches. For example the value right now is 66, 65, etc...

    Hi Curt,
    If Unit of measure is CM then use below logic
    (totext(({Database_cm}* 0.0328084),0)) & " Fts   "&Tonumber((Split(totext({Database_.cm}* 0.032808,5),".")[2])) *0.00012 & " Inches"
    If Unit of measure is in Meters then You need to convert meters to CM by using below formula
    {Meters_field}/100
    --Praveen G

  • Conver feet and inches to meters

    I'm writing a program that calculates BMI of a person,
    but i have some problems trying to extract feet and inches after the user enter their height, you know what I mean?
    is something like this, the program prompts user to enter the height (ft'in") so if the person enters something like this 5'6" I have to extract feet and inches and then convert them to meters. I'mm trying to use the StringTokenizer, but I know I;m doing something wrong,
    Can anyone help me please?
    thank you,

    I know but I really need helpThat doesn't make your question any more important than everybody else's. Everybody who posts here needs help. Please don't try to claim that your problem is more important.

  • Feet and Inches formula

    Is there an easy formula for converting cell values from Inches to non-decimal Feet & Inches? I can get feet and decimals, but '8.3333' isn't as intuitive for the applications I'm using the spreadsheet for!

    If you start with a decimal number of inches in cell B2, you can convert it into feet and inches with the following formula:
    =TRUNC(B2/12)&"ft "&MOD(B2,12)&"in"

  • How can I convert feet to meters using Numbers

    Does anyone have a formula for converting feet  to meters?

    Convert m to in, QUOTIENT will give you the number of feet, MOD will provide the number of inches left over, truncated to the last full inch.
    If you want the result rounded to the nearer full inch, round the result of the initial conversion. If you need fractions of inches (ludicrous if the original figure is to the nearest metre), that can be done as well.
    m in B2,
    formula in C2: =ROUND(B2*39.3700787,0)  (inches, rounded to nearer full inch)
    formula in D2: =QUOTIENT(ROUND(B2*39.3700787,0),12)&" Ft. "&MOD(ROUND(B2*39.3700787,0),12)&" In."
    Regards,
    Barry

  • Convert from feet to inches?

    Can numbers convert imported data from feet notation (i.e. 3' 6 1/2") to decimal inches (i.e. 42.5)? I'd like to be able to import rough opening dimensions from my internal CAD (Vectorworks 2008) spreadsheet to generate cut lists with numbers. I can manually type in the info, but that is prone to errors. I'm also looking into whether Vectorworks can export the data I want in the proper format.
    Thanks for any help
    - Tobias

    Hello
    Assuming that the values are entered in a column,
    select a group of the cells containing them
    copy to the clipboard
    call the passed script
    paste the result where you want.
    If I forget nothing, it take cares of all combinations:
    3’ 6 1/2
    3’ 6
    3’ 3/4
    6 3/4
    3'
    6
    1/2
    3' 6 1/2
    even blank rows are correctly treated.
    Of course, if the source of the datas give you the same kind of list, you may call the script directly.
    It only requires that Numbers is the frontmost application.
    save the script as an Application or an Application Bundle.
    store it in the folder <yourStartupDisk>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Doing so you will be able to run the script from the System's scripts menu.
    Select the block of feets values
    Copy to clipboard
    Call the script
    Paste the block of converted values where you want.
    Yvan KOENIG
    25 février 2008
    --(SCRIPT feets2inches.app]
    property passed : {}
    set passed to the clipboard
    if passed contains return then
    set my passed to my decoupe(passed, return)
    else
    set my passed to {passed}
    end if
    set tt to ""
    repeat with vv in my passed
    set vv to vv as text
    if vv is "" then
    set tt to tt & return
    else
    set l to my decoupe(vv, " ")
    if (count of l) = 1 then (* 3' or 6 or 1/2 *)
    set l1 to item 1 of l
    if character -1 of l1 is in {"'", "’"} then
    set nn to ((text 1 thru -2 of l1) as integer) * 12
    else if l1 does not contain "/" then
    set nn to l1 as integer
    else
    set {c, d} to my decoupe(l1, "/")
    set nn to c / d
    end if
    else if (count of l) = 2 then (* 3' 6 or 3' 1/2 or 6 1/2 *)
    set {l1, l2} to l
    if (character -1 of l1) is in {"'", "’"} then
    if l2 does not contain "/" then
    set nn to (((text 1 thru -2 of l1) as integer) * 12) + (l2 as integer)
    else
    set {c, d} to my decoupe(l2, "/")
    set nn to (((text 1 thru -2 of l1) as integer) * 12) + (c / d)
    end if
    else
    set {c, d} to my decoupe(l2, "/")
    set nn to (l1 as integer) + (c / d)
    end if
    else (* 3' 6 1/2 *)
    set {c, d} to my decoupe(item 3 of l, "/")
    set nn to (((text 1 thru -2 of item 1 of l) as integer) * 12) + (item 2 of l as integer) + (c / d)
    end if
    set tt to tt & nn & return
    end if
    end repeat
    set the clipboard to tt
    set passed to {}
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --[/SCRIPT]
    If it works as you wish, I will put it in my idisk.
    Yvan KOENIG (from FRANCE lundi 25 février 2008 15:57:4)

  • Hi, I am using Indesign CS6, How to set the page size in Inches.

    Hi, I am using Indesign CS6, How to set the page size in Inches.

    All fields in InDesign can be entered in any measurement system. So, if you want to make an 8"x10" document and go to File>New Document and the window looks like this:
    …you can type either 8 in or 8" into the Width field like this:
    …and when you move to the next field, it will convert the eight inches into the equivalent number in the unit of measure that it is using at the moment, like this:
    … (203.2 milimeters is the same as 8 inches). You can also enter a different measurement unit into other fields once the file is created, such as the width or height of a frame, or the position of an object in the X and Y coordinates.
    If you would rather just work in inches instead of having to type the inches mark or abbreviation, go to InDesign>Preferences>General and select the Units & Increments tab. There you will see Ruler Units for Horizontal and Vertical at the top of the window. Set them to Inches and all of the fields will display in inches. If you do that to an open document, you will change the unit of measure for that document. If you do it while no documents are open, it will change the unit of measure for any new documents you create. To change the unit of measure for existing documents, you will have to open each and make the change.

  • Problem of X200 with 15 feet USB cable

    Hi,
    I have a X200 with the ultrabase and  I used to use a 6 feet USB cable connect to a HP Laserjet P2015N printer but now when I use the 15 feet USB cable and the system says USB device not recognized. and I can use the 15 feet cable to connect to another printer with my HP laptop. Any idea?
    Thanks,
    Davy

    davylo wrote:
    now when I use the 15 feet USB cable and the system says USB device not recognized.
    You  are at the limit of USB cable length for USB 2.0.... 
    Q1: How long of a cable can I use to connect my device?
    A1: In practice, the USB specification limits the length of a cable between full speed devices to 5 meters (a little under 16 feet 5 inches).
    http://www.usb.org/about/faq/ans5
    ... so use a shorter, and good quality, cable.
    Cheers,
    Bill
    I don't work for Lenovo

  • Curly quotes

    My company is moving away from windows based servers running IIS to Linux running Apache. So now I'm running into the curly quotes issue when pasting from Word in dreamweaver CS4. I have a bunch of sites already built that will be ported over. Not to mention the fact that I get virtually all the content from Word docs. Is there any way to automatically convert  curly quotes, apostrophes, em dashes etc without having to resort to manual find and replace on every page? This has become a major issue for me and I'm wondering if there's any way to set up CS4 to automatically handle these characters when cutting and pasting from Word. DW used to do this but CS4 doesn't seem to. Any info is appreciated.
    thanks

    That is bad programming, they should not occur in these situations.
    Thank you for pointing it out I never noticed, because like 95% of the known universe I use metric measures.
    I have tried all the likely keyboard commands and searched the user manual and can not find a solution.
    I thought of replacing the auto correction with the appropriate space" and "space but this is already hard encoded in and wouldn't fix the problem. What was required in the programming was to check if there was a leading quote mark before substituting a trailing quote mark.
    Send feedback to Apple at http://www.apple.com/feedback/pages.html
    A work around is to go:
    +Menu > Edit > Special Characters… > Punctuation > and use ′ or ″ (single or double Prime)+
    These are actually the correct characters for feet and inches and will not be substituted.
    To speed it up as you type you could use auto-correction to substitute for /' and /" or whatever you think will work.

  • "Toggle Smart Quotes" doesn't work anymore

    I'm not sure if this stopped working after I upgraded to Snow Leopard (from Leopard) or if it's been a CS4 issue all along, but hitting Cmd+Opt+Shift+' doesn't toggle smart quotes functionality anymore. This is handy for the odd occasion when I actually want feet and inches marks. I trashed preferences and that didn't fix it.
    For what it's worth, this keyboard command is still listed in the Keyboard Shortcuts preferences. It just isn't working.

    I've since learned that I can use Ctrl+' and Ctrl+Shift+' (Mac) for the cheapo feet and inches marks. Thanks for the info about prime marks though, I didn't know about them – that they are the "real" feet and inches marks. I also didn't know that Smart Quotes would convert quotes during copy and paste.
    I must say that I couldn't find prime marks in the Glyphs palette (which would really benefit from a search tool), at least not for the Myriad Pro font. Still, I will keep it in mind for any "important" applications of the feet and inches marks in future. Most of the time I just want them quickly for unimportant uses, at which time I'll just use Ctrl+'. I guess I'm obsessive enough to avoid quotation marks when I mean feet and inches, but not obsessive enough to dig through the Glyphs palette.
    By the way, I scanned through Snow Leopard's keyboard shortcuts preferences and couldn't find a conflicting Cmd+Opt+Shift+' command. It doesn't matter to me anymore though.

  • Most efficient way to code all possible combos?

    Hi everyone,
    I'm in the process of creating a unit conversion utility using the Swing GUI interface package. Basically there are 2 drop down menus: one for the starting unit, and the other for the unit that the first unit will be converted to. Whenever someone chooses an item on either of the menus, the index or menu selection number is loaded into a variable. What my problem is is that I'm trying to write code for every possible unit conversion. For instance, menu item 1 must be able to be converted to every item on menu 2.
    Here is a sample of what I mean:
    if (menuOneItem == 0 && menuTwoItem == 0)
       output = input;
    if (menuOneItem == 0 && menuTwoItem == 1)
       output = input * 0.032808398950131;//Centimeters/sec� to Feet/sec�
    if (menuOneItem == 0 && menuTwoItem == 2)
       output = input * 0.39370078740157;//Centimeters/sec� to Inches/sec�And on and on untill menuTwoItem reaches something like 10. Now I have to do the next item of menu one and code all the combos with the others for it:
    if (menuOneItem == 1 && menuTwoItem == 0)
       output = input * 30.48;//Feet/sec� to Centimeters/sec�
    if (menuOneItem == 1 && menuTwoItem == 1)
       output = input;
    if (menuOneItem == 1 && menuTwoItem == 2)
       output = input * 12.0;//Feet/sec� to Inches/sec�Do you see what I'm trying to do? You have to realize that I have many other different unit conversions like distance and mass. The time it would take to implement all the combinations would be ridiculous! There must be a better way to program in all the different types of conversions like this.
    Any help anyone can offer me will be greatly appreciated! Thanks!

    One way (not necessarily very object-oriented) would be:
    final static double [][] conversionFactors = new double[MENU_ONE_SIZE][MENU_TWO_SIZE];
    // fill out the array somehow--could be in a static initializer
    double getConversionFactor(int menuOne, int menuTwo)
       if (menuOne <= menuTwo)
           return conversionFactors[menuOne][menuTwo];
       else
           return 1.0/conversionFactors[menuTwo][menuOne];
    }You'd only fill in the array where index1 <= index2.
    So:
    [0, 0] = 1.0; //no conversion
    [0, 1] = 0.032808398950131;
    [0, 2] = 0.39370078740157;
    ... through to end.
    Then
    getConversionFactor(0, 1) = 0.032808398950131;The opposite:
    getConversionFactor(1, 0) = 1.0/0.032808398950131 = 30.48;You could enter all conversion factors, if you want. You could also put in a minimal number of hardcoded constants, and calculate the rest as products of multiple known values:
    cm/feet = (cm/inches )*(inches/feet);

Maybe you are looking for

  • Can no longer send/receive texts on my new phone

    New Moto e phone and service bought two days ago.  Everything was working fine.  Went into Verizon account and checked that we did not want to receive premium texts ($0 cost).  My phone will no longer send or receive any text messages.  When we go in

  • SAP SCM Upgrade-Issue in STARTSAT_TRANS in execution phase

    Hi Experts, I am running sap upgrade of SCM 5.1 to SCM 7.0 EHP3. My Environment is OS : windows server 2008 R2 Source Kernel :720_ext_rel DB: MS SQL server In Execution phase i have encountered issue with MAIN_SWITCH/STARTSAP_TRANS phase and below ar

  • Bex Analyzer - Filling cells

    Dear all, simple question: İn bex analyzer report shows as follows: A   -B - C-  120 usd -- 4 pc    -    -       D -120 usd- -4 pc when its same char, it does not paste A again in the second line as it repeats. Is there any chance we can tweak that i

  • IDVD not understanding source file size.

    I'm trying to make a DVD with several different movies. They have all been encoded the same way, but have different lengths. The shorter clips are under 15 minutes, but the longer clip is over and hour long. I re-encoded the longer clip to bring down

  • How to display search results in content area

    Hi              How can I display search results in the content area as seen in sdn. Thanks in advance.