Please  help me. I m a beginner in Sql.

Hi,
My database contains below informations.
scrip_code scrip_name client_code qty b_s
500100 TISCO 47198      1000 BUY
500100 TISCO 47198 1000 SELL
500101 RELCAPITAL 47198 1000 BUY
500101 RELCAPITAL 47198 1000 SELL
500102 RELIANCE 47198 1000 BUY
500103 SATYAM 47198 2000 BUY
I just want to write a query that will extract the net postion
of my current portfolio. For a particular scrip code buy qty minus sell qty
equals 0 then that should eliminate.
for above table i want the output as,
500102 RELIANCE 47198 1000 BUY
500103 SATYAM 47198 2000 BUY
Plz give me a help. I m a beginner in Sql.
thanks
rathish

Assuming the table is a transaction table, and not a summary table, if I do another transaction on the same stock:
SQL> INSERT INTO t VALUES (500101,'RELCAPITAL',47198,500,'BUY');
1 row created.
SQL> commit;
Commit complete.
SQL> SELECT scrip_code, scrip_name, client_code,
  2  MAX(DECODE(b_s,'BUY',qty,0)) - MAX(DECODE(b_s,'SELL',qty,0)) net
  3  FROM t
  4  GROUP BY scrip_code, scrip_name, client_code
  5  HAVING MAX(DECODE(b_s,'BUY',qty,0)) - MAX(DECODE(b_s,'SELL',qty,0)) <> 0;
SCRIP_CODE SCRIP_NAME      CLIENT_CODE        NET
    500102 RELIANCE              47198       1000
    500103 SATYAM                47198       2000I would use something more like:
SQL> SELECT scrip_code, scrip_name, client_code,
  2         SUM(decode(b_s,'BUY',qty,qty * -1)) net
  3  FROM t
  4  GROUP BY scrip_code, scrip_name, client_code
  5  HAVING SUM(decode(b_s,'BUY',qty,qty * -1))<> 0;
SCRIP_CODE SCRIP_NAME      CLIENT_CODE        NET
    500101 RELCAPITAL            47198        500
    500102 RELIANCE              47198       1000
    500103 SATYAM                47198       2000

Similar Messages

  • Please help me out I am beginner

    I posted many questions no body answered.
    Am i posting stupid questions?
    But the thing is i am beginner and started as3 and OSMF just few days before.
    I am in learning phase.
    Please help me.
    I will again post my question.
    1>    When the authentication dialog of strobe media playback comes into play.
    To check with authentication dialog do need to pass some special type of url or what i am stuck.
    2>    How to display logo image with video in SMP.
    Lastly suggest some good resources for as3 and SMP so that i will get good insight.
    Hopefully that this time i will get feedback
    Thanks and regards

    Hi Silviu,
    I passed the given url to strobe media player but its showing "content not found message ".
    I am using sdk 4.5
    Fp version 10.2.
    Trial version of flashbuilder
    Could you please let me know in brief, where i need to pass the url.
    And my  another question
    Do i need to develop another  actionscript file having image logo class.
    And in begining where i need to call that class.
    Is it like this or some other way.
    Sorry actually i am not knowing much about strobe media playback.
    Please guide me.
    Waiting for your favourable response.
    Thanks .

  • Please help me regarding the running of a sql file

    Hi I downloaded one sql file from
    http://www.cs.uwf.edu/~sbagui/db/practical_oracle.htm
    But i am unable to run it successfully...please help me regarding this... thanking you
    Edited by: SowmyRaj on Dec 24, 2009 5:24 AM

    Hi vali thanks for your reply...
    I am using Windows XP sp2 Os.
    and Oracle database 11g ...
    when executing this file the follwing error is occuring
    Enter value for user_name: system
    old 2: uname VARCHAR(50) := '&user_name';
    new 2: uname VARCHAR(50) := 'system';
    **MOBILE CODE** immediate 'drop user ' ||uname;
    ERROR at line 13:
    ORA-06550: line 13, column 1:
    PLS-00103: Encountered the symbol "*" when expecting one of the following:
    ( begin case declare exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    continue close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe purge

  • Please HELP to retrieve all records in PL/SQL --Still waiting for solution

    First of all, I am a PL/SQL beginner. I need help to retrieve all records in PL/SQL from a database (maybe anyone could give me an example). Here is my code, but this code is only able to retrieve one records only. I would like to create a web service by using PL/SQL to view data in a table.
    CREATE or REPLACE package body DRIVER_FETCHER as
    FUNCTION get_driver(driver_id in VARCHAR2) RETURN driver_rec IS
    driver_found tblDrivers%rowtype;
    driver_rtn driver_rec;
    BEGIN
    SELECT *
    INTO driver_found
    FROM tblDrivers;
    WHERE tblDrivers.lngDriverID=driver_id;
    driver_rtn := driver_rec
    driver_found.lngDriverID,
    driver_found.strTitle,
    driver_found.strFirstName,
    driver_found.strLastName,
    driver_found.dteDOB,
    driver_found.dteDateLicensed,
    driver_found.strLicenseReference,
    driver_found.strAddress_Street,
    driver_found.strAddress_TownVillage,
    driver_found.strAddress_Country,
    driver_found.strAddress_PostCode,
    driver_found.strContactDayPhone,
    driver_found.strContactNightPhone
    RETURN driver_rtn;
    END;
    END;
    and here is the tblDrivers table
    CREATE or REPLACE type DRIVER_REC as object
    lngDriverID varchar2(10),
    strTitle varchar2(5),
    strFirstName varchar2(20),
    strLastName varchar2(20),
    dteDOB date,
    dteDateLicensed date,
    strLicenseReference varchar2(30),
    strAddress_Street varchar2(50),
    strAddress_TownVillage varchar2(20),
    strAddress_Country varchar2(15),
    strAddress_PostCode varchar2(10),
    strContactDayPhone varchar2(20),
    strContactNightPhone varchar2(20)
    CREATE or REPLACE package DRIVER_FETCHER as
    FUNCTION get_driver(driver_id IN VARCHAR2) RETURN driver_rec;
    END;
    Thank You,
    Paul
    Message was edited by:
    user452391
    Message was edited by:
    user452391
    Message was edited by:
    user452391

    Hi,
    you will enjoy reading
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/toc.htm
    for a fundamental understanding of PL/SQL.
    You can do a "select * from t;" only in SQL, not in PL/SQL. There you have to open a cursor and fetch the results into a variable, e.g.:
    declare
    cursor c_example
    is
       select * from emp;
    begin
       for r_example in c_example loop
           dbms_output.put_line(r_example.empno);
       end loop;
    end;This is an explicit cursor, opened within an "cursor for"-loop. The results are fetched into a (implicitly declared) record "r_example". The record now holds the values of one row from the emp table. The loop ends when all record from emp where fetched.
    Regards,
    Gerd

  • PLEASE HELP...Problems connecting to my sql

    I can't connect to mysql.
    The error message that I have is:
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    I already include the file where I installed my driver in the classpath.
    when I was working with windows 2000, this was working perfectly. Right now I'm
    working with XP. When I went to set my class path, it was not defined in
    my environment variables, so I created with my driver's folders.
    THIS IS NOT WORKING, IF YOU KNOW ANOTHER WAY TO FIX THIS IN
    XP, PLEASE TELL ME HOW..
    thx

    Did you extract your driver, or did you leave it in zip or jar form?
    I believe XP is very similar to 2000 in how you define your classpath variable, but by default one does not exist. If you extracted out your driver classes, make sure that the root of the directory structure is listed in the classpath, not the directory of the actual driver.
    ie. If your driver is in c:\drivers\org\gjt\mm\mysql\Driver.class, then you classpath should include
    c:\drivers;
    if you have not extracted the classes, then you need to include the filename in the classpath
    c:\drivers\drivers.jar;

  • Oracle 8.1.7 on HP UX 11.0.0 Please help..

    hi oracle gurus,
    I am using Oracle 8.1.7 on HP UX 11.0.0 and my application is on Solaris 2.6.
    I am getting exceptions as shown below. Atually the problem does NOT happen often , but we do get this issue
    once in a while. Could anyone give some explanation for the possible cause of this Exception. We are sure that nothing had gone wrong from our part.
    Please help..
    Many thanks,
    george
    java.sql.SQLException: Io exception:Invalid Packet Lenght
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java,
    Compiled Code)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java,
    Compiled Code)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java,
    Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.jav
    a, Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java ,
    Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.
    java , Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java,
    Compiled Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java,
    Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java,
    Compiled Code)
    at com.tdiinc.EventDBAdapter.a(EventDBAdapter.java, Compiled Code)
    at com.tdiinc.EventDBAdapter.storeEvent(EventDBAdapter.java,
    Compiled Code)

    Sorry - OTN has never had the HP version of 8i available for download from OTN. We just started posting HP versions with 9i: http://otn.oracle.com/tech/hp/content.html
    Regards,
    OTN
    All, trying to download a copy of Oracle 8.1.7 for HP-UX 11.0. This download seems no longer to be available (just 9i) and judging by the other posts on this topic, Oracle dont seem to care either - this is not exactly good customer service!
    ***ORACLE - where have the 8.1.7 downloads gone, and when can we expect them back? *****
    Seb Gevers
    Director, IT Services
    SVi (Galway)

  • Another problem with my SQL ...please help

    hi to u all
    here is my SQL
    String SQL = "UPDATE TABLENAME SET FIRSTFIELD= '"+VALUE1+"', "+
                                 "Secondfiled= '"+value2+"', "+
                                 "185thfieled= '"+value185+"',"+
                                "WHERE MAINREF= '"+MAINREF_VALUE+"'";i have about 185 filed in my form where i am using this update statement
    now everything complied perfect but when i run the program and try to update
    i am getting the following error
    [Microsoft][ODBC Microsoft Acceess Driver] Too many fileds defined please help me
    Regards Gugi

    hi to u all
    here is my SQL
    String SQL = "UPDATE TABLENAME SET
    FIRSTFIELD= '"+VALUE1+"', "+
    "Secondfiled=
    "Secondfiled= '"+value2+"', "+
    "185thfieled=
    "185thfieled=
    led[/i]= '"+value185+"',"+
    "WHERE MAINREF=
    "WHERE MAINREF=
    [/i]= '"+MAINREF_VALUE+"'";i have about 185 filed in my form where i am using
    this update statement
    now everything complied perfect but when i run the
    program and try to update
    i am getting the following error
    [Microsoft][ODBC Microsoft Acceess Driver] Too many
    fileds defined please help me
    Regards GugiThis is not valid SQL. I have no idea what you're doing. Worse, I don't think you do, either.
    %

  • Please help this clueless beginner with out.print syntax....

    Please help a clueless beginner out!!!! :-)
    I'm trying to build a dynamic table that functions as a calendar...(see http://www.oreilly.com/catalog/javacook/chapter/ch18.html for the basic idea and code structure).
    Here's the problem...I want to make each date inside of the table a hyperlink to a new page. I figured out how to create the hyperlinks, but I CAN'T figure out how to create hyperlinks that pass variables to a new page.
    Here's the code that works:
    // Fill in numbers for the day of month.
    for (int i = 1; i <= daysInMonth; i++)
    out.print("<td>");
    out.print("<a href=newpage.jsp>");
    out.print(i);
    out.print("</a>");
    out.print("</td>");
    Here's the code that DOESN'T work....but can serve as pseudo-code for what I want to do:
    // Fill in numbers for the day of month.
    for (int i = 1; i <= daysInMonth; i++)
    out.print("<td>");
    out.print("<a href=newpage.jsp?year=<%= yy %>&month=<%= months[mm] %>&date=<%= i %>>");
    out.print(i);
    out.print("</a>");
    out.print("</td>");
    <%= yy %>, <%= months[mm] %> are defined elsewhere in the code, and I want to use the current value of "i" from the loop.
    So, if everything works like I want, the table will get created, and if yy=2002 and mm=January, then the hyperlinks will look like:
    for day 1:
    "/newpage.jsp?year=2002&month=January&date=1"
    for day 2:
    "/newpage.jsp?year=2002&month=January&date=2"
    ...for day 31:
    "/newpage.jsp?year=2002&month=January&date=31"
    Can someone please point me in the right direction? Is it even possible to do what I want? (I assume it is...but maybe I can't use out.print???)
    Thanks!

    Hi. The expression "<%=some_Java_expression %>" is the JSP tag, that returns string value to HTML code. You should use it in HTML block like:
    <%String myname="Ivan"; %>
    <body>
    <p>My name is: <%=myname %></p>
    But You tried to use it inside the string expression and it generated some code like this:
    <a href="newpage.jsp?year=<%=yy%">...
    , didn't it?
    It invokes method out.print(" ... "), that prints this string value (but in the HTML block). So You tried to print something inside the print method. You should rewrite Your code like this:
    for (int i = 1; i <= daysInMonth; i++)
    out.print("<td>");
    out.print("<a href=newpage.jsp?year="+yy+"&month="+months[mm]+"&date="+i+">");
    out.print(i);
    out.print("</a>");
    out.print("</td>");
    I used the + operator to join Your code for link tag with the values (yy, months[mm], i.
    I hope it helps You,
    bye.</a>

  • Someone please help a complete beginner with Enterprise Manager!

    Question moved from
    Someone please help a complete beginner with Enterprise Manager!
    Please be gentle with me, I'm absolutely new to all this. We don't have a proper DBA and I've been tasked with the role. There is no-one else in the company with oracle experience and we don't have any support. Until now I've just used enterprise manager to manage the database, but now I have a problem..
    We are using Windows Server 2003 and Oracle 10g. I (stupidly) installed some network monitoring software on our server (PRTG network monitor). I almost immediately uninstalled it and all components/registry settings, but it seems to have thrown something out regards the OEM web interface.
    We used to access the OEM GUI through http://<hostname>:5500/em, but after installing/uninstalling the network monitor software the OEM webpage would only stay up for a few minutes, before saying 'Internet Explorer cannot display the webpage'. Restarting the DBconsole in services fixed the problem, but again, only for a few minutes.
    Spent all day yesterday looking at logfiles (they didn't make much sense to me), but seemed to be saying access was denied to the server ('actively denied it'). Lots of googling led me to believe I needed to reconfigure OEM by dropping and recreating it using:
    emctl stop dbconsole
    emca -deconfig dbcontrol db
    emca -repos recreate
    during this process I was asked for various passwords and a port number? I didn't even know what to use as the port number but guessed it was 5500 ?!? (probably wrong). As it didn't work I used the default port number that I found somewhere on the web.
    However now I am even deeper in the **** as this didn't work either, (some error about listnener?) and I have now lost the DBConsole in windows services. Obviously the OEM web console doesn't work at all now
    I would be eternally grateful for some patient, beginners help here..I can post whatever log files are necessary - I just need to know what I'm supposed to be doing and where to start..
    We used to log on to the OEM as 'SYSTEM', but nowhere in the process does it seem to ask me for the password for that (its asked me for SYS and SYSMAN)
    It could be that I'm going about this completely wrong, but with only a days experience in all this its pretty hard to know what I'm doing really!
    As you can tell I'm in way over my head..I just need OEM web interface to work!
    Thanks in advance

    ok, thanks to helpful comments from other people in my initial thread (posted in general database forum), after rebuilding the console/repository I now have EM up and running. But there are more problems..
    Firstly I have an error at the very top of the screen:
    java.lang.Exception: Number of responses does not match queries
    Also, the 'Host CPU' and 'Active Sessions' are blank and say 'No Data Is Currently Available' beneath them
    my emagent.trc file contains this error, repeating with different thread IDs every 30 seconds...
    (error = 10061)
    2012-04-30 17:19:28 Thread-4376 ERROR pingManager: nmepm_pingReposURL: Cannot connect to http://hostname:5500/em/upload/: retStatus=-1
    2012-04-30 17:19:59 Thread-1448 WARN http: snmehl_connect: connect failed to (hostname:5500): No connection could be made because the target machine actively refused it.
    Help!

  • Java beginner, please help!! (oracle jdbc setting)

    Hi, I am a java beginner. I can't access remote oracle db from my computer. please help me. I can't figure out the problem.
    1.The error------------------------------------------------------------
    Exception in thread "main" java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:532)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at testdb.main(testdb.java:9)
    2.JDBC DRIVER is in----------------------------------------------------
    c:\j2sdk1.4.1_02\jdbc\classes12.zip
    3.CLASSPATH is --------------------------------------------------------
    .;c:\j2sdk1.4.1_02\bin;c:\j2sdk1.4.1_02\jdbc;
    4.My program is--------------------------------------------------------
    import java.sql.*;
    class testdb
    public static void main (String args[])
    throws SQLException,ClassNotFoundException
    Connection conn=
    DriverManager.getConnection("jdbc:oracle:thin:@111.31.111.11:1526:ORA81","scott","tiger");
    Statement stmt = conn.createStatement();
    ResultSet rset=stmt.executeQuery("SELECT EMPNO FROM EMP");
    while (rset.next()) {
    System.out.println (rset.getString(1));
    5. Why can't i connect to db?

    Hi...i have the same problem and can't seem to solve it
    this is my source code
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class TextToDatabaseTable {
    public static void main (String[] args) {
    try {
    // connect to db
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@cs-bid:1521:SVRDESK", "lynn", "abc");
    catch( Exception e) {
    e.printStackTrace();
    and this is my error
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at TextToDatabaseTable.main(TextToDatabaseTable.java:12)
    and i try the methods above
    C:\download\Lynn>java -classpath c:\download\lynn;classes12.zip TextToDatabaseTable
    C:\download\Lynn>java TextToDatabaseTable
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at TextToDatabaseTable.main(TextToDatabaseTable.java:12)
    i'm using oracle 8i with tomcat on win 2k server.
    i dunno what's wrong with it...do i need to set any classpath?
    i have TOMCAT_HOME and JAVA_HOME Variables in My Environment Variables.
    Do i need to set anything for these variables?
    Do i need to download any patches? I'm kinda confused.
    Thanks!

  • It just doesn't add up... Please help the beginner

    Hi all of you who are experts in Appleworks. I am a graphic artist and Mac user since '89. I do a lot with iMovie and iPhoto and Indesign but you think I can figure out the simplest thing in Appleworks!? I've read over the AppleHelp and try what it says and can't make it work. All I want is in a simple data base I made for my business, I have about 6 columns that I set up to be numeric and dollars with 2 decimals so I can enter monthly amounts. I want the column to ADD automatically and I know this is probably Appleworks "101" Why can't I make it work. I have a horizontal row with "Total" and along that row, under each column, I want the total of what I put in each cell above it to ADD! I know you enter a formula. I go to the box and type the = sign, then SUM, then you put in parenthesis A1,A,2 etc. right? I always gives me the alert that I entered the wrong formula.. or sometimes it says it can't complete something circular..or something like that. I think I set the field to "summary" too not "calculate" Why won't it work? I know it should! I did it in an old Microsoft works program. I ONLY use this type of software to keep a chart of my business expenses and my monthly earnings and then make a data base of my friends/family addresses, so I really don't need to know lots of complicated formulas... just ADD a column! Any tips from any of you? I read the instructions and do it step by step and it won't work! Please help! Give me the steps. THANKS so much for your time!!!
    iMac GHZ PowerPC G$   Mac OS X (10.3.6)  

    Hi Rollie,
    Like the others who have posted here, I think the task you've set is more easily accomplished in the Spreadsheet.
    You'll probably want a label for each column (and possiblly for each row) in the first cell, so your data will begin in B2.
    For an example, I'm going to assume a data block of six rows (2..7) by six columns (B..G), with totals in row 8, and a grand total in H8.
    In cell B8, enter: =SUM(B2..B7)
    Select cells B8..G8, then go to the Calculate menu and choose Fill Right. This copies the formula into each of the selected cells, changing the cell references in the formula to match the correct column.
    If you also want a Grand Total, in cell H8, enter: =SUM(B8..G8)
    As for the database of Friends and Family addresses, there are two easy solutions:
    1. Use the "Address List" Assistant found in the Assistants tab of Starting Points to create a Personal Address List database.
    2. Use the Address Book application that is included with the OS X software you are running. You should find the Address Book icon (a brown 'book' with the @ symbol on the cover) on your Dock. Unless you are going to print mailing labels, you'll probably find Address Book sufficient to your needs.
    Regards,
    Barry

  • Please help me. im beginner. How to start OracleOraDb10g_home1iSQL*Plus?

    My name is Doil
    im korean
    at now,
    im installing oracle 10g
    so, i hava a problem
    ComputerManagement -> service
    OracleOraDb10g_home1iSQL*Plus is continuing starting..
    um.. it indicate "starting"
    it mean... OracleOraDb10g_home1iSQL*Plus status is only starting... not started..
    please help me..

    This is the XE forum, isqlplus isn't part of an XE install, sorry :(
    Can point you to the 10g docs for isqlplus, for Windows I'm not positive a command line isqlplusctl stop will work to ensure its shut down- try stopping the service and make sure the port it wants to use is available-
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch2.htm#CIHFDCJI

  • Please, help me learn J2EE...point me out to better tutorials or something!

    Hi,
    Guys, I really need help in trying to learn what J2EE is.
    I've got prior knowledge and experience on Java (I thought), but ever since I came across the terms J2EE, EJB, JNI, JSP, JDBC and all that crap, I now don't know what I actually learnt!
    Please bear with me I beg of you! :)
    1.0: What I've learnt.
    ===============================
    So far, I've learnt (I think) the core/basics of the Java language, covering uhm...the basics up to GUIs, Arrays, IOStreams...yeah I think that's it.
    I code using notepad and compile them using the SDK...which up to now I still don't know if it is an SE or EE edition. It's j2sdk1.4.0 the last time I checked. I didn't use any IDE.
    I've done (school) projects like a Library System (involves loaning of books and charges etc etc), a Chalet Organizer (Loaning out chalets/rooms and charges etc etc) and an Appointment Organizer.
    So what was that which I learnt? Am I right to say that that is only core Java and nothing else and is next to worthless in the working world?
    2.0: Why I want to learn J2EE.
    ===============================
    Okay so why do I want to learn specifically J2EE? Well, most employment opportunities here require J2EE and EJB (and maybe some other alien terms) as prerequisites to being a "Java Programmer".
    I really need the job as soon as possible (for family's sake) and the job market here is already saturated with webmasters..
    3.0: What I have tried.
    ===============================
    Believe me, I tried for like 2 months already to try learn this thing on my own.
    I have followed almost exactly to the J2EE "Beginner's Tutorial" found on http://java.sun.com/j2ee/tutorial/ but no matter how far I read, I'm still just as clueless as I was when I was in my mother's womb about what J2EE is all about, even though I did the examples. I stopped somewhere in the middle of "Getting Started" because I realized I wasn't learning anything at all.
    4.0: Help meeeeeee...
    ===============================
    4.1:
    Can anyone please help me set my head straight and either point me to a REAL beginner's tutorial on J2EE and what the heck it is, or help explain to me slowly what J2EE really is and how to learn it?
    4.2:
    What's the difference between J2EE and J2SE?!? I initially thought that J2SE was simply just a smaller download which didn't include some of the heavier stuff that the EE carried, but boy was I wrong when that same tutorial asked me to install BOTH of them!
    4.3:
    Is it right for me to think that EJB are just files which are precoded to facilitate programming? e.g.:(I could've written up my own Date class instead of using the standard Date class that everybody uses.)
    4.4:
    What the hell is Jakarta Ant? Is it a builder and not a compiler, and may allow me to run built programs just by double-clicking on an e.g. executable? Like C++? So that I don't have to go to command prompt and type "java myApp.class"? (OT, but I think it's ridiculous that Apache has this and not Sun!!)
    4.5:
    Is there a simpler, much much much simpler example of a J2EE tutorial besides the overly vague tutorial "The Duke's Bank Application"? I need more examples of smaller scale maaaan... Better yet, is there a tutorial around that covers the very very very basics of Java all the way up to J2EE, step by step and with ample explanations?
    =========================
    Thanks all, I would really really appreciate any heads up you can provide me with.
    Sincerely, Kai.

    Lee and tsith - same fella -
    Run Tomcat as a standalone critter - the install of the current ver (4.1.12?) on a Windows machine sets it up nicely, and you don't have to worry about web connectors and stuff. Just create a few JSPs and dump them somewhere under the ROOT directory of your webapps directory and you should be able to hit them via a URL like http://localhost:8080/test.jsp (assuming you have it running on port 8080). Once you get your fill of the JSP thing, make a serrvlet and look into creating WAR files - then copy your WAR file into webapps subdirectory of your Tomcat installation and play with that. When you've had enough Servlet fun, then look into JBoss and making EAR files and you'll have all sorts of fun with JNDI and JDBC and all those other acronyms.
    Ant is just a build tool, not a compiler. Compiling simple java classes is no big deal, 'cause you just type javac MyClass.java or some such. But when you get into complicated build processes (like, compile these classes, making sure to include the J2EE jar and all the other jars I need, and create a WAR file, and deploy it to Tomcat) then Ant really helps.
    If you want help documenting your classes, the javadoc tool is for you.
    Lee

  • Command or Canvas Events for Recording ?? Please Help..

    Hi I am Abhijith I am a total newbie to the j2me world, And I am learning it now,
    My project topic is "Bluetooth Walkie Talkie " , And I am trying my best and putting
    all my efforts to code incrementally by learning , Before I could implement bluetooth,
    I thought let me complete the recording The audio and playing part first,
    The recording and playing of audio is working fine , But i would like to do it a real manner as Real Walkie talkie does, I want to record audio ONLY when the Key is being
    pressed , and when its released it should exit the player hence saving the recorded file,
    (Actually i dont want to save it in future,i would be sending the bytearray though the bluetooth , but for now , I want the Current module to be ready)
    I tried my best searching online to implement my requirement but the couldnot find
    such events I found Canva's KEYPRESS, KEYRELEASE , etc events but they dint not
    serve my purpose, Let me clearly tell where I am stuck , After the midlet starts(by launching it) then i would like to press a key( keypressed say No 5) for certain
    amount of time and the audio should be recorded only for the keypressed duration ,
    after I release , it should stop recording and save as a wav file .
    Whats happening is When i keep the key pressed , The midlet asks whether to allow
    the recording , for this purpose when I release key the control is going out, and
    i am not able to achieve the needed , I am posting the code here, Please Help me.
    I am not asking for the complete spoon feeding or ready made code, But as a beginner
    I need help from you all to learn and implement it.(at least it should satisfy me,i would feel i have learnt something then)
    Here below is my code ( i AM using WTK 2.5 )
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.media.*;
    import java.io.*;
    import javax.microedition.media.control.*;
    import java.util.*;
    import javax.microedition.io.*;
    import javax.microedition.io.file.*;
    public class Key extends MIDlet{
      private Display  display;
      private KeyCodeCanvas canvas;
      public Key(){
        display = Display.getDisplay(this);
        canvas  = new KeyCodeCanvas(this);
      protected void startApp(){
        display.setCurrent(canvas);
      protected void pauseApp(){}
      protected void destroyApp( boolean unconditional ){
        notifyDestroyed();
    class KeyCodeCanvas extends Canvas implements CommandListener{
      private Command exit;
         public StringItem message ;
         private Player player;
         private byte[] recordedAudioArray = null;
      private String keyValue = null;
      private Key midlet;
         Thread t = null;
         private String eventType = null;
      public KeyCodeCanvas(Key midlet){
        this.midlet = midlet;
        exit = new Command("Exit", Command.EXIT, 1);
        addCommand(exit);
        setCommandListener(this);
      protected void paint(Graphics g){
          g.setColor(255, 0, 0);
          g.fillRect(0, 0, getWidth(), getHeight());
        if (keyValue != null){
          g.setColor(0, 0, 255);
           g.drawString(keyValue + eventType+message, getWidth() / 2, getHeight() / 2,
         Graphics.TOP | Graphics.HCENTER);
      public void commandAction(Command c, Displayable d){
        String label = c.getLabel();
        if(label.equals("Exit"))
          midlet.destroyApp(true);
      protected void keyPressed(int keyCode){
         eventType = "pressed";
        keyValue = getKeyName(keyCode);
        repaint();
      public void keyReleased(int keyCode)
           try
                eventType = "released";
                keyValue = getKeyName(keyCode);
                repaint();
           catch (Exception e)
                System.out.print(e);
      public void keyRepeated(int keyCode)
           eventType = "repeated";
           keyValue = getKeyName(keyCode);
           try
                Thread t1 = new Thread()
                     public void run()
                          try
                               player = Manager.createPlayer("capture://audio?encoding=pcm");
                               player.realize();
                               RecordControl rc = (RecordControl)player.getControl("RecordControl");
                               ByteArrayOutputStream output = new ByteArrayOutputStream();
                               rc.setRecordStream(output);
                               rc.startRecord();
                               player.start();
                               eventType = "Recording";
                               message.setText("Recording...");
                               Thread.sleep(5000);
                               message.setText("Recording Done!");
                               rc.commit();
                               recordedAudioArray = output.toByteArray();
                               player.close();
                          catch (Exception e)
                }; t1.start();
           catch (Exception e)
           repaint();
         //Runnable r1 = new Runnable()
         //    public void run()
         //        try
         //            System.out.print(" here 1");
         //            message.setText(" here 1 ");
         //            player = Manager.createPlayer("capture://audio?encoding=pcm");
         //            player.realize();
         //            RecordControl rc = (RecordControl)player.getControl("RecordControl");
         //            ByteArrayOutputStream output = new ByteArrayOutputStream();
         //            rc.setRecordStream(output);
         //            rc.startRecord();
         //            player.start();
         //            eventType = "Recording";
         //            message.setText("Recording...");
         //            Thread.sleep(5000);
         //            message.setText("Recording Done!");
         //            rc.commit();
         //            recordedAudioArray = output.toByteArray();
         //            player.close();
         //        catch (Exception e)
    }I am really sorry at the end I messed with the code and its altered a Lot, But hope the
    logic Will is clear which is my requirement . I know the code for recording and
    playing is not complete as said, i Messed around a working code and tried adding Canavs
    for keyrepeat method,tried putting a thread around , AT last totally messed,
    I tried working on this for two days but couldn't be successfull , Please Help me!!
    The control goes out when midlet asks whether to allow recording ,
    I thank you anticipation ...
    -Abhijith Rao

    Midlet asking whether to allow the recording are typical permissions prompts specified by MIDP security policy. You need to sign the MIDlet and give it proper permissions.
    Problems like this were discussed in an older thread at WTK forum: *[MIDlet keeps asking for permission.|http://forums.sun.com/thread.jspa?threadID=5347313]* According to one of the posters in the thread, +"...I got it to work on the emulator by setting the permission to 'manufacturer'. It runs smoothly without annoying questions..."+
    If you're interested, check documentation and tutorials on MIDP security policy for more details.
    For events to record audio only when the key is being pressed, consider GameCanvas API, method getKeyStates.
    I am not certain though if doing it this way is a good idea. I doubt that phone users have same habits as those of walkie-talkies; for them it might be indeed more comfortable to use single simple key presses to start and finish recording.

  • Please help me with my problem, urgently worried and tired. Cant seem to find a solution!

    I was just doing my website and doing my css stylings. Suddenly, when i create a css rule, it stopped showing in my live view or browser. It still appears the way i want in design view. I have no idea why, i am only a beginner and i am struggling with this. My assignment is due soon and i have not finished, I am feeling so stressed now i have resort to asking here. Please please help me, this means so much to me...i know its really messy i just need all my css to work. The textarea and form parts are not working. any new css created from this stage doesnt work too.
    Here is my html code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="js/lightbox-2.6.min.js"></script>
    <script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
    <link href="css/lightbox.css" rel="stylesheet" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="css/gallerystyle.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    #apDiv1 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 1;
              left: -9px;
              top: 75px;
    #apDiv2 {
              position: absolute;
              width: 754px;
              height: 115px;
              z-index: 1;
              left: 262px;
              top: 28px;
    a {
              font-weight: bold;
    a:link {
              text-decoration: none;
    a:visited {
              text-decoration: none;
    a:hover {
              text-decoration: none;
    a:active {
              text-decoration: none;
              font-weight: bold;
              color: #000;
    body,td,th {
              color: #000;
    #apDiv3 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 2;
              left: 31px;
              top: 27px;
    #apDiv4 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 21;
              top: 199px;
              left: 35px;
    #apDiv5 {
              position: absolute;
              width: px;
              height: 150px;
              z-index: 21;
              top: 145px;
              left: 8px;
    #apDiv6 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 22;
    #apDiv7 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 22;
    #apDiv8 {
              position: absolute;
              width: 269px;
              height: 332px;
              z-index: 22;
              left: 285px;
              top: 175px;
    #apDiv9 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 22;
              left: 271px;
              top: 107px;
    #apDiv10 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 23;
              left: 588px;
              top: 106px;
    #apDiv11 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 24;
              left: 909px;
              top: 105px;
    #apDiv12 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 25;
              left: 273px;
              top: 497px;
    #apDiv13 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 26;
              left: 590px;
              top: 494px;
    #apDiv14 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 27;
              left: 910px;
              top: 498px;
    #apDiv15 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 28;
              left: 275px;
              top: 886px;
    #apDiv16 {
              position: absolute;
              width: 200px;
              height: 115px;
              z-index: 22;
              left: 435px;
              top: 145px;
    #apDiv17 {
              position: absolute;
              width: 439px;
              height: 115px;
              z-index: 22;
              left: 267px;
              top: 156px;
    </style>
    <script type="text/javascript">
    function MM_effectAppearFade(targetElement, duration, from, to, toggle)
              Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    </script>
    </head>
    <body onload="MM_preloadImages('images/GalleryTOPS/STRIPEY/3.jpg','images/GalleryTOPS/LONG/3.jp g','images/GalleryTOPS/vneck/3.jpg','images/GalleryTOPS/pink/3.jpg','images/GalleryTOPS/ss /3.jpg')">
    <div id="apDiv5">
       <section class="ac-container">
                                            <div>
                                                      <input id="ac-1" name="accordion-1" type="checkbox" />
                                              <label for="ac-1">New Arrivals</label></li>
                                            <div>
                                                      <input id="ac-2" name="accordion-1" type="checkbox" />
                                              <label for="ac-2">Tops</label>
                                                      <article class="ac-medium"><a href="blouse.html" class="linkstyle"><span class="linkk"> <span class="ac-medium">Blouse
                                                      </span><br />
    <a href="#" class="linkk">Printed Tops</a><br />
    <a href="#" class="linkk"> Basics</a></article>
                                            </div>
                                            <div>
                                                      <input id="ac-3" name="accordion-1" type="checkbox" />
    <label for="ac-3">Bottoms</label>
                                                      <article class="ac-small">
                          <a href="#" class="linkk">Pants</a>
                      <a href="#"> <li class="linkk" id="active">Skirts</li></a>
                      <span class="linkk"></span></article>
                                                      <div>
                                                      <input id="ac-4" name="accordion-1" type="checkbox" />
                                                      <label for="ac-4">Dresses</label>
                                            </div>
                                                            <div>
                                                      <input id="ac-5" name="accordion-1" type="checkbox" />
                                                      <label for="ac-5">Bags & Accessories</label>
                                                      <article class="ac-large">
                          <span class="linkk"><a href="#" class="linkk"><span class="ac-large">Bags </span></a><span class="ac-large"><br />
                          <a href="#" class="linkk">Clutches</a>
    <br />
    <a href="#" class="linkk">Necklaces & Bracelets</a><br />
    <a href="#" class="linkk">Eyewear</a></span></span> </article>
                        </div>
                                                                <div>
                                                      <input id="ac-6" name="accordion-1" type="checkbox" />
                                                      <label for="ac-6">Shoes</label>
                                                      <article class="ac-large">
                          <span class="linkk"><a href="#" class="linkk"><span class="ac-large">Flats</span></a>          <span class="ac-large"><br />
                          <a href="#" class="linkk">Heels</a>
    <br />
    <a href="#" class="linkk">Boots</a></span></span></article>                   
    </section>
    </div>
    <div id="apDiv2">
    <ul id="menu">
      <li><a href="#">Home</a></li>
      <li id="active"><a href="#">Shop</a></li>
              <li><a href="#">Blog</a></li>
              <li><a href="#">About</a></li>
              <li><a href="#">FAQ</a></li>
        <li><a href="#">Contact</a></li>
    </ul>
    </div>
    <div id="apDiv3"><img src="images/images/images/dolce_03.png" width="172" height="62" /></div>
    </body>
    </html>
    HERE IS MY CSS CODE:
    @charset "utf-8";
    /* CSS Document */
    #menu{
              width: 100%;
              margin: 0;
              padding: 10px 0 0 0;
              list-style: none; 
              background: none;
    #menu li{
              float: left;
              padding: 0 0 10px 0;
              position: relative;
              font-weight: bold;
    #menu a{
              float: left;
              height: 25px;
              padding: 0 34px;
              color: #CCC;
              text-transform: uppercase;
              font: bold 14px/27px Arial, Helvetica;
              text-decoration: none;
    #active a{float: left;
              height: 25px;
              padding: 0 34px;
              color: #000;
              text-transform: uppercase;
              font: bold 14px/27px Arial, Helvetica;
              text-decoration: none;}
    #menu li:hover > a{
              color: #000;
              transition:.30s ease-in-out;
              -moz-transition: .30s ease-in-out;
              -webkit-transition: .30s ease-in-out;
    /* Sub-menu */
    /* Clear floated elements */
    #menu:after{
              visibility: hidden;
              display: block;
              font-size: 0;
              content: " ";
              clear: both;
              height: 0;
    * html #menu             { zoom: 1; } /* IE6 */
    *:first-child+html #menu { zoom: 1; } /* IE7 */
    .ac-container{
              width: 200px;
              margin: 10px auto 30px auto;
              text-align: left;
    .ac-container label{
              font-family: Arial, Helvetica, sans-serif;
              padding: 5px 20px;
              position: relative;
              z-index: 20;
              display: block;
              height: 30px;
              cursor: pointer;
              color: #000;
              line-height: 33px;
              font-size: 13px;
              box-shadow: 1px  0px #333;
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ffffff',GradientType=0 );
              font-weight: bold;
    .ac-container label:hover{
              color: #ccc;
              background-image:
    .ac-container input:checked + label,
    .ac-container input:checked + label:hover{
              background: #FFF;
              color: #F1C97E;
              text-shadow: 0px 1px 1px rgba(255,255,255, 0.6);
    .ac-container label:hover:after,
    .ac-container input:checked + label:hover:after{
              content: '';
              position: absolute;
              width: 24px;
              height: 24px;
              right: 13px;
              top: 7px;
    .ac-container input:checked + label:hover:after{
    .ac-container input{
              display: none;
    .ac-container article{
              margin-top: -1px;
              overflow: hidden;
              height: 0px;
              position: relative;
              z-index: 10;
              -webkit-transition: height 0.3s ease-in-out, box-shadow 0.6s linear;
              -moz-transition: height 0.3s ease-in-out, box-shadow 0.6s linear;
              -o-transition: height 0.3s ease-in-out, box-shadow 0.6s linear;
              -ms-transition: height 0.3s ease-in-out, box-shadow 0.6s linear;
              transition: height 0.3s ease-in-out, box-shadow 0.6s linear;
              padding-left:60px;
    .ac-container input:checked ~ article{
              -webkit-transition: height 0.5s ease-in-out, box-shadow 0.1s linear;
              -moz-transition: height 0.5s ease-in-out, box-shadow 0.1s linear;
              -o-transition: height 0.5s ease-in-out, box-shadow 0.1s linear;
              -ms-transition: height 0.5s ease-in-out, box-shadow 0.1s linear;
              transition: height 0.5s ease-in-out, box-shadow 0.1s linear;
    .ac-container input:checked ~ article.ac-small{
              height: 30px;
              padding-left:60px;
    .ac-container input:checked ~ article.ac-medium{
              height: 50px;
              padding-left:60px;
    .ac-container input:checked ~ article.ac-large{
              height: 90px;
              padding-left:60px;
    .linkk {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 12px;
              color: #000;
    .linktext {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 13px;
              color: #333;
    .accordion {  
         width:830px; 
         overflow:hidden;  
         margin:10px auto;  
         color:#;  
         padding:10px;  
    .accordion section{  
          float:left; 
          overflow:hidden;  
          color:#;  
          cursor:pointer;  
          margin:3px;  
    .accordion section:hover { 
          background:; 
    .accordion section p {  
          display:none;  
    .accordion section:after{ 
          position:relative; 
          font-size:24px; 
          color:#000; 
          font-weight:bold; 
    .accordion section:nth-child(1):after{ content:'1'; } 
    .accordion section:nth-child(2):after{ content:'2'; } 
    .accordion section:nth-child(3):after{ content:'3'; } 
    .accordion section:nth-child(4):after{ content:'4'; } 
    .accordion section:nth-child(5):after{ content:'5'; } 
    .accordion section:target {  
          background:#FFF;  
          padding:10px; 
    .accordion section:target:hover {  
          background:#FFF;  
    .accordion section:target h2 { 
          width:100%; 
    .accordion section:target h2 a{  
          color:;  
          padding:0; 
    .accordion section:target p { 
          display:block; 
    .accordion section h2 a{ 
          padding:8px 10px; 
          display:block;  
          font-size:16px;  
          font-weight:normal; 
          color:  
          text-decoration:none;  
    .vertical section{  
         width:100%;  
         height:40px;  
         -webkit-transition:height 0.2s ease-out; 
         -moz-transition:height 0.2s ease-out; 
         -o-transition:height 0.2s ease-out; 
         transition:height 0.2s ease-out; 
    /*Set height of the slide*/ 
    .vertical :target{  
         height:250px;  
         width:97%; 
    .vertical section h2 {  
         position:relative;  
         left:0;  
         top:-15px;  
    /*Set position of the number on the slide*/ 
    .vertical section:after{  
          top:-50px; 
          left:810px; 
    .vertical section:target:after{  
          left:-9999px; 
    .item {
              width: 490px;
              height: 30px;
              /* height = total height of A child element */
              overflow: hidden;
              margin-bottom: 3px;
              transition: height ease-in-out 500ms; /* css3 transition */
              -o-transition: height ease-in-out 500ms;
              -moz-transition: height ease-in-out 500ms;
              -webkit-transition: height ease-in-out 500ms;
              font-family: Arial, Helvetica, sans-serif;
              font-size: 12px;
              color: #000;
              padding-bottom:1px;
    #accordion div:target {
              height: 150px;
              transition: background .30s ease-in-out;
              -moz-transition: background .30s ease-in-out;
              -webkit-transition: background .30s ease-in-out; /* height = total height of A and P child elements */
    #accordion a {
        display: block;
        height: 20px;
        background: #fff;
              -webkit-transition: height ease-in-out 500ms;
              font-family: Georgia, "Times New Roman", Times, serif;
              font-size: 24px;
              font-style: italic;
              font-weight: bold;
              color: #333;
              text-decoration: underline;
        padding: 1px;
    #accordion a:hover {
        display: block;
        height: 20px;
        background: #fff;
              -webkit-transition: height ease-in-out 500ms;
              font-family: Georgia, "Times New Roman", Times, serif;
              font-size: 24px;
              font-style: italic;
              font-weight: bold;
              color: #f1c97e;
              text-decoration: underline;
        padding: 1px;
              transition:.30s ease-in-out;
              -moz-transition:  .30s ease-in-out;
              -webkit-transition:.30s ease-in-out;}
    #accordion div:hover a:before {    color: #F1c97e;
              content:url(../images/images/aa_03.png)
    #accordion p {
        height: 380px;
        padding: 5px;
    .enqhead {
              font-family: "Arial Black", Gadget, sans-serif;
              font-size: 16px;
              font-style: normal;}
    .enquhead {
              font-family: Georgia, "Times New Roman", Times, serif;
              font-size: 18px;
              font-weight: bold;
              color: #333;
              border: 3px solid #333;
              position: absolute;
    .embox {
              border-top-color: #000;
    .enqq {
              font-family: Georgia, "Times New Roman", Times, serif;
              font-weight: bold;
              font-style: italic;

    I'll 2nd Chris's comments about position:absolute.  It is definitely not needed for 98% of page layouts and in most cases should be avoided because it makes a complete mess of things. 
    You also have quite a few coding errors which mucks things up in browsers.  While I'm not certain what all you're trying to do with those labels, But I think you can simplify things enormously by using a very basic CSS layout and simple jQuery Accordion panels. 
    Copy & paste the following code into a new, blank document.  SaveAs test.html and preview in browsers.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Document with Accordion Panels</title>
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <script src="http://code.jquery.com/jquery-latest.min.js"> </script>
    <style>
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    img { vertical-align: baseline }
    body {
        width: 960px; /**adjust width as needed**/
        margin: 0 auto; /**with width, this is centered**/
        padding:0;
        background: #69F;
        font: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, sans-serif;
        font-size: 100%;
        color: #000;
    /**global text links**/
    a img { border: none }
    a {
        font-weight: bold;
        text-decoration: none
    a:link { color: #069; }
    a:visited { color: #69F }
    a:hover, a:active, a:focus {
        text-decoration: underline;
        color: #000;
        outline: none;
    header {
        margin:0;
        padding:0;
        overflow: hidden;/*float containment**/
        width: 100%;
    header:after {
        /**clear floats**/
        content: '';
        visibility: hidden;
        display: block;
        clear: both;
    footer {
        margin:0;
        padding:0;
        width: 100%;
        color: #FFF;
        text-align: center
    article {
        margin:0;
        background: #FFF;
        padding: 2%;
    /**top navigation**/
    nav {
        margin:0;
        padding:0;
        float: right;
        width: 75%;
        overflow:hidden;
    #menu {
        width: 100%;
        margin: 0;
        padding: 10px 0 0 0;
        list-style: none;
    #menu li {
        float: left;
        padding: 0 0 10px 0;
        position: relative;
        font-weight: bold;
    #menu li a {
        display: block;
        padding: 0 34px;
        color: #CCC;
        text-transform: uppercase;
        font: bold 14px/27px Arial, Helvetica;
        text-decoration: none;
    #menu li:hover > a {
        color: #000;
        transition: .30s ease-in-out;
        -moz-transition: .30s ease-in-out;
        -webkit-transition: .30s ease-in-out;
    /* Clear floated elements */
    #menu:after {
        visibility: hidden;
        display: block;
        font-size: 0;
        content: " ";
        clear: both;
        height: 0;
    * html #menu { zoom: 1; } /* IE6 */
    *:first-child+html #menu { zoom: 1; } /* IE7 */
    /**accordion panels**/
    .accordion { margin: 50px; }
    .accordion dt {
        background: #DDD;
        line-height: 50px;
        padding: 10px;
        border: 1px solid #000;
        border-bottom: 0;
    .accordion dd {
        min-height: 100px;
        margin-left: 0;
        padding: 20px;
        border: 1px solid #ccc;
    .accordion dd &:last-of-type {
    border-top: 1px solid white;
    position: relative;
    top: -1px;
    .accordion dt a {
        display: block;
        font-weight: bold;
    </style>
    </head>
    <body>
    <header> <img src="http://placehold.it/172x62" height="62" width="172" alt="logo" >
    <nav>
    <ul id="menu">
    <li><a href="#">Home</a></li>
    <li><a href="#">Shop</a></li>
    <li><a href="#">Blog</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">FAQ</a></li>
    <li><a href="#">Contact</a></li>
    </ul>
    </nav>
    </header>
    <article> <h2>New Arrivals &gt; Tops</h2>
    <dl class="accordion">
    <dt><a href="">Blouses</a></dt>
    <dd><a href="#">Printed Tops</a>  |  <a href="#" >Basics</a></dd>
    <dt><a href="">Bottoms</a></dt>
    <dd><a href="#">Pants</a> |   <a href="#">Skirts</a></dd>
    <dt><a href="">Dresses</a></dt>
    <dd>Something here... |   something here... |  something here...</dd>
    <dt><a href="">Bags &amp; Accessories</a></dt>
    <dd>Bags  |   Clutches  |   Necklaces &amp; Bracelets |  
    Eyewear</dd>
    <dt><a href="">Shoes</a></dt>
    <dd><a href="#">Flats</a> |   <a href="#">Heels</a> |   <a href="#">Boots</a></dd>
    </dl>
    <!--end accordion panels-->
    </article>
    <footer> <small>© 2013 XYZ Company. All rights reserved. </small> </footer>
    <script>
    //jQuery Accordion Panels//
    (function($) {
      var allPanels = $('.accordion > dd').hide();
      $('.accordion > dt > a').click(function() {
          $this = $(this);
          $target =  $this.parent().next();
          if(!$target.hasClass('active')){
             allPanels.removeClass('active').slideUp();
             $target.addClass('active').slideDown();
        return false;
    })(jQuery);
    </script>
    </body>
    </html>
    ❄  ☃  ❄Nancy O.

Maybe you are looking for

  • Illustrator 11.0.2 crashes network MAC OS 10.5.6 Suitcase Fusion 12.1.7

    Just a heads up for anyone out there using Illustrator 11.0.0. Before what happened below I had already updated to the so called version 11.0.2. What happened was my connection to my airport extreme kept logging out when I loaded Illustrator. I have

  • Need help writing a script to delete a folder to run at startup

    I have no experience with this and need full assistance to set this up. I am hoping to write a script which can be run at startup on a single client machine which is giving me font trouble. Our client machines are network controlled by our server and

  • Executing 3 FM's in a sequence

    Hi all, I need to execute  3 FM's(eg create ,save and commit) in SE37.How do i do this?

  • Where's the manual?

    I have given it a go -- 20 minutes searching the Adobe site and googling. Where can I download a PDF manual for Soundbooth?

  • Stop warnings when launching apps

    Every time I launch Firefox, it tells me, "Firefox is an application which was downloaded from the internet. Are you sure you want to open it?"" Even after opening and quitting it, I get the same warning next time. Same thing for Amazon MP3 Downloade