Cfchart static items

I have a query that I am outputing to a chart. That is all
working fine. The question I have is has anyone out there added
static items to a cfchart. I need to add to horizontal lines and
one sloping line to my chart and they are always in the same
locaiton on the chart. I would also like to lable the areas between
the lines with text.
I can see that cfchart is very limiting but has anyone found
a workaround? If I could just find a way to overlay these items it
would be perfect. Any suggestions would be greatly
appreciated.

Hi,
Firstly, if you create the form, using the Form wizard and based on the TBL_SAMPLE table, then Apex will generate everything you need to insert records.
If you do want to manually insert records, you would need to create a PL/SQL process that runs "After Submit" and triggered by a button.
The process code would be something like:
BEGIN
INSERT INTO TBL_SAMPLE (XNAME, XNAME2, Q1NUMBER, Q2NUMBER, Q3NUMBER, Q4NUMBER, Q5NUMBER, TRANSACTION_DATE)
VALUES (:TXT_NAME1, :TXT_NAME2, :RGRP_Q1, :RGRP_Q2, :RGRP_Q3, :RGRP_Q4, :RGRP_Q5, SYSDATE);
END;I have not included TRANSACTION_NO in the fields to be updated as you should have a sequence and trigger to handle the creation of new primary keys.
Andy

Similar Messages

  • How to set static item in PL/SQL

    I know this may sound like a stupid quesiton but here's the issue.
    I need a PL/SQL function that will set a application item, or page item etc. The items that need to be set are static items. Ex: P1_FIRST_NAME
    I know if I use a PL/SQL function withing HTMLDB I can use the :P1_FIRST_NAME := 'Martin';... Problem is that you can not use that syntax if you store the function in Oracle itself.
    So I need to know the syntax to set items.
    Thanks.
    M.

    HTMLDB will also recognize variables using the format &VARIABLE_NAME. (with the period at the end). Have you tried this variable naming convention? Oracle may store it as it looks like a runtime variable.
    I don't know if it will work for your scenario or not...
    Adam Cumming
    Marion County

  • Default or Static Item in Layout within ListView

    I am trying to have a static item show up within the layouttemplate of my listview. Anyone can show me some examples of this? I have a lv_serviceLocations_DataBound event that fires the ListView to be visible, but I am unsure of how to take the data within
    my DataTable and have a default location be visible once the ListView appears. Here is some of my code...
    <asp:ListView ID="lvServiceLocations" runat="server" DataSourceID="sdsServiceLocations"
    DataKeyNames="user_service_location_id" InsertItemPosition="FirstItem"
    OnItemInserting="lvServiceLocations_ItemInserting"
    OnDataBound="lvServiceLocations_DataBound" >
    <LayoutTemplate>
    <table class="location-selection-table ui-widget-content"><tr>
    <th colspan="4" class="ui-widget-header">Locations</th></tr>
    <tr id="itemPlaceHolder" runat="server" />
    </table>
    </LayoutTemplate>
    <ItemTemplate>
    <tr class="location-selection-item-row">
    <td class="location-selection-actions">
    <asp:LinkButton runat="server" Text="Remove" CommandName="Delete" /></td>
    <td><%# Eval("selected_state") %></td>
    <td><%# Eval("selected_county") %></td>
    <td class="location-selection-actions"></td>
    </tr>
    </ItemTemplate>

    Hi Mosnet99,
    Thank you for posting in the MSDN forum.
    Since Visual Studio General Forum which discuss Visual Studio IDE usage, I’m afraid that it is not the correct forum for this issue. The issue seems more related to the ASP.NET Web Application,
    so I suggest you can post the issue to the
    ASP.NET forum and you will get more detail information about your issue.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • PDF Printing issue (passing static items)

    Hello experts,
    I am starting out with PDF printing from Apex and have a small (I hope) issue. I have downloaded a demo from Oracle site and all works OK.
    To test the ability to create my own RTF templates I have added an additional item on the page called P3_PAWEL
    Then I have added a field in the RTF template (by copying the existing field from elsewhere in the template and changing its property name)
    As a last step I have added the item in the Report Quearies page by clicking on Session State > and adding the P3_PAWEL item to the list.
    When I now print the report all still works OK but I do not see anything on the report where (in the template) I put my P3_PAWEL text field.
    Any ideas what else I am missing here?
    Regards,
    Pawel.

    What you are after is the Oracle XML Publisher Desktop.
    Goto :
    http://www.oracle.com/technology/software/products/publishing/index.html
    and download Oracle XML Publisher Desktop 5.6.2 for Microsoft Windows. It is 100Mb.
    It adds some buttons to MS Word.

  • Which Function Should i use for static values for a an array[] in BPM 11g.

    Hi Experts,
    Please throw some light on this..
    I've a requirement which is bugging me..
    How do i assign a static value to a array in BPM11g in script activity. What exactly function do i need to use to assign a Static value for an Array []
    I been doing like taking the business object as a Array thats fine. But how can i set a static value in BPM 11g.
    Iam using BPM 11.1.1.6 version..
    Regards,
    Pavan

    Hi Pavan,
    Here's one approach, but it assumes you're comfortable with XSDs and XML.
    Know this is light on detail, but without knowing what your array looks like it's the best I can do. Here's what you'd do from a high level:
    1. Create an XSD that defines the structure of your array.
    2. Create the XML that represents the static item you want to add to the array.
    3. Create a process variable based on the XSD that defined the array.
    4. Add a Script activity.
    5. Open the "Implementation" tab -> click "Data Associations".
    6. On the right, expand the folder under your process -> drag the XML icon in the upper right corner on the array variable -> paste your XML into the XML literal panel.
    Hope this gets you going,
    Dan

  • Compulsory use of 'static' modifier?

    Could someone clarify if I must declare my main() this way:
    public static void main(String[] argv) {
    My problem stems from main always having to be static or the program just plain won't run. The big problem starts when trying to access non static library functions. Is there a way to avoid having to make everything static because my main is always static? Is there a way to access non-static items from static ones? Do I even make sense anymore?
    Thanks.

    It absolutely must be declared as static, because the JVM does not instantiate your class, it just builds an argument array (args), and loads and executes <yourclassname>.main(args)
    What you need to do if you want it to access non-static methods, is do something like this:
    public static void main(String[] args)
      MyClass instance = new MyClass();
      instance.doStuff();
    public (or private or whatever appropriate) void doStuff()
      // do the code you were trying to do in main, here instead.
    }

  • Problem with Hibernate Connection and MySQL

    I have the following setup:
    J2EE web-application, Java Servlets, Jsp, Hibernate for DB persistence, MySQL 4 (InnoDB tables)
    I have not specified any connection pool parameters (c3p0) in my hibernate.cfg.xml, as the default settings should suffice for my purposes.
    I use the SessionFactory object as follows.
    In my database access class, I have a static declaration that initialises the new SessionFactory.
    Then, I use Session session = sessionFactory.getSession(); and session.close(); to do my DB access.
    Likewise, when storing data into the DB, I use a Transaction object, and use transaction.commit(); at the end of database access.
    The problem is:
    When I store data into the database, the changes do not occur on the website. In other words, the data gets stored into the tables (I check that via phpMyAdmin) but when accessing it, it only gets the old data. This is a serious problem as I am developing a website with attached CMS that will be used to update the pages.
    The OTHER problem is:
    Instead of having a static initialisation of the SessionFactory object, I created a new one every time I needed to access the database. Although I had a sessionFactory.close(); statement at the end of the database acccess, I got an exception:
    "java.sql.SQLException: User db_user already has more than 'max_user_connections' active connections"
    At the very moment I don't have access to my code.
    If somebody has a suggestion or a solution to the problem, please reply.
    Also, I will supply any code that is necessary to identify the problem.
    Anders

    Thanks for the tip, but how do you mean to update the object?
    Here is the code that stores the data into the database:
    'sessionFactory' is a static SessionFactory object.
         public static int saveOrUpdate ( Object object ) {
              int flag = 0; // 0 is true
              LOG.info("CMSLogic >>> saveOrUpdate() - object: " + object );
              Session session = null;
              Transaction transaction = null;
              try {
                   session = sessionFactory.openSession();
                   transaction = session.beginTransaction();
                   LOG.info("CMSLogic >>> saveOrUpdate() - object to save or update: " + object );
                   session.saveOrUpdate(object);
                   // Flush the session
                   if ( session!= null )
                        session.flush();
                   transaction.commit();
              } catch ( Exception e ) {
                   e.printStackTrace ();
                   transaction.rollback();
                   flag = 1;
              } finally {
                   try{
                        if (session != null) {
                             session.close();
                   } catch (Exception e) {
                        LOG.error("CMSLogic >>> saveOrUpdate() - threw exception: " + e);
              return flag;
         }Further, here is the code that fetches the data from the DB:
         public static Item getItemByURL ( String url ) {
              // Verify the URL
              if ( url.charAt(0) == '/' ) url = url.substring (1);
              String [] urlArr = url.split( "/" );
              LOG.info("BusinessLogic >>> getItemByURL() - split url: urlArr.length: " + urlArr.length );
              for ( int i = 0; i < urlArr.length; i++ )
                   System.out.println ( urlArr[i] + ", " );
              if ( urlArr == null ) return null;
              if ( urlArr.length == 0 ) return null;
              if ( urlArr.length > 4 ) return null; // If the path depth is more than 3 levels, abort
              // Fetch data from DB
              List<Item> items = null;
              Session session = null;
              Query query = null;
              try {
                   session = sessionFactory.openSession();
                   if ( urlArr.length == 1 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE 'root' " +
                             "AND filename LIKE '" + urlArr[0] + "'" );
                   else if ( urlArr.length == 2 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[1] + "'" );
                   else if ( urlArr.length == 3 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[1] + "' " +
                             "AND section.parentSection.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[2] + "'" );
                   else { // if ( urlArr.length == 4 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[2] + "' " +
                             "AND section.parentSection.sectionKey LIKE '" + urlArr[1] + "' " +
                             "AND section.parentSection.parentSection.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[3] + "'" );
                   items = query.list();
                   LOG.info("BusinessLogic >>> getItemByURL() - items = query.list(): " + items );
                   // Load the related revisions, too
                   if ( !items.isEmpty() ) {
                        Hibernate.initialize ( items.get(0).getRevisions() );
                        LOG.info("BusinessLogic >>> getItemByURL() - initialised revisions for item." );
                        Hibernate.initialize ( items.get(0).getRevisions().get(0).getTemplate() );
                        LOG.info("BusinessLogic >>> getItemByURL() - initialised template for first revision." );
                   // Flush the session
                   if ( session!= null )
                        session.flush();
              } catch ( Exception e ) {
                   e.printStackTrace ();
                   LOG.error("BusinessLogic >>> getItemByURL() - threw exception: " + e );
              } finally {
                   session.close();
                   //sessionFactory.close(); // !!!???
              // Return query results
              if ( items == null ) return null;
              else if ( items.isEmpty() == true ) return null;
              else {
                   LOG.info("BusinessLogic >>> getItemByURL() - items.get(0).getRevisions().size(): " + items.get(0).getRevisions().size() );
                   LOG.info("BusinessLogic >>> getItemByURL() - items.get(0).getRevisions().get(0): " + items.get(0).getRevisions().get(0) );
                   return items.get(0);
         }Any constructive suggestions and helpful comments are more than welcome.
    I have been struggling with this problem for a while now.
    Anders

  • ORACLE.FDK.ServerError while creating document and assigning category

    Hi,
    I try tro create a new Document in Content Services and assigning an existing category
    here is the code snippet:
    public static Item createDocumentWithCategory(Item parent, Item category)
    throws FdkException, RemoteException
    // get the Manager instances
    FileManager fm =s_WsCon.getFileManager();
    System.out.println("Ok document");
    RechercheCategorie categorie=RechercheCategorie();
    categorie.catValeur2();
    Item cat=categorie.getCat();
    Item workspace =fm.resolvePath("/solaria/E-TOP2", null);
    System.out.println("id dans create document:"+cat.getId()+"workspace name:=
    "+workspace.getName()+ "workspaceid:"+workspace.getId());
    // create Category definition for category instance
    NamedValue[] categoryDefs =WsUtility.newNamedValueArray(new Object[]=
    { Options.CATEGORY_ID, new Long(cat.getId()) }/*,
    { Options.CATEGORY_DEFINITION_ATTRIBUTES,
    WsUtility.newNamedValueArray(new Object[][] {
    { "CUSTOM_Attribute", "Value One" } }) }*/
    System.out.println("Ok document");
    // create document specifying category definition
    Item newDoc =fm.createDocument(
    WsUtility.newNamedValueArray(new Object[][] {
    { Attributes.NAME, "MyDoc41" },
    { Options.CATEGORY_DEFINITION, categoryDefs },
    { Options.DESTFOLDER, new Long(workspace.getId()) } }), null, null);
    System.out.println("Ok document2");
    return newDoc;
    It throws an Exception essage d'erreur:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:=
    faultString: ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
    faultActor:=
    faultNode:=
    faultDetail:=
         {http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="x=
    sd:string">ORACLE.FDK.ServerError</detailedErrorCode><errorCode xsi:type=
    "xsd:string">ORACLE.FDK.UnexpectedError</errorCode><exceptionEntries xsi:ty=
    pe="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/><info xsi:type="ns1=
    :ArrayOfNamedValue" xsi:nil="true"/><serverStackTraceId xsi:type="xsd:s=
    tring">139-1170838513360</serverStackTraceId>
    What is wrong with the code?
    Please advise
    Jo

    The stack trace is incomplete. Please post the complete exception stack trace.
    regards,
    -sancho

  • How to freeze the columns in excel exported from SSRS report??

    We have created a report for our client. The client wants the report in excel format. As there are nearly about 30,000 rows in the excel. Client wants us to freeze the column header names in the excel so that even after scrolling down they
    will be able to see the column names.
    can anybody have idea how to achieve this in SSRS?

    Hi Shard,
    Thanks for your post, You can achive your requiremets by using the below logic. hope this will help you.
    Steps to achieve it
    1. Select the tabix and click on Tablix properties.
    2. In the General tab under Column Headers section you can see "Keep header visible while scrolling" checkbox, check it.
    3. Now the header row will be remain fixed in the report.
    OR
    1.    In the grouping pane, make sure to turn on advanced mode (click on the small black down arrow on the far right of the grouping pane) 
    2.  Select the corresponding (Static) item in the row group hierarchy
    3.  In the properties grid, set RepeatOnNewPage to true
    4. KeepwithGroup to After
    OR
    1)Freeze the header of all columns[ Freezing table header ] : To do select static member of table header row from  row groups [ Advanced Mode ] and set  FixedData to true
    2) Freeze the initial 2 columns : To do select static member of columns in column group and set fixedData to true .
    How do you freeze the tablix header row in an Excel export file in SSRS 2008
    Suhas Kudekar
    Mark as Answer if this resolves your problem or "Vote as Helpful" if you find it helpful.
    My Blog
    Follow @SuhasKudekar

  • Remove supporting object in Deinstallation Script

    Hello.
    I want to define a deinstallation script for my application. It should remove all created database objects and the supporting objects.
    I can remove the database objects with SQL statements. But what is the command to remove supporting objects?
    Maybe you can give me an example to remove an icon called delete.gif. (I think static items and images are handled in the same way, aren't they?)
    Thank you very much.
    Stephan

    begin
    wwv_flow_api.create_or_remove_file(
    p_location => 'WORKSPACE',
    p_name => 'image.gif',
    p_mode => 'REMOVE',
    p_type => 'STATIC');
    end;

  • Error in Java code

    i dont know if this is the right place to post this.. but... ehh
    when i try to compile these two programs i get errors
    This program is saved in Item.java and it compiles fine
    public class Item
         private String name, desc;
         private double price;
         private int amount;
         public Item (String name, String desc, double price, int amount) {
              this.name = name;
              this.desc = desc;
              this.price = price;
              this.amount = amount;
         public String getName() {
              return name;
         public String getDesc() {
              return desc;
         public double getPrice() {
              return price;
         public int getAmount() {
              return amount;
         public void iAmount() {
              amount++;
         public void dAmount () {
              amount--;
         public String toString() {
              String s = name + "\tDescription: " + desc;
              s += "\nPrice: " + price + "\tAmount Left: " + amount;
              return s;
    }and this code is saved in Store.java (in the same folder) dowsnt compile
    public class Store
         private static int arraySize = 0;
         public static Item[] inv = new Item[0];
         public static void initItems() {
              addToInv("Orange", "Fruit", 0.99, 10);
              addToInv("Apple", "Fruit", 0.65, 12);
              addToInv("Bananna", "Fruit", 0.75, 18);
         private static void addToInv(String name, String desc, double price, int amount) {
              if (arraySize == inv.length)
                   increaseArray();
              inv[arraySize] = new Item(name, desc, price, amount);
         private static void increaseArray() {
              Item[] temp = new Item[inv.length + 1];
              for (int x = 0; x < temp.length; x++)
                   temp[x] = inv[x];
              inv = temp;
         public static void main(String[] args) {
              initItems();
              for (int x = 0; x < inv.length; x++)
                   System.out.println(inv[x]);
    }I get the errors
    C:\Work\JAVA\Store.java:4: cannot find symbol
    symbol  : class Item
    location: class Store
         public static Item[] inv = new Item[0];
                          ^
    C:\Work\JAVA\Store.java:4: cannot find symbol
    symbol  : class Item
    location: class Store
         public static Item[] inv = new Item[0];
                                           ^
    C:\Work\JAVA\Store.java:15: cannot find symbol
    symbol  : class Item
    location: class Store
              inv[arraySize] = new Item(name, desc, price, amount);
                                         ^
    C:\Work\JAVA\Store.java:19: cannot find symbol
    symbol  : class Item
    location: class Store
              Item[] temp = new Item[inv.length + 1];
                    ^
    C:\Work\JAVA\Store.java:19: cannot find symbol
    symbol  : class Item
    location: class Store
              Item[] temp = new Item[inv.length + 1];
                                      ^

    Hey I just copied ur prog and saved it in one directory and then i complied them and it worked fine I guess the only mistake u did is u didn't compiled the Item.java first .First compile Item.java and then Store.java then it will work u dont have to set the calsspath for this..

  • Radiogroup "onClick" function in ApEx?

    Hello,
    I have a radiogroup and a select list in a form. On click on the radiogroup the content of the select list should change.
    How is it possible in Apex. Is it just possible to do it with javascript and an "onclick" function?
    Thx in advance!
    Greetings, Hamburger

    I have a same problem, but I think that I resolved it with tis way
    1. Create a hidden static item (P?_CONT)
    2. Create a radiogroup with submit (P?_CHECK) with values (0,1)
    3. Create a selected list with redirect (P?_LIST:
    SELECT ... WHERE :P?_CHECK=..
    4. Create a report region : SELECT ... WHERE P?_LIST=...
    5. Create a branch (After submit) with clear cache option at this page
    and set items P?_CONT=&P?_CHECK., P?_CHECK=&P?CHECK.
    which are worked at condition P?_CONT != P?_CHECK
    It seems to me that it works well

  • UCCX 7 - Advanced Reporting - Grade of Service Realtime Report

    Is there any sample of what DB fields would be required to build/calculate an Advanced Report for seeing Grade of Service (GoS) for a particular CSQ?
    Since there is nothing in the Supervisor Agent to display this, can it be built using the Advanced Reporting capabilities (w/DB Schema documents) of UCCX?
    Thanks
    Pete

    Hi
    All looks good to me - SingleSelection is valid I think, certainly works on my 8.x system.
    I would take a look at one of the 'Interval' reports - for example Agent State Summary by Interval. The selection of the interval is done using a SingleSelection DBListToList, but with static items. If that appears as a drop down, then the element works. If not, there may be a bug with your HRC client. I'm pretty sure this option has been supported for a long time.
    In that case you can take a backup copy of that XML definition, and replace the 'ListOption' elements with your single 'SQL' element in the original file, and see if it populates from the query.
    Only other thing I noticed was your 'SingleSelection' property appears before the GUIComponentName property - might be some weird parser error or something, as the Cisco examples have SingleSelection after GUIComponentName?
    Regards
    Aaron
    Please rate helpful posts...

  • An x, y, w patch for dmenu

    This patch provide the necessary options to achieve a precise placement of the dmenu window.
    It also added an option to hide the matching items when the search string is empty.
    diff -u dmenu-4.4/dmenu.1 dmenu/dmenu.1
    --- dmenu-4.4/dmenu.1 2011-07-19 22:31:28.000000000 +0200
    +++ dmenu/dmenu.1 2011-08-06 23:18:20.000000000 +0200
    @@ -41,6 +41,9 @@
    .B \-b
    dmenu appears at the bottom of the screen.
    .TP
    +.B \-q
    +dmenu will not show any items if the search string is empty.
    +.TP
    .B \-f
    dmenu grabs the keyboard before reading stdin. This is faster, but may lock up
    X if stdin is from a terminal.
    @@ -57,6 +60,15 @@
    .BI \-fn " font"
    defines the font or font set used.
    .TP
    +.BI \-x " xoffset"
    +defines the offset from the left border of the screen.
    +.TP
    +.BI \-y " yoffset"
    +defines the offset from the top border of the screen.
    +.TP
    +.BI \-w " width"
    +defines the desired menu window width.
    +.TP
    .BI \-nb " color"
    defines the normal background color.
    .IR #RGB ,
    diff -u dmenu-4.4/dmenu.c dmenu/dmenu.c
    --- dmenu-4.4/dmenu.c 2011-07-19 22:31:28.000000000 +0200
    +++ dmenu/dmenu.c 2011-08-06 23:17:53.000000000 +0200
    @@ -42,6 +42,9 @@
    static int bh, mw, mh;
    static int inputw, promptw;
    static int lines = 0;
    +static int xoffset = 0;
    +static int yoffset = 0;
    +static int width = 0;
    static size_t cursor = 0;
    static const char *font = NULL;
    static const char *prompt = NULL;
    @@ -53,6 +56,7 @@
    static unsigned long selcol[ColLast];
    static Atom utf8;
    static Bool topbar = True;
    +static Bool quiet = False;
    static DC *dc;
    static Item *items = NULL;
    static Item *matches, *matchend;
    @@ -75,6 +79,8 @@
    else if(!strcmp(argv[i], "-b"))
    topbar = False;
    + else if(!strcmp(argv[i], "-q"))
    + quiet = True;
    else if(!strcmp(argv[i], "-f"))
    fast = True;
    else if(!strcmp(argv[i], "-i")) {
    @@ -84,6 +90,12 @@
    else if(i+1 == argc)
    usage();
    /* double flags */
    + else if(!strcmp(argv[i], "-x"))
    + xoffset = atoi(argv[++i]);
    + else if(!strcmp(argv[i], "-y"))
    + yoffset = atoi(argv[++i]);
    + else if(!strcmp(argv[i], "-w"))
    + width = atoi(argv[++i]);
    else if(!strcmp(argv[i], "-l"))
    lines = atoi(argv[++i]);
    else if(!strcmp(argv[i], "-p"))
    @@ -177,28 +189,30 @@
    if((curpos = textnw(dc, text, cursor) + dc->h/2 - 2) < dc->w)
    drawrect(dc, curpos, 2, 1, dc->h - 4, True, FG(dc, normcol));
    - if(lines > 0) {
    - dc->w = mw - dc->x;
    - for(item = curr; item != next; item = item->right) {
    - dc->y += dc->h;
    - drawtext(dc, item->text, (item == sel) ? selcol : normcol);
    - else if(matches) {
    - dc->x += inputw;
    - dc->w = textw(dc, "<");
    - if(curr->left)
    - drawtext(dc, "<", normcol);
    - for(item = curr; item != next; item = item->right) {
    - dc->x += dc->w;
    - dc->w = MIN(textw(dc, item->text), mw - dc->x - textw(dc, ">"));
    - drawtext(dc, item->text, (item == sel) ? selcol : normcol);
    - dc->w = textw(dc, ">");
    - dc->x = mw - dc->w;
    - if(next)
    - drawtext(dc, ">", normcol);
    + if(!quiet || strlen(text) > 0) {
    + if(lines > 0) {
    + dc->w = mw - dc->x;
    + for(item = curr; item != next; item = item->right) {
    + dc->y += dc->h;
    + drawtext(dc, item->text, (item == sel) ? selcol : normcol);
    + }
    + }
    + else if(matches) {
    + dc->x += inputw;
    + dc->w = textw(dc, "<");
    + if(curr->left)
    + drawtext(dc, "<", normcol);
    + for(item = curr; item != next; item = item->right) {
    + dc->x += dc->w;
    + dc->w = MIN(textw(dc, item->text), mw - dc->x - textw(dc, ">"));
    + drawtext(dc, item->text, (item == sel) ? selcol : normcol);
    + }
    + dc->w = textw(dc, ">");
    + dc->x = mw - dc->w;
    + if(next)
    + drawtext(dc, ">", normcol);
    + }
    + }
    mapdc(dc, win, mw, mh);
    @@ -501,7 +515,7 @@
    if(INRECT(x, y, info[i].x_org, info[i].y_org, info[i].width, info[i].height))
    break;
    x = info[i].x_org;
    - y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
    + y = info[i].y_org + (topbar ? yoffset : info[i].height - mh - yoffset);
    mw = info[i].width;
    XFree(info);
    @@ -509,9 +523,13 @@
    #endif
    x = 0;
    - y = topbar ? 0 : DisplayHeight(dc->dpy, screen) - mh;
    + y = topbar ? yoffset : DisplayHeight(dc->dpy, screen) - mh - yoffset;
    mw = DisplayWidth(dc->dpy, screen);
    +
    + x += xoffset;
    + mw = width ? width : mw;
    +
    promptw = prompt ? textw(dc, prompt) : 0;
    inputw = MIN(inputw, mw/3);
    match(False);
    @@ -532,7 +550,8 @@
    void
    usage(void) {
    - fputs("usage: dmenu [-b] [-f] [-i] [-l lines] [-p prompt] [-fn font]\n"
    + fputs("usage: dmenu [-b] [-q] [-f] [-i] [-l lines] [-p prompt] [-fn font]\n"
    + " [-x xoffset] [-y yoffset] [-w width]\n"
    " [-nb color] [-nf color] [-sb color] [-sf color] [-v]\n", stderr);
    exit(EXIT_FAILURE);
    I made the following script to center dmenu's window:
    #! /bin/sh
    width_height=`xwininfo -root | grep -m 1 '\-geometry' | grep -oE '[0-9]+x[0-9]+'`
    width=${width_height%x*}
    height=${width_height#*x}
    bar_width=$(( $width / 3 ))
    left_shift=$(( ($width - $bar_width) / 2 ))
    top_shift=$(( $height / 3 ))
    fn='-*-terminus-medium-r-normal-*-20-*-*-*-*-*-iso10646-*'
    nb='#171513'
    nf='#575655'
    sb='#171513'
    sf='#929292'
    dmenu_run -fn "$fn" -nb "$nb" -nf "$nf" -sb "$sb" -sf "$sf" -p '>' -l 3 -q -x $left_shift -y $top_shift -w $bar_width
    Here's how it initially looks:
    Last edited by bloom (2012-01-10 17:52:41)

    This is pretty neat! You should post this on the suckless-dev ML.
    edit: in case you're not afraid of bash, here's a bash3/awk alternative to calculating the offsets:
    IFS=$'\n' read -r -d '' bar_width left_shift top_shift < \
    <(xwininfo -root | awk '/-geometry/ {
    split($2, dim, /[x+]/)
    bar_width = dim[1] / 3
    left_shift = (dim[1] - bar_width) / 2
    top_shift = dim[2] / 3
    printf "%.0f\n%.0f\n%.0f\n", bar_width, left_shift, top_shift
    Last edited by falconindy (2011-08-20 14:31:24)

  • Two components do PublishedStaticFiles over the same file, who wins?

    Hi,
    I use UCM 11G PS4.
    Does anyone knows how PublishedStaticFiles is working, I know it publish
    resources into the weblayout/resources/wcm/custom.
    But does anyone knows what happens if two components try to publish same file?
    I will expect that Content Server to merge the 2 published files into one
    depending by loadOrder.
    Can anyone tell me what is the difference between PublishedStaticFiles and PublishedWeblayoutFiles?
    Regards,
    Cipi

    The PublishedStaticFiles and PublishedWeblayoutFiles tables are essentially the same thing, in that they both define where to publish in the Weblayout folder/directory. However, PublishedStaticFiles is used to publish static items like images, while PublishedWeblayoutFiles is generally used to publish dynamic items like layouts. When you're in the config manager, the "Publish static layout files" and "Publish dynamic layout files" publish those tables, respectively. A brief overview can be read on Kyle's post.
    As far as merging published files, no, that is not possible. The Content Server publishes all component files, but if any have the same file name, the component with the bigger (higher) loadOrder will "win" and its file will override the other.
    For instance, in the .hda file of the component you want to be loaded, you'll have:
    @ResultSet MergeRules
    4
    fromTable
    toTable
    column
    loadOrder
    SSOPublishedStaticFiles <-- your table that defines where in the weblayout directory you want to publish your files to
    PublishedStaticFiles
    null
    500 <--loadOrder (set the value to something big like 500)

Maybe you are looking for

  • Error while refering to old workspace in NWDS

    Hi There, I have created a webdynpro application for SAP mobile applicationfor laptop usign NWDS.Due to some reason i needed to reinstall my NWDS. I copied my workspace and reinstalled the NWDS.After reinstalling i was getting the following error whi

  • Oracle.xml.sql.query.OracleXMLQuery   GetXML -withDTD

    I'm trying to create a dtd for each table in my schema. I've created a java program that loops through the user_tables and I am then trying to create the DTD with oracle.xml.sql.query.OracleXMLQuery -withDTD. I am able to make it work using the XSU C

  • My ipods screen shattereted, how do i save all my music?

    Ok, so my ipod broke screen shattered completely. Tomorrow I am going in to get a new one, but the downfall is I don't want to loose my music. Help!!

  • Online number in Brazil not working

    For weeks my friends have been reporting it was working intermitently. Now none of them can place a call, they always get a busy signal. I have a friend who has an online number and he's reporting the same problem.

  • Statistics take forever...

    Hi, 9.2 on AIX5 Have a database in size 260GB, largest single table is 150GB. Collecting statistics ( is a real burden). Last time a schema statistics run 50h and could not complete. I cancelled due to large loads over the weekend. (We do cold backup