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

Similar Messages

  • How to optimize your PC for the 0404 USB and 0202 USB

    This is a guide on optimizing your system for the 0404 USB and 0202 USB.
    Make sure the 0404 USB is using a USB HOST that is on an IRQ alone. This means no other device in the PC can be sharing its IRQ.
    If you are running a hyper-threaded CPU, by turning hyperthreading off from the bios. You can set the latency at 20ms or lower and you will usually not have any latency issues.
    Change Processor Scheduling to 'Background Services' - Navigate to the Advanced page of the System applet. Click on the Performance Settings button, select its Advanced tab and click on 'Background Services' for Processor Scheduling.
    Switch Off Power Schemes - In the Power Options applet, choose the 'Always On' power scheme. Change the settings for monitor and hard disk turn off and System standby to 'Never', so that your PC doesn't unexpectedly conk out during song playback
    Disable System Sounds - Select the 'No Sounds' scheme on the Sounds tab of the Sounds and Audio Devices applet.
    Make sure legacy USB support is disabled in your BIOS.

    Hi everybody.
    This message to share my experience of the 0404 USB under Windows 7.
    I previously operated this sound adapter under Windows XP and it was working fine with my pipe organ simulator (Hauptwerk).
    When I switched to W7 on a Dell Vostro (professionnal series), sound was muting after exactly one minute . The same with a video on Yutube.....
    I did all the adjustments suggested here and there on the web (sampling rate, drivers) , I tried to operate at moonlight, I shot a chicken, etc ...
    After many manipulations, I noticed that, if I was doing "something", for instance moving the sound level up and down, the sound was going on ....
    The solution was in part at the beginning of the topic "how to optimize your PC for th 0404, etc ....".
    The keyword is "interrruption".
    As a matter of fact, the Dell laptop is strongly closed. The BIOS allows no adjustment of nothing.... No way to control interruptions allocation.
    BUT!!! I noticed that the two USB 2.0 ports are located very far away from each other. I supposed there would be TWO controlling chips. And I tried the second one. AND IT WORKED!
    So the E-MU guy is right, the device must get a free interruption line to operate ....!

  • How can I use applet to get the desktop image of client

    hi,I have a question to ask u.
    How can I use applet to get the desktop image of client? Now I develop a web application and want user in the client to get his current image of the screen.And then save as a picture of jpeg format ,then upload it to the server?
    I have done an application to get the screen image and do upload file to server in a servlet with the http protocal.

    Since the desktop image is on the client's local hard drive, you'll need to look at trusted applets first.

  • HOw to run the Applet in dos mode

    how to run the applet in Command Prompt(DOS).
    I have save this in directory D/vijay/javap/A.java and my JDK is in C drive.
    Plz send me reply as soon as possible.
    My code is :-
    import java.applet.*;
    import java.awt.*;
    public class A extends Applet
    private int w, h;
    public void init( )
         w = 45;
         h = 50;
    public void paint(Graphics g)
         g.drawRect(w, h, 20, 80);
    }

    import java.applet.*;
    import java.awt.*;
    public class A extends Applet
    private int w, h;
    public void init( )
    w = 45;
    h = 50;
    public void paint(Graphics g)
    g.drawRect(w, h, 20, 80);
    <applet class="A" height="200" width="200" code="A.class">
    </applet>
    */And in command prompt
    javac A.java
    appletviewer A.java
    Message was edited by:
    passion_for_java

  • How to load an Applet application for 1000cards?

    Hi Friends..
    I want to know How to load an Applet application for 1000cards?..
    Assume that, i have an Applet application that need to loaded into 1000cards..
    So, how to solve this?
    Do i must to load an application manually for each card?
    Is there any another way?
    Thanks in advance..

    for 1000 cards you can use a "small" printer like an evolis "dualis" or something like that
    we've produced thousands of cards with this method in my company.
    the pro is that you can also print the cards in the same time.
    they usually have simple APIS like get_new_card_from_loader(), put_card_on_contacts(), eject_card()
    you can connect any reader on the printer , the raw card contacts are available on a connector.
    some printers also have contactless couplers.
    but remember that deploying cards in the field is not just loading an applet.
    it's also a cryptographic challenge, you need to change the card keys or anyone will be able to play with your cards, adding and removing applets as they want.
    typically this is achieved by using an ultra secret mother key and whatever derivation algorithm you like using data from INIT UPDATE as diversifier. example, you can TDES cipher part of the INIT UPDATE data using the mother key as TDES key, or use something involving SHA1, using a HSM if you are serious, etc.
    for your entertainment here is a high volume card personnalization machine. That's amazing.
    http://www.youtube.com/watch?v=6ZBF_yKRF5w

  • How to create an applet that shows a pdf as non-editable.

    Hi friends,
    Does any one know how to create an applet that shows a pdf document (should make that pdf a non-editable one) while clicking a link.Its urgent for me as I have to complete this one tomorrow itself...please help me...
    I am able to view the pdf document but that cannot be make a non-editable one.
    Can anyone gave me the code for that one....please I am not very much good in Java.

    PDF is a proprietary format and Java doesn't support it by default. Are you using a 3rd party tool to create the PDF? If so, you need to review the developer docs to see how to make the document non-editable. Frankly, I don't see why you're using an Applet to view a PDF in the first place. What exactly are you trying to do. I'm confused.

  • How to write a applet with multiple menu

    Hi all,
    How to write a applet with multiple menu or please tell me where can I get a examples
    thanks

    i'm writing a project and it seem not work with browser. If anyone can help please leave me a e-mail so that i can send my source to you.
    Thanks so much

  • How to open an Applet from a text link in a HTML Page

    Hi There
    How to open an Applet from a text link
    in a HTML page
    For example I have a HyperLink "Open Applet"
    When a user clicks that link i want to open a
    Applet in a AWT Window.
    How can i do this
    Will any one help me?
    -Ramya

    u can use javascript for that
    <SCRIPT language="javascript">
    function loadAppNow() {
    document.write("<APPLET ......></APPLET>")
    </SCRIPT>
    LoadApplet
    this will overwrite the applet on current window
    There are many good ways other than document.write to open in same window. I don't remember the syntax right now.
    Plz. refer to javascript tutorial for that.
    even you can insert the applet while retaining previous contents. its quite easy actually.
    regards....bhart

  • 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 run an Applet using the JDK1.3.1 platform?

    I'm a beginner of Java Applet.
    I've type in the sample program provided in the text book, and compiled it using the jdk1.3.1 platform.
    Usually we run a java program using java [filename], right?
    How about running an applet file?
    What is appletviewer function?
    Thanks!

    I try to put it in a HTML page but it required me to download a Java Virtual Machine.
    I've been searching sources for that but stil cannot get.
    This is always what I get:
    [We're sorry, you cannot view this page because it requires the Microsoft Java Virtual Machine (MSJVM). Your machine does not have the MSJVM installed. For more information please visit www.microsoft.com/java.]
    I visit java.sun.com. On the right side of the page listed with the HOT DOWNLOADS.
    I click on the Java VM but still cannot get anything...
    Can u help me on that?
    I've been trying for 2 days already.
    Thanks!

  • How to get my applet signed

    Hi
    I have an applet which has the functionality to print images.when i am working with appletviewer on local machine it works. when i tried to print through browser i am getting access denied error...i came to know that my applet has to get signed so that it prints data to printer. Pls tel me how to achieve it...
    And one more thing is i want to run my applet in a JSP so that i can access the file from different machine.
    For this i tried using jsp:plugins..but it is also giving error...
    Can u suggest me at this moment. how to get my applet signed...and how to resolve the plugin error...
    thanks
    type Exception report
    Error message :.....................
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /view.jsp(9,0) jsp:plugin not closed
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
         at org.apache.jasper.compiler.Parser.parsePlugin(Parser.java:643)
         at org.apache.jasper.compiler.Parser.parseAction(Parser.java:669)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)

    Don't know about your second question but signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post

  • 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

  • How to load an applet in card?

    Hi everyone,
    I use NetBeans and its JavaCard Simulator, protocol T = 0, and I am wandering how to load an applet using APDU tool instead of clicking on Run Projetc which do the mentioned thing. It would be helpfull if someone post ouptut and explain all used apdu commands.
    Thanks,
    Mare.

    Here is the APDU trace:
    Select Card Manager
    => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00
    <= 6F 10 84 08 A0 00 00 00 03 00 00 00 A5 04 9F 65
        01 FF 90 00
    Authenticate
    cm>  init-update 255
    => 80 50 00 00 08 09 41 55 62 DF F5 61 2B 00
    <= 00 00 C6 D8 6A 1C B2 02 14 13 FF 02 00 00 93 73
        3A B8 2C 0F 8E A4 1D EF 84 60 77 12 90 00
    cm>  ext-auth plain
    => 84 82 00 00 10 B5 AA A8 E6 8B 73 57 F9 5D 37 6C
        D1 FE CF 56 32
    <= 90 00
    Install For Load
    => 80 E6 02 00 12 05 11 11 11 11 11 08 A0 00 00 00
        03 00 00 00 00 00 00 00
    <= 00 90 00
    Load Block 1
    => 80 E8 00 00 FF C4 82 01 65 01 00 1A DE CA FF ED
        02 02 04 00 01 05 11 11 11 11 11 0A 68 65 6C 6C
        6F 57 6F 72 6C 64 02 00 21 00 1A 00 21 00 0A 00
        0B 00 2A 00 0E 00 A1 00 0A 00 17 00 00 00 5A 02
        5A 00 00 00 00 00 00 01 01 00 04 00 0B 01 02 01
        07 A0 00 00 00 62 01 01 03 00 0A 01 06 11 11 11
        11 11 11 00 08 06 00 0E 00 00 00 80 03 00 FF 00
        07 01 00 00 00 1C 07 00 A1 00 01 10 18 8C 00 04
        7A 05 30 8F 00 09 3D 8C 00 02 18 1D 04 41 18 1D
        25 8B 00 03 7A 04 22 18 8B 00 07 60 03 7A 19 8B
        00 06 2D 1A 04 25 75 00 6D 00 06 00 00 00 1D 00
        01 00 2C 00 02 00 3B 00 40 00 4A 00 41 00 57 00
        42 00 62 19 8B 00 05 3B 19 03 1A 07 25 8B 00 08
        70 49 19 8B 00 05 3B 19 03 1A 07 25 8B 00 08 70
        3A 19 8B 00 05 3B 19 03 1A 07 25 8B 00 08 70 2B
        03 32 04 8D 00 00 32 1F 8D 00 01 70 1E 05 8D 00
        00 32 1F 8D 00
    <= 00 90 00
    Load other Blocks with  80 E8 00 xx ... which xx is the Block number
    Load Last Block
    => 80 E8 80 01 6A 00 01 70 13 03 8D 00 00 32 1F 8D
        00 01 70 08 11 6D 00 8D 00 01 7A 08 00 0A 00 00
        00 00 00 00 00 00 00 00 05 00 2A 00 0A 06 80 08
        10 06 80 07 01 06 00 00 01 03 80 03 02 06 80 03
        00 03 80 0A 06 03 80 0A 01 03 80 03 03 03 80 0A
        08 01 00 02 00 09 00 17 00 00 00 13 05 06 04 0A
        07 07 25 09 06 09 06 09 08 05 06 05 06 05 08 00
    <= 00 90 00
    Install For Install
    cm>  install -i 111111111111  -q C9#() 1111111111 111111111111
    => 80 E6 0C 00 1A 05 11 11 11 11 11 06 11 11 11 11
        11 11 06 11 11 11 11 11 11 01 00 02 C9 00 00 00
    <= 90 00Note that if you want to use APDU manually, you should do the authenticate process and loading all blocks of the CAP file yourself.
    Note that this is the APDU for a real card that is executed in JCOP Environment. I think it should work for the simulators too except the authentication commands.

  • How to sign java applet policy to end user?

    i have putted my applet class on server, i want all end users can access it on server, how to sign the java.policy to there JRE?
    can anyone help me?

    I found this some where else. It shows how to sign an applet.
    START OF DOC
    How To Sign a Java Applet
    The purpose of this document is to document the steps required to sign and use an
    applet using a self-signed cert or CA authorized in the JDK 1.3 plugin.
    The original 9 steps of this process were posted by user irene67 on suns message forum:
    http://forums.java.sun.com/thread.jsp?forum=63&thread=132769
    -----begin irene67's original message -----
    These steps describe the creation of a self-signed applet. This is useful for testing purposes. For use of public reachable applets, there will be needed a "real" certificate issued by an authority like VeriSign or Thawte. (See step 10 - no user will import and trust a self-signed applet from an unkown developer).
    The applet needs to run in the plugin, as only the plugin is platform- and browser-independent. And without this indepence, it makes no sense to use java...
    1. Create your code for the applet as usual.
    It is not necessary to set any permissions or use security managers in
    the code.
    2. Install JDK 1.3
    Path for use of the following commands: [jdk 1.3 path]\bin\
    (commands are keytool, jar, jarsigner)
    Password for the keystore is any password. Only Sun knows why...
    perhaps ;-)
    3. Generate key: keytool -genkey -keyalg rsa -alias tstkey
    Enter keystore password: *******
    What is your first and last name?
    [Unknown]: Your Name
    What is the name of your organizational unit?
    [Unknown]: YourUnit
    What is the name of your organization?
    [Unknown]: YourOrg
    What is the name of your City or Locality?
    [Unknown]: YourCity
    What is the name of your State or Province?
    [Unknown]: YS
    What is the two-letter country code for this unit?
    [Unknown]: US
    Is CN=Your Name, OU=YourUnit, O=YourOrg, L=YourCity, ST=YS, C=US
    correct?
    [no]: yes
    (wait...)
    Enter key password for tstkey
    (RETURN if same as keystore password):
    (press [enter])
    4. Export key: keytool -export -alias tstkey -file tstcert.crt
    Enter keystore password: *******
    Certificate stored in file tstcert.crt
    5. Create JAR: jar cvf tst.jar tst.class
    Add all classes used in your project by typing the classnames in the
    same line.
    added manifest
    adding: tst.class(in = 849) (out= 536)(deflated 36%)
    6. Verify JAR: jar tvf tst.jar
    Thu Jul 27 12:58:28 GMT+02:00 2000 META-INF/
    68 Thu Jul 27 12:58:28 GMT+02:00 2000 META-INF/MANIFEST.MF
    849 Thu Jul 27 12:49:04 GMT+02:00 2000 tst.class
    7. Sign JAR: jarsigner tst.jar tstkey
    Enter Passphrase for keystore: *******
    8. Verifiy Signing: jarsigner -verify -verbose -certs tst.jar
    130 Thu Jul 27 13:04:12 GMT+02:00 2000 META-INF/MANIFEST.MF
    183 Thu Jul 27 13:04:12 GMT+02:00 2000 META-INF/TSTKEY.SF
    920 Thu Jul 27 13:04:12 GMT+02:00 2000 META-INF/TSTKEY.RSA
    Thu Jul 27 12:58:28 GMT+02:00 2000 META-INF/
    smk 849 Thu Jul 27 12:49:04 GMT+02:00 2000 tst.class
    X.509, CN=Your Name, OU=YourUnit, O=YourOrg, L=YourCity, ST=YS, C=US
    (tstkey)
    s = signature was verified
    m = entry is listed in manifest
    k = at least one certificate was found in keystore
    i = at least one certificate was found in identity scope
    jar verified.
    9. Create HTML-File for use of the Applet by the Sun Plugin 1.3
    (recommended to use HTML Converter Version 1.3)
    10. (Omitted See Below)
    -----end irene67's original message -----
    To make the plug-in work for any browser you have two options with the JDK 1.3 plugin.
    1) Is to export a cert request using the key tool and send it to a CA verification source like verisign.
    When the reponse comes back, import it into the keystore overwriting the original cert for the generated key.
    To export request:
    keytool -certreg -alias tstkey -file tstcert.req
    To import response:
    keytool -import -trustcacerts -alias tstkey -file careply.crt
    An applet signed with a cert that has been verified by a CA source will automatically be recognized by the plugin.
    2) For development or otherwise, you may want to just use your self-signed certificate.
    In that case, the JDK 1.3 plugin will recognize all certs that have a root cert located in the JDK 1.3 cacerts keystore.
    This means you can import your test certificate into this keystore and have the plugin recognize your jars when you sign them.
    To import self-signed certificate into the cacerts keystore, change directory to where the JDK plugin key store is located.
    For JDK 1.3.0_02: C:\Program Files\JavaSoft\JRE\1.3.0_02\lib\security
    For JDK 1.3.1: C:\Program Files\JavaSoft\JRE\1.3.1\lib\security
    Import your self-signed cert into the cacerts keystore:
    keytool -import -keystore cacerts -storepass changeit -file tstcert.crt
    (the password is literally 'changeit')
    Now, regardless of which method you use, the applet should be recognized as coming from a signed jar. The user can choose to activate it if he / she chooses. If your applet uses classes from multiple jars, for example Apache's Xerce's parser, you will need to sign those jars as well to allow them to execute in the client's brower. Otherwise, only the classes coming from the signed jar will work with the java.security.AllPermission setting and all other classes from unsigned jars will run in the sandbox.
    NOTE: Unless otherwise specified by the -keystore command in all keytool and jarsigner operations, the keystore file used is named '.keystore' in the user's home directory.
    The first time any keystore is accessed (including the default) it will be created and secured with the first password given by the user. There is no way to figure out the password if you forget it, but you can delete the default file and recreate it if necessary. For most operations, using the -keystore command is safer to keep from cluttering or messing up your default keystore.

Maybe you are looking for

  • New laptop won't print wirelessly to a network printer

    I just bought a new laptop running windows 7, and it wont print to my photosmart c5580 that is networked and wired through my computer (desktop) and shared running windows XP. I also know that my computer has to be on for this to happen, I also know

  • Problem with back button in alv o/p

    Hi guys, I am using Grid display to display a data. but when i am clicking on back button on o/p the o/p is displaying duplicate records for the first o/p. i,e it is displaying multiple records, again clicking on back it displaying extended o/p with

  • Agents keep logging out after transferring a call internally

    Guys,      I have an issue regarding the UCCX agent functions of transfeering call internally. - Reported issue was one extension was not working - The user did initial steps to correct the issue such as logging out of the cisco desktop agent clearin

  • IMovie suddenly erased ALL my work. How do I retrieve it back?

    I was working on an english project of a photo essay. The computer was lagging so I decided to restart it. But once I opened iMovie, ALL of my 2 days of work was just suddenly erased, disappered, vanished. I had some deleted parts of that but it won'

  • Odd Handling of Wide by GetBytecodes -- Any Thoughts?

    Hello Everyone, I have been playing with examining the set of bytecodes executed by different Java applications using the JVMTI. However, I have come across an oddity with respect to how wide is handled. I wrote a simple hello world type program (pri