HELP!What's wrong with my GZIP program?

Here's part of the source code:
static void Compress(String strfilename)     
     int iTemp;
     try
          BufferedReader brIn=new BufferedReader(new FileReader(strfilename));
          BufferedOutputStream bosOut=new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(strfilename+".gz")));
          while(true)
               iTemp=brIn.read();
               if(iTemp==-1) break;
               bosOut.write(iTemp);                         }
          brIn.close();
          bosOut.close();
     catch(Exception e)
          System.out.println("Error: "+e);
If I use it to compress a small file(20k),the compression is successful,and I can also see it using WINRAR;but once I decompress
this GZIP file,all the English words are correct,while other unicodes
such as Chinese become unrecognizable;
If I use it to compress a "large" file(3M) such as abc.chm,the size of the compressed file is about 2M(INCREDIBLE! WINRAR can only decrease
the size of this file by 30k);But..the size of decompressed file is
still about 2M,and windows cannot read it (Invalid page error).
I wonder what's wrong with my program? Even if I use "javac -encoding
gb2312 ..." to compile my program,the result is also the same.
HOW SHOULD I DO??

Hi, jchc,
Let me help you a little bit, here. hwalkup is correct that for data compression you should use input and output stream instead of readers and writers. I don't think that mixing a reader with an output stream would work anyway as streams read and write bytes (8-bit data), while readers and writers read and write characters (16-bit data). hwalkup is also correct to suggest that you should use a buffer (a byte[]) to improve the performance of your streaming processes.
Here is code for methods to compress and decompress one file into another. Note: the decompress() method will throw an IOException if the file to decompress (inFile) is not actually compressed in the first place.
    public static void compress(File inFile, File outFile)
            throws FileNotFoundException, IOException {
        InputStream in = null;
        OutputStream out = null;
        try {
            in = new BufferedInputStream(new FileInputStream(inFile));
            GZIPOutputStream gzipOut = new GZIPOutputStream(
                                       new FileOutputStream(outFile));
            out = new BufferedOutputStream(gzipOut);
            byte[] buffer = new byte[512];
            for (int i = 0; (i = in.read(buffer)) > -1; ) {
                out.write(buffer, 0, i);
            out.flush();
            gzipOut.finish(); // absolutely necessary
        } finally {
            // always close your output streams before your input streams
            if (out != null) {
                try {
                    out.close();
                } catch (IOException e) {
            if (in != null) {
                try {
                    in.close();
                } catch (IOException e) {
    public static void decompress(File inFile, File outFile)
            throws FileNotFoundException, IOException {
        InputStream in = null;
        OutputStream out = null;
        try {
            GZIPInputStream gzipIn = new GZIPInputStream(
                                     new FileInputStream(inFile));
            in = new BufferedInputStream(gzipIn);
            out = new BufferedOutputStream(new FileOutputStream(outFile));
            byte[] buffer = new byte[512];
            for (int i = 0; (i = in.read(buffer)) > -1; ) {
                out.write(buffer, 0, i);
            out.flush();
        } finally {
            // always close your output streams before your input streams
            if (out != null) {
                try {
                    out.close();
                } catch (IOException e) {
            if (in != null) {
                try {
                    in.close();
                } catch (IOException e) {
    }Shaun

Similar Messages

  • Help - What is wrong with my code ?

    I have a cfform that does a db search, using a field and a
    search criteria selected by the user. Here is my code :
    <tr>
    <td align="center" colspan="2">
    <font size="3" face="Arial, Helvetica, sans-serif"
    color="003366">
    <b>Pick Request
    Number: </b></font>
    <input type="text" name="prNumber">
    <select name="search_type">
    <option value="Contains">Contains</option>
    <option value="Begins With">Begins With</option>
    <option value="Ends With">Ends With</option>
    <option value="Is">Is</option>
    <option value="Is Not">Is Not</option>
    <option value="Before">Before</option>
    <option value="After">After</option>
    </select>
    </td>
    </tr>
    Here is the query that I am using :
    <cfquery name="getPRNum" datasource="docuTrack">
    SELECT prNumber, fileName
    FROM dbo.psFileInventory
    <cfif form.search_type is "Contains">
    Where dbo.psFileInventory.prNumber like '%#form.prNumber#%'
    </cfif>
    <cfif form.search_type is "Begins With">
    Where dbo.psFileInventory.prNumber like '#form.prNumber#%'
    </cfif>
    <cfif form.search_type is "Ends With">
    Where dbo.psFileInventory.prNumber like '%#form.prNumber#'
    </cfif>
    <cfif form.search_type is "Is">
    Where dbo.psFileInventory.prNumber = '#form.prNumber#'
    </cfif>
    <cfif form.search_type is "Is Not">
    Where dbo.psFileInventory.prNumber <>
    '#form.prNumber#'
    </cfif>
    <cfif form.search_type is "Before">
    Where dbo.psFileInventory.prNumber <= '#form.prNumber#'
    </cfif>
    <cfif form.search_type is "After">
    Where dbo.psFileInventory.prNumber >= '#form.prNumber#'
    </cfif>
    </cfquery>
    It cannot find any records with any of the search criteria
    except for the = sign. However, when I do each criteria
    individually, it works. For example, lif I enter 'PR8' in the form,
    then like '#form.prNumber#%' in the query will give me all part
    numbers that begin with PR8...etc, so I am pretty sure each of the
    search criteria work.
    But when I run it combined, it cannot find anything except
    for the 'is' (=) criteria.
    Can somebody please tell me what I am doing wrong ? I just
    cannot see it.
    Thanks

    quote:
    ...but wouldn't the query be in the action page ?
    I'm not quite sure what you are asking here. Are
    you asking if you have to run the query again in the action page?
    If that is the question, then the answer is no, because that is why
    I have you assign the query results on your query page
    to a session variable so that you can make it available to
    use just like you would the results of a cfquery on your action
    page. In other words, if you did something like this
    <cfset session.getPRNum_qry = getPRNum> on your query
    page, you can do something like this on your action page...
    <cfif IsDefined("session.getPRNum_qry.prNumber")>
    <cfoutput query = "session.getPRNum_qry">
    #prNumber# #fileName#
    </cfoutput>
    </cfif>
    ... which would loop through your "query" and display your
    prNumber and fileName values for all rows returned. What you do
    with them is up to you.....
    Phil

  • Help, what's wrong with my upload function

    Hi,
    I want to write a java Bean (FileUploadBean) to upload the image files. I use a very simple txt file to test my Bean code, I've already know the syntax of the entity body of httpServletRequest object, it's like below:
    "-----------------------------7d327203032e
    Content-Disposition: form-data; name="toefl_form"; filename="C:\transfer\Picasso_ljm\jakarta-tomcat-4.0.1\webapps\junmin\image\test.txt"
    Content-Type: text/plain
    hi, this is a test;
    -----------------------------7d327203032e--
    My original test.txt file is only a line without '\r', '\n'.
    "hi, this is a test."
    But after call my upload function, the saved file is:
    hi, this is a test.
    There are 4 more bytes than the original file. Below is my FileUploadBean file, does anyone can figure out what's wrong in my upload function? Does the readLine read the return carriage and new line charactor too? Thank you very much!
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.ServletInputStream;
    import java.util.Dictionary;
    import java.util.Hashtable;
    import java.io.PrintWriter;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.FileOutputStream;
    import java.io.IOException;
    public class FileUploadBean {
    private String savePath, saveFilename, filepath, filename, contentType;
    // private Dictionary fields;
    public String getFilename() {
    return filename;
    public String getFilepath() {
    return filepath;
    public void setSavePath(String savePath) {
    this.savePath = savePath;
    public void setSaveFilename(String saveFilename) {
    this.saveFilename = saveFilename;
    public String getContentType() {
    return contentType;
    private void setFilename(String s) {
    if (s==null)
    return;
    int pos = s.indexOf("filename=\"");
    if (pos != -1) {
    filepath = s.substring(pos+10, s.length()-1);
    // Windows browsers include the full path on the client
    // But Linux/Unix and Mac browsers only send the filename
    // test if this is from a Windows browser
    pos = filepath.lastIndexOf("\\");
    if (pos != -1)
    filename = filepath.substring(pos + 1);
    else
    filename = filepath;
    private void setContentType(String s) {
    if (s==null)
    return;
    int pos = s.indexOf(": ");
    if (pos != -1)
    contentType = s.substring(pos+2, s.length());
    public void doUpload(HttpServletRequest request) throws IOException {
    ServletInputStream in = request.getInputStream();
    // read boundary
    byte[] line = new byte[256];
    int i = in.readLine(line, 0, 256);
    if (i < 3)
    return;
    int boundaryLength = i - 2;
    String boundary = new String(line, 0, boundaryLength); //-2 discards the newline character
    String newLine = new String(line, 0, i);
    if (newLine.startsWith("Content-Disposition: form-data; name=\""))
    if (newLine.indexOf("filename=\"") != -1) {
    setFilename(new String(line, 0, i-2));
    if (filename==null)
    return;
    //this is the file content
    i = in.readLine(line, 0, 256);
    setContentType(new String(line, 0, i-2));
    // blank line
    i = in.readLine(line, 0, 256);
    // read the first byte of the file
    i = in.read();
    FileOutputStream fo = new FileOutputStream((savePath==null? "" : savePath) + saveFilename);
    while (i != -1) {
    // if this byte is equal to the first byte of the boundary, then first mark this place, and
    // go ahead to check if it encounter the ending boundary. If it belongs to the file, then reset
    // the read position and reread.
    if( (char)i == '\r') {
    in.mark(256);
    i = in.read();
    char c1 = (char)i;
    i = in.read();
    char c2 = (char)i;
    i = in.readLine(line, 0, 256);
    // if it is the end of request body, then close the OutputStream. Since the first byte is
    // read already, then the final boundary size if +3
    if ( (c1 == '\n') && (c2 == '-') && (i==boundaryLength+3) // + 3 is eof
    && (new String(line, 0, i).startsWith(boundary.substring(1)))) {
    i = in.read();
    else {
    // it is not the eof, then write this byte into the outputStream and reset the read position
    fo.write(i);
    in.reset();
    i = in.read();
    } // end if
    // else if (char)i != '-', then write directly to the fileOutputStream
    else {
    fo.write(i);
    i= in.read();
    } // end while
    // close the fileOutputStream
    fo.close();
    }// end function

    HI,
    I find a bug myself. I add a line "i = in.read(line, 0, 256);" in doUpload function in the following position:
    String boundary = new String(line, 0, boundaryLength); //-2 discards the newline character
    i = in.read(line, 0, 256);
    String newLine = new String(line, 0, i);
    But still, when I was trying to read a image file, it even didn't finish reading and quit already! Still has bugs, need help!
    Junmin

  • I need Help what is wrong with my code?

    Hi, well I am doing a class and a driver for a sphere. I need to compute the volume and surface area of the sphere I have the formula but when I run the program I don't get a result for neither. I would like to know what am I doing wrong? Here is my code. Thanks.
    This is my class
    import java.text.DecimalFormat;
        public class Sphere
       //Variable Declarations.
          private int diameter;
          private double radius;
       //Constructor: Accepts and initialize instance data.
           public Sphere(int sp_diameter)
             diameter = sp_diameter;
       //Set methods: Diameter
           public void setDiameter(int new_diameter)
             diameter = new_diameter;
       //Get methods: Diameter
           public int getDiameter()
             return diameter;
       //Compute volume and surface area of the sphere
           public double getVolume()
             return  4 * Math.PI * radius * radius * radius / 3;
           public double getArea()
             return  4 * Math.PI * radius * radius;
       //toString method will return one line description of the sphere
           public String toString()
             DecimalFormat fmt =new DecimalFormat("0.###");
             String sphere = " " + fmt.format(diameter) +fmt.format(getVolume()) + fmt.format(getArea());        
             return sphere;
    Here is the driver
    public static void main(String[]args)
             Sphere sphere1, sphere2, sphere3;
             sphere1 = new Sphere(10);
             sphere2 = new Sphere(12);
             sphere3 = new Sphere(20);
             System.out.println("The sphere diameter are: ");
             System.out.println("\tFirst Sphere diameter is: " + sphere1);
             System.out.println("\tSecond Sphere diameter is: " + sphere2);
             System.out.println("\tThird Sphere diameter is: " + sphere3);
          //Prints the Sphere Volume and  Surface Area.
             System.out.println("\nTheir Volume and Surface Area: ");
             System.out.println("\tSphere1: " + " " + sphere1.getVolume() + " " + sphere1.getArea());
             System.out.println("\tSphere2: " + " " + sphere2.getVolume() + " " + sphere2.getArea());
             System.out.println("\tSphere3: " + " " + sphere3.getVolume() + " " + sphere3.getArea());
          //Change the diameter of the sphere.
             sphere1.setDiameter(11);
             sphere2.setDiameter(15);
             sphere3.setDiameter(25);
             System.out.println("\nNew diameter is: ");
             System.out.println("\tFirst Sphere diameter is: " + sphere1);
             System.out.println("\tSecond Sphere diameter is: " + sphere2);
             System.out.println("\tThird Sphere diameter is: " + sphere3);
          //Prints the Sphere Volume and  Surface Area.
             System.out.println("\nTheir Volume and Surface Area: ");
             System.out.println("\tSphere1: " + " " + sphere1.getVolume() + " " + sphere1.getArea());
             System.out.println("\tSphere2: " + " " + sphere2.getVolume() + " " + sphere2.getArea());
             System.out.println("\tSphere3: " + " " + sphere3.getVolume() + " " + sphere3.getArea());
          //Using the toString Method.
             System.out.println("\nFirst sphere: " + sphere1);
       }

    Maybe try a different constructor for sphere...
    public Sphere(int sp_diameter, int sp_radius)
    diameter = sp_diameter;
    }nd maybe even a setRadius(int newRadius) and
    getRadius().
    Hope that helpsYou should not do it this way. The reason.. The radius is 1/2 the diameter. if you have seperate methods, then the programmer can set the diameter to X and the radius to 10X. not good.
    A better way for the c'tor would be:
        //Constructor: Accepts and initialize instance data.
        public Sphere(int sp_diameter) {
            diameter = sp_diameter;
            radius = (double) diameter/2.0;  //<-- I added this
        }something similar in the setDiameter..

  • Help - what is wrong with my iMac ?

    Hello
    I'd really appreciate some help and advice with by iMac !
    I'm having a really strange issue and I've no idea whats casuing it.
    After using it for a while whichever window is open starts to black out - you can shut the window down but it remains there - if you click you mouse onto the screen you can pull a square out and it reveals the desktop wall paper underneath !
    You cant force quit the open screens, the only way to stop it is to restart.
    I have posted some photos for you to see - I hope someone can help !
    [url=http://www.flickr.com/photos/52989912@N02/8686257908/][img]http://farm9.staticflickr.com/8538/8686257908_fa4d265b87_c.jpg[/img][/url]
    [url=http://www.flickr.com/photos/52989912@N02/8686257908/]
    [url=http://www.flickr.com/photos/52989912@N02/8685138651/][img]http://farm9.staticflickr.com/8123/8685138651_3fee66c385_c.jpg[/img][/url]
    [url=http://www.flickr.com/photos/52989912@N02/8685138651/]
    thanks

    thanks for replying
    unfortunatle I blew the dust out of the vents before running temperature monitor so I can only say what the temps are now !
    Ambient 16c
    CPU A heatsink 31c
    Graphics processor chip 1 41c
    Graphics processor heatsink 1 41c
    Graphics Processor temp diode 45c
    Power supply 54c
    Just to state again I blew a heck of a lot of dust out (with a compressor) - really amazed at how much there was
    I probably blew too hard though as some dust has gone behind the screen but luckily you cant see it when the screen is on..
    thanks

  • Help: what's wrong with my code?

    Hi. I'm using JNDI to connect to an SQL Server Database.
    My machine can only handle jcreator or netbeans 4.1
    is it possible for me to deploy or create such connection?
    Please help me.
    All suggestions would be very much appreciated.
    import javax.sql.*;
    import java.sql.*;
    import java.io.*;
    import javax.naming.*;
    import java.util.*;
    public class Test {
        public static void main(String[] args) {
            System.out.println("Starting test.");
            setJVMProperties();
            bindDataSource();
            testDataSource();
            System.out.println("Test finished.");
        public static void setJVMProperties() {
            Properties p = new Properties(System.getProperties());
            p.setProperty("java.naming.factory.initial",
    "com.sun.jndi.fscontext.RefFSContextFactory");
            p.setProperty("java.naming.provider.url", "com.ibm.websphere.naming.WsnInitialContextFactory");
            System.setProperties(p);
        public static void bindDataSource() {
            Context ctx = null;
            try {
    // On the 3 lines below, I get the error: package com.microsoft.jdbc.sqlserver does not exist
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    com.microsoft.jdbc.sqlserver.SQLServerDriver sqlServerDS = new
    com.microsoft.jdbc.sqlserver.SQLServerDriver();
                sqlServerDS.setServerName("PSERVER\\PINST");
                sqlServerDS.setPortNumber("9080");
                sqlServerDS.setDatabaseName("Customer");
                sqlServerDS.setUser("neil");
                sqlServerDS.setPassword("123");
                ctx = new InitialContext();
                ctx.rebind("jdbc/Name", sqlServerDS);
            } catch (Exception e) {
                System.err.println("Error binding datasource with jndi. " +e);
        public static void testDataSource() {
            try {
                 int id;
                Context ctx = new InitialContext();
                DataSource ds = (DataSource)ctx.lookup("jdbc/Name");
                Connection con = ds.getConnection();
                CallableStatement cs = con.prepareCall("{? = Call Login(?,?)}");
                cs.registerOutParameter(1, Types.INTEGER);
                cs.setString(2, "123");
                cs.setString(3, "123");
                cs.execute();
                id = cs.getInt(1);
                System.out.println(id);
               try {
                        cs.close();
                        con.close();
                } catch (Exception e) {System.err.println(e);}
            } catch (Exception e) {
                System.err.println("Problem running db stuff." +e);
    }

    hi. thanks so much for your tip. i followed it and finally my
    com.microsoft.jdbc.sqlserver.SQLServerDriver sqlServerDS = new
    com.microsoft.jdbc.sqlserver.SQLServerDriver();line is now recognized...
    However, i get errors on the next 5 lines
       sqlServerDS.setServerName("PSERVER\\PINST");
                sqlServerDS.setPortNumber("9080");
                sqlServerDS.setDatabaseName("Customer");
                sqlServerDS.setUser("neil");
                sqlServerDS.setPassword("123");the errors i get are something like: cannot find symbol
    symbol : method setUser(java.lang.String)
    location: class com.microsoft.jdbc.sqlserver.SQLServerDriver
    sqlServerDS.setUser("neil");
    as you might have noticed, i'm really new to java programming and i would very much appreciate all the help i can get.

  • What is wrong with my simple program!

    Hello everybody,
    I have a very simple Java program, but it could not run as i expect.
    Could anybody help me firgure it out ?
    Thank you very much in advance
    still_learn
    Here is my program:
    import java.io.*;
    public class Practice
    static InputStreamReader reader = new
    InputStreamReader(System.in);
    static BufferedReader keyboard = new BufferedReader
    (reader);
    public static void main(String[] args) throws
    IOException
    String response;
    do{
         System.out.println("");
         for(int i=0; i<20; i++)
         System.out.println("George Michael");
         do{
         System.out.print("Do you want to continue?
    (y/n) ");
         response = keyboard.readLine();
         }while((response != "y")&&(response != "n"));
              }while(response == "y");
    }// end of main
    }// end of class

    You didn't say what you expected, so debugging becomes very difficult. However I do notice at the end of the code that you compare two strings using == and !=. This does not work. If you want to see if two strings have the same content, use the equals() method of the String class. In your case:}while((!response.equals("y"))&&(!response.equals("n")));
    }while(response.equals("y");

  • What is wrong with this Swing program?

    Hi all,
    I wrote program:
    1) which should display JTable as part of JTree node
    2)In the table it has to display one column with JComboBox in each cell.
    I can get the first one, but not getting the JComboBox in it.
    I am pasting the code below.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.util.*;
    import javax.swing.table.*;
    public class TableInTree extends JFrame
    public TableInTree()
    super("TableInTree");
    JTree tree = new JTree(this.createTreeModel());
    tree.setCellRenderer(new ResultTreeCellRenderer());
    this.getContentPane().add(new JScrollPane(tree));
    public static void main(String[] args)
    TableInTree frame = new TableInTree();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(800, 600);
    frame.show();
    private JTable createTable()
    TableColumn column=new TableColumn();
    column.setHeaderValue(new String("Sport"));
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    comboBox.addItem("Rowing");
    comboBox.addItem("Knitting");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Pool");
    comboBox.addItem("None of the above");
    column.setCellEditor(new DefaultCellEditor(comboBox));
    column.setCellRenderer(new DefaultTableCellRenderer());
    JTable table = new JTable();
    table.addColumn(column);
    //DefaultCellEditor tce=new DefaultCellEditor();
    //table.setCellEditor(tce);
    //table.setDefaultRenderer(Object.class,new DefaultTableCellRenderer());
    //TableRenderDemo table2=new TableRenderDemo();
    return table;
    // * Method createRootNodes.
    private TreeModel createTreeModel()
    DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
    DefaultMutableTreeNode node1 = new DefaultMutableTreeNode("test1");
    node1.add(new DefaultMutableTreeNode(this.createTable()));
    root.add(node1);
    root.add(new DefaultMutableTreeNode("test2"));
    return new DefaultTreeModel(root, true);
    public static class ResultTreeCellRenderer extends DefaultTreeCellRenderer
    public Component getTreeCellRendererComponent(JTree t, Object value,boolean s, boolean o,boolean l, int r, boolean h)
    if (value instanceof DefaultMutableTreeNode)
    DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
    if (node.getUserObject() instanceof JTable)
    return new JScrollPane((JTable) node.getUserObject());
    return super.getTreeCellRendererComponent(t, value, s, o, l, r, h);
    Can anyone pls provode solution for it.
    thanks in advance
    amar

    I think you should configure the TableColumn after setModel for the JTable.

  • Help: What's wrong with my installed Developer 6.0?

    Hi, Everyone,
    I have a Developer 6.0 for Win95/NT4.0 version free downloaded
    from OTN. My development ENV is: ORACLE 8.0.5 in one NT4.0
    machine, OAS4.0.7 in the second NT4.0 machine.
    Oracle8.0.5&OAS4.0.7 are installed and configed successfully.
    Then I installed my Develper6.0 in the second NT4.0 machine. I
    want to config my Develper6.0 Web developing/deployment
    environment to deploy my developed Form/Report/Graphics. But I
    cann't find the "Start->Oracle Developer R6.0->Server Wizard"
    menu as illustrated in the chapter "Configuring your Oracle
    Developer Server environment" of Oracle Developer Online
    Manuals.So I can not config my Developer6.0 Server for Web
    environment automatically. Who can tell me why? Without the
    Server Wizard, how can I config my Form/Report/Graphics Server
    manually?
    Thanks in advance.
    Robby
    null

    I've managed to install the wizard. I've started Oracle
    installer and pointed to nt.prd file on developer 6 CD. Almost
    at the end you find the server configuration wizard. You can
    install him seperately.
    For the whole story i've replied the thread
    'URGENT HELP NEEDED: Configure the Developer 6.0 Web Server u'
    Succes,
    Werner
    Brad (guest) wrote:
    : Robby Shong (guest) wrote:
    : : Hi, Everyone,
    : : I have a Developer 6.0 for Win95/NT4.0 version free
    downloaded
    : : from OTN. My development ENV is: ORACLE 8.0.5 in one NT4.0
    : : machine, OAS4.0.7 in the second NT4.0 machine.
    : : Oracle8.0.5&OAS4.0.7 are installed and configed
    successfully.
    : : Then I installed my Develper6.0 in the second NT4.0 machine.
    I
    : : want to config my Develper6.0 Web developing/deployment
    : : environment to deploy my developed Form/Report/Graphics. But
    I
    : : cann't find the "Start->Oracle Developer R6.0->Server
    Wizard"
    : : menu as illustrated in the chapter "Configuring your Oracle
    : : Developer Server environment" of Oracle Developer Online
    : : Manuals.So I can not config my Developer6.0 Server for Web
    : : environment automatically. Who can tell me why? Without the
    : : Server Wizard, how can I config my Form/Report/Graphics
    Server
    : : manually?
    : : Thanks in advance.
    : : Robby
    : Server Wizard is not currently available you get to do the
    setup
    : manually for now. The installation documentation will guide
    you
    : through.
    : Hope that helps
    null

  • What's wrong with my Macbook Air?

    Yesterday I was using it and everything seemed to be working perfectly. I turned it off and when I tried turning it back on, it got stuck on the grey screen with the apple at the beginning and didn't do anything else. I tried pressing shift while I turned it on and it finally worked. Now, it's being really weird, it's showing me a message saying 'Shockwave Flash has crashed' when I try loading a site on the internet, also, my Volume buttons are not working, they seem to be locked and if I turn it off and back on again, it takes forever to load. 
    Help what's wrong with it?

    Try booting to your Recovery Partion, by holding down the OPTION key while booting, and then select the Recovery Partion. Run Disk Utility from there, and Repair your Permissions, then Verify Disk. If Verify Disk finds reason to do so, run Repair Disk.
    Shutdown, and see if it boots normally. If not, boot using the SHIFT key again (Safe Mode). From Safe Mode, update your Flash drom Adobe's site. Retry a normal boot.

  • What's wrong with this program?

    /* Daphne invests $100 at 10% simple interest. Deirdre invests $100 at 5% interest compounded annually. Write a program that finds how many years it takes for the value of Deirdre's investment to exceed the value of Daphne's investment. Aso show the two values at that time.*/
    #include <stdio.h>
    #define START 100.00
    int main(void)
    int counter = 1;
    float daphne = START;
    float deirdre = START;
    printf("Daphne invests $100 at 10 percent simple interest. Deirdre invests $100 at 5 percent interest compounded annually.
    When will Deirdre's account value exceed Daphne's?
    Let\'s find out.
    while (daphne > deirdre)
    daphne += 10.00;
    deirdre *= 1.05;
    printf("%f %f
    ", daphne, deirdre);
    printf("At year %d, Daphne has %.2f dollars. Deirdre has %.2f dollars.
    ", counter, daphne, deirdre);
    counter++;
    printf("By the end of year %d, Deirdre's account has surpassed Daphne's in value.
    ", counter);
    return 0;
    This is my output:
    *Daphne invests $100 at 10 percent simple interest. Deirdre invests $100 at 5 percent interest compounded annually.*
    *When will Deirdre's account value exceed Daphne's?*
    *Let's find out.*
    *By the end of year 1, Deirdre's account has surpassed Daphne's in value.*
    What's wrong with it?
    Message was edited by: musicwind95
    Message was edited by: musicwind95

    John hadn't responded at the time I started typing this, but I'll keep it posted anyways in order to expand on John's answer a little bit. The answer to your last question is that the loop's condition has to return true for it to run the first time around. To examine this further, let's take a look at the way you had the while loop before:
    while (daphne > deirdre)
    Now, a while loop will run the code between its braces as long as the condition inside the parenthesis (daphne > deirdre, in this case) is true. So, if the condition is false the first time the code reaches the while statement, then the loop will never run at all (it won't even run through it once -- it will skip over it). And since, before the while loop, both variables (daphne and dierdre) are set equal to the same value (START (100.00), in this case), both variables are equal at the point when the code first reaches the while statement. Since they are equal, daphne is NOT greater than dierdre, and therefore the condition returns false. Since the condition is false the first time the code reaches it, the code inside the loop's braces is skipped over and never run. As John recommended in the previous post, changing it to this:
    while (daphne >= deirdre)
    fixes the problem because now the condition is true. The use of the "greater than or equal to" operator (>=) instead of the "great than" operator (>) means that the condition can now be returned true even if daphne is equal to deirdre, not just if it's greater than deirdre. And since daphne and deirdre are equal (they are both 100.00) when the code first reaches the while loop, the condition is now returned true and the code inside the loop's braces will be run. Once the program reaches the end of the code inside the loop's braces, it will check to see if the condition is still true and, if it is, it will run the loop's code again (and again and again and again, checking to see if the condition is still true each time), and if it's not true, it will skip over the loop's bottom brace and continue on with the rest of the program.
    Hope this helped clear this up for you. Please ask if you have any more questions.

  • I need help figuring out what is wrong with my Macbook Pro

    I have a mid 2012 Macbook Pro with OS X Mavericks on it and for the past few weeks it has running VERY SLOW! I have no idea what is wrong with it, i have read other discussion forums trying to figure it out on my own. So far i have had no luck in fixing the slowness. When i open applications the icon will bounce in dock forever before opening and then my computer will freeze with the little rainbow wheel circling and circling for a few minutes... and if i try to browse websites it take forever for them to load or youtube will just stop working for me. Everything i do, no matter what i click, the rainbow wheel will pop up! The only thing i can think of messing it up was a friend of mine plugging in a flash drive a few weeks ago to take some videos and imovie to put on his Macbook Pro, he has said his laptop has been running fine though... so idk if that was the problem. Anyways, could someone please help me try something? Thank you!!

    OS X Mavericks: If your Mac runs slowly?
    http://support.apple.com/kb/PH13895
    Startup in Safe Mode
    http://support.apple.com/kb/PH14204
    Repair Disk
    Steps 1 through 7
    http://support.apple.com/kb/PH5836
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    Increase disk space.
    http://support.apple.com/kb/PH13806

  • What is wrong with my font? Squares instead of letters - Help!

    Can someone tell me what is wrong with my system font? Everytime I need to put my administrator key the login page will appear but with weird glitched font of squared A's all around (see picture).  I can't recall that I have done any installations that would mess with it.
    Any help greatly appreciated.
    Regards,
    Bart

    You have a bad System Font.
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    Once Disk Reports OK, reinstall the OS.

  • My iPhone 4S won't turn on it's been off for two days now. I tried charging it but it makes a noise every 8 seconds,holding the buttons down and also plugging it to a computer. I need help on what to do or if anybody can tell me what's wrong with my phone

    My iPhone 4S won't turn on it's been off for two days now. I tried charging it but it makes a noise every 8 seconds,holding the buttons down and also plugging it to a computer. I need help on what to do or if anybody can tell me what's wrong with my phone

    Yes ive tried a different charger and it also nothing shows when i plug it in just makes a noise

  • I don't know what's wrong with my 3GS. It only shows the black screen with white apple. Turning it on then off doesn't help.

    I don't know what's wrong with my 3GS. It only shows the black screen with white apple. Home button and turning the phone off then on doesn't seem to do anything.

    Thanks Lucas,
    I've tried doing that with no results. Same screen keeps showing. Maybe it'd be more helpful if I told you a bit more info.  My phone was randomly playing music, and the voice control would also suddenly start without me touching the phone.  Then I let the battery die and started to recharge when on the screen it indicated to plug into my computer/iTunes, I tried to restore but was getting an error message (can't remember what it said now). Battery died and now my current issue of the black screen with white apple.  I'd love to be able to restore my phone but now its not showing as a device on my iTunes. HELP! Any other suggestions?

Maybe you are looking for

  • Movies in Itunes not showing up on Apple TV

    I am finding that some movies which I have added to Itunes and play fine on my Mac, do not appear on my Apple TV.  They are mpeg4 with the H.264 codec, which is what all my videos are.  I have tried rebooting the ATV and also restarting Itunes on my

  • How to call a link in jsp

    hello, i have some link saved in w="www.yahoo.com" w is saved in some table which contains many links doing it like this out.println("<a href=< www.yahoo.com >yahoo</a>"); make it fixed and i can't change the web page address which is readed from som

  • Play a movie in full screen mode

    Hi evrybody, Plzz could anybody help me with codes to play a movie in full screen mode. thanking u in anticipation.

  • Cannot open books in iBooks ipad2 new purchases and ones I am reading

    Cannot open downloaded books in iBook library  I could before

  • Photoshop CS3 is popping out an error dialog

    Photoshop CS3 is popping out an error dialog when trying to open some of the PDFs. The Error Message is "Error opening the Portable Document File (PDF) document. Error code = 0x40010015". Can some one please let me know what does this mean?