Need help on a exception error

here s my program my problem is i keep getting a index out of bounds error and have no clue why heres the error followed by the code
thanks in advance for any help
java.lang.ArrayIndexOutOfBoundsException
     at graphics_class2.init(graphics_class2.java:37)
     at sun.applet.AppletPanel.run(AppletPanel.java:344)
     at java.lang.Thread.run(Thread.java:484)
Exit code: 0
No Errors
public class graphics_class2 extends Applet {
int dumyvarX = 150 ;
int dumyvarY = 150 ;
int n= 0;
int j = 0;
int i = 0;
int[] nx ;
int[] ny ;
int[] x ;
int[] y ;
int polygonpositionX = 100;
int polygonpositionY = 100;
int centerpointX = 100;
int centerpointY = 100;
int adjusted_centerpointX = 0;
int adjusted_centerpointY = 0;
int maximum_vertices = 3;
public void init() {
nx = new int[maximum_vertices] ;
ny = new int[maximum_vertices] ;
x = new int[ maximum_vertices] ;
y = new int[ maximum_vertices] ;
nx[0]= 20; nx[1]=40; nx[2]=60; nx[3]=110;
ny[0]= 170; ny[1]=100; ny[2]=170; ny[3]=220;
adjusted_centerpointX = centerpointX + polygonpositionX;
adjusted_centerpointY = centerpointY + polygonpositionY;
for(i = 0; i < maximum_vertices; i++) {
x[i] = nx[v ]+polygonpositionX ; // v is i just to lazy to retype it all out
y[i] = ny[v ]+polygonpositionY ;
public void paint(Graphics g) {
g.setColor(Color.black);
g.setColor(Color.cyan);
for(i = 1; i <= 359; i++){
for(n = 1; n <= maximum_vertices; n++){
dumyvarX = nx[n]+polygonpositionX ;
dumyvarY = ny[n]+polygonpositionY ;
x[n] = (int)(dumyvarX * Math.cos(i)) ; // float or int?
x[n] = (int)(dumyvarY * Math.sin(i)) ;
g.drawPolygon(x,y,maximum_vertices) ;
repaint();
// g.setColor(Color.cyan);
// g.drawPolygon(x,y,maximum_vertices) ;
// g.fillPolygon(x,y,4);
// g.drawLine(centerpointX+polygonpositionX,centerpointY + polygonpositionY,(int)(dumyvarX +(j) * Math.cos(i)), (int)(dumyvarY +(j ) * Math.sin(i)));
// repaint();

Your code:
nx = new int[maximum_vertices] ;
ny = new int[maximum_vertices] ;
x = new int[ maximum_vertices] ;
y = new int[ maximum_vertices] ;
nx[0]= 20; nx[1]=40; nx[2]=60; nx[3]=110;
ny[0]= 170; ny[1]=100; ny[2]=170; ny[3]=220;maximum_vertices is 3 and therefore space for 3 ints is allocated. You try to access 4 (0 -> 3) but there are only 3 (0 -> 2).

Similar Messages

  • I need help with this code error "unreachable statement"

    the error_
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errors
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    public class Tools//tool class
    private int numberOfToolItems;
    private ToolItems[] toolArray = new ToolItems[10];
    public Tools()//array of tool
    numberOfToolItems = 0;
    for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
    toolArray[i] = new ToolItems();
    }//end for loop
    }//end of array of tools
    public int search(int id)//search mehtod
    int index = 0;
    while (index < numberOfToolItems)//while and if loop search
    if(toolArray[index].getID() == id)
    return index;
    else
    index ++;
    }//en while and if loop
    return -1;
    }//end search method
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0;
    int index;
    index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    }//end delete method
    public void display()//display method
    for(int i = 0; i < numberOfToolItems; i++)
    //toolArray.display(g,y,x);
    }//end display method
    public String getRecord(int i)//get record method
    // return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
    }//end getrecod
    }//end class
    Edited by: ladsoftware on Oct 9, 2009 6:08 AM
    Edited by: ladsoftware on Oct 9, 2009 6:09 AM
    Edited by: ladsoftware on Oct 9, 2009 6:10 AM
    Edited by: ladsoftware on Oct 9, 2009 6:11 AM

    ladsoftware wrote:
    Subject: Re: I need help with this code error "unreachable statement"
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errorsThe compiler is telling you exactly what the problems are:
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
    int index;
    index = search(id);  //< -----------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    // <<== HERE where is the return statement?
    }//end delete method
    public String getRecord(int i)//get record method
    // return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
    }//end getrecod
    }//end class

  • I have an error -5000 when I try to record in GarageBand..I urgen need help, I have an error -5000 when I try to record in GarageBand..I urgen need help

    I have an error -5000 when I try to record in GarageBand V10,02..I urgen need help, I have an error -5000 when I try to record in GarageBand..
    I just reinstal OSX 10,9,2 marveiks and downdload the GB.. but when I try to record, the error ocurr
    I urgen need help
    thanks

    This is probably one of the files that is required by the template you are using.
    These files are inside the iWeb app. Control click the iWeb app icon and select "Show package contents".
    You need to dig down through the folders and files to find what you want...
    Contents/Resources/da.lproj/Templates/
    If the file is missing you would need to re install the iWeb app...
    http://www.iwebformusicians.com/iWeb/iWeb-Tips.html

  • Need help in analysing the error in JasperReportIntegration Test Applicatio

    Our DBA installed Jasper Reports Integration kit Version 1.1.0.0 in our test environment. Apex version is 3.2.1.00.12. Oracle database is 11g and Apache Tomcat is 7.0.26
    I was able to bring up the Jasper Reports Integration test application. When I navigate to "Report Tester" tab, changed the JasperReportIntegration URL to the correct localhost and then cklick the "Show report (directly)" button, I got this message:
    Jun 12, 2012 11:41:58 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [ReportWrapper] in context with path [JasperReportsIntegration] threw exception [Servlet execution threw an exception] with root cause
    Throwable occurred: java.lang.NoClassDefFoundError: net.sf.jasperreports.engine.util.JRStyledTextParser (initialization failure)
         at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:87)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:57)
         at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:52)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)
         at de.oc.integration.jasper.webapp.ReportWrapper.service(ReportWrapper.java:318)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
         at java.lang.Thread.run(Thread.java:736)
    Can anyone help me understand this error and let me know if this message is caused by installing the jasper report integration kit incorrectly?
    Thanks.
    Edited by: bratz69 on Jun 12, 2012 7:35 PM

    Hi Dietmar,
    Thanks for your reply.
    There's no jasperreports-fonts-3.7.4.jar file in the webapps/JasperReportsIntegration/WEB-INF/lib folder. The only font file available is jasperreports-fonts-4.5.0.jar. I've downloaded the 3.7.40 jar file and saved it in the same folder without deleting the 4.5.0.jar. I tried to run the Test application again and still give me the same error.
    Jun 13, 2012 3:58:26 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [ReportWrapper] in context with path [JasperReportsIntegration] threw exception [Servlet execution threw an exception] with root cause
    Throwable occurred: java.lang.NoClassDefFoundError: net.sf.jasperreports.engine.util.JRStyledTextParser (initialization failure)
         at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:87)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:57)
         at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:52)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)
         at de.oc.integration.jasper.webapp.ReportWrapper.service(ReportWrapper.java:318)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
         at java.lang.Thread.run(Thread.java:736)
    I also tried the suggestion from the link provided by Nick. However, the syntax is for SUN environment and we are using IBM so I searched the equivalent of that command in IBM. Our DBA added the Java system property in the startup script by adding these 2 lines. But it errored out on the first 2 lines. I'm not sure if I do have the right syntax.
    java.version=1.4
    java.awt.headless=true
    ----- Error
    27) ./startup.sh
    ./startup.sh[25]: java.version=1.4: not found
    ./startup.sh[26]: java.awt.headless=true: not found
    Using CATALINA_BASE: /dbfupg/apache-tomcat-7.0.26
    Using CATALINA_HOME: /dbfupg/apache-tomcat-7.0.26
    Using CATALINA_TMPDIR: /dbfupg/apache-tomcat-7.0.26/temp
    Using JRE_HOME: /usr/java6/jre
    Using CLASSPATH: /dbfupg/apache-tomcat-7.0.26/bin/bootstrap.jar:/dbfupg/apache-tomcat-7.0.26/bin/tomcat-juli.jar
    ----- Start up script
    27) cat startup.sh
    #!/bin/sh
    java.version=1.4
    java.awt.headless=true
    os400=false
    case "`uname`" in
    OS400*) os400=true;;
    esac
    # resolve links - $0 may be a softlink
    PRG="$0"
    while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
    else
    PRG=`dirname "$PRG"`/"$link"
    fi
    done
    PRGDIR=`dirname "$PRG"`
    EXECUTABLE=catalina.sh
    # Check that target executable exists
    if $os400; then
    # -x will Only work on the os400 if the files are:
    # 1. owned by the user
    # 2. owned by the PRIMARY group of the user
    # this will not work if the user belongs in secondary groups
    eval
    else
    if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "Cannot find $PRGDIR/$EXECUTABLE"
    echo "The file is absent or does not have execute permission"
    echo "This file is needed to run this program"
    exit 1
    fi
    fi
    exec "$PRGDIR"/"$EXECUTABLE" start "$@"
    BTW, Thanks for the update on the new version.
    Thanks!
    Edited by: bratz69 on Jun 13, 2012 4:48 PM

  • Need help in understanding the error ORA-01843: not a valid month - ECX_ACT

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

  • Need help, I have an error message "not enough storage"  for icloud and it will not let me do anything

    Need help... getting an error message "not enough storage" for icloud and it will not let me get passed the message

    See if this helps.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • Need help about : ORA-14450 error

    ORA-14450: attempt to access a transactional temp table already in use
    Cause: An attempt was made to access a transactional temporary table that has been already populated by a concurrent transaction of the same session.
    what can i do to solve this error
    need help immediately

    Sounds like you have a transaction-specific global temporary table (ON COMMIT DELETE ROWS) and that mulitple transactions try to use it at the same time.
    You could make the table session-specific (ON COMMIT PRESERVE ROWS).
    BUT, there may be a reason why it was created this way and you therefore have a problem somewhere in the program logic.

  • Need help with System.setClipboard error

    SDK version: 3.3.0.4589
    Requires flash 10.0.12 or higher
    Code:
    private function sendTextToClipboard():void
         System.setClipboard("User Name: " + uname + "\n" + "Password: " + pword);
    I am using the System.setClipboard function in my application and have incountered an interesting problem.
    When the call is made on a windows box (XP and Vista) IE crashes.
    The following is the Vista IE error that is being thrown:
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: iexplore.exe
    Application Version: 8.0.6001.18865
    Application Timestamp: 4b077416
    Fault Module Name: Flash10c.ocx
    Fault Module Version: 10.0.32.18
    Fault Module Timestamp: 4a613d79
    Exception Code: c0000005
    Exception Offset: 0016f1f2
    OS Version: 6.0.6002.2.2.0.256.6
    Locale ID: 1033
    Additional Information 1: fd00
    Additional Information 2: ea6f5fe8924aaa756324d57f87834160
    Additional Information 3: fd00
    Additional Information 4: ea6f5fe8924aaa756324d57f87834160
    The following is the XP SP3 IE error:
    Internet Explorer has encountered a problem with an add-on and needs to close.
    The following add-on was running when this problem occured:
    File:    FlDbg10b.ocx
    iexplore.exe - Application Error
    The instruction "0x052bee0e" referenced memory at "0x00000018".  The memory could not be read.
    Any help would be greatly apprieciated.

    Try the example in the docs and see if that works.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • NEED HELP IN CONFLICT HANDLER ERROR ORA-01403: no data found

    Hi All,
    I am using Oracle Streams to replicate the data...
    I need to update the records on the destination with some particular condition like if USER_COUNTRY = 'XXX' then the data need to be updated in the destination side else skip ...
    I wrote the procedure ..below .. the data is not replicating and found the below error from dba_apply_error..
    ORA-01403: no data found
    ORA-06512: at "SYS.LCR$_ROW_RECORD", line 419
    Table called history_row_lcrs is created in the strmadmin to store the lcr values...
    CREATE OR REPLACE PROCEDURE proc_test(in_any sys.anydata)IS
    lcr sys.lcr$_row_record;
    rc pls_integer;
    v_type varchar2(20);
    col_1 sys.anydata;
    lcr_usercountry varchar2(20);
    TRANS varchar2(20);
    skip_routine Exception;
    BEGIN
    rc:=in_any.GetObject(lcr);
    v_type:=lcr.get_command_type();
    col_1:=lcr.get_value('NEW','USER_COUNTRY');
    rc:=col_1.GetVarchar2(lcr_usercountry);
    for x in ( select user_country from TEST.TESTREP1
    where USER_COUNTRY=lcr_usercountry)
    Loop
    IF (x.USER_COUNTRY = 'XXX')
    THEN
    insert into strmadmin.history_row_lcrs VALUES (SYSDATE, lcr.GET_SOURCE_DATABASE_NAME(), lcr.GET_COMMAND_TYPE(),
    lcr.GET_OBJECT_OWNER(), lcr.GET_OBJECT_NAME(), lcr.GET_TAG(), lcr.GET_TRANSACTION_ID(), lcr.GET_SCN(),
    lcr.GET_COMMIT_SCN,lcr.GET_VALUES('old'), lcr.GET_VALUES('new', 'n'));
    lcr.EXECUTE(true);
    ELSE
    Raise Skip_routine;
    END IF;
    END Loop;
    Exception
    when skip_routine Then
    null;
    END;
    BEGIN
    DBMS_APPLY_ADM.SET_DML_HANDLER(
    object_name => 'TEST.TESTREP1',
    object_type => 'TABLE',
    operation_name => 'UPDATE',
    error_handler => false,
    user_procedure => 'STRMADMIN.PROC_TEST',
    apply_database_link => NULL,
    apply_name => NULL);
    END;
    Please try to help me if am doing something wrong...because I need to update only one colums am using DML_HANDLER instead of SET_UPDATE_CONFLICT_HANDLER...
    Any other inputs are also appreciated...
    Thanks In Advance and appreciate for the quick reply...

    I fired the query, am not getting any output from dbms_output.put_line('..|USER_COUNTRY..');
    Is that no data is reading or may be any reason else..
    in this table store_id is the primary key ..
    SQL> set serveroutput on
    SQL> CREATE OR REPLACE PROCEDURE test(in_any sys.anydata) IS
    2 lcr sys.lcr$_row_record;
    3 rc pls_integer;
    4 v_type varchar2(20);
    5 col_1 sys.anydata;
    6 col_2 sys.anydata;
    7 lcr_usercountry varchar2(20);
    8 lcr_storeid number;
    9 TRANS varchar2(20);
    10 store_id number;
    11 USER_COUNTRY varchar2(20);
    12
    13 BEGIN
    14 rc:=in_any.GetObject(lcr);
    15 v_type:=lcr.get_command_type();
    16 col_1:=lcr.get_value('NEW','USER_COUNTRY');
    17 rc:=col_1.GetVarchar2(lcr_usercountry);
    18 col_2:=lcr.get_value('NEW','STORE_ID');
    19 rc:=col_2.getnumber(lcr_storeid);
    20 select user_country into user_country from dev03.testrep1 where user_country=lcr_usercountry and store_id=lcr_storeid;
    21 dbms_output.put_line('---------||USER_COUNTRY ||-----------');
    22 END;
    23 /
    Procedure created.
    Thanks for your help ....

  • Need help in Cursor exception

    Hi,
    I have a small code with implicit cursor to fetch rows from table unreadable_cards and then for each value fetched I lookup another table card_acnt for some values and update data in unreadable cards table. The code is as below
    declare
    v1 number;
    begin
    for v1 in (select engravedid from unreadable_cards where case_resolved=1)
    loop
    update unreadable_cards set serial_number = (select serial_number from card_account
    where ticketid = v1.engravedid)
    where engravedid = v1.engravedid;
    update unreadable_cards set case_resolved=2
    where case_resolved=1
    and serial_number is not null;
    end loop;
    exception
    when no_data_found then
    update unreadable_cards set case_resolved=22
    where ticketid = v1.engravedid;
    when too_many_rows then
    update unreadable_cards set case_resolved=23
    where ticketid = v1.engravedid;
    when others then
    update unreadable_cards set case_resolved=24
    where ticketid = v1.engravedid;
    end;
    Here I have problem writing values to the table as this error pops up for every reference to V1 in exception
    PLS-00487: Invalid reference to variable 'V1'
    I need to be able to raise all three exceptions within the loop so that v1 can be referenced and loop does not exit on encountering the exception and completes for every row fetched by cursor, so that I can track the status of each record on the basis of case_resolved value.
    Any help would be highly appreciated
    Thanks
    Saurabh

    Let me get that out of me.. I don't like your code
    First thing you need to know is, you are not going to hit NO_DATA_FOUND exception in a UPDATE statement. If a update did not modify any row it will not raise NO_DATA_FOUND exception. Check this out
    SQL> begin
      2    update emp set sal = sal+ 10 where 1=2;
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    No exception there. So that is one thing you need to look at.
    Second thing I don't like the way you have used WHEN OTHERS exception. What are the exception you are looking at? You should not be having a when others without RAISE. It a bug in the code. You need to fix that.
    Assuming your logic behind assigning CASE_RESOLVED is like this.
    CASE_RESOLVED = 2   means you have found an exact match for your UNREADABLE_CARDS.ENGRAVEDID in CARD_ACCOUNT.TICKETID
    CASE_RESOLVED = 22 means you don't have a match for your UNREADABLE_CARDS.ENGRAVEDID in CARD_ACCOUNT.TICKETID
    CASE_RESOLVED = 23 means you have multiple match for your UNREADABLE_CARDS.ENGRAVEDID in CARD_ACCOUNT.TICKETID
    CASE_RESOLVED = 24 This does not make any sense. You need to drop this part.
    You can do this, You don't need all that PL/SQL. Just a simple SQL like this will do.
    merge into unreadable_cards x
    using (
            select a.engravedid
                 , max(b.serial_number) serial_number
                 , case when count(b.serial_number) = 1 then 2
                        when count(b.serial_number) = 0 then 22
                        when count(b.serial_number) > 1 then 23
                   end case_resolved
              from unreadable_cards a
              left
              join card_account b
                on a.engravedid = b.eticketid
             where a.case_resolved = 1
             group
                by a.engravedid
          ) y
       on (
            x.engravedid = y.engravedid
    when matched then
    update set x.serial_number = nvl(y.serial_number, x.serial_number)
              , x.case_resolved = y.case_resolved;
    Above is a untested code. But should work. If any minor error fix it and you should be good to go.

  • [Solved] Need help with DSDT - 15 errors

    I downloaded a tool designed for mac DSDT editing from the internet, for Windows (as Linux doesn't show battery properly yet).
    Here's my system:
    Toshiba Satellite L750D
    AMD A8 APU
    ATI 6620HD Discrete Graphics
    On Linux, the following doesn't seem to work correctly:
    - Fan spins very high and makes a lot of noise
    - The battery BAT1 isn't even detected as a device and the only device under /sys/class/power_supply/ is ACAD, which is something else.
    On Linux, I get the following errors which suggests a buggy DSDT table:
    kyle@kyle-laptop ~ dmesg | grep ACPI
    [ 0.000000] BIOS-e820: [mem 0x00000000cf486000-0x00000000cf88efff] ACPI NVS
    [ 0.000000] BIOS-e820: [mem 0x00000000cfbbf000-0x00000000cfebefff] ACPI NVS
    [ 0.000000] BIOS-e820: [mem 0x00000000cfebf000-0x00000000cfef5fff] ACPI data
    [ 0.000000] ACPI: RSDP 00000000000fe020 00024 (v02 TOSQCI)
    [ 0.000000] ACPI: XSDT 00000000cfef5120 0007C (v01 TOSQCI TOSQCI00 00000001 01000013)
    [ 0.000000] ACPI: FACP 00000000cfef4000 000F4 (v04 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: DSDT 00000000cfede000 112E5 (v01 TOSQCI TOSQCI00 F0000000 ACPI 00040000)
    [ 0.000000] ACPI: FACS 00000000cfc97000 00040
    [ 0.000000] ACPI: HPET 00000000cfef3000 00038 (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: APIC 00000000cfef2000 00084 (v02 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: MCFG 00000000cfef1000 0003C (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: ASF! 00000000cfef0000 000A5 (v32 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: BOOT 00000000cfedd000 00028 (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: SLIC 00000000cfedc000 00176 (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: WDRT 00000000cfedb000 00047 (v01 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: MSDM 00000000cfeda000 00055 (v03 TOSQCI TOSQCI00 00000001 ACPI 00040000)
    [ 0.000000] ACPI: SSDT 00000000cfed9000 00E28 (v01 AMD POWERNOW 00000001 AMD 00000001)
    [ 0.000000] ACPI: SSDT 00000000cfed7000 0193D (v02 AMD ALIB 00000001 MSFT 04000000)
    [ 0.000000] ACPI: Local APIC address 0xfee00000
    [ 0.000000] ACPI: PM-Timer IO Port: 0x408
    [ 0.000000] ACPI: Local APIC address 0xfee00000
    [ 0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
    [ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
    [ 0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
    [ 0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x03] enabled)
    [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
    [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
    [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
    [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
    [ 0.000000] ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0])
    [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
    [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
    [ 0.000000] ACPI: IRQ0 used by override.
    [ 0.000000] ACPI: IRQ2 used by override.
    [ 0.000000] ACPI: IRQ9 used by override.
    [ 0.000000] Using ACPI (MADT) for SMP configuration information
    [ 0.000000] ACPI: HPET id: 0x10228210 base: 0xfed00000
    [ 0.005191] ACPI: Core revision 20120320
    [ 0.005342] ACPI: Forced DSDT copy: length 0x112E5 copied locally, original unmapped
    [ 0.275625] PM: Registering ACPI NVS region [mem 0xcf486000-0xcf88efff] (4231168 bytes)
    [ 0.275717] PM: Registering ACPI NVS region [mem 0xcfbbf000-0xcfebefff] (3145728 bytes)
    [ 0.277613] ACPI: bus type pci registered
    [ 0.285292] ACPI: Added _OSI(Module Device)
    [ 0.285296] ACPI: Added _OSI(Processor Device)
    [ 0.285297] ACPI: Added _OSI(3.0 _SCP Extensions)
    [ 0.285299] ACPI: Added _OSI(Processor Aggregator Device)
    [ 0.285300] ACPI: Added _OSI(Linux)
    [ 0.287480] ACPI: EC: Look up EC in DSDT
    [ 0.328586] ACPI: Executed 1 blocks of module-level executable AML code
    [ 0.333711] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query honored via cmdline
    [ 0.334386] ACPI: Interpreter enabled
    [ 0.334389] ACPI: (supports S0 S3 S4 S5)
    [ 0.334404] ACPI: Using IOAPIC for interrupt routing
    [ 0.340413] ACPI: EC: GPE = 0x3, I/O: command/status = 0x66, data = 0x62
    [ 0.340624] ACPI: No dock devices found.
    [ 0.340630] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
    [ 0.340779] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
    [ 0.367355] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
    [ 0.367488] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB2_._PRT]
    [ 0.367521] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB4_._PRT]
    [ 0.367545] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB5_._PRT]
    [ 0.367613] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P2P_._PRT]
    [ 0.367677] pci0000:00: >Requesting ACPI _OSC control (0x1d)
    [ 0.367680] pci0000:00: >ACPI _OSC request failed (AE_NOT_FOUND), returned control mask: 0x1d
    [ 0.367681] ACPI _OSC control for PCIe not granted, disabling ASPM
    [ 0.375952] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376034] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376110] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376163] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376204] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376235] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376268] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376300] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 7 10 11 12 14 15) *0
    [ 0.376629] PCI: Using ACPI for IRQ routing
    [ 0.388090] pnp: PnP ACPI init
    [ 0.388113] ACPI: bus type pnp registered
    [ 0.388383] pnp 00:00: >Plug and Play ACPI device, IDs PNP0a08 PNP0a03 (active)
    [ 0.388482] system 00:01: >Plug and Play ACPI device, IDs PNP0c02 (active)
    [ 0.388640] pnp 00:02: >Plug and Play ACPI device, IDs PNP0103 (active)
    [ 0.388760] pnp 00:03: >Plug and Play ACPI device, IDs PNP0200 (active)
    [ 0.388819] pnp 00:04: >Plug and Play ACPI device, IDs PNP0c04 (active)
    [ 0.388910] pnp 00:05: >Plug and Play ACPI device, IDs PNP0b00 (active)
    [ 0.388963] pnp 00:06: >Plug and Play ACPI device, IDs PNP0800 (active)
    [ 0.389048] pnp 00:07: >Plug and Play ACPI device, IDs PNP0303 (active)
    [ 0.389133] pnp 00:08: >Plug and Play ACPI device, IDs TOS0200 SYN1000 SYN0002 PNP0f13 (active)
    [ 0.389261] system 00:09: >Plug and Play ACPI device, IDs PNP0c02 (active)
    [ 0.389348] system 00:0a: >Plug and Play ACPI device, IDs PNP0c01 (active)
    [ 0.389762] pnp: PnP ACPI: found 11 devices
    [ 0.389764] ACPI: ACPI bus type pnp unregistered
    [ 1.799341] ACPI: bus type usb registered
    [ 6.119883] toshiba_bluetooth: Detected Toshiba ACPI Bluetooth device - installing RFKill handler
    [ 6.162801] ACPI: acpi_idle registered with cpuidle
    [ 6.189958] ACPI: Power Button [PWRB]
    [ 6.190091] ACPI: Lid Switch [LID]
    [ 6.190142] ACPI: Power Button [PWRF]
    [ 6.550426] ACPI Exception: AE_AML_PACKAGE_LIMIT, Index (0x0000000000000011) is beyond end of object (20120320/exoparg2-418)
    [ 6.550437] ACPI Error: Method parse/execution failed [\_SB_.BAT1.UBIX] (Node ffff880203e8a168), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
    [ 6.550443] ACPI Error: Method parse/execution failed [\_SB_.BAT1._BIX] (Node ffff880203e8a0f0), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
    [ 6.550449] ACPI Exception: AE_AML_PACKAGE_LIMIT, Evaluating _BIX (20120320/battery-419)
    [ 6.595368] ACPI: AC Adapter [ACAD] (on-line)
    [ 6.747736] ACPI: Video Device [VGA] (multi-head: yes rom: no post: no)
    [ 6.758044] ACPI: Thermal Zone [THRM] (55 C)
    [ 6.758620] ACPI: Video Device [VGA1] (multi-head: yes rom: no post: no)
    [ 7.772864] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.19
    [ 7.876001] ACPI Warning: 0x0000000000000b00-0x0000000000000b07 SystemIO conflicts with Region \_SB_.PCI0.SMBS.SMB0 1 (20120320/utaddress-251)
    [ 7.876019] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
    [ 19.440618] ACPI: Power Button [PWRB]
    [ 19.441155] ACPI: Lid Switch [LID]
    [ 19.441886] ACPI: Power Button [PWRF]
    kyle@kyle-laptop ~
    Of interest;
    [ 6.550426] ACPI Exception: AE_AML_PACKAGE_LIMIT, Index (0x0000000000000011) is beyond end of object (20120320/exoparg2-418)
    [ 6.550437] ACPI Error: Method parse/execution failed [\_SB_.BAT1.UBIX] (Node ffff880203e8a168), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
    [ 6.550443] ACPI Error: Method parse/execution failed [\_SB_.BAT1._BIX] (Node ffff880203e8a0f0), AE_AML_PACKAGE_LIMIT (20120320/psparse-536)
    [ 6.550449] ACPI Exception: AE_AML_PACKAGE_LIMIT, Evaluating _BIX (20120320/battery-419)
    I have no idea how to fix this. So, I'm outsourcing help
    Here's the original DSDT which I extract:
    DefinitionBlock ("DSDT.aml", "DSDT", 1, "TOSQCI", "TOSQCI00", 0xF0000000)
    External (ALIB, MethodObj) // 2 Arguments
    External (\_SB_.ALIB, MethodObj) // 5 Arguments
    External (\_PR_.C003._PPC)
    External (\_PR_.C002._PPC)
    External (\_PR_.C001._PPC)
    External (\_PR_.C000._PPC, IntObj)
    OperationRegion (DBG0, SystemIO, 0x80, One)
    Field (DBG0, ByteAcc, NoLock, Preserve)
    IO80, 8
    OperationRegion (DBG1, SystemIO, 0x80, 0x02)
    Field (DBG1, WordAcc, NoLock, Preserve)
    P80H, 16
    OperationRegion (ACMS, SystemIO, 0x72, 0x02)
    Field (ACMS, ByteAcc, NoLock, Preserve)
    INDX, 8,
    DATA, 8
    OperationRegion (PSMI, SystemIO, 0xB0, 0x02)
    Field (PSMI, ByteAcc, NoLock, Preserve)
    APMC, 8,
    APMD, 8
    OperationRegion (PMRG, SystemIO, 0x0CD6, 0x02)
    Field (PMRG, ByteAcc, NoLock, Preserve)
    PMRI, 8,
    PMRD, 8
    IndexField (PMRI, PMRD, ByteAcc, NoLock, Preserve)
    Offset (0x24),
    MMSO, 32,
    Offset (0x50),
    HPAD, 32,
    Offset (0x60),
    P1EB, 16,
    Offset (0xC8),
    , 2,
    SPRE, 1,
    TPDE, 1,
    Offset (0xF0),
    , 3,
    RSTU, 1
    OperationRegion (P1E0, SystemIO, P1EB, 0x04)
    Field (P1E0, ByteAcc, NoLock, Preserve)
    , 14,
    PEWS, 1,
    WSTA, 1,
    , 14,
    PEWD, 1
    OperationRegion (IOCC, SystemIO, 0x0400, 0x80)
    Field (IOCC, ByteAcc, NoLock, Preserve)
    Offset (0x01),
    , 2,
    RTCS, 1
    Name (PRWP, Package (0x02)
    Zero,
    Zero
    Method (GPRW, 2, NotSerialized)
    Store (Arg0, Index (PRWP, Zero))
    Store (Arg1, Index (PRWP, One))
    If (LAnd (LEqual (DAS3, Zero), LEqual (DAS1, Zero)))
    If (LLessEqual (Arg1, 0x03))
    Store (Zero, Index (PRWP, One))
    Else
    If (LAnd (LEqual (DAS3, Zero), LEqual (Arg1, 0x03)))
    Store (Zero, Index (PRWP, One))
    If (LAnd (LEqual (DAS1, Zero), LEqual (Arg1, One)))
    Store (Zero, Index (PRWP, One))
    Return (PRWP)
    Method (SPTS, 1, NotSerialized)
    If (LEqual (Arg0, 0x03))
    Store (Zero, RSTU)
    Store (One, \_SB.PCI0.SMBS.CLPS)
    Store (One, \_SB.PCI0.SMBS.SLPS)
    Store (PEWS, PEWS)
    Method (SWAK, 1, NotSerialized)
    If (LEqual (Arg0, 0x03))
    Store (One, RSTU)
    Store (PEWS, PEWS)
    Store (One, \_SB.PCI0.SMBS.PWDE)
    Store (Zero, PEWD)
    Method (CHKH, 0, NotSerialized)
    If (\_SB.PCI0.SMBS.G05S)
    Store (One, \_SB.PCI0.SMBS.G05T)
    Else
    Store (Zero, \_SB.PCI0.SMBS.G05T)
    Store (Not (\_SB.PCI0.SMBS.GE16), \_SB.PCI0.SMBS.G16T)
    OperationRegion (GNVS, SystemMemory, 0xCFEBCE18, 0x00000013)
    Field (GNVS, AnyAcc, NoLock, Preserve)
    DAS1, 8,
    DAS3, 8,
    TNBH, 8,
    TCP0, 8,
    TCP1, 8,
    ATNB, 8,
    PCP0, 8,
    PCP1, 8,
    PWMN, 8,
    LPTY, 8,
    M92D, 8,
    WKPM, 8,
    ALST, 8,
    AFUC, 8,
    EXUS, 8,
    AIRC, 8,
    WLSH, 8,
    TSSS, 8,
    ODZC, 8
    OperationRegion (OGNS, SystemMemory, 0xCFEBDD98, 0x00000255)
    Field (OGNS, AnyAcc, Lock, Preserve)
    OG00, 8,
    OG01, 8,
    OG02, 8,
    OG03, 8,
    OG04, 8,
    OG05, 8,
    OG06, 8,
    OG07, 8,
    OG08, 8,
    OG09, 8,
    OG10, 8,
    OG11, 8,
    OG12, 8,
    OG13, 8,
    OG14, 8,
    OG15, 8,
    OG16, 8,
    OG17, 8,
    OG18, 8,
    OG19, 8,
    OG20, 8,
    BLK0, 32,
    BLK1, 32,
    BLK2, 32,
    BLK3, 32,
    BLK4, 32,
    BLK5, 32,
    BTEN, 1,
    WLAN, 1,
    WN3G, 1,
    ENSR, 2,
    CCDE, 1,
    DACB, 1,
    TPDV, 1,
    WOLI, 1,
    CIRE, 1,
    FGPE, 1,
    HDME, 1,
    CPUD, 1,
    PCIL, 1,
    FBBS, 1,
    SWKS, 1,
    OWNS, 4096,
    DVDI, 160,
    OWN0, 8,
    OWN1, 8,
    HEUE, 8,
    BEUE, 8,
    VEVT, 16,
    FEVT, 16,
    NEVT, 16,
    OPR0, 8,
    OPR1, 8,
    OPR2, 8,
    KBIN, 8,
    SLPB, 32
    OperationRegion (NVST, SystemMemory, 0xCFEBED61, 0x0000012A)
    Field (NVST, AnyAcc, Lock, Preserve)
    SMIF, 8,
    PRM0, 8,
    PRM1, 8,
    BRTL, 8,
    TLST, 8,
    IGDS, 8,
    LCDA, 16,
    CSTE, 16,
    NSTE, 16,
    CADL, 16,
    PADL, 16,
    LIDS, 8,
    PWRS, 8,
    BVAL, 32,
    ADDL, 16,
    BCMD, 8,
    DID, 32,
    INFO, 2048,
    TOML, 8,
    TOMH, 8,
    CEBP, 8,
    C0LS, 8,
    C1LS, 8,
    C0HS, 8,
    C1HS, 8,
    ROMS, 32,
    MUXF, 8,
    PDDN, 8
    Method (SCMP, 2, NotSerialized)
    Name (STG1, Buffer (0x50) {})
    Name (STG2, Buffer (0x50) {})
    Store (Arg0, STG1)
    Store (Arg1, STG2)
    If (LNotEqual (SizeOf (Arg0), SizeOf (Arg1)))
    Return (Zero)
    Store (Zero, Local0)
    While (LLess (Local0, SizeOf (Arg0)))
    If (LNotEqual (DerefOf (Index (STG1, Local0)), DerefOf (Index (
    STG2, Local0))))
    Return (Zero)
    Increment (Local0)
    Return (One)
    Name (WNOS, Zero)
    Name (MYOS, Zero)
    Name (HTTS, Zero)
    Name (OSTB, Ones)
    Name (TPOS, Zero)
    Name (LINX, Zero)
    Name (OSSP, Zero)
    Method (CKOS, 0, NotSerialized)
    If (LEqual (WNOS, Zero))
    If (SCMP (_OS, "Microsoft Windows"))
    Store (One, WNOS)
    If (SCMP (_OS, "Microsoft Windows NT"))
    Store (0x02, WNOS)
    If (SCMP (_OS, "Microsoft WindowsME: Millennium Edition"))
    Store (0x03, WNOS)
    If (SCMP (_OS, "Windows 2012"))
    Store (0x07, WNOS)
    If (CondRefOf (\_OSI, Local0))
    If (SCMP (_OS, "Windows 2006"))
    Store (0x05, WNOS)
    Else
    If (SCMP (_OS, "Windows 2009"))
    Store (0x06, WNOS)
    Else
    Store (0x04, WNOS)
    Return (WNOS)
    Method (SEQL, 2, Serialized)
    Store (SizeOf (Arg0), Local0)
    Store (SizeOf (Arg1), Local1)
    If (LNotEqual (Local0, Local1))
    Return (Zero)
    Name (BUF0, Buffer (Local0) {})
    Store (Arg0, BUF0)
    Name (BUF1, Buffer (Local0) {})
    Store (Arg1, BUF1)
    Store (Zero, Local2)
    While (LLess (Local2, Local0))
    Store (DerefOf (Index (BUF0, Local2)), Local3)
    Store (DerefOf (Index (BUF1, Local2)), Local4)
    If (LNotEqual (Local3, Local4))
    Return (Zero)
    Increment (Local2)
    Return (One)
    Method (OSTP, 0, NotSerialized)
    If (LEqual (OSTB, Ones))
    If (CondRefOf (\_OSI, Local0))
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    If (_OSI ("Windows 2001"))
    Store (0x08, OSTB)
    Store (0x08, TPOS)
    If (_OSI ("Windows 2001.1"))
    Store (0x20, OSTB)
    Store (0x20, TPOS)
    If (_OSI ("Windows 2001 SP1"))
    Store (0x10, OSTB)
    Store (0x10, TPOS)
    If (_OSI ("Windows 2001 SP2"))
    Store (0x11, OSTB)
    Store (0x11, TPOS)
    If (_OSI ("Windows 2001 SP3"))
    Store (0x12, OSTB)
    Store (0x12, TPOS)
    If (_OSI ("Windows 2006"))
    Store (0x40, OSTB)
    Store (0x40, TPOS)
    If (_OSI ("Windows 2006 SP1"))
    Store (0x41, OSTB)
    Store (0x41, TPOS)
    Store (One, OSSP)
    If (_OSI ("Windows 2009"))
    Store (One, OSSP)
    Store (0x50, OSTB)
    Store (0x50, TPOS)
    If (_OSI ("Linux"))
    Store (One, LINX)
    Store (0x80, OSTB)
    Store (0x80, TPOS)
    Else
    If (CondRefOf (\_OS, Local0))
    If (SEQL (_OS, "Microsoft Windows"))
    Store (One, OSTB)
    Store (One, TPOS)
    Else
    If (SEQL (_OS, "Microsoft WindowsME: Millennium Edition"))
    Store (0x02, OSTB)
    Store (0x02, TPOS)
    Else
    If (SEQL (_OS, "Microsoft Windows NT"))
    Store (0x04, OSTB)
    Store (0x04, TPOS)
    Else
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    Else
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    Return (OSTB)
    Method (VTOB, 1, NotSerialized)
    Store (One, Local0)
    ShiftLeft (Local0, Arg0, Local0)
    Return (Local0)
    Method (BTOV, 1, NotSerialized)
    ShiftRight (Arg0, One, Local0)
    Store (Zero, Local1)
    While (Local0)
    Increment (Local1)
    ShiftRight (Local0, One, Local0)
    Return (Local1)
    Method (MKWD, 2, NotSerialized)
    If (And (Arg1, 0x80))
    Store (0xFFFF0000, Local0)
    Else
    Store (Zero, Local0)
    Or (Local0, Arg0, Local0)
    Or (Local0, ShiftLeft (Arg1, 0x08), Local0)
    Return (Local0)
    Method (POSW, 1, NotSerialized)
    If (And (Arg0, 0x8000))
    If (LEqual (Arg0, 0xFFFF))
    Return (Ones)
    Else
    Not (Arg0, Local0)
    Increment (Local0)
    And (Local0, 0xFFFF, Local0)
    Return (Local0)
    Else
    Return (Arg0)
    Method (GBFE, 3, NotSerialized)
    CreateByteField (Arg0, Arg1, TIDX)
    Store (TIDX, Arg2)
    Method (PBFE, 3, NotSerialized)
    CreateByteField (Arg0, Arg1, TIDX)
    Store (Arg2, TIDX)
    Method (ITOS, 1, NotSerialized)
    Store (Buffer (0x09)
    /* 0000 */ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    /* 0008 */ 0x00
    }, Local0)
    Store (Buffer (0x11)
    "0123456789ABCDEF"
    }, Local7)
    Store (0x08, Local1)
    Store (Zero, Local2)
    Store (Zero, Local3)
    While (Local1)
    Decrement (Local1)
    And (ShiftRight (Arg0, ShiftLeft (Local1, 0x02)), 0x0F, Local4)
    If (Local4)
    Store (Ones, Local3)
    If (Local3)
    GBFE (Local7, Local4, RefOf (Local5))
    PBFE (Local0, Local2, Local5)
    Increment (Local2)
    Return (Local0)
    Scope (_PR)
    Processor (C000, 0x00, 0x00000410, 0x06)
    Processor (C001, 0x01, 0x00000000, 0x00)
    Processor (C002, 0x02, 0x00000000, 0x00)
    Processor (C003, 0x03, 0x00000000, 0x00)
    Name (_S0, Package (0x04)
    Zero,
    Zero,
    Zero,
    Zero
    If (LEqual (DAS1, One)) {}
    If (LEqual (DAS3, One))
    Name (_S3, Package (0x04)
    0x03,
    0x03,
    Zero,
    Zero
    Name (_S4, Package (0x04)
    0x04,
    0x04,
    Zero,
    Zero
    Name (_S5, Package (0x04)
    0x05,
    0x05,
    Zero,
    Zero
    Scope (_GPE)
    Method (_L1C, 0, NotSerialized)
    Store (0xFFFF, Local1)
    Store (\_SB.PCI0.SMBS.MIN, Local2)
    ShiftLeft (Local2, 0x08, Local1)
    Store (\_SB.PCI0.SMBS.SEC, Local2)
    Or (Local1, Local2, Local1)
    Store (Local1, P80H)
    Method (_L08, 0, NotSerialized)
    Notify (\_SB.PCI0.PB2, 0x02)
    Notify (\_SB.PCI0.PB3, 0x02)
    Notify (\_SB.PCI0.PB4, 0x02)
    Notify (\_SB.PCI0.PB5, 0x02)
    Notify (\_SB.PCI0.PB6, 0x02)
    Notify (\_SB.PCI0.PB7, 0x02)
    Notify (\_SB.PCI0.SPB0, 0x02)
    Notify (\_SB.PCI0.SPB1, 0x02)
    Notify (\_SB.PCI0.SPB2, 0x02)
    Notify (\_SB.PCI0.SPB3, 0x02)
    Name (XX05, Buffer (One)
    0x05
    Name (XX06, Buffer (One)
    0x05
    Method (_L05, 0, NotSerialized)
    Name (HPOK, Zero)
    Sleep (0xC8)
    If (\_SB.PCI0.SMBS.GE05)
    Store (Zero, \_SB.PCI0.SMBS.G05T)
    Else
    Store (One, \_SB.PCI0.SMBS.G05T)
    Notify (\_SB.PCI0.SPB2, Zero)
    Method (_L18, 0, NotSerialized)
    Notify (\_SB.PCI0.OHC1, 0x02)
    Notify (\_SB.PCI0.OHC2, 0x02)
    Notify (\_SB.PCI0.OHC3, 0x02)
    Notify (\_SB.PCI0.OHC4, 0x02)
    Notify (\_SB.PCI0.EHC1, 0x02)
    Notify (\_SB.PCI0.EHC2, 0x02)
    Notify (\_SB.PCI0.EHC3, 0x02)
    Notify (\_SB.PCI0.XHC0, 0x02)
    Notify (\_SB.PCI0.XHC1, 0x02)
    Notify (\_SB.PWRB, 0x02)
    Method (_L09, 0, NotSerialized)
    Store (0x4400, P80H)
    Store (\_SB.PCI0.SMBS.O012, Local0)
    Or (Local0, \_SB.PCI0.SMBS.O013, Local0)
    Or (Local0, \_SB.PCI0.SMBS.O014, Local0)
    CreateWordField (XX05, Zero, SZZE)
    CreateField (XX05, 0x10, 0x03, FUCC)
    CreateField (XX05, 0x13, 0x05, DEVV)
    CreateByteField (XX05, 0x03, BUSS)
    CreateByteField (XX05, 0x04, HPST)
    Store (0x05, SZZE)
    Store (Zero, BUSS)
    Store (0x05, DEVV)
    Store (Zero, FUCC)
    CreateWordField (XX06, Zero, SZZ6)
    CreateField (XX06, 0x10, 0x03, FUC6)
    CreateField (XX06, 0x13, 0x05, DEV6)
    CreateByteField (XX06, 0x03, BUS6)
    CreateByteField (XX06, 0x04, HPS6)
    Store (0x05, SZZ6)
    Store (Zero, BUS6)
    Store (0x06, DEV6)
    Store (Zero, FUC6)
    If (LEqual (Local0, One))
    If (LEqual (WLSH, Zero))
    Store (One, \_SB.PCI0.SMBS.O012)
    Store (One, \_SB.PCI0.SMBS.O013)
    Store (One, \_SB.PCI0.SMBS.O014)
    Store (Zero, \_SB.PCI0.SMBS.E012)
    Store (Zero, \_SB.PCI0.SMBS.E013)
    Store (Zero, \_SB.PCI0.SMBS.E014)
    Else
    Store (Zero, HPST)
    \_SB.ALIB (0x06, XX05, \_SB.ALIB (0x06, XX06, Store (One, \_SB.PCI0.SMBS.O012), Store (
    One, \_SB.PCI0.SMBS.O013), Store (One, \_SB.PCI0.SMBS.O014)), Store (Zero, \_SB.PCI0.SMBS.E012), Store (Zero, \_SB.PCI0.SMBS.E013))
    Store (Zero, \_SB.PCI0.SMBS.E014)
    If (LEqual (Local0, Zero))
    If (LEqual (WLSH, Zero))
    Store (One, \_SB.PCI0.SMBS.E012)
    Store (One, \_SB.PCI0.SMBS.E013)
    Store (One, \_SB.PCI0.SMBS.E014)
    Store (Zero, \_SB.PCI0.SMBS.O012)
    Store (Zero, \_SB.PCI0.SMBS.O013)
    Store (Zero, \_SB.PCI0.SMBS.O014)
    Else
    Store (One, \_SB.PCI0.SMBS.E012)
    Store (One, \_SB.PCI0.SMBS.E013)
    Store (One, \_SB.PCI0.SMBS.E014)
    Store (Zero, \_SB.PCI0.SMBS.O012)
    Store (Zero, \_SB.PCI0.SMBS.O013)
    Store (Zero, \_SB.PCI0.SMBS.O014)
    Store (One, HPST)
    \_SB.ALIB (0x06, XX05, \_SB.ALIB (0x06, XX06, \_SB.PCI0.PB5.XPPR (Zero), Sleep (0x14),
    Notify (\_SB.PCI0.PB5, Zero)), Notify (\_SB.PCI0.PB6, Zero), Notify (\_SB.PCI0.SPB0, Zero))
    Method (_L0E, 0, NotSerialized)
    CreateWordField (XX05, Zero, SZZE)
    CreateField (XX05, 0x10, 0x03, FUCC)
    CreateField (XX05, 0x13, 0x05, DEVV)
    CreateByteField (XX05, 0x03, BUSS)
    CreateByteField (XX05, 0x04, HPST)
    Store (0x05, SZZE)
    Store (Zero, BUSS)
    Store (0x03, DEVV)
    Store (Zero, FUCC)
    Name (HPOK, Zero)
    If (LGreaterEqual (OSTB, 0x40))
    Sleep (0x14)
    If (\_SB.PCI0.SMBS.GE14)
    Store (Zero, \_SB.PCI0.SMBS.G14T)
    Store (0x18, INFO)
    Store (0x86, BCMD)
    Sleep (0x64)
    Sleep (0x64)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (Zero, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (Zero)
    }, Store (0x0F1A, P80H), Else
    Store (One, \_SB.PCI0.SMBS.G14T)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (One, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (One)
    }, Store (0x021A, P80H), Else
    Sleep (0x14)
    If (\_SB.PCI0.SMBS.GE14)
    Store (Zero, \_SB.PCI0.SMBS.G14T)
    Store (One, \_SB.PCI0.PB3.PDC2)
    Store (\_SB.PCI0.PB3.VGA.DVID, Local7)
    Sleep (0x0A)
    Store (One, Local4)
    Store (0x05, Local5)
    While (LAnd (Local4, Local5))
    Store (\_SB.PCI0.PB3.XPRD (0xA5), Local6)
    And (Local6, 0x7F, Local6)
    If (LLessEqual (Local6, 0x04))
    Store (Zero, Local4)
    Else
    Store (\_SB.PCI0.PB3.VGA.DVID, Local7)
    Sleep (0x05)
    Decrement (Local5)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (Zero, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (Zero)
    }, Store (One, HPOK), Store (0x1F1A, P80H))
    Else
    Store (One, \_SB.PCI0.SMBS.G14T)
    Store (Zero, HPOK)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (One, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (One)
    }, Store (Zero, Local2), While (LLess (Local2, 0x0F))
    Store (One, \_SB.PCI0.PB3.PDC2)
    Store (One, Local4)
    Store (0xC8, Local5)
    While (LAnd (Local4, Local5))
    Store (\_SB.PCI0.PB3.XPRD (0xA5), Local6)
    And (Local6, 0x7F, Local6)
    If (LAnd (LGreaterEqual (Local6, 0x10), LNotEqual (Local6, 0x7F)))
    Store (Zero, Local4)
    Else
    Sleep (0x05)
    Decrement (Local5)
    If (LNot (Local4))
    Store (\_SB.PCI0.PB3.XPDL (), Local5)
    If (Local5)
    \_SB.PCI0.PB3.XPRT ()
    Sleep (0x05)
    Increment (Local2)
    Else
    Store (0x18, INFO)
    Store (0x87, BCMD)
    If (LEqual (\_SB.PCI0.PB3.XPR2 (), Ones))
    Store (One, HPOK)
    Store (0x10, Local2)
    Else
    Store (Zero, HPOK)
    Store (0x10, Local2)
    Else
    Store (0x10, Local2)
    Store (0x121A, P80H)
    If (LNot (HPOK))
    Store (\_SB.PCI0.PB3.VGA.DVID, Local7)
    Sleep (0x0A)
    Store (One, Local4)
    Store (0x05, Local5)
    While (LAnd (Local4, Local5))
    Store (\_SB.PCI0.PB3.XPRD (0xA5), Local6)
    And (Local6, 0x7F, Local6)
    If (LLessEqual (Local6, 0x04))
    Store (Zero, Local4)
    Else
    Store (\_SB.PCI0.PB3.VGA.DVID, Local7)
    Sleep (0x05)
    Decrement (Local5)
    If (CondRefOf (\_SB.ALIB, Local0))
    Store (Zero, HPST)
    \_SB.ALIB (0x06, XX05, Else
    \_SB.PCI0.PB3.XPPR (Zero)
    }, If (HPOK)
    Notify (\_SB.PCI0.PB3, Zero)
    Method (_L10, 0, NotSerialized)
    If (LEqual (ODZC, One))
    If (\_SB.PCI0.SMBS.G16T)
    Sleep (0x14)
    If (\_SB.PCI0.SMBS.GE16)
    Store (Zero, \_SB.PCI0.SMBS.G16T)
    If (LOr (LEqual (\_SB.PCI0.SATA.VIDI, 0x78001022), LEqual (\_SB.PCI0.SATA.VIDI, 0x78011022)))
    Notify (\_SB.PCI0.AFD, 0x80)
    If (LEqual (\_SB.PCI0.SATA.VIDI, 0x78041022))
    If (LEqual (\_SB.PCI0.AFD.HDD0, One))
    Notify (\_SB.PCI0.SATA.ODDZ, 0x80)
    Else
    Notify (\_SB.PCI0.SATA.ODDZ, 0x80)
    Store (0xDF15, P80H)
    Else
    Sleep (0x14)
    If (LNot (\_SB.PCI0.SMBS.GE16))
    Store (One, \_SB.PCI0.SMBS.G16T)
    If (LOr (LEqual (\_SB.PCI0.SATA.VIDI, 0x78001022), LEqual (\_SB.PCI0.SATA.VIDI, 0x78011022)))
    Notify (\_SB.PCI0.AFD, 0x80)
    If (LEqual (\_SB.PCI0.SATA.VIDI, 0x78041022))
    If (LEqual (\_SB.PCI0.AFD.HDD0, One))
    Notify (\_SB.PCI0.SATA.ODDZ, 0x80)
    Else
    Notify (\_SB.PCI0.SATA.ODDZ, 0x80)
    Store (0xDF14, P80H)
    Name (PICM, Zero)
    Name (GPIC, Zero)
    Method (_PIC, 1, NotSerialized)
    Store (Arg0, PICM)
    Store (Arg0, GPIC)
    If (GPIC)
    \_SB.DSPI ()
    Name (PTSF, Zero)
    Method (_PTS, 1, NotSerialized)
    Store (One, PTSF)
    Store (One, \_SB.PCI0.LPC0.EC0.IESQ)
    SPTS (Arg0)
    If (LEqual (Arg0, One))
    Store (0x51, IO80)
    \_SB.S80H (0x51)
    If (LEqual (Arg0, 0x03))
    If (\_SB.SSTS)
    Store (Zero, \_SB.PCI0.LPC0.EC0.WLID)
    Else
    Store (One, \_SB.PCI0.LPC0.EC0.WLID)
    Store (0x53, IO80)
    \_SB.S80H (0x53)
    Store (One, \_SB.PCI0.SMBS.SLPS)
    If (LEqual (Arg0, 0x04))
    Store (0x54, IO80)
    \_SB.S80H (0x54)
    Store (One, \_SB.PCI0.SMBS.SLPS)
    Store (One, RSTU)
    Store (One, \_SB.INS4)
    Store (One, \_SB.PCI0.LPC0.EC0.FLS4)
    If (\_SB.SSTS)
    Store (Zero, \_SB.PCI0.LPC0.EC0.WLID)
    Else
    Store (One, \_SB.PCI0.LPC0.EC0.WLID)
    If (LEqual (Arg0, 0x05))
    Store (0x55, IO80)
    \_SB.S80H (0x55)
    \_SB.GSMI (0x03)
    Method (_WAK, 1, NotSerialized)
    Store (Zero, PTSF)
    SWAK (Arg0)
    If (LEqual (Arg0, One))
    Store (0xE1, IO80)
    \_SB.S80H (0xE1)
    Store (0xF1, \_SB.PCI0.P2P.PR4B)
    If (LEqual (Arg0, 0x03))
    Store (0x55, \_SB.INS3)
    Store (One, \_SB.PCI0.LPC0.EC0.CPLE)
    Store (0xE3, IO80)
    \_SB.S80H (0xE3)
    CHKH ()
    If (\_SB.ECOK)
    If (LGreaterEqual (TPOS, 0x40))
    If (LEqual (TPOS, 0x80))
    Store (Zero, \_SB.PCI0.LPC0.EC0.OSTP)
    Else
    Store (One, \_SB.PCI0.LPC0.EC0.OSTP)
    Else
    Store (Zero, \_SB.PCI0.LPC0.EC0.OSTP)
    Notify (\_SB.BAT1, 0x81)
    Notify (\_SB.PWRB, 0x02)
    If (LEqual (Arg0, 0x04))
    Store (0x55, \_SB.INS3)
    Store (Zero, \_SB.INS4)
    Store (0xE4, IO80)
    \_SB.S80H (0xE4)
    \_SB.PCI0._INI ()
    \_SB.PCI0.EHC1.STOS ()
    If (\_SB.ECOK)
    If (LGreaterEqual (TPOS, 0x40))
    If (LEqual (TPOS, 0x80))
    Store (Zero, \_SB.PCI0.LPC0.EC0.OSTP)
    Else
    Store (One, \_SB.PCI0.LPC0.EC0.OSTP)
    Else
    Store (Zero, \_SB.PCI0.LPC0.EC0.OSTP)
    Notify (\_SB.BAT1, 0x81)
    Notify (\_SB.PWRB, 0x02)
    Return (Zero)
    Scope (_SI)
    Method (_SST, 1, NotSerialized)
    If (LEqual (Arg0, One))
    Store ("===== SST Working =====", Debug)
    If (LEqual (Arg0, 0x02))
    Store ("===== SST Waking =====", Debug)
    If (LEqual (Arg0, 0x03))
    Store ("===== SST Sleeping =====", Debug)
    If (LEqual (Arg0, 0x04))
    Store ("===== SST Sleeping S4 =====", Debug)
    Scope (_SB)
    Name (ECOK, One)
    Name (INS3, Zero)
    Name (INS4, One)
    Name (WLWF, Zero)
    Name (L3WF, Zero)
    Name (DCNT, Zero)
    Name (SSTS, Zero)
    Name (LDSS, Zero)
    Method (GBFE, 3, NotSerialized)
    CreateByteField (Arg0, Arg1, TIDX)
    Store (TIDX, Arg2)
    Method (PBFE, 3, NotSerialized)
    CreateByteField (Arg0, Arg1, TIDX)
    Store (Arg2, TIDX)
    Method (ITOS, 1, NotSerialized)
    Store (Buffer (0x09)
    /* 0000 */ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    /* 0008 */ 0x00
    }, Local0)
    Store (Buffer (0x11)
    "0123456789ABCDEF"
    }, Local7)
    Store (0x08, Local1)
    Store (Zero, Local2)
    Store (Zero, Local3)
    While (Local1)
    Decrement (Local1)
    And (ShiftRight (Arg0, ShiftLeft (Local1, 0x02)), 0x0F, Local4)
    If (Local4)
    Store (Ones, Local3)
    If (Local3)
    GBFE (Local7, Local4, RefOf (Local5))
    PBFE (Local0, Local2, Local5)
    Increment (Local2)
    Return (Local0)
    Device (PWRB)
    Name (_HID, EisaId ("PNP0C0C"))
    Method (_STA, 0, NotSerialized)
    Return (0x0B)
    Device (PCI0)
    Name (_HID, EisaId ("PNP0A08"))
    Name (_CID, EisaId ("PNP0A03"))
    Name (_ADR, Zero)
    OperationRegion (SCTH, PCI_Config, 0x7A, One)
    Field (SCTH, ByteAcc, NoLock, Preserve)
    RSMF, 1
    Method (_INI, 0, NotSerialized)
    If (LEqual (GPIC, Zero)) {}
    Else
    DSPI ()
    OSTP ()
    Store (0x07D0, MYOS)
    If (CondRefOf (\_OSI, Local0))
    If (_OSI ("Linux"))
    Store (0x03E8, MYOS)
    If (_OSI ("Windows 2001"))
    Store (0x07D1, MYOS)
    If (_OSI ("Windows 2001 SP1"))
    Store (0x07D1, MYOS)
    If (_OSI ("Windows 2001 SP2"))
    Store (0x07D2, MYOS)
    If (_OSI ("Windows 2006"))
    Store (0x07D6, MYOS)
    If (_OSI ("Windows 2009"))
    Store (0x07D9, MYOS)
    If (_OSI ("Windows 2012"))
    Store (0x07DC, MYOS)
    OperationRegion (NBMS, PCI_Config, 0x60, 0x08)
    Field (NBMS, DWordAcc, NoLock, Preserve)
    MIDX, 32,
    MIDR, 32
    Mutex (NBMM, 0x00)
    Method (NBMR, 1, NotSerialized)
    Acquire (NBMM, 0xFFFF)
    And (Arg0, 0x7F, Local0)
    Store (Local0, MIDX)
    Store (MIDR, Local0)
    Store (0x7F, MIDX)
    Release (NBMM)
    Return (Local0)
    Method (NBMW, 2, NotSerialized)
    Acquire (NBMM, 0xFFFF)
    And (Arg0, 0x7F, Local0)
    Or (Local0, 0x80, Local0)
    Store (Local0, MIDX)
    Store (Arg1, MIDR)
    Store (And (Local0, 0x7F, Local0), MIDX)
    Release (NBMM)
    OperationRegion (NBXP, PCI_Config, 0xE0, 0x08)
    Field (NBXP, DWordAcc, NoLock, Preserve)
    NBXI, 32,
    NBXD, 32
    Mutex (NBXM, 0x00)
    Method (NBXR, 1, NotSerialized)
    Acquire (NBXM, 0xFFFF)
    Store (Arg0, NBXI)
    Store (NBXD, Local0)
    Store (Zero, NBXI)
    Release (NBXM)
    Return (Local0)
    Method (NBXW, 2, NotSerialized)
    Acquire (NBXM, 0xFFFF)
    Store (Arg0, NBXI)
    Store (Arg1, NBXD)
    Store (Zero, NBXI)
    Release (NBXM)
    Method (XPTR, 2, NotSerialized)
    If (LAnd (LLess (Arg0, 0x02), LGreater (Arg0, 0x07)))
    Return (Zero)
    Else
    If (LLess (Arg0, 0x04))
    Subtract (Arg0, 0x02, Local1)
    Store (0x01310800, Local0)
    Else
    Subtract (Arg0, 0x04, Local1)
    Store (0x01300900, Local0)
    Add (Local0, ShiftLeft (Local1, 0x08), Local0)
    ShiftLeft (Local0, Local1, Local0)
    NBXW (Local0, Arg1)
    Return (Ones)
    Method (XPLP, 2, NotSerialized)
    Method (XPLL, 2, NotSerialized)
    Name (_UID, One)
    Name (_BBN, Zero)
    Name (SUPP, Zero)
    Name (CTRL, Zero)
    Name (AMHP, Zero)
    Method (XOSC, 4, NotSerialized)
    CreateDWordField (Arg3, Zero, CDW1)
    CreateDWordField (Arg3, 0x04, CDW2)
    CreateDWordField (Arg3, 0x08, CDW3)
    If (LEqual (Arg0, Buffer (0x10)
    /* 0000 */ 0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40,
    /* 0008 */ 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66
    Store (CDW2, SUPP)
    Store (CDW3, CTRL)
    And (CTRL, 0x1D, CTRL)
    If (Not (And (CDW1, One)))
    If (And (CTRL, One)) {}
    If (And (CTRL, 0x10)) {}
    If (LNotEqual (Arg1, One))
    Or (CDW1, 0x08, CDW1)
    If (LNotEqual (CDW3, CTRL))
    Or (CDW1, 0x10, CDW1)
    Store (CTRL, CDW3)
    Return (Arg3)
    Else
    Or (CDW1, 0x04, CDW1)
    Return (Arg3)
    Method (TOM, 0, NotSerialized)
    Multiply (TOML, 0x00010000, Local0)
    Multiply (TOMH, 0x01000000, Local1)
    Add (Local0, Local1, Local0)
    Return (Local0)
    Name (CRES, ResourceTemplate ()
    WordBusNumber (ResourceProducer, MinFixed, MaxFixed, SubDecode,
    0x0000, // Granularity
    0x0000, // Range Minimum
    0x00FF, // Range Maximum
    0x0000, // Translation Offset
    0x0100, // Length
    0x00,, )
    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
    0x0000, // Granularity
    0x0000, // Range Minimum
    0x0CF7, // Range Maximum
    0x0000, // Translation Offset
    0x0CF8, // Length
    0x00,, , TypeStatic)
    WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
    0x0000, // Granularity
    0x0D00, // Range Minimum
    0xFFFF, // Range Maximum
    0x0000, // Translation Offset
    0xF300, // Length
    ,, , TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000A0000, // Range Minimum
    0x000BFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00020000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadOnly,
    0x00000000, // Granularity
    0x000C0000, // Range Minimum
    0x000C3FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadOnly,
    0x00000000, // Granularity
    0x000C4000, // Range Minimum
    0x000C7FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadOnly,
    0x00000000, // Granularity
    0x000C8000, // Range Minimum
    0x000CBFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadOnly,
    0x00000000, // Granularity
    0x000CC000, // Range Minimum
    0x000CFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000D0000, // Range Minimum
    0x000D3FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000D4000, // Range Minimum
    0x000D7FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000D8000, // Range Minimum
    0x000DBFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x000DC000, // Range Minimum
    0x000DFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x00000000, // Granularity
    0x000E0000, // Range Minimum
    0x000E3FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x00000000, // Granularity
    0x000E4000, // Range Minimum
    0x000E7FFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x00000000, // Granularity
    0x000E8000, // Range Minimum
    0x000EBFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x00000000, // Granularity
    0x000EC000, // Range Minimum
    0x000EFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x00004000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0x80000000, // Range Minimum
    0xF7FFFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x77000000, // Length
    0x00,, _Y00, AddressRangeMemory, TypeStatic)
    DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
    0x00000000, // Granularity
    0xFC000000, // Range Minimum
    0xFFFFFFFF, // Range Maximum
    0x00000000, // Translation Offset
    0x04000000, // Length
    0x00,, , AddressRangeMemory, TypeStatic)
    IO (Decode16,
    0x0CF8, // Range Minimum
    0x0CF8, // Range Maximum
    0x01, // Alignment
    0x08, // Length
    Method (_CRS, 0, NotSerialized)
    CreateDWordField (CRES, \_SB.PCI0._Y00._MIN, BTMN)
    CreateDWordField (CRES, \_SB.PCI0._Y00._MAX, BTMX)
    CreateDWordField (CRES, \_SB.PCI0._Y00._LEN, BTLN)
    Store (TOM (), BTMN)
    Subtract (0xF8000000, BTMN, BTLN)
    Return (CRES)
    Device (MEMR)
    Name (_HID, EisaId ("PNP0C02"))
    Name (MEM1, ResourceTemplate ()
    Memory32Fixed (ReadWrite,
    0x00000000, // Address Base
    0x00000000, // Address Length
    _Y01)
    Memory32Fixed (ReadWrite,
    0x00000000, // Address Base
    0x00000000, // Address Length
    _Y02)
    Memory32Fixed (ReadWrite,
    0xFF800000, // Address Base
    0x00000020, // Address Length
    Method (_CRS, 0, NotSerialized)
    CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y01._BAS, MB01)
    CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y01._LEN, ML01)
    CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y02._BAS, MB02)
    CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y02._LEN, ML02)
    If (GPIC)
    Store (0xFEC00000, MB01)
    Store (0xFEE00000, MB02)
    Store (0x1000, ML01)
    Store (0x1000, ML02)
    Return (MEM1)
    Method (XCMP, 2, NotSerialized)
    If (LNotEqual (0x10, SizeOf (Arg0)))
    Return (Zero)
    If (LNotEqual (0x10, SizeOf (Arg1)))
    Return (Zero)
    Store (Zero, Local0)
    While (LLess (Local0, 0x10))
    If (LNotEqual (DerefOf (Index (Arg0, Local0)), DerefOf (Index (
    Arg1, Local0))))
    Return (Zero)
    Increment (Local0)
    Return (One)
    Method (AFN0, 0, Serialized)
    If (LEqual (PDDN, One))
    ^VGA.AFN0 ()
    If (LEqual (PDDN, 0x02))
    ^PB2.VGA.AFN0 ()
    If (LEqual (PDDN, 0x03))
    ^PB3.VGA.AFN0 ()
    Method (AFN1, 1, Serialized)
    Method (AFN2, 2, Serialized)
    Method (AFN3, 2, Serialized)
    If (LEqual (PDDN, One))
    ^VGA.AFN3 (Arg0, Arg1)
    If (LEqual (PDDN, 0x02))
    ^PB2.VGA.AFN3 (Arg0, Arg1)
    If (LEqual (PDDN, 0x03))
    ^PB3.VGA.AFN3 (Arg0, Arg1)
    Method (AFN4, 1, Serialized)
    If (LEqual (PDDN, One))
    ^VGA.AFN4 (Arg0)
    If (LEqual (PDDN, 0x02))
    ^PB2.VGA.AFN4 (Arg0)
    If (LEqual (PDDN, 0x03))

    First remove any acpi_os_name=linux or acpi_osi=linux that you have on the kernel command line, if need be use acpi_osi="!Linux", told you that already in the other thread, I only suggested that you decompile your dsdt so you can pinpoint which acpi_os_name and acpi_osi names are being checked and try to spoof _using windows_ with those names.
    This is the part you should be looking at first:
    Method (OSTP, 0, NotSerialized)
    If (LEqual (OSTB, Ones))
    If (CondRefOf (\_OSI, Local0))
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    If (_OSI ("Windows 2001"))
    Store (0x08, OSTB)
    Store (0x08, TPOS)
    If (_OSI ("Windows 2001.1"))
    Store (0x20, OSTB)
    Store (0x20, TPOS)
    If (_OSI ("Windows 2001 SP1"))
    Store (0x10, OSTB)
    Store (0x10, TPOS)
    If (_OSI ("Windows 2001 SP2"))
    Store (0x11, OSTB)
    Store (0x11, TPOS)
    If (_OSI ("Windows 2001 SP3"))
    Store (0x12, OSTB)
    Store (0x12, TPOS)
    If (_OSI ("Windows 2006"))
    Store (0x40, OSTB)
    Store (0x40, TPOS)
    If (_OSI ("Windows 2006 SP1"))
    Store (0x41, OSTB)
    Store (0x41, TPOS)
    Store (One, OSSP)
    If (_OSI ("Windows 2009"))
    Store (One, OSSP)
    Store (0x50, OSTB)
    Store (0x50, TPOS)
    If (_OSI ("Linux"))
    Store (One, LINX)
    Store (0x80, OSTB)
    Store (0x80, TPOS)
    Else
    If (CondRefOf (\_OS, Local0))
    If (SEQL (_OS, "Microsoft Windows"))
    Store (One, OSTB)
    Store (One, TPOS)
    Else
    If (SEQL (_OS, "Microsoft WindowsME: Millennium Edition"))
    Store (0x02, OSTB)
    Store (0x02, TPOS)
    Else
    If (SEQL (_OS, "Microsoft Windows NT"))
    Store (0x04, OSTB)
    Store (0x04, TPOS)
    Else
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    Else
    Store (Zero, OSTB)
    Store (Zero, TPOS)
    Return (OSTB)
    You can clearly see that linux is being checked for and different stuff is done for it, as is the case for each windows version, like I also said in the other thread first try to spoof a windows version where the battery shows up and the fan works correctly. Only after trying that and if it fails, I would go about trying to fix the dsdt myself.

  • Need help: Got SO Exception when connecting to oracle

    I am using with oracle 9.2.0.1.0 on Linux, and java 1.3.1.
    I copied the classes12.jar file provided by oracle 9.2.0.1 to /usr/lib/java/jre/lib/ext directory.
    I did not have any problem compiling the program. However,
    I got the following error when running my program.
    Io exception: SO Exception was generated.
    Here is how I connect to the database.
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    Connection con = DriverManager.getConnection (
    "jdbc.oracle.thin:user/password//@192.168.0.150/myDb");
    When I changed the following code I got a different error
    Connection con = DriverManager.getConnection (
    "jdbc.oracle.thin:user/[email protected]:1521:myDb");
    Io exception: Network Adapter could not establish the connection.
    Which code should I use, and what are these error
    messages mean ? Please help.

    Never mind. I found out what I did wrong. I need to start the listener
    lsnrctl

  • Need help burning- what is error 2131

    PLEASE HELP ME!!! I really need this disc for school but the disc will not burn it pops out and says unknown error occured (2131) so what can i do to fix this please help me cause if i do not have this disc tomorow i will fail my class and am not allowed to use ipods for this assignment

    With a 2131, a good policy is to check for any firmware updates for your DVD/CD drive. The following document might be of some help with that:
    iTunes for Windows: Updating the firmware on your CD or DVD drive

  • Need help ASAP - SSAS Tabular error has me stumped and others' solutions do not apply in this case.

    Hello everyone,
    Here's hoping no one will consider this to be the wrong forum. The data source is an Access database, but the issue is an SSAS Tabular issue. Kind of desperate here... the customer needs this ASAP, and I've been trying to resolve this for a week
    already! Any help would be much appreciated!
    A customer of mine (another employee of the ComIT department) is receiving an error trying to open an Access database via SQL Data Tools.
    The error is "OLE DB or ODBC error: The Microsoft Access database engine cannot open or write to the file '\\[our_domain]\[the_path_to_the_file]\[database_name].accdb'. It is already opened exclusively by another user, or you need permission
    to view and write its data.; 3051."
    What perplexes me is that I do not receive this error, my coworkers on the DBA team do not receive this error, and our boss does not receive this error--even on the customer's machine. But the customer gets this error every single time.
    The only difference is the credentials provided on the "Impersonation Information" window.
    Here is our process:
    We open SQL Data Tools, we create a new Analysis Services Tabular Project, we select the workspace server (our Analysis Services server... db5079\tabular) and test connection ("Test connection succeded") and click OK.
    Then we click "Import From Data Source," select "Microsoft Access," enter the full network path to the database and test connection ("Test connection succeeded")
    The next window says "Impersonation Information - Specify the credentials used by the Analysis Services server to connect to the data source when importing and processing data"
    The credentials provided at this point is the only difference between me/my team/our boss and the customer. If we use our own credentials at this point--even on the customer's machine--we receive no error and everything is fine.
    If we use the customer's credentials, we get the error above at the end of the next step (i.e., after we choose the data to import and then click Finish).
    So that's it. On the same machine, the customer's credentials produce this error, and our credentials do not.
    I have already added the customer as a server administrator to the Analysis Services server (db5079\tabular).
    Copying the data source to another folder on the network or to his local machine produces the same results: his credentials produce the error, my credentials/my boss's credentials/etc. do not.
    All of our machines are 64 bit, and the Analysis Services server is 2012 64-bit.
    Please help!

    UPDATE: As it turns out, all those who were able to import the data were local administrators on the Analysis Server (i.e., on the OS), and all those who were unable to import data were not.
    When we added someone who couldn't import the data to the local Administrators group on the Analysis Server, they were able to import the data.
    However, we can't give them local admin on the Analysis Server, and we are unable to determine what combination of user rights and permissions on folders we can grant the user as individual that will allow them to import the data.
    Just as a test, we tried giving the user the same user rights that the admin group has, and the same permissions on all the drive as the admin group has, but that didn't work.
    If it had worked, we could have started reducing the rights until we found the minimum necessary, but it didn't and once again we're stuck.
    Please help!

  • I need help with my ipods error 21 please help

    my ipod doesn't like to restore on my computer its a windows 7 and i have the latest itunes can somebody please help me the i

    Error 20, 21, 23, 26, 28, 29, 34, 36, 37, 40
    These errors typically occur when security software interferes with the restore and update process. FollowTroubleshooting security software issues to resolve this issue. In rare cases, these errors may be a hardware issue. If the errors persist on another computer, the device may need service.
    The "device may need service" means a hardware problem. In that case make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

Maybe you are looking for

  • Emptying all users' temp folders

    Hello everyone           Right now we're having problem with low disk space on Terminal Server. Actually we have applications which help us to get rid of all temp files easily, I mean without going to C:\Users\USERNAME\AppData\Local\Temp and deleting

  • I can't synchronised even when I am connected with my USB cable

    I don't know what happened, I don't see my Ipad and Ipod on Itunes. I have connected with my PC and nothing. I uninstalled and reinstalled Itunes and still nothing. I am using a VPN address but I didn't activated to be sure that I can synchronised. I

  • LOV Switcher problem in form layout

    Hi I'm using JDEV11.1.1.2 I have an attribute with two LOV associated. I'm using transient attribute for lov-switcher. I have rendered the attribute as <af:inputListOfValues>. I have a button that changes the lov-switcher value to the other LOV and r

  • One of the SAP client got an error message

    Dear all, I got an error message 'connect to license server failed 60070-15' Others are fine. I have the service manager up and running on the server. Any idea? Thanks. Regards, Yuka

  • How to display the content once the button is clicked

    Hello!  Just joined today, and my apologize for my huge noobness. I'm still learning how to use Flash... and am still struggling on one thing.  It may seem simple to the most of you -- how exactly do you have the content displayed once you click the