Java-less

this is more a mathematical/physical problem than a java problem (although it is going to be used in a java program...)
if i wanted to calculate I in the following equation by means of a gradient on a graph, how would i rearragne the equation or whatever....
a = g/(1+(I/mr^2))
i.e. want to make a graph that has a and m on the axes....
Cheers
Sarah :)

Argh. I believe I know the answer the OP is seeking. As soon as I went to sleep I figured it out.
It turns out I was thinking too hard earlier when I said we want a<<g. I was thinking a was on both sides of the equation and therefore I had a parametrized equation that wouldn't give a line. What a doofus. That's not right. You will get a line if you plot the applied torque versus the angular acceleration. It is parametrized, but that doesn't stop the plot of y vs. x from being a line if the equation says it is.
Suppose we are doing the experiment where we have a disk with a string wrapped around it, there's no friction and on the string we hang various masses.
Let T = tension in the string
Let m = the hanging mass
Let I = moment of inertia of the disk
Let R = radius of the disk. The string is wound around the disk at this radius
Let a = the acceleration of the mass = tangential acceleration of the disk
Let alpha = the angular acceleration = a/R
Then by Newton's second law (linear and rotational)
Net torque = T*R (assuming no friction) = I*alpha
Net force on the hanging mass = ma = mg - T
So T = m(g-a)
and substituting this in the first equation m(g-a)R = I*a/R.
If you rearrange, you find the OP's equation:
maR+Ia/R = mgR
a(1 + I/(mR^2)) = mgR
a = mgR/(1+I/(mR^2))
This I had mentioned as correct earlier, for the case when there is no friction and we have a mass hanging on a disk. But where I was mistaken I was when I was thinking that plotting a vs. m would be better than applied torque vs. alpha, since the torque and alpha both have a in them, and we usually say "plot the dependent vs. the independent variable" like a mantra. Mathematically this is not strictly necessary.
If you compute applied torque = m(g-a)R and alpha = a/R, then you can plot applied torque on the y axis, angular acceleration on the x axis. By the equation
applied torque = I*alpha, this will be linear and the slope will be I, and the y intercept will be zero.
That's the simplest possible way to do this. (Providing my surmise about your experiment is correct)
D'oh!
:P jen

Similar Messages

  • Java-less agent

    Hello!
    because of security reasons i must NOT start java-process on the server with oracle rdbms running.
    is there any java-less agent?
    can i turn this host to managed without starting java-process?
    what does java do in agent deployment?
    OEM12c, suse-linux, rdbms 10g

    In EM12c, there is no "java-less agent" for monitoring hosts and/or databases. The agent software is written in java in EM 12c.
    Regards,
    - Loc

  • MSS, Webdynpro for Java(EHP4) , Webdynpro for ABAP

    Hi Experts,
    We have EHP 4.0 with MSS in Java webdynpro iviews and are primarily interested in the ECM portions of MSS. 
    We wants to stay with EHP 4.0 standard iViews and make minor changes to accommodate their business conditions u2013 without making any enhancements directly on the Java iViews. No setup for Netweaver Developer Studio environment or other tools for Java development.
    We have to achieve the following without enhancing the Java iViews directly. Making use of existing standard error messages and RFC calls are some of the solutions suggested by the client.
    1.)Display error messages on the Java iViews based on some employee infotype consistency checks
    2.)Disable employees for input when they fail consistency checks
    3.) For employees with multiple performance ratings, display a Java-less popup which will have a table of information as a u2018display onlyu2019 window.
    Can anyone help me on any of the above given points.
    Thanks,Shilpa.

    Hi,
    I wouldn't call myself an expert with WDJ but we've made some changes to the XSS WebDynpro's without modifying the SAP delivered WebDynpro's. This was mostly done by creating a new page layout and adding javascript to it. By placing the XSS WebDynpro's in the new pages we could manipulate some parts of the functionality.
    However, now that we have NWDI in place we prefer the route where we modify the application instead of workiarounds.
    Marcel

  • Need help with Java classwork

    I am a student who is new to Java (less than a week) and we were given some problems to solve. I got all of them except this one, and was wondering if yall could hep me out. Here it is:
    Given a strand of DNA determine the percentage of cytosine and guanine nucleotides present in the genome. The strand is represented by a string containing only the lowercase characters 'c', 'g', 't', and 'a'. Your method should return the percentage (between 0.0 and 1.0) of 'c' (cytosine) and 'g' (guanine) in the genome. For example, if half of the nucleotides are 'c' or 'g' your method should return 0.5.
    The teacher has a set of solutions that test my code and sees if it works for all scenarios. Here is my code:
    public class DNAcgcount
    public double ratio(String dna)
    int count = 0;
    int size = dna.length();
    for (char item_from_dna: dna.toCharArray())
    if ((item_from_dna == 'c') || (item_from_dna == 'g'))
    count ++;
    return count/size;
    and everytime i test it I get an error message for 8/12 of the tests saying :
    runtime exception:java.lang.ArithmeticException: / by zerojava.lang.ArithmeticException: / by zero at DNAcgcount.ratio(DNAcgcount.java:20) at Tester$1.run(Tester.java:45) ""
    Any help would be greatly appreciated!
    Edited by: 03blackgt on Nov 19, 2007 7:39 AM

    03blackgt wrote:
    runtime exception:java.lang.ArithmeticException: / by zerojava.lang.ArithmeticException: / by zero at DNAcgcount.ratio(DNAcgcount.java:20) at Tester$1.run(Tester.java:45) ""
    This error message is telling you that you're dividing by zero on line 20 of DNAcgcount. Find that line and figure out when the denominator can be 0, and what you can do to prevent that.

  • Abrupt, loss in performance.

    Hi all.
    I just found that doing certain database work like data normalization is far faster in java than Sybase.
    Stats I have recorded:
    Records                    | Sybase  | Java
    less than 30,000 records:  | 2000R/S | 3000R/S
    less than 800,000 records: | 2.5R/S ; | +2500R/S
    more than 800,000 records: | ?       | 25R/S
    public void process(){
    UniqueList<Person> persons = new UniqueList<Person>();
    //Create other unique lists for other tables.
    while(log.next()){
    cleaner.clean(log.getLine());
    Record record = new Record(cleaner.getCleanedData());
    record.setPersonsIDKey(persons.add(record.getPerson()));
    //set other IDKeys for other tables
    WhareHouse.storeRecord(record);
    public class UniqueList<Unique>{
      int id=0;
      private HashMap<Unique,Integer> list = null;
      public UniqueList(){
        list = new HashMap<Unique,Integer>();
      public int add(Unique value){
        if(!list.containsValue(value)){
          listID.put(value,id);
          return id++;
        }else{
          return -1 * list.get(value).intValue();
    } I have 2 questions to ask but let me ask the simpler of the 2 first.
    *<Question 1>*
    This is regarding Sets.
    Why is it that Sets use both equals and hashCode to determine uniqueness, even when the documentation says
    (o==null ? e==null : o.equals(e)). *</Question 1>*

    kajbj wrote:
    Execute it with gc printing so that you can see how often the gc is executing and for how long it's executing. It still sounds gc related.It looks that way.
    Here are 3 sections (Begining, Middle, point of performance loss) of the log file from
    java -XX:+PrintGC -Xloggc:log.log Normalizer------------------
    0.075: [GC 896K->183K(5056K), 0.0017151 secs]
    0.108: [GC 1079K->186K(5056K), 0.0005844 secs]
    0.109: [GC 1082K->187K(5056K), 0.0003445 secs]
    0.134: [GC 1083K->190K(5056K), 0.0002221 secs]
    0.130: [GC 1086K->191K(5056K), 0.0001363 secs]
    0.152: [GC 1087K->195K(5056K), 0.0002240 secs]
    0.145: [GC 1091K->197K(5056K), 0.0001318 secs]
    0.165: [GC 1093K->200K(5056K), 0.0002152 secs]
    0.159: [GC 1096K->201K(5056K), 0.0001563 secs]
    0.179: [GC 1097K->203K(5056K), 0.0002125 secs]
    171.522: [GC 55672K->52095K(56024K), 0.0005632 secs]
    171.533: [GC 55679K->52103K(56024K), 0.0004544 secs]
    171.544: [GC 55687K->52111K(56024K), 0.0004587 secs]
    171.554: [GC 55695K->52114K(56024K), 0.0004445 secs]
    171.609: [Full GC 52150K->52150K(56024K), 0.1150563 secs]
    171.736: [GC 56151K->52158K(65088K), 0.0046462 secs]
    171.752: [GC 56254K->52165K(65088K), 0.0004931 secs]
    171.778: [GC 56261K->52172K(65088K), 0.0004828 secs]
    171.790: [GC 56268K->52181K(65088K), 0.0004062 secs]
    171.802: [GC 56277K->52182K(65088K), 0.0003858 secs]
    220.279: [GC 64706K->60616K(65088K), 0.0006192 secs]
    220.292: [GC 64712K->60623K(65088K), 0.0005213 secs]
    220.304: [GC 64719K->60632K(65088K), 0.0005268 secs]
    220.317: [GC 64728K->60638K(65088K), -0.0130646 secs]
    220.329: [GC 64734K->60649K(65088K), 0.0006524 secs]
    220.329: [Full GC 64745K->60655K(65088K), 0.1366094 secs]
    220.481: [Full GC 65087K->60661K(65088K), 0.1351008 secs]
    220.645: [Full GC 65087K->60668K(65088K), 0.1205051 secs]
    220.794: [Full GC 65087K->60663K(65088K), 0.1209526 secs]
    220.930: [Full GC 65087K->60664K(65088K), 0.1348696 secs]
    And from here it only does Full GC which takes about a tenth of a second

  • ProcessBuilder Syntax errors

    Hi,
    I'm getting syntax errors with the following two statements
    x ProcessBuilder pb = new ProcessBuilder("xxx.exe");
    x pb.command(filename);
    It says there is no such constructor for the first statement. For the second one, no such a method for the data type. In fact, I tried several samples from the net and all end up the same result. ANy suggestions?
    I use Eclipse 3.2 on XP Professional. Thanks,
    I tried on several sets of codes from website. They all resulted in the same kind of errors

    Sorry. I sent the same message twice. I'm new to Java
    (less than 2 weeks). Would be happy to use whatever
    are already there. In fact I'm writing my first Java
    application.Okay.
    So did you write your own ProcessBuilder class or not?

  • Integrate and multiplication matrix

    I want function for integrate and multiplication matrix.
    I start with JAVA less than 1 month.
    Please help me.

    I want function for integrate and multiplication matrix.
    I start with JAVA less than 1 month.
    Please help me.Have a look at the JAMA package:
    http://math.nist.gov/javanumerics/jama/
    And if you want to write your own code, try to create an array of arrays (which would represent your matrix).
    Here's an array tutorial:
    http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html

  • How can I add a node with with a user-chosen name  to JTree in one action

    The functionality that I would like to implement is to add a new node to a tree (JTree with DefaultTreeModel), that during the adding process of the the new node the user will type the node name.
    I am using the following documentation as a reference: http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html#select
    but in this example (as well as all the other examples that I found on net) the user can add first a new node with a constant name (like "NewNode").
    and then in a seperated action the user can edit this node. I'd like to perfrom it in one action.
    one solution that could be implemented is on the end of the adding node invoking beginning of editing action that will be triggered in code instead of forcing the user to click with the mouse on the selected node. The question is how can I do it? how can I trigger an edit action on a selected node in a JTree?
    Edited by: Rotshield on Aug 23, 2008 2:21 AM
    Edited by: Rotshield on Aug 23, 2008 2:24 AM
    Edited by: Rotshield on Aug 23, 2008 2:29 AM
    Edited by: Rotshield on Aug 23, 2008 2:29 AM

    Ah, well.
    You can lead a horse to the water but you can't make it drink.
    Just to provide some background, I'm not a developer, just a hobby programmer and first took up Java less than 14 months ago. I didn't know the answer to your problem, but on reading the API it was fairly clear which method I'd have to make use of. In less than half an hour of coding, I had a JFrame with a JTree and a JButton to add a node, which was immediately in editing condition.
    Try to find another profession, Rotshield. Or at least don't disgrace the community by calling yourself a Java developer (for 4 years lol) until (if ever) you learn how to read and apply an API.
    db

  • Java.sql.SQLException: Invalid precision value. Cannot be less than zero

    Hi,
    In my portlet application have several jsf tables which bind to several oracle tables. I have tested the portlet in pluto and tried to deploy it on liferay. However, I get an exception stating:
    java.sql.SQLException: Invalid precision value. Cann
    ot be less than zero
    What could this exception mean? Has anyone else encountered this?
    Marc
    P.S. The trace is shown below:
    Feb 6, 2007 12:34:56 AM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: java.sql.SQLException: Invalid precision value. Cann
    ot be less than zero
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Cach
    edRowSetDataProvider.java:343)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(Ca
    chedRowSetDataProvider.java:300)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(Cache
    dRowSetDataProvider.java:624)
    at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys(TableRowGroup.
    java:806)
    at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys(TableR
    owGroup.java:429)
    at com.sun.rave.web.ui.component.TableRowGroup.getRowCount(TableRowGroup
    .java:749)
    at com.sun.rave.web.ui.component.Table.getRowCount(Table.java:307)
    at com.sun.rave.web.ui.renderer.TableRenderer.renderTitle(TableRenderer.
    java:400)
    at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(TableRenderer.
    java:123)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.jav
    a:683)

    I've dug deeper into this problem and am able reproduce the error in the Pluto server. To reproduce this error, I modified my Oracle jdbc driver from the JSC embedded driver (smoracle.jar) to the Oracle native driver (ojdbc14.jar). Now, I am getting the exception in my Sun Application Server:
    What is the difference between ojdbc14.jar and smoracle.jar that could cause this problem? What can I do so that I can fix this problem for ojdbc14.jar?
    Thanks,
    Marc
    P.S.
    The problem is with the clob column (DOR_NOTE_TX). The stack trace is:
    [#|2007-02-06T09:00:53.663-0800|INFO|sun-appserver-pe8.2|javax.enterprise.system.stream.out|_ThreadID=16;|
    Reader executing query ps=0 SELECT DOR_NOTE_DT, DOR_NOTE_TX FROM DOR.DOR_NOTE_DATA WHERE DOR_NOTE_CD='SECURITY' AND TO_CHAR(DOR_Note_Dt, 'mm/dd/yyyy') = '02/05/2007'
    No Params|#]
    [#|2007-02-06T09:00:53.679-0800|WARNING|sun-appserver-pe8.2|javax.enterprise.system.stream.err|_ThreadID=16;|
    java.sql.SQLException: Invalid precision value. Cannot be less than zero
    Message was edited by:
    marcnikko

  • Java.sql.SQLException: Invalid column count. Cannot be less or equal to zer

    Hi,
    update method working but java.sql.SQLException: Invalid column count. Cannot be less or equal to zero is thorwn...
    value's are updating...how can i handle this exception...pls anybody help me
    related java file(IDE) generated file
    public void setColumnCount(int columnCount) throws SQLException {
    if (columnCount <= 0) {
    throw new SQLException("Invalid column count. Cannot be less " +
    "or equal to zero");
         }

    The idea behind drag'n'drop visual editors and code-generators is nice. But they are not intented to be used by developers who don't understand what they do.
    With other words, keep away from those visual editors and code generators as long as you're unexperienced with Java. Write code at your own. You will learn and grow gratefully.

  • Java matcher - one less result than expected

    Hi all,
    I have a question about the Java matcher, which may have a very simple answer, but after a while trying to find the answer (through debugging and googling), I have come up with no solution.
    Basically, I am trying to parse through CSV files and find text matching a user-defined String that is entered. I have written a small CSV file and have written many instances of one word (for instance "java"). However when I use the matcher.find() method upon the content of the CSV file, it always finds one less match than are actually in the file! (e.g. if there are 6 instances of the word 'java', the matcher finds 5). I have printed the contents of the CSV file to the screen and the whole file is correctly displayed, so it must be something to do with the way the matcher works. Here is my code, although it is only basic at the moment:
            Pattern pattern = Pattern.compile("java", Pattern.CASE_INSENSITIVE);
            Matcher matcher = pattern.matcher(pageContents); // this is a String containing the contents of the CSV file.
            ArrayList<String> allMatches = new ArrayList<String>();
            if (!matcher.find()) {
                System.err.println("\nNo Matching Data Could Be Found In This Text File.\n");
                System.exit(0);
         while (matcher.find()) {           
                String individualMatch = matcher.group().trim();
                System.out.println(individualMatch);
                allMatches.add(individualMatch);
            return allMatches;So basically I am returning an ArrayList of Strings which contains all matches of the word "java" (just as an example).
    Any help would be greatly appreciated!
    Thanks,
    Jon

    if (!matcher.find()) {  // This line matches the first one, and throws it away
    System.err.println("\nNo Matching Data Could Be Found In This Text File.\n");
    System.exit(0);
         while (matcher.find()) {  // .. since you call find here again.         
    String individualMatch = matcher.group().trim();
    System.out.println(individualMatch);
    allMatches.add(individualMatch);
    return allMatches;Kaj

  • Which version of ODBC Driver supports DSN-less Connection in JAVA

    hai,
    Which version of ODBC Driver supports DSN-less Connection in JAVA.
    -raja

    hai,
    Pleae help in this regard.
    I am using a DSN-less connection to conect to
    Access using JDBC. But it is not working. It is throwing
    Data Source Name too long exception.
    I think the problem is with ODBC version.
    Let me clear about this.
    Thanks in Advance.
    -raja

  • In a Conversion file, Using Java Script - IF statement with Greater,Less definitions

    Hail to All Gurus,
    Well, I've been trying to make a conversion file by using if statement of Java script with < , > definitions. unfortunately i got "Evolution error" over and over again.
    Actually i want to convert all dates before 2009 as 2008.12. And the dates which is greater than 2009 will be converted as they are (e.g. 2009.01 or 2010.02 etc.).
    Code is:
    js:if(%external%.toString().substring(0,4)<"200900"){"2008.12"}else{%external%.toString().substring(0,4) + "." + %external%.toString().substring(4,6)}
    SAP EPM version 10.0 SP15 Patch 2
    Build 8586
    Thanks for your help in advance

    Sadi,
    You can write if Statement in transformation not conversion.
    Look at this docs,
    How to Import Master Data and Hierarchies into SAP BusinessObjects BPC 7.5 from SAP NetWeaver BW
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c02d0b47-3e54-2d10-0eb7-d722b633b72e?QuickLink=index&…
    Thanks

  • How to connect Java with Acces (DSN Less)

    Hi, I'm try to connect an Access DataBase in Java with an example. I find it in this forum, but don't work...
    I've my database in the folder Data, and its name is BaseDat.mdb...
    I'm working in NetBeans 5.5, and the DataBase is in the Folder: "C:/Documents and Settings/MetalTux/POOL/src/Data/BaseDat.MDB"...
    This way, its work, but It's another way to use this... without the "C:/Documents and Settings/MetalTux/POOL/src/"????
    Please help me... and sorry my english...
    Regards...

    I have this in my code:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conec = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Documents and Settings/MetalTux/POOL/src/Data/BaseDat.MDB");
    This is OK... work in my code...
    But I want to know if there's another way to do this... without "C:/Documents and Settings/MetalTux/POOL/src" code....
    In Visual Basic I do this with "App.Path", but I don't know how I can do the same thing in Java...
    Please help me...

  • Why Oracle recommends to have less heap while using IBM Java in OEM 12c

    I've recently installed OEM 12c R4 and set the values for OMS_HEAP_MIN (-Xms) and OMS_HEAP_MAX (-Xmx) to 1740M in a 64-bit environment as per Oracle recommendation. This can be found at http://docs.oracle.com/cd/E24628_01/install.121/e24089/sizing.htm
    But with only 1740M heap size, i am frequently getting java heap size related alerts.
    Is there any specific reason for recommending only 1740M?
    Can I safely increase the heap size to 4G as the manual suggest for Medium size OEM installations in case of other Java vendors

    -When we ship the EM product, we default ship with 1.7G, but its up to customer to have a higher heap size accordingly to there use. I know, some customers are running 16GB of OMS heap size, since EM is centrally used by many of the people across their organization and target is more in the EM system.

Maybe you are looking for

  • I want to find the image tag name from Image layer name InDesign JavaScript?

    I want to find the image tag name from Image layer name InDesign JavaScript?

  • Jstl if doubt?

    I have a variable which comes from my properties file <fmt:message var="maxNumber" key="maxNumber"/>And I have another variable${k}I am trying to comapre tehse two variables as below; <c:if test="${k <'maxNumber' }"> Hello WOrld </c:if>But there seem

  • How to Remove Disabled Add-ons

    Working add-ons can be removed easily with a single button - whereas, disabled ones are not presented in the Add-on Manager with a means for removal. Seems an oversight; but in any event, with nothing in the FAQs about removing disabled add-ons, I'm

  • Fail to open java source file

    i just learn about java. but i find that i fail to open the java source that i had download from the net. do i need addition software to open it? if i had installed the jbuilder already?

  • LSMW for Vendor master

    Hi All, I am trying to use LSMW for Vendor Master upload. I have gone through all the steps and it is showing correct data in "Display Read Data". Also the data in "Display Converted Data" is correct. However when i am running step "Create Batch Inpu