Grid API problem

Hi, I sort of copied and pasted the example from Grid API doc. But the output doesn't produce as necessary.The result I get is:,Scenario,,,,,,,,,and I think it should be: , ,Year,Product,MarketActual, Sales, 333, , Any ideas ???Here is the Code: ( quite long but mostly copied from the example )#include <stdio.h>#include <essapi.h>#include <essgapi.h>ESSG_PPDATA_T BuildTable (ESSG_PRANGE_T pRange) ;ESSG_PPDATA_T AllocTwoDims (ESS_ULONG_T ulRows, ESS_ULONG_T ulCols) ;ESSG_VOID_T FreeTwoDim(ESSG_PPDATA_T ppDataToFree,ESSG_ULONG_T ulRows) ;int main(void) {     // Initialize API.     ESSG_FUNC_M sts = ESSG_STS_NOERR ;     ESSG_INIT_T InitStruct ;     ESSG_HANDLE_T Handle ;     ESSG_HGRID_T hGrid ;     InitStruct.ulVersion = ESSG_VERSION ;     InitStruct.ulMaxColumns = 1000 ;     InitStruct.ulMaxRows = 200 ;     InitStruct.pfnMessageFunc = ESS_NULL ;     InitStruct.pUserdata = ESS_NULL ;     sts = EssGInit(&InitStruct, &Handle) ;     if(sts != 0) {          printf("API Grid Init failed\n %d\n", sts) ;          return 0 ;     }     // Initialize Grid.     sts = EssGNewGrid(Handle, &hGrid) ;     if(sts != ESSG_STS_NOERR) {          printf("New Grid Init failed\n") ;          return 0 ;     }     // Data Retrieval.     ESSG_ULONG_T     ulRow, ulCol, ulOptions ;     ESSG_PPDATA_T     ppDataIn, ppDataOut ;     ESSG_RANGE_T     rRangeDataIn, rRangeDataOut ;     ESSG_USHORT_T     usState ;     /* Connect to Essbase and assigne to Grid */     sts = EssGConnect(     hGrid,                              "Sever",                              "Admin",                              "admin92",                              "username",                              "pass",                              ESSG_CONNECT_NODIALOG                         ) ;          if(sts == 0) {          ppDataIn = BuildTable(&rRangeDataIn) ;          ulOptions = 0 ;          sts = EssGBeginRetrieve(hGrid, ESSG_RET_RETRIEVE);     } else {               printf( "Connection Problem \n") ;               return 0 ;     }     if(sts == 0) {          sts = EssGSendRows(hGrid, &rRangeDataIn, ppDataIn) ;     } if (sts == 0) {                /* We're done sending rows, perform the retrieval */                sts = EssGPerformOperation(hGrid, 0);                        /* Free the data we built */                FreeTwoDim(ppDataIn, rRangeDataIn.ulNumRows);        }          if (sts == 0) {                /* Determine the results of the retrieve and how much data                 * is being returned.                 */                sts = EssGGetResults(hGrid, 0, &rRangeDataOut, &usState);        } if (sts == 0) {                /* Get all of the data */                sts = EssGGetRows(hGrid,0, &rRangeDataOut,                         &rRangeDataOut, &ppDataOut);        }          if (sts == 0) {                /* Interate though the data ... */                /* First the rows */                for (ulRow = rRangeDataOut.ulRowStart;                                ulRow < rRangeDataOut.ulNumRows;                                ulRow++)                {                        /* Then the columns */                        for (ulCol = rRangeDataOut.ulColumnStart;                                        ulCol < rRangeDataOut.ulNumColumns;                                        ulCol++)                        {                                /* Here's a cell ... just render it. */                                switch (ppDataOut[ulRow][ulCol].usType) {                                        // Renderint it. too big to post.                                }                                             printf(","); }                                                  printf("\n") ; }               }     if(sts == 0) {          EssGEndOperation(hGrid, 0) ;          EssGDisconnect(hGrid,0) ;     }     return 0 ;}ESSG_PPDATA_T BuildTable (ESSG_PRANGE_T pRange){ESSG_PPDATA_T   ppTable;ESSG_STR_T      current_str;ESSG_USHORT_T   slen = 0;   pRange->ulRowStart = 0;   pRange->ulColumnStart = 0;   pRange->ulNumRows = 2 ;   pRange->ulNumColumns = 5;   ppTable = AllocTwoDims(2, 5);   /* ROW 1 */   ppTable[0][0].usType = ESSG_DT_BLANK; ppTable[0][1].usType = ESSG_DT_BLANK; return ppTable ; slen = strlen("Year"); current_str = (ESSG_CHAR_T *) malloc(sizeof(ESSG_CHAR_T)*(slen+2)); current_str = slen;   strcpy( (current_str + 1), "Year");   ppTable[0][2].usType = ESSG_DT_STRING;   ppTable[0][2].Value.pszStr = current_str;      slen = strlen("Product");   current_str = (ESSG_CHAR_T ) malloc(sizeof(ESSG_CHAR_T)*(slen+2)); current_str =  slen;   strcpy( (current_str + 1), "Product");   ppTable[0][3].usType = ESSG_DT_STRING;   ppTable[0][3].Value.pszStr = current_str;   slen = strlen("Market");   current_str = (ESSG_CHAR_T ) malloc(sizeof(ESSG_CHAR_T)*(slen+2)); current_str =  slen;   strcpy((current_str + 1), "Market");   ppTable[0][4].usType = ESSG_DT_STRING;   ppTable[0][4].Value.pszStr = current_str;   /** ROW 2 ***/ slen = strlen("Actual"); current_str = (ESSG_CHAR_T *) malloc(sizeof(ESSG_CHAR_T)*(slen+2)); current_str = slen;   strcpy((current_str + 1), "Actual");   ppTable[1][0].usType = ESSG_DT_STRING;   ppTable[1][0].Value.pszStr = current_str;   ppTable[1][1].usType = ESSG_DT_STRING;   slen = strlen("Sales");   current_str = (ESSG_CHAR_T ) malloc(sizeof(ESSG_CHAR_T)*(slen+2)); *current_str =   slen;   strcpy( (current_str + 1), "Sales");   ppTable[1][1].Value.pszStr = current_str;   ppTable[1][2].usType = ESSG_DT_BLANK;   ppTable[1][3].usType = ESSG_DT_BLANK;   ppTable[1][4].usType = ESSG_DT_BLANK;   return (ppTable);}ESSG_PPDATA_T AllocTwoDims (ESS_ULONG_T ulRows, ESS_ULONG_T ulCols){        ESSG_PPDATA_T   ppTemp;        ESS_ULONG_T     ulIndex;        ppTemp = (ESSG_PDATA_T * ) malloc(sizeof(ESSG_PDATA_T) * ulRows);        for (ulIndex = 0; ulIndex < ulRows; ulIndex++)        {                ppTemp[ulIndex] =( ESSG_DATA_T * ) malloc(sizeof(ESSG_DATA_T) * ulCols); } return ppTemp;}ESSG_VOID_T FreeTwoDim(ESSG_PPDATA_T ppDataToFree, ESSG_ULONG_T ulRows){   ESSG_ULONG_T ulIndex;   for (ulIndex = 0; ulIndex < ulRows; ulIndex++)   {      if (ppDataToFree[ulIndex]->usType == ESSG_DT_STRING) {         free(ppDataToFree[ulIndex]->Value.pszStr); } free(ppDataToFree[ulIndex]); } free(ppDataToFree);}

Assuming there are no errors happening, it looks like the function you are using to output the results is not displaying the data properly.Could you post that function? It looks like it got truncated...Regards,Jade----------------------------------Jade ColeSenior Business Intelligence ConsultantClarity [email protected]

Similar Messages

  • How can we use Essbase grid API for VB

    Hi Experts
    I am developing a custom application to talk to Essbase in VB6 environment.
    I need to retrieve data from the essbase. When i am using EsbReport to execute the report script query, it takes a lot of time to parse through the returned output and even sometimes, the application prompts "Out of Memory" error.
    1. Is there any faster way to extract data from Essbase using VB APIs
    2. I was going through Grid APIs which gives the ability to extract data from Essbase in Grid format in a comparatively faster manner. Do we have any such Grid APIs for VB? or is there any way to use C grid APIs in VB program?
    Please help :(

    Hi,
    Its hard to say if there is a faster way without knowing how you're doing it now. A few questions:
    - why are you using the API to get at Essbase Data, especially if you've already defined a (some) report scripts?
    - if you want to use provider services, vs having to ensure all the libraries and the client are present, why not use the JAPI?
    - Without seeing your code, its hard to know why you're getting out of memory errors. What are you doing with the data as you're parsing it from the report?
    Grid API exists for the C API, and more noteable the JAPI, but not VB(I'm surprised the VB api still exists).
    Why not just use the Java API?
    Robb

  • How to realize 'parent first'  with grid api?

    I can realize most of the functions as realized in hyperion analyzer with SetGridOption function in grid api except 'parent first' function. Hyperion analyzer version 5.03 can work in 'Use Grid Api' mode, and can produce the right result, with parent member listed on the top of all it's children members. So I am sure grid api can do it. Could someone tell me how to do it?

    You'd think so, but no. The Grid API works the same way as the spreadsheet add-in - Analyzer has some client code that does the manipulation to "flip" the zoom in results to show the parent first.None of the available options in the SetGridOption function pertain to the positioning of the parent member.Regards,Jade-------------------------------Jade ColeSenior Business Intelligence ConsultantClarity [email protected]

  • ALV grid Refresh problem

    hi,
    I have 2 views, input and output these two included in a MAIN views.
    when user key in their input values in INPUT view and the search results will be displayed in OUTPUT view using ALV grid.
    the problem i'm facing here is, when user changes search criteria once after search results displayed.. it is not displaying with new search results. every time i have to give F5(Refresh) it is certainly not comfortable to deliver it as it is.
    i have tried same scenario with simple query in our local server.. where it is working very well.
    i really clueless what would be the cause.. is there any with SAP patch issues.
    i have tried with refresh method of ALV component.
    please help me out of this, i cannot use TABLE control every time to avoid this.
    thanks,
    gupta.

    Hi Gupta,
    Could you please let us know how you are filling the context node which is mapped to ALV table?
    After the search criteria is changed, if you are doing it inside handler of the button or something like that, it should work.
    Refer to the tutorial in the following link which shows an example similar to your scenario:
    SAP List Viewer in Web Dynpro - Simple Example for Using ALV
    please post the code also which you are using to fill the node in case if you still face the issue after referring to the above tutorial.
    Hope this helps!
    Regards.
    Srilatha
    Edited by: Srilatha M on Jul 19, 2010 7:57 AM

  • Comm API problems RS232 SerialDemo

    Hello,
    before you ask: yes, i have read a lot of postings concerning this topic.
    However, my problem is different than the common Comm API problems.
    Win2000, JDK 1.5.2, Comm API 2.0.
    The SerialDemo compiles (wow), shows the correct COM Ports (1) (this has been a major problem in a lot of postings), and works without exceptions. Great, but i dont get any serialEvent when i send something from my device on COM1 (a balance).
    I know the RS232 parameters (1200,7 data bits, 1 stop bit, parity odd), and i connected this device without problems to a Delphi application.
    Cable is the same and the correct one. The device sends with CRLF (ASCII 13 and 10) at the end of each string.
    I tried SimpleRead.java too, but here the same: no serialEvent has been triggered when the device sends its data.
    Any ideas?
    Oliver

    Hi
    sorry, it does work now :)
    It was the device itself which was causing the problem.
    But i really wasnt expecting this, because the day before the device (a balance) worked without any problems. Its quite funny that the balance stopped working just the day i started with the Java communication :)
    thanks
    Oliver

  • Deprecated API Problem

    I have tried (unsuccessfully) for hours and hours to correct a deprecated Api problem with an old java program I have been tinkering with. Is there anyone out there who may be able to help me? I would appreciate it very much.

    Hello Lovadina,
    I do not think my problem is the most difficult problem that has ever been posted but because I am so new to this I am having difficulty in fixing a java program I am working on. It is to do with an old API Mouse event that is currently part of the source code and from what I have read about it, it should not take much to update it as an old version is being used. You can contact me at [email protected] Thanks

  • JPA on the Grid API

    Hi All , I am working with JPA on the TopLink grid with Coherence my Intention is to put the data in cache as well as in database , when the database get shutdown i have to get the data from cache ..
    so for that i have created cache store to store the data in the cache its working fine when database is on startup mode , when db shutdown its unable to pick the data ...showing error
    2012-06-18 21:21:08.173/7.234 Oracle Coherence GE 3.7.1.0 <Error> (thread=DistributedCache:EclipseLinkJPA, member=1): BackingMapManager com.tangosol.net.DefaultConfigurableCacheFactory$Manager: failed to instantiate a cache: Employe
    2012-06-18 21:21:08.173/7.234 Oracle Coherence GE 3.7.1.0 <Error> (thread=DistributedCache:EclipseLinkJPA, member=1):
    (Wrapped: Missing or inaccessible constructor "oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheStore(String,String)"
    <class-scheme>
    <!--
    Since the client code is using Coherence API we need the "standalone"
    version of the cache loader
    -->
    <class-name>oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheStore</class-name>
    <init-params>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>Employe</param-value>
    </init-param>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>CacheStoreProject</param-value>
    </init-param>
    </init-params>
    </class-scheme>) java.lang.reflect.InvocationTargetException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2652)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2536)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateAny(DefaultConfigurableCacheFactory.java:3476)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateCacheStore(DefaultConfigurableCacheFactory.java:3324)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.java:1753)
         at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1500)
         at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:4111)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.instantiateBackingMap(PartitionedCache.CDB:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.setCacheName(PartitionedCache.CDB:25)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ServiceConfig$ConfigListener.entryInserted(PartitionedCache.CDB:17)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)
         at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:567)
         at com.tangosol.util.ObservableHashMap.dispatchEvent(ObservableHashMap.java:229)
         at com.tangosol.util.ObservableHashMap$Entry.onAdd(ObservableHashMap.java:270)
         at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
         at com.tangosol.coherence.component.util.ServiceConfig$Map.put(ServiceConfig.CDB:43)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$StorageIdRequest.onReceived(PartitionedCache.CDB:45)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:694)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2611)
         ... 23 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
    Error Code: 0
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:517)
         at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
         at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getServerSession(EntityManagerFactoryDelegate.java:219)
         at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:247)
         at org.eclipse.persistence.jpa.JpaHelper.getServerSession(JpaHelper.java:193)
         at oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheLoader.<init>(EclipseLinkJPACacheLoader.java:70)
         at oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheStore.<init>(EclipseLinkJPACacheStore.java:26)
         ... 29 more
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
    Error Code: 0
         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
         at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
         at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
         at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
         at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
         ... 35 more
    Caused by: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
         ... 39 more
    New Employe from cache is: null
    program for put and get the data from cache
    package com.cachestore.example;
    import com.oracle.employe.Employe;
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    public class PutGetData {
         public static void main(String[] args) {
              System.setProperty("tangosol.coherence.distributed.localstorage","true");
              // Get the cache--name is same as Entity
              NamedCache employeeCache = CacheFactory.getCache("Employe");
              Employe employee = new Employe();
              employee.setId(4);
              employee.setFirstname("rambabu");
              employee.setLastname("davuluri");
              //employeeCache.put(employee.getId(), employee);
              // Getting an object from cache produces no SQL
              System.out.println("New Employe from cache is: " + employeeCache.get(4));
    Thanks

    What's happening is the JPA cache store is failing on creation/initialization due to its inability to connect to the database.
    Can you describe the behaviour you're expecting? Are you saying you want an "optional" cache store that works when the database is up and silently ignores problems when the database is down? It would still have to fail on write otherwise Coherence write behind will believe the writes have been successfully performed and won't get retried. On a get() with a cache miss, would retuning a null from the cache store be what you want? Your application will be lead to believe that there is no object with the specified key when in reality there may be such an object that just doesn't happen to have been read into cache yet. Perhaps this is acceptable if you were to fully warm your caches.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Filling in grid squares problems

    package view;
    import javax.swing.*;
    import model.CellModel;
    public class Grid
              public void buildGrid(){
              GridPanel gridPanel = new GridPanel();
              JFrame f = new JFrame();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.getContentPane().add(gridPanel);
              f.setSize(400,400);
              f.setLocation(200,200);
              f.setVisible(true);
         //update() Redraw the GUI
         public void update(){
              gridPanel.repaint();
         public static void main(String[] args)
              Grid g = new Grid();
              g.buildGrid();
              GridPanel g2 = new GridPanel();
              model.CellModel c = new model.CellModel(g2);
              c.divide();
    class GridPanel extends JPanel
        double xInc, yInc;
        final int
            GRID_SIZE = 4,
            DRAW      = 0,
            FILL      = 1,
            PAD       = 20;
        int[][] cells;
        public GridPanel()
            initCells();
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            double w = getWidth();
            double h = getHeight();
            xInc = (w - 2*PAD)/GRID_SIZE;
            yInc = (h - 2*PAD)/GRID_SIZE;
            // row lines
            double x1 = PAD, y1 = PAD, x2 = w - PAD, y2 = h - PAD;
            for(int j = 0; j <= GRID_SIZE; j++)
                g2.draw(new Line2D.Double(x1, y1, x2, y1));
                y1 += yInc;
            // col lines
            y1 = PAD;
            for(int j = 0; j <= GRID_SIZE; j++)
                g2.draw(new Line2D.Double(x1, y1, x1, y2));
                x1 += xInc;
            // fill cells
            g2.setPaint(Color.red);
            for(int row = 0; row < cells.length; row++)
                for(int col = 0; col < cells[0].length; col++)
                    if(cells[row][col] == FILL)
                        x1 = PAD + col * xInc + 1;
                        y1 = PAD + row * yInc + 1;
                        g2.fill(new Rectangle2D.Double(x1, y1, xInc - 1, yInc - 1));
        public void toggleCell(int row, int col)
            int mode = DRAW;
            if(cells[row][col] == DRAW)
                mode = FILL;
            cells[row][col] = mode;
            repaint();
        private void initCells()
            cells = new int[GRID_SIZE][GRID_SIZE];
            for(int row = 0; row < cells.length; row++)
                for(int col = 0; col < cells[0].length; col++)
                    cells[row][col] = DRAW;
                  setUpCells();
    public void setUpCells() {
       for (int k = 0; k < 20; k++) {
       Random rand = new model.Random(0, 9);
        x = rand.next();
        y = rand.next();
       // if cell is switched to off turn it on          
        if(getStatus(x,y) != 1) {
        toggleCell(x,y);
        else k++;
    }the above code draws the grid fine and iniates randomly 20 cells to on - red.
    The problem occurs when I call the toggleCell method from other classes, grid squares are signalled to be on but they are not being painted.
    package model;
    import model.Cells;
    import view.GridPanel;
    public class CellModel {
         private Cells cells;
         private GridPanel g;
         int[][] location;
         int x,y ;
         String strX,strY;
    public CellModel(GridPanel grid){
              g = grid;
                                               g.toggleCell(1, 1);
              g.toggleCell(0, 0);
              System.out.println(g.getStatus(0,0));
              cells = new Cells();
         }the above should turn on grid squares (1,1) and (0,0) when the cellmodel is iniated, although when i retreive the status the status of the squares is to on but they are not painting, can anyone help clear this up?

    Maybe it's because you have a variable or ORA_CRS_HOME CRS_HOME, see this portion of the code:
    # Make sure CRS_HOME is set
    if ( exists( $ENV{"ORA_CRS_HOME"} ) ) {
        $CRS_HOME = $ENV{"ORA_CRS_HOME"};
    $CRS_HOME_BIN    = $CRS_HOME;
    If it was not, do the following to the node of clusterware:
    1. Kill all processes sap, use the command:
    ps-ef | grep-i sap | awk-F "" {'print $ 2'} | xargs kill -9
    2. Delete files sockets. Sap / tmp
    rm / tmp / * .sap
    3. Start sapctl with the command:
    $ Su - qrcadm
    # su
    # Sapctl start all-sapsid QRC
    I have a publication of the implementation of sapctl on my homepage.
    However, this Ligua written in Portuguese, any questions, please contact me.

  • ALV GRID DISPLAY -Problem with Layout

    Hi,
    I'm using ALV GRID DISPLAY. I ran the program and in the output i created a layout Test1.Later i created a layout Test2. Now when i run the report, when i select layout Test1, the display is not as selected for the layout. but when i manualy select the layout throu change layout-->Test1, the display is working good. Can someone tell me what the problem can be?
    Thanks
    Challa

    hi,
    in the FM have you filled the structure IS_VARIANT.
    is_variant-report = sy-repid.
    is_variant-variant = <variant name>.
    Regards,
    Leo

  • Problems with Direct Entitlement API ( problems to download the issuenumbers and others)

    Hi there.
    Here we are using the last version of Direct Entitlement API , we had download on this url : http://www.adobe.com/devnet/digitalpublishingsuite/articles/direct-entitlement-starter-kit .html
    But We are getting some problems
    With https://dev01.cartacapital.com.br/adobe/api/entitlements.php?authToken=0fc82ad9b9c11703ad5 c8dee47d7ee26&appVersion=1.3.1&appId=468573252
    This api is modificated to show only the issuenumbers that I have the right to read.
    I'm getting this results
    <result httpResponseCode="200">
    <entitlements>
    <productId>com.editoraconfianca.revistacartacapital.edicao753</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao754</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao755</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao756</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao757</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao758</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao759</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao760</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao761</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao762</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao763</productId>
    <productId>com.editoraconfianca.revistacartacapital.edicao764</productId>
    </entitlements>
    </result>
    That's ok
    But on my Ipad ( for testing only) , show this entitlement on a first place, on top of my screen.
    1) Why does the app is showing others  entitlements too, like ( com.editoraconfianca.revistacartacapital.edicao752, 751 ...  ) ?
    2) When I try to download all the result in  my xml , is not allowed to donwload, but the ( com.editoraconfianca.revistacartacapital.edicao752, 751 ...  ) is allowed to download
    When I verify if I can download the issue ( https://dev01.cartacapital.com.br/adobe/api/verifyEntitlement.php?authToken=0fc82ad9b9c117 03ad5c8dee47d7ee26&appId=com.editoraconfianca.revistacartacapital&productId=com.editoracon fianca.revistacartacapital.edicao753&appVersion=1.0.34 )
    show this result
    <result httpResponseCode="200">
    <entitled>true</entitled>
    </result>
    But I can't do the download.
    Help Please.

    There is no license or serial number for the DVD installer.
    If you can get access to a Mac with a working DVD Drive, make the DVD into a .dmg file in Disk Utility and then copy the .dmg file onto a USB key and install onto your Mac from that.
    Peter

  • OO ALV grid refresh problem on sort

    I have an editable OO ALV where I over ride the standard functionality for append, insert, Delete etc to handle condition that when a new row is inserted/appended its status which is in a non-editable cell  is defaulted to some value. Now the logic is as follows
    1.User clicks on append button(which we have overridden)  I capture it in user command and append a blank row at end with default status in itab and do a grid->refresh_table_display()
    2.User enters values in all cells and presses ENTER , control goes to handle_data_changed method I validate and check the modified rows from ER_DATA_CHANGED->MOD_ROWS or ER_DATA_CHANGED->MOD_CELLS and update my itab with the values entered on screen and again do a grid->refresh_table_display() so the values are displayed again on the screen.
    Problem is when I give a SORT criteria or press sort say according to Year (descending) if grid already contains 2 rows and we add 3rd row with year 2009 at bottom
    Amount Year Status
    100        2007  Old
    200        2006  Old
    300        2009 New
    Then on ENTER the 3rd row goes to 1st place as it should  but the values on the 3rd row do not change!!! eg see below
    Amount Year Status
    300        2009 New
    100        2007  Old
    300        2009 New
    The problem is only when the ALV is sorted & I have a unique row index in my itab to keep track of records. I feel this is a mismatch in the frontend and backend update. Any body else have a clue why is this happening only on sort ?

    Don't do your refresh_table_display( ) until the data_changed_finished event.
    Cheers,
    Phil

  • Fluid grid layout problem

    I am trying to create a fluid grid layout.  In fact it is why I purchased Dreamweaver CS6.  Problem is after I create the first div which I named header it works fine.  However, on inserting the next div Dreamweaver inserts the following text in my index.html:
    @charset "utf-8"; /* Simple fluid media Note: Fluid media requires that you remove the media's height and width attributes from the HTML http://www.alistapart.com/articles/fluid-images/ */ img, object, embed, video { max-width: 100%; } /* IE 6 does not support max-width so default to width 100% */ .ie6 img { width:100%; } /* Dreamweaver Fluid Grid Properties ---------------------------------- dw-num-cols-mobile:3; dw-num-cols-tablet 8; dw-num-cols-desktop: 12; dw-gutter-percentage 20; Inspiration from "Responsive Web Design" by Ethan Marcotte http://www.alistapart.com/articles/responsive-web-design and Golden Grid System by Joni Korpi http://goldengridsystem.com/ */ /* Mobile Layout: 480px and below. */ .gridContainer { margin-left: auto; margin-right: auto; width: 85.9444%; padding-left: 2.5277%; padding-right: 2.5277%; } #LayoutDiv1 { clear: both; float: left; margin-left: 0; width: 100%; display: block; } #header { clear: both; float: left; margin-left: 0; width: 100%; display: block; } #nav { clear: both; float: left; margin-left: 0; width: 100%; display: block; } /* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */ @media only screen and (min-width: 481px) { .gridContainer { width: 91.0625%; padding-left: 0.9687%; padding-right: 0.9687%; } #LayoutDiv1 { clear: both; float: left; margin-left: 0; width: 100%; display: block; } #header { clear: both; float: left; margin-left: 0; width: 100%; display: block; } #nav { clear: both; float: left; margin-left: 0; width: 100%; display: block; } } /* Desktop Layout: 769px to a max of 1232px. Inherits styles from: Mobile Layout and Tablet Layout. */ @media only screen and (min-width: 769px) { .gridContainer { width: 88.75%; max-width: 1232px; padding-left: 0.625%; padding-right: 0.625%; margin: auto; } #LayoutDiv1 { clear: both; float: left; margin-left: 0; width: 100%; display: block; } #header { clear: both; float: left; margin-left: 0; width: 100%; display: block; } #nav { clear: both; float: left; margin-left: 0; width: 100%; display: block; } }
    I suspected the respond.min.js file was causing the problem so I downloaded an update but it didn't help.  At this point I am not able to use this feature of Dreamweaver.  Any help will be appreciated.

    Thanks for the help.  I am using version 12.0 build 5861.
    I was trying to follow the example in a book I have called Dreamweaver CS6 – The Missing Manual.  When I got to the section discussing Fluid Grid Layout, I attempted to follow the example step by step.  I was able to insert the first div which I named header.  I looked at my css file and it had placed the #header.
    I knew that I had to remain within the container  div.  I went into the code view and placed the cursor to the right of the header div.  I then clicked the insert Fluid Grid Layout Div Tag button.  That’s when it automatically inserted all of the code I indicated in my post.
    I then started to follow the example in http://www.adobe.com/inspire/2012/08/fluid-grid-layouts-dreamweaver-cs6.html .  I got the same results.
    I’m beginning to wonder if there is an error in the Dreamweaver software itself.
    Any help you can give will be appreciated.
    Sheridan

  • Can anuone help me on persistence API problem please?

    I would like someone to explain me why when using persistence API
    sometime i can insert data in database normally but later when i
    have added more functionalities like ajax, and file upload i can
    insert data in database using persistence API.
    for instance, using this i was able in the begin of my development
    but now i am not:
    utx.begin();
    inst.insert(name, email); 
    utx.commit();replace the code above by this below i can insert the data
    at the same step of my project:
    Class.forName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource").newInstance();
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/loja?user=marcos&password=131283");     
                String selectStatement = "insert into cadastroswebradio values(?, ?)";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                prepStmt.setString(1, name);
                prepStmt.setString(2, email);So what's the problem? could anyone help me?Thanks!!
    this explain either:http://forum.java.sun.com/thread.jspa?threadID=764824

    Basically i totally not understand your question and i believe also nobody would understand what is your question. You mean your persistence APIs, but you didnt show how the APIs and just use it, i can say that, the only different of that JDBC and your 'persistence', is your JDBC isnt commit function(not include auto-commit). What i can see is that's all.
    But the idea of usage DB conn API should be correct with the 3 steps,
    Begin - Open connection
    Query - insert/update/delete
    Close - commit
    catch - Rollback
    Hopefully it helps.

  • Can anyone help me on persistence API problem?

    I would like someone to explain me why when using persistence API
    sometime i can insert data in database normally but later when i
    have added more functionalities like ajax, and file upload i can
    insert data in database using persistence API.
    for instance, using this i was able in the begin of my development
    but now i am not:
    utx.begin();
    inst.insert(name, email); 
    utx.commit();replace the code above by this below i can insert the data
    at the same step of my project:
    Class.forName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource").newInstance();
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/loja?user=marcos&password=131283");     
                String selectStatement = "insert into cadastroswebradio values(?, ?)";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                prepStmt.setString(1, name);
                prepStmt.setString(2, email);So what's the problem? could anyone help me?Thanks!!
    this explain either:http://forum.java.sun.com/thread.jspa?threadID=764824

    Basically i totally not understand your question and i believe also nobody would understand what is your question. You mean your persistence APIs, but you didnt show how the APIs and just use it, i can say that, the only different of that JDBC and your 'persistence', is your JDBC isnt commit function(not include auto-commit). What i can see is that's all.
    But the idea of usage DB conn API should be correct with the 3 steps,
    Begin - Open connection
    Query - insert/update/delete
    Close - commit
    catch - Rollback
    Hopefully it helps.

  • COMM API problem

    Hello there
    I am hoping you can help me with following. I am trying to transfer files from one computer
    to another using a serial port and hence I am using the communications api. I have gotten so
    many errors on the problem. I have followed the information for installing the api but I
    still get errors. It will let me compile a file but when I try to run it it give me the
    following error
    NoClassDeffounder found
    What my lecturer did was opened up the jar file and put them into a separate folder. We then
    put them into the bin directory in the jdk.
    Everywhere in the code where it was calling a class,constant belong to the api we did the
    following
    comm.CommPortIdentifier.getPortIdentifiers();
    In the above line comm is the folder with the class files
    When we try to tun it now it executes.But it still cannot find any ports whatsoever
    Please can anyone at all help. I am stuck on this problem for over a month and is slowing me down
    Thanks

    No the code has not come from my tutor
    I've had 2 experts trying to help me and they dont
    know what the problem is
    I have tried the SerialDemo
    I still get the same result
    Any other ideasIf you have followed these instructions to the letter, which I doubt, then you probably need to re-install Windows.
    If they haven't fixed this relatively simple problem they are not experts. Consultants perhaps, but not experts.

Maybe you are looking for

  • Tricky SQL*Loader

    Does anyone have any suggestions on how to load a text file with the following layout: 1SYSTEM:   TMS1                                         STATE OF DISMAY                                     DATE: 10/23/06 REPORT:   B155A761                      

  • Time caspule only works when connected through my dLink router first

    I have a dlink router that was always my network router in my home. I hooked up a time capusle from the lan output of the dlink into the internet input port on the time capsule and it works fine. The time capsule and dlink are both wifi hostpots. Whe

  • IPhoto has stopped downloading photos from my camera

    It worked a few weeks ago.  Now iPhoto takes several minutes to decide it can't read the format.  The camera is a Nikon Coolpix S8100.

  • In procedures IS or AS

    In creating a PROCEDURE when would you use CREAT OR REPLACE INSERTINTOEMPLOYEE(empName IN varchar2, NUMBER rate ) AS and CREAT OR REPLACE INSERTINTOEMPLOYEE(empName IN varchar2, NUMBER rate ) IS What is the difference in using AS and IS Thanks Tony

  • File input question

    I'm new to java and I'm trying to write a program using file input/output. The user is asked for the names of an input file and an output file. My question is that in case I don't specify the path of the input file, where should it reside? thanks,