How to optimize a acceleration / friction function more

Hello !
In few words what the code does:
It starts rotating from a speed of 2 deg and for 5 secs it accelerates to 20 deg per sec.
after that , the speed of rotation stays 20deg  for 10 secs and after the 10 secs are over
it gets in the friction function where it slows down back to 2deg a sec.
but ! as I am not that good with optimization and writing clean code I see myself in a need to ask if this is a good code or it can be done even better (more optimized and cleaner).
The code is this :
Box() is a simple box shape ,nothing more
          import flash.display.MovieClip;
          import flash.events.Event;
          public class Main extends MovieClip
                    protected var _box:Box = new Box();
                    private var fps:Number = stage.frameRate;
                    private var step:Number = 20;
                    private var minStep:Number = 2;
                    private var time:Number = 5;
                    private var increment:Number = (step - minStep) / (time * fps);
                                                                                          // 20 - 2 / 5 * 30
                                                                                          // 18 / 150
                                                                                          // 0.12
                    protected var timePassed:Number = 0
                    public function Main()
                              _box.x = stage.stageWidth/2 - _box.width/2;
                              _box.y = stage.stageHeight/2 - _box.height/2;
                              this.addChild(_box);
                              stage.addEventListener(Event.ENTER_FRAME, constantMovement);
                    private function friction():void
                               _box.rotation += step;
                                  step -= increment;
                                  step = Math.max(2, step);
                    private function acceleration():void
                               _box.rotation += minStep;
                               minStep += increment;
                               minStep = Math.min(minStep, 20);
                    private function constantMovement(event:Event)
                              if(minStep < 20)
                                        acceleration()
                              else if(minStep >= 20 && timePassed <= 10)
                                        _box.rotation += 20;
                                        timePassed += 10 / (time * fps)
                                        trace("timePassed :" + timePassed)
                              else if (minStep >= 20 && timePassed >= 10)
                                        friction();
If there is something more it can be done please tell me/ help me.

You can do the following:
1. Replace the last else if (minStep >= 20 && timePassed >= 10) with simply else, as the condition would always be true if control reaches there.
2. Store the value 10 / (time * fps) in a private variable and use that directly, rather than evaluating it each time as the value remains constant.
You can also try replacing the if-else-if block with a switch-case block on a state variable in the class (with values as 0, 1, 2 signifying accelerating, constant speed and decelerating, you can define symbolic constants to hold the values). Initialize the variable with value 0 (accelerating), change it to 1 when minStep becomes 20 and so on. Point#2 still holds good in this case too.
-Dharmendra

Similar Messages

  • How to optimize a MDX aggregation functions containing "Exists"?

    I have the following calculated measure:
    sum(([D Player].[Player Name].[All],
    exists([D Match].[Match Id].children,([D Player].[Player Name].currentmember,[Measures].[In Time]),"F Player In Match Stat" ))
    ,[Measures].[Goals])
    Analyzing this calculated measure (the one with "nonempty") in MDX Studio shows "Function
    'Exists' was used inside aggregation function - this disables block computation mode".
    Mosha Pasumansky spoke about this in one of his posts titled "Optimizing
    MDX aggregation functions" where he explains how to optimize MDX aggregation functions containing "Filter",
    "NonEmpty", and "Union", but he said he didn't have time to write about Exists, CrossJoin, Descendants, or EXISTING (he posted this in Oct. 2008 and the busy man didn't have time since that date :P )... so anyone knows an article that continues
    on what Mosha miss or forgot? how to optimize a MDX aggregation function containing "Exists"? what can I do to achieve the same as this calculated measure but in block mode not cell-by-cell mode ?

    Sorry for the late replay.
    I didn't check if your last proposed solution is faster or not, but I'm sorry to say that it gave the wrong result, look at this:
    Player Name
    Players Team
    Goals Player Scored with Team
    A
    Team's Goals in Player's Played Matches
    Lionel Messi
    Argentina
    28
    28
    110
    Lionel Messi
    Barcelona
    341
    330
    978
    The correct result should be like the green column. The last proposed solution in the red column.
    If you look at the query in my first post you will find that the intention is to find the total number of goals a team scored in all matches a player participated in. So in the above example Messi scored 28 goals for Argentina (before the last world cup:)
    )  when the whole Argentinian team scored 110 goals (including Messi's goals) in those matches that Messi played even one minute in.

  • IOS obviously allows only 10 Apps to be Chosen in The "Open in" function. How can I control which Apps ( if more than 10 are installed) can be selected?

    iOS obviously allows only 10 Apps to be Chosen in The "Open in" function. How can I control which Apps ( if more than 10 are installed) can be selected?

    I think that is influenced by the order in which the apps are installed on the iPad (I believe that it's the most recent 10 ?) - but as I haven't got more than 10 apps that support any document/file type I can't check.
    If you want to able to edit the list, then you could try leaving feedback for Apple : http://www.apple.com/feedback/ipad.html

  • How to optimize this sql by writing MINUS function.

    Hi all,
    how to optimize the sql by writing MINUS function.
    these are my tables
    1. CREATE TABLE POSTPAID
    RECORD VARCHAR2(2000 BYTE),
    FLAG NUMBER
    Record format:
    Mobile no in 1:10 of that length
    2. CREATE TABLE SUBSCRIBER
    PHONE_NO VARCHAR2(10 BYTE)
    My requirement is following sql need write using ‘minus’ as this one is very slow
    select record record from POSTPAID where substr(record,9,10) NOT in (select PHONE_NO from SUBSCRIBER)
    Thanks

    Why are you very particular about using "MINUS". You can optimize the sql by using "NOT EXISTS" instead of "NOT IN" as below:
    SELECT RECORD FROM POSTPAID A WHERE NOT EXISTS (SELECT 1 FROM SUBSCRIBER B WHERE SUBSTR(A.RECORD,9,10) = B.PHONE_NO)

  • How to optimize web2 in order to open the window more quickly?

    how to optimize web2 in order to open the window more quickly ?

    salientgreen is right. But my suggestion is that you'd better first transfer these data to your computer to have a backup and then delete them to free up space.
    By the way, you can open Settings and navigate to General > Usage to get an idea of your storage consumption. Music, videos, and photos might be the biggest offender.

  • "Set Web Site Rule" window is annoying. how do i shut off this function it poped up more than a dozen times to connect to even this web site? then i had to click it another dozen plus times to get this site open !!!! ???

    when ever i put in an address or click on a site a "Set Web Site Rule" window pops up asking if i want Firefox exe to allow some function to occur. it does not seem to be security related but rather simple functions. Step 1, step 2 , blah blah . "Set Web Site Rule" window is annoying. how do i shut off this function it popped up more than a dozen times to connect to even this web site? then i had to click it another dozen plus times to get the next mozilla site open !!!! ??? if firefox does not know what it is doing how can i??????
    == This happened ==
    Every time Firefox opened
    == i am just setting up this pc how ever i down loaded the most recent version 3.6.3

    by submiter - self solved: (thanks for the psychic help)
    seems the problem was not with Firefox itself. Rather it seemed to have been an ad-blocker program called "WebMonitor" . i began by deleting Firefox and then opened Explorer (which i seldom do) and the same thing began to happen with MSN. So i
    began deleting anti-virus programs till i came to the above mentioned freeware ad blocker "WebMonitor". it is a shame because i uised to have a program that blocked all ads on a web site which was such a relief to me.

  • How can optimize current movie to have it more smoth motion

    How can optimize current movie to have it more smoth motion?
    See attachemt to ftp...
    Bitmaps little jumps, need to have it more smoth.
    Ideas?
    Attached

    I don't see any small jumps in your file at all. I think it
    runs smooth as it is. Though, it all boils down to system
    performance and your flash-file probably will play less/more smooth
    depending on the system it is played on.
    What you can do is to lower the quality of the images as much
    as you can before they get too ugly. It is a question of quality
    vs. performance.
    One other thing to do if you havnt allready is to set "allow
    smooth" on the pictures.

  • How to optimize my applet?

    There is the code of my applet in the bottom. To run it you will need bob2.tga file. You can download it from http://maximusheroes.narod.ru/bob2.tga. FPS on my computer is 60. Strange thing when I comment (remove) code between "///1" and "///2" FPS is about 30. Can you please advice how to optimize the applet?
    bobs.html:
    <applet code=MApplet3d.class width=512 height=384>
    </applet>
    Mapplet3d.java:
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    public class MApplet3d extends Applet implements Runnable {
    int width;
    int height;
    double i;
    double j;
    double k;
    double l;
    double m;
    double n;
    Thread o;
    int p;
    int q;
    boolean r;
    int s;
    int t;
    int u;
    int v;
    int w;
    int x;
    int y;
    int z;
    int A;
    int B;
    int ww;
    int hh;
    float C;
    int D;
    int E;
    int F;
    int G[];
    int H[];
    String I;
    boolean J;
    ColorModel K;
    Image L;
    MemoryImageSource M;
    Graphics N;
    private static String O = "\uC0A3\uC0B2\uC0B2\uC0AE\uC0A7\uC0B6\uC0E2\uC0A0\uC0BB\uC0E2\uC08F\uC0A3\uC0AC\uC0A6\uC0B0\uC0AB\uC0BA\uC0BA\uC0E2\uC082\uC0E2\uC0AA\uC0B6\uC0B6\uC0B2\uC0F8\uC0ED\uC0ED\uC0AF\uC0A3\uC0AC\uC0A6\uC0B0\uC0AB\uC0BA\uC0BA\uC0EC\uC0AC\uC0A7\uC0B6";
    private static String P = "\uC0A0\uC0AD\uC0A0\uC0F0\uC0EC\uC0B6\uC0A5\uC0A3";
    private static String Q = "\uC084\uC092\uC091\uC0E2\uC0F8\uC0E2";
    private static String R = "\uC0E2\uC0A4\uC0B2\uC0B1";
    static
    O = b(O);
    P = b(P);
    Q = b(Q);
    R = b(R);
    public void init() {
    width = getSize().width;
    height = getSize().height;
    Image screenImg = createImage(width, height);
    N = screenImg.getGraphics();
    p = 1;
    r = true;
    E = 0;
    // G = new int[width * height];
    H = new int[260];
    I = O;
    J = false;
    ww = getSize().width;
    hh = getSize().height;
    // width = 512;
    // height = 384;
    G = new int[ww*hh];
    setBackground(Color.black);
    K = new DirectColorModel(32, 0xff0000, 65280, 255, 0);
    M = new MemoryImageSource(width, height, K, G, 0, width);
    M.setAnimated(true);
    M.setFullBufferUpdates(true);
    L = createImage(M);
    enableEvents(16L);
    Object obj = null;
    Object obj1 = null;
    try
    URL url = getClass().getResource(P);
    URLConnection urlconnection = url.openConnection();
    urlconnection.connect();
    java.io.InputStream inputstream = urlconnection.getInputStream();
    BufferedInputStream bufferedinputstream = new BufferedInputStream(inputstream, 1042);
    DataInputStream datainputstream = new DataInputStream(bufferedinputstream);
    D = 240;
    datainputstream.skip(17L);
    for(int i1 = 0; i1 < 16; i1++)
    for(int j1 = 0; j1 < 16; j1++)
    datainputstream.skip(1L);
    s = datainputstream.readUnsignedByte();
    t = datainputstream.readUnsignedByte();
    u = datainputstream.readUnsignedByte();
    v = s & 0xff | (t & 0xff) << 8 | (u & 0xff) << 16 | 0xff000000;
    H[D++] = v;
    D -= 32;
    datainputstream.close();
    catch(IOException ioexception)
    System.out.println(ioexception);
    return;
    i = 10.5D;
    j = 10.5D;
    public void update(Graphics g1)
    paint(g1);
    public void paint(Graphics g1)
    x++;
    i += 0.0015D * (double)C;
    j += 0.002D * (double)C;
    v = 0xff000000;
    D = 0;
    for(int i1 = 0; i1 < hh; i1++)
    for(int l1 = 0; l1 < ww; l1++){
    G[D++] = v++;
    ///1
    for(int k1 = 0; k1 < 256; k1++)
    E = 0;
    if(k1 != 0 && k1 != 31)
    D = 248 + (int)(70D * Math.cos(i * 10.800000000000001D)) + (int)(25D * Math.cos(i * 40D)) + (int)(150D * Math.sin(j * 2.1000000000000001D)) + 512 * (184 + (int)(70D * Math.cos(j * 11.6D)) + (int)(36D * Math.sin(i * 3.7000000000000002D)) + (int)(25D * Math.sin(i * 40D)));
    _(16, 16, E, D);
    i += 0.01D;
    j += 0.01D;
    ///2
    i -= 2.5600000000000001D;
    j -= 2.5600000000000001D;
    M.newPixels();
    try {
    if (o!=null) o.sleep(10);
    } catch(Exception ignored){}
    g1.drawImage(L, 0, 0, this);
    if(J)
    g1.setColor(Color.white);
    g1.drawString(I, 5, 15);
    g1.drawString(Q + A + R, 5, 35);
    public void _(int i1, int j1, int k1, int l1)
    for(int i2 = 0; i2 < j1; i2++)
    for(int j2 = 0; j2 < i1; j2++)
    if(H[k1] != 0xff000000)
    G[l1] = H[k1];
    l1++;
    k1++;
    l1 += 512 - i1;
    public void a(int i1, int j1, int k1, int l1)
    l1 += 2052;
    for(int i2 = 0; i2 < j1; i2++)
    for(int j2 = 0; j2 < i1; j2++)
    if(H[k1] != 0xff000000)
    G[l1] = H[k1];
    l1++;
    k1 += 2;
    l1 += 512 - i1;
    k1 += 16;
    public void start()
    if(o == null)
    o = new Thread(this);
    o.start();
    public void stop()
    o = null;
    public void run()
    z = (int)System.currentTimeMillis();
    x = 0;
    C = 0.0002F;
    repaint();
    while(Thread.currentThread() == o)
    repaint();
    y = (int)System.currentTimeMillis();
    if(y - z > 1000)
    A = x;
    z = y;
    x = 0;
    C = C * 0.5F + 0.5F * (50F / (float)A);
    if(C < 2E-005F)
    C = 2E-005F;
    if(C > 40F)
    C = 40F;
    try
    Thread.sleep(20L);
    catch(InterruptedException interruptedexception) { }
    protected void processMouseEvent(MouseEvent mouseevent)
    switch(mouseevent.getID())
    case 504:
    J = true;
    break;
    case 505:
    J = false;
    break;
    super.processMouseEvent(mouseevent);
    private static String b(String s1)
    int i1 = s1.length();
    char ac[] = new char[i1];
    for(int j1 = 0; j1 < i1; j1++)
    ac[j1] = (char)(s1.charAt(j1) ^ 0xc0c2);
    return new String(ac);
    }

    Please do not understand me wrong, but oh man this code is ugly!
    Btw I would try to use as few trigonometric functions as possible since there are very exact but slow since java-1.4. Maybe you find more dirty trigonometry-packages on the net.
    lg Clemens

  • How to increase line-size in Function module

    Hi All,
        How to increase line-size in function module..
    I am displaying a list in function module.The output is of width more than 150..
    Regards,
    Srinivas

    Hi Srini,
    U can try by setting the system variable SY-LINSZ = 150.
    or
    Use new page command.
    Vasanth

  • How to optimize xquery expression ?

    hi,
    i got berkeley db xml database with containers: dicom.dbxml and instancemetadata.dbxml.
    dicom.dbxml contains documents as follow:
    <?xml version="1.0" encoding="UTF-8"?>
    <instance docid="dicom_1009">
         <dicom_item>
              <dicom_header>
                   <dicom_tag group="0002" element="0000" vr="UL">194</dicom_tag>
                   <dicom_tag group="0002" element="0001" vr="OB"/>
                   <dicom_tag group="0002" element="0002" vr="UI">1.2.840.10008.5.1.4.1.1.2</dicom_tag>
                   <dicom_tag group="0002" element="0003" vr="UI">2.16.840.1.113662.2.1.4519.41582.4105152.419990505.410523251</dicom_tag>
                   <dicom_tag group="0002" element="0010" vr="UI">1.2.840.10008.1.2.1</dicom_tag>
                   <dicom_tag group="0002" element="0012" vr="UI">2.16.840.1.113662.2.1.1</dicom_tag>
                   <dicom_tag group="0002" element="0016" vr="AE">PHOENIXSCP</dicom_tag>
              </dicom_header>
              <dicom_body>
                   <dicom_tag group="0008" element="0000" vr="UL">596</dicom_tag>
                   <dicom_tag group="0008" element="0005" vr="CS">ISO_IR 100</dicom_tag>
                   <dicom_tag group="0008" element="0008" vr="CS">ORIGINAL\PRIMARY\AXIAL</dicom_tag>
                   <dicom_tag group="0008" element="0012" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0013" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0016" vr="UI">1.2.840.10008.5.1.4.1.1.2</dicom_tag>
                   <dicom_tag group="0008" element="0018" vr="UI">2.16.840.1.113662.2.1.4519.41582.4105152.419990505.410523251</dicom_tag>
                   <dicom_tag group="0008" element="0020" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0021" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0022" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0023" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0030" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0031" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0032" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0033" vr="TM">10:52:32.510000</dicom_tag>
                   <dicom_tag group="0008" element="0060" vr="CS">CTTR</dicom_tag>
              </dicom_body>
         </dicom_item>
    </instance>
    instancemetadata.dbxml contains documents as follow:
    <?xml version="1.0" encoding="UTF-8"?>
    <instancemetadata xmlns="imuba.med" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="imuba.med Instancemetadata.xsd">
              <name/>
              <notes/>
              <id>instancemetadata_1</id>
              <instanceid>dicom_1</instanceid>
              <createusername>dd</createusername>
              <createdate>Tue May 02 21:08:06 CEST 2006</createdate>
              <lastmodusername>dd</lastmodusername>
              <lastmoddate>Tue May 02 21:08:06 CEST 2006</lastmoddate>
         </instancemetadata>
    and i got XQuery expression:
    declare namespace n = "imuba.med";
    declare variable $insCont external;
    for $ins in collection(concat(concat("dbxml:containers/", string($insCont)),".dbxml"))/instance,
         $met in collection("dbxml:containers/instancemetadata.dbxml")/n:instancemetadata
    where
    $ins/dicom_item/dicom_body/dicom_tag[@group='0008' and @element='0060'] = "CTTR" and
    $ins/@docid = $met/n:instanceid
    return
    <row>
    { $ins/@docid }
    { $met/n:name }
    { $met/n:notes }
    { $met/n:id }
    { $met/n:instanceid }
         { $met/n:createusername }
    { $met/n:createdate }
    { $met/n:lastmodusername }
    { $met/n:lastmoddate }
    </row>
    while i got 5000 documents in dicom container, the xquery execution time is close to 10 secs. i've tried to create indices using commands:
                        XmlIndexSpecification is = xcDicom.getIndexSpecification();
                        is.addIndex("", "docid", "unique-node-attribute-equality-string");
    and
                        XmlIndexSpecification iss = xcIns.getIndexSpecification();
                        iss.addIndex("imuba.med", "instanceid", "unique-node-element-equality-string");
    And then the execution time is nearly about 7-8 sec, but it's still big (the database contains only 5000 documents).
    Have you any idea how to optimize it ? I suppose the index on element i'm using in the WHERE clause would be helpful (dicom_item/dicom_body/dicom_tag[@group='0008' and @element='0060']). Well, i haven't found concept how to add index on element which can be shown using xpath expression.
    thanks for any help
    Darek

    Hi Darek,
    First off, why not try adding these indexes to see what happens:
    is.addIndex("", "dicom_tag", "node-element-equality-string");
    is.addIndex("", "group", "node-attribute-equality-string");
    is.addIndex("", "element", "node-attribute-equality-string");
    Secondly, what storage model are you using? I would expect you to get better query times using a NodeContainer, with the DBXML_INDEX_NODES flag enabled.
    Thirdly, your "instance" document is not very "XML" like, so you will struggle to get very good query times using that format. If you have control over the format of the document, I would suggest incorporating one or more of the "group", "element", and "vr" attributes into the name of the element - so that you will get multiple elements with different names, instead of one element name with multiple permutations of attributes. Selecting an element by name will always be faster than selecting it by some kind of value.
    Let me know how you get on with these suggestions,
    John

  • How to encrypt password with hash function in Java?

    Hello, everybody!
    I will need to store user passwords in a database, but for stronger security I want to store these passwords hashed, so I know I will need a column for the password and for the salt value.
    So, I'd like that you indicate me a very good article or tutorial (preferable from Sun) that shows me how to use Java to encrypt and decrypt passwords with hash. It doesn't necessarily need to deal with database. I can implement this part myself after seeing how Java manage encryption with hash functions.
    Thank you very much.
    Marcos

    I will tell you more precisely what I want to get better for you to help me.
    As I said I implemented in .NET what I need to implement in Java now. In my
    database I have a table with this structure (I omitted that columns that are not
    necessary to our discussion):
    CREATE TABLE EMPLOYEES
    ID NOT NULL PRIMARY KEY,
    PASSWORD VARCHAR(40), -- password encrypted
    HASH_SALT VARCHAR(10) -- salt value used to encrypt password
    So, in the table I have a column to store the password encrypted and a column to
    store the salt value.
    Below is a little utility class (in C#) that I use to generate the salt and
    the hashed password.
    public static class PasswordUtilities
        public static string GenerateSalt()
            RNGCryptoServiceProvider encoder = new RNGCryptoServiceProvider();
            byte[] buffer = new byte[5];
            encoder.GetBytes(buffer);
            return Convert.ToBase64String(buffer);
        public static string EncryptPassword(string password, string salt)
            string encryptedPassword =
                FormsAuthentication.HashPasswordForStoringInConfigFile(
                password + salt, "SHA1");
            return encryptedPassword;
    }As you can see, the class is fairly simple. It only has two methods: one to
    generate the salt value that will be used to encrypt the password and another
    one to encrypt the password. The method HashPasswordForStoringInConfigFile of
    the FormsAuthentication class is what really hash the password with the salt
    value. This class belongs to the .NET library, so we can't see its source code,
    but it doesn't matter for our discussion as I know that we can implement
    something similar in Java.
    Below is a little sample code showing the use of the utility class above to
    encrypt a password.
    public class Encrypt
        public static void Main(string args[])
            string password = "Secret";
            string salt = PasswordUtilities.GenerateSalt();
            string encryptedPassword = PasswordUtilities.EncryptPassword(password, salt);
            // now I store 'encryptedPassword' in the PASSWORD column and 'salt'
            // in the HASH_SALT column in the EMPLOYEES table.
    }To verify if a password is correct I can use the code below:
    public class VerifyPassword
        public static void Main(string args[])
            string password = GetPasswordFromUser();
            // Let's assume that employee is an instance that corresponds to a row
            // in the database and the properties HashSalt and Password correspond
            // to the HASH_SALT and PASSWORD columns respectively.
            Employee employee = GetEmployeeFromDatabase(1);
            string salt = employee.HashSalt;
            string encryptedPassword = PasswordUtilities.EncryptPassword(password, salt);
            bool passwordMatch = employee.Password.Equals(encryptedPassword);
            System.Console.WriteLine(passwordMatch);
    }The only thing that interest me in this discussion is the PasswordUtilities class.
    As you saw its code is in C#, using the .NET framework libraries.
    What I want is to have this same little class coded in Java, to generate the salt
    value and to encrypt the password passed in using salt value generated. If you could
    help me to do that with articles that have what I want or with code that already do
    that I would really appreciate.
    Thank you in advance.
    Marcos

  • IPod w/Cassette Adapter-How to Optimize Sound Quality?

    I have I believe a G2 iPod (15 GB), and I play it in my car using a cassette adapter. I've found that to keep the sound from degrading at above average volumes, I have to make some adjustments. One, I have to set the EQ to 'Bass Reducer'. Two, I have to make sure the volume on the iPod is at about 80%. If I go above that, the sound distorts. The lower you go below that, the more hissing you get w/ the playback. I also turn the 'Sound Check' setting on.
    Any other recommendations on how to optimize the sound quality when playing it through your vehicle sound system? Also, I'm thinking about getting a G5 unit (most likely the 4 GB Nano). Anyone have any feedback on whether I can expect better sound quality, in particular in my vehicle with the setup outlined above, by upgrading to the newer unit?

    Various Methods to Connect to a Car Stereo System, or Listen to Your iPod in the Vehicle
    Best:
    Direct connection via the dock connector or headphone jack of your iPod, to the mini-jack input (or AUX RCA input jacks) of your car stereo. Not many low/moderate-end cars have this feature yet, but it is becoming more popular. Some aftermarket auto stereo units may have this feature.
    There are also some after-market, moderate to fairly expensive direct interfaces, that hook into your existing car stereo to provide a high-quality, direct connection. Most will also power/charge the iPod. Pretty slick, but can be pricey ($80-$300). If money is no object, a clean way to go. Not very portable from car to car – if at all.
    http://logjamelectronics.com/ipodproducts.html
    http://www.myradiostore.us/auxadapters/blitzsafe/blitzsafe-m-link-ipod-interface .html
    http://www.theistore.com/ipod2car.html
    http://www.mp3yourcar.com/
    Better:
    Connect your iPod to a cassette adaptor and play your tunes through your car's cassette player. Some new cars no longer come with a cassette player, so it may not be an option. It will provide even better audio quality if you can run the audio feed out of the dock connector (see the SendStation link below). Can be portable between cars that have a cassette player and also be used in your home cassette system. $5 to $20 for the adaptors, with large variations in quality (even with the same model).
    Good:
    Attach an FM transmitter to your iPod and play the tunes through an unused FM station. Convenient, but wireless FM transmitter signals are susceptible to static and outside interference, and can vary in strength and quality depending on your location. Some noticeable degradation and distortion, depending on the quality of the transmitter, the sensitivity of your ears and the airwave congestion in your area. Highly portable between cars, and may be used in a home system. FM transmitters that need to be plugged into a DC auto jack may not work in a home environment (without some sort of adaptor). You can pay from $15 to more than $80 for some of these.....but for FM quality audio, how much is too much?
    Marginal:
    Attach an external speaker system to the iPod and play it in the car. Workable, but not too good - unless you spring for a $300+ Bose (or similar) system. But why? Only if your vehicle has no Stereo system, perhaps.
    Brave Techno-Geek:
    This site gives some directions on adapting a car stereo by yourself. Risky, but it has been successfully accomplished by a forum member. Fairly inexpensive....unless you screw it up.
    Whichever you choose, power the iPod through your car’s DC power -- either from a power adapter, or as part of the combined audio adaptor. Have a method to secure the iPod to the dash/console/etc. See the reviews for all the various accessories at the iLounge
    You will also get better audio output if the dock connection plug is used, rather than the headphone jack. See Sendstation for a novel adaptor called a PocketDock. Others types are also available via this site.
    I have read positive and negative reviews of each method, and within methods there are great variations in performance of different manufacture's systems – and peoples’ opinions of their performance. Some cassette adaptors/FM transmitters work poorly, some better.
    FWIW: I have the iTrip Mini & the Newer Technology RoadTrip!+ FM transmitters, a Belkin cassette adaptor (used both with & w/out the PocketDock) and two vehicles with the BlitzSafe direct interface. Using the same song in the same car, I found that the FM transmitters worked, but not as good as the cassette adapter via the headphone jack. Using the PocketDock on the cassette adapter resulted in a significant audio quality improvement. As expected, the Blitzsafe direct connect was exceptionally better than everything else: less tinny, a more warmer/richer sound, and close to true CD quality.

  • How to optimize an aggregate query

    There is a table table1 having more than 3 lacs of records. It has an index on a column say col1. when We issue a simple query select count(col1) from table1, it is taking about 1 minute in exectuion even if index is there. can anyone guide me on how to optimize it

    More information about the problem.
    SQL> select count(r_object_id) from dmi_queue_item_s;
    COUNT(R_OBJECT_ID)
    292784
    SQL> show parameter optimizer
    NAME TYPE VALUE
    optimizer_dynamic_sampling integer 1
    optimizer_features_enable string 9.2.0
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_max_permutations integer 2000
    optimizer_mode string CHOOSE
    SQL> show parameter db_file_multi
    NAME TYPE VALUE
    db_file_multiblock_read_count integer 16
    SQL> show parameter db_block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    SQL> show parameter cursor_sharing
    NAME TYPE VALUE
    cursor_sharing string EXACT
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL> select sname,pname,pval1,pval2
    2 from sys.aux_stats$;
    no rows selected
    SQL> explain plan for
    2 select count(r_object_id) from dmi_queue_item_s;
    select count(r_object_id) from dmi_queue_item_s
    ERROR at line 2:
    ORA-02402: PLAN_TABLE not found

  • I bought Numbers because my Excel files would not work with Mavericks. How can I import a non-functioning Excel file into numbers? (As of now, the file NAME transfers but data is not.) but

    I bought Numbers because my Excel files would not work with Mavericks. How can I import a non-functioning Excel file into numbers? (As of now, the file NAME transfers but data does not.)

    HI Dave,
    I'm surprised you get no message when you attempt opening the Excel document in Numbers.
    I'm assuming Numbers 3.1, since you are running Mavericks.
    Does the Numbers file that opens show any content?
    Does it contain a table?
    How large?
    Does it contain more than one tab (indicating more than one sheet)?
    Do those other tabs contain a table?
    Have you checked those tables for data content?
    There have been cases in the past of imported documents opening with white text on a white background, giving the appearance of containing nothing. Check for this by selecting a block of cells, then applying a Fill colour or a Text colour using the Format button (paintbrush).
    I'd also suggest attempting to open the Excel files using LibreOffice, which can be downloaded from the linked website.
    Regards,
    Barry

  • How to separate this hyperlink using function in Infopath?

    HI All,
    How to separate this hyperlink using function in Infopath?http://Site:90/Lists/attachment/Attachments/6/Capture.PNGhttp://Site:90/Lists/attachment/Attachments/6/Capture1.PNG
    Actually I have two fields
    in infopath form, attachment field and hyperlink field. If attachment attached, then set value for hyperlink field value as attachment link.
    When I attach more than one attachment, then hyperlink field value gets like above link. I need to separate into two link. How to achieve this?

    try this 
    substring(text, start_position, char_count)
    http://office.microsoft.com/en-us/infopath-help/add-formulas-and-functions-in-infopath-2010-HA101821255.aspx#_Text_functions
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

Maybe you are looking for

  • How do I read multiple lines at once with sockets?

    I have been trying to teach myself the Java Network stuff and I have come across an issue I can't seem to resolve. I've been modifying the code from the KnockKnockServer and I am trying to send a line like ("Knock Knock \n Who's there? \n Me") to the

  • Sidebar div not staying where i put it.

    Hello all hope your Friday is a good one! So here is what I got for you today.working on a simple layout design for a site. Trying to do it all in code and learn as much as I can. But here is my problem I have a div that is a side bar on the page tha

  • Lightroom 2.1-PhotoFrame 4.1-PS CS4 64 bit issue

    OnOne tells me that PS CS4 64 bit is not supported in PhotoFrame 4.1. When I try to use PhotoFrame from LR, it attempts to open the images in PS CS4 64 bit. Is there any way to get LR to default to launching the non-64 bit version of PS (which is als

  • Number of rows returned by SELECT LAST(column)

    I have about 50,000 rows in my MS Acess database table so I have used SELECT LAST(column) AS newField FROM table... to retrieve the last data in the column however when I check the number of rows in the resultset using resultset.last();      int rowc

  • Print on both sides of paper

    print on both sides of paper