How to use synonyms on multiple word search ?

We use context with multiword search like this one :
select * from my_table where contains(my_text,'the small building near the river')>0
Now we have specific synonyms in a thesaurus. How do we write the contains clause ?
contains(my_text,'syn(the,thes) and syn(small,thes) and syn(building,thes) and syn(near,thes) and syn (river,thes)')>0 does not fin the synonym for "small building"="house" for instance
contains(my_text,'syn(the small building near the river,thes)')>0 does only for synonyms on the full sentence.
More generally is there an Oracle Document which describes how to use SYN, FUZZY and combine them, since
the reference documentation gives only limited information on this ?
Have a nice day

The thesaurus functionality is not currently built for stuff like this.
if you want to combine fuzzy and thesaurus, I am assuming you want to do fuzzy first, to correct any misspelling,
then thesaurus on the "corrected" spellings? You'd have to do something like:
1. take the query and run ctx_query.explain to break it down and do the fuzzy expansion
2. work through the fuzzy expansion and build a new query string by sticking SYN() around each
expanded word
As for thesaurus expansion and phrase, these are not compatible. Thesaurus expansions use "," and "|", and so
you cannot have a phrase of thesaurus expansions.
I see what you're getting at, but you would need sub phrase detection, phrase equivalence, etc., which is
currently beyond the thesaurus function capability.
You can use themes (ABOUT) on phrases, and it will do something like what you are describing. You might want
to check that out.

Similar Messages

  • Multiple Word Search

    Does anyone know how i can search a coloumn using multiple words without using string tokenizer I get all the values in the table everytime as it searches using " " unless you enter a string in every section. If you just want to search for one word it still displays every value in the table. The code is below
    try {
    StringTokenizer searchtoken = new StringTokenizer(searchwords,",");
    String s1 = searchtoken.nextToken();
    String s2 = searchtoken.nextToken();
    String s3 = searchtoken.nextToken();
    String s4 = searchtoken.nextToken();
    String s5 = searchtoken.nextToken();
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn = DriverManager.getConnection(
    data, "", "");
    Statement st = conn.createStatement();
    searchwords = searcharea.getText();
    ResultSet rec = st.executeQuery(
    "SELECT * "+
    "FROM data "+
    "WHERE Annotation LIKE '%"+
    s1+
    "%' OR" +
    " Annotation LIKE '%" +
    s2 +
    "%'OR"+
    " Annotation LIKE '%" +
    s3 +
    "%'OR" +
    " Annotation LIKE '%" +
    s4 +
    "%'OR" +
    " Annotation LIKE '%" +
    s5 +
    while(rec.next()) {
    //System.out.println(rec.getString("Location"));
    searchBox.addItem(
    rec.getString("Location") + " " +
    rec.getString("Start_Time") + " " +
    rec.getString("End_Time") + " " +
    (rec.getString("Annotation")).toUpperCase()
    st.close();
    } catch (Exception e) {
    JOptionPane.showMessageDialog(frame, "The search criteria entered is not in correct format");
    } catch (Exception e) {
    JOptionPane.showMessageDialog(frame, "The search criteria entered is not in correct format");
    }

    Does anyone know how i can search a coloumn using
    multiple words without using string tokenizer I get
    all the values in the table everytime as it searches
    using " " unless you enter a string in every section.
    If you just want to search for one word it still
    displays every value in the table. That is how databases work.
    If you don't want to search on a field then you must not include it in the clause.

  • How to use ZendAMF with multiple services?

    I followed Mihai Corlan's tutorial (http://corlan.org/2008/11/13/flex-and-php-remoting-with-zend-amf/) to create a remote service with Zend AMF, and it works great.
    But, I can't figure out how to use multiple RemoteObjects. I keep getting the infamous:
               faultCode:Client.Error.DeliveryInDoubt faultString:'Channel disconnected' faultDetail:'Channel disconnected
               before an acknowledgement was received'
    I set up my second RemoteObject the same way that I set up my first one.  But, I can't get it to work.
    Any suggestions? Has anyone seen examples of multiple services being used?
    Thank you!
    -Laxmidi

    I made a stupid php error.
    If you can do a single remote, you can do multiple ones. It's straightforward.
    -Laxmidi

  • How to use Import parameters of a search help

    Hi,
    Could you please tell me how to use import & export parameters of a search help in the report.

    Hi,
    Import parameters are imported from the selection screen of the report into the search help and then these are used to query in the search help.
    For example
    case 1.
    parameters : p_carrid like sflight-carrid.
    parameters : p_connid like sflight-connid.
    the search help that is used in the above condition is
    SFLIGHT.
    And the selection method is SFLIGHT in this search help.
    ( to check which search help is used go to se11 display the table and put your cursor on the field and in the menu for goto--> search help.)
    so when you do an F4 on connid it looks for a field which is declared like SFLIGHT-CARRID ( and the value entered in it) since the SFLIGHT-CARRRID is an import parameter in the search help,  and queries the database where the value is equal to the p_carrid which is declared like SFLIGHT-CARRID and gets only data which is equal to carrid
    case 2.
    parameters : p_carrid like SCARR-carrid.
    parameters : p_connid like sflight-connid.
    In this case the system will fetch all the data.
    since there is no parameter for SFLIGHT-CARRID on the selection screen it would get all the data from SFLIGHT.

  • How to use OSD with Multiple DPs to remote locations

    Hi
    My SCCM 2012 R2 Primary site is located on my corporate office but i need to use OSD for multiple branch locations in different subnets.in My Organization there is network level DHCP server rather than Windows DHCP...
    What would be the complete configuration in this case .. can some one provide the steps..
    Shailendra Dev

    Hi,
    The best way to forward the PXE boot requests to the DP/PXE server is to use IP Helpers in the routers/switches. I assume that the branch locations are without a DP. You can use DHCP scope options in the DHCP servers as well but you will end up with problems
    when PXE-booting machines that run UEFI becuase it is not the same bootfile used and it is not really supported.
    Maybe standalone media could be an option where you have the most of the TS on a USB stick/Drive.
    Regards,>
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • How to Use "Hot Key" in the Search help

    Hi,
    Please explain how to use hot key with some example.

    TYPE-POOLS SLIS. DATA: BEGIN OF itab OCCURS 0,
            BUKRS LIKE T001-BUKRS,
            BUTXT LIKE T001-BUTXT,
          END   OF itab.
    PARAMETERS: P_BUKRS TYPE BUKRS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BUKRS. 
    PERFORM F4_FOR_BUKRS.
    FORM F4_FOR_BUKRS.   DATA: IT_FIELDCAT TYPE  SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
            ES_SELFIELD TYPE  SLIS_SELFIELD. * Get data
      SELECT BUKRS
             BUTXT
             FROM T001
             INTO TABLE itab
             up to 10 rows .
    Get field
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME     = SY-REPID
                I_INTERNAL_TABNAME = 'ITAB'
           CHANGING
                CT_FIELDCAT        = IT_FIELDCAT[].   LOOP AT IT_FIELDCAT.
        IT_FIELDCAT-KEY = SPACE.
        IF IT_FIELDCAT-FIELDNAME = 'BUTXT'.
          IT_FIELDCAT-EMPHASIZE  = 'C710'.
          IT_FIELDCAT-HOTSPOT = X.
        ENDIF.
        IF IT_FIELDCAT-FIELDNAME = 'BUKRS'.
          IT_FIELDCAT-EMPHASIZE  = 'C610'.
        ENDIF.     MODIFY IT_FIELDCAT.
      ENDLOOP.   CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
    I_TITLE                       = 'THIS IS FOR F4 IN COLOR'
          I_TABNAME                     = 'ITAB'
          IT_FIELDCAT                   = IT_FIELDCAT[]
        IMPORTING
          ES_SELFIELD                   = ES_SELFIELD
        TABLES
          T_OUTTAB                      = ITAB . ENDFORM.                    " F4_FOR_BUKRS

  • How to use TextFormat on multiple frames

    I must be missing something, but how on earth do I make it so
    that I can set TextFormats for the whole movie and not just the
    frame the actionscript is on.
    My movie is basically a video with cuepoints that trigger
    different keyframes that display text appropriate to what the
    person featured in the video is talking about. In other words it's
    like a powerpoint presentation that's run by an FLV file. Almost
    all of the blocks of text I'll be displaying are bulleted lists and
    since, for some odd reason, bulleted lists aren't available using
    the standard Flash GUI text formating tools I need to apply them
    via ActionScript. All the ActionScript is in its own keyframe at
    the beginning of the movie timeline. I've setup my text formating
    code like this:
    var bulletlist:TextFormat = new TextFormat();
    bulletlist.bullet = true;
    bulletlist_field.setTextFormat(bulletlist);
    While I have successfully applied this to a box of text on
    the first frame of the movie, I haven't be able to apply it to text
    on any other keyframe. So from what I can tell, I have to reference
    the above TextFormat actionscript for every frame I need to use it
    on, and since I can't have duplicate TextFormat values, that means
    I'd have to create a new instance with a new name for each frame.
    This seems rather inefficient and frankly ridiculous consider that
    the other ActionScript that I wrote seems to apply to the whole
    movie. And what's the point of using ActionScript to format text if
    you have to redo it for every *******' keyframe? Is there some
    function that I'm missing somewhere to allow me to use one set of
    TextFormat code on multiple frames or is this simply a dysfunction
    of Flash and/or ActionScript 3.
    Any help would be appreciated.

    Craig Grummitt - Why so it is. Thanks for pointing that out.
    But my point still remains: You can change the defaultTextFormat
    property before you assign the text property or you can use
    setTextFormat() after you have assigned the text property. That one
    is a property and the other is a method just makes it more likely
    that somebody will over look one or the other!
    fallenturtle - part of the issue is that really great
    typographic stuff is tough and most people can't even use the
    simple tools that we have. For use with CS4 and Flash 10 publishing
    they are coming out with a far more complex Text Layout Framework.
    As best I can tell it is insanely complex and I'm guessing most
    people will never use it....but who knows.
    Additionally you are trying to do one of the more difficult
    things: mix timeline with code. That always gets tricky. If you
    were just using code you could create one textformat instance and
    apply it to all your code-created text fields. But since each
    timeline created clip is a new one you will need to apply the
    formatting by hand.
    Or you could just have one timeline created text field that
    went across all your frames and then change its properties with
    code everytime you needed to change it.

  • How can I disable the instant word search while typing in the FF find bar?

    I want FF to start searching the word in the current page only after I type the word completely in the find bar and after I click the 'next' or 'previous' button, or 'Enter'...

    Thank you, Cor-el, that seems a sollution to my problem.
    I tried to download the extension, but I don't seem to get it to work. Where do I save it and how can I make it installing itself?
    I use Vista.
    I am sorry, I have never done this before... :-)

  • How to use Ajax Get Multiple Values in Tabular form?

    Hi All-
    I am trying to use AJAX to get multiple values in tabular form by using Denes Kubicek's example in the following link -
    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606::NO:::
    Basically, I want to use the drop down list to populate rest of the values on the form.
    I have created the example(Ajax Get Multiple Values, application 54522) on Oracle site -
    http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
    Workspace: iConnect
    login: demo
    password: demo
    I was able to duplicate his example on page 1 (home page).
    However, I want to use system generate tabular form to finish this example, and was not able to populate the data correctly.
    Page 2 (method 2) is the one that I am having trouble to populate the column values. When I checked application item values in Session, and the values seems to be populated correctly.
    This is what I have done on this page:
    1. Create an Application Process On Demand - Set_Multi_Items_Tabular2:
    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
      OWA_UTIL.mime_header ('text/xml', FALSE);
      HTP.p ('Cache-Control: no-cache');
      HTP.p ('Pragma: no-cache');
      OWA_UTIL.http_header_close;
      HTP.prn ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    2. Create two application items - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2
    3. Put the following in the Page Header:
    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);   
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
        get = null;
    </script>
    Add the follwing to the end of the above JavaScript:
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    var s = filter.id;
    var item = s.substring(3,8);
    var field2 = list2 + item;
    f_set_multi_items_tabular2(filter, field2);
    4. Tabular form query:
    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    5. In Book_ID_DISPLAY column attribute:
    Add the following code to element attributes: onchange="javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#');"
    Changed to -> onchange="javascript:setLOV(this,'f03');"
    Now,  T_ROWNUM2 returns value as f03_0001. But, TEMPORARY_APPLICATION_ITEM2 returns as [object HTMLSelectElement]...
    Please help me to see how I can populate the data with this tabular form format. Thanks a lot in advanced!!!
    Ling
    Updated code in Red..

    Ling
    Lets start with looking at what the javascript code is doing.
    function f_set_multi_items_tabular(pValue, pRow){
      /*This will initiate the url for the demand process to run*/
      var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
                              'APPLICATION_PROCESS=Set_Multi_Items_Tabular',0);
      if(pValue){
        /*If there is an value than submit item name with value*/
        get.add('TEMPORARY_APPLICATION_ITEM',pValue)
        get.add('T_ROWNUM',pRow)
      }else{
        /*Else set the item TEMPORARY_APPLICATION_ITEM to null*/
        get.add('TEMPORARY_APPLICATION_ITEM','null')
      /*Submit the url and te returned document is of type XML*/
      gReturn = get.get('XML');
      if(gReturn){
        /*There is something returned*/
        var l_Count = gReturn.getElementsByTagName("item").length;
        /*For all elements of the tag item*/
        for(var i = 0;i<l_Count;i++){
          /*Get the item out of the XML*/
          var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
          /*Get the id of the item*/
          var l_ID = l_Opt_Xml.getAttribute('id');
          /*Get the element in the original page with the same id as
          **the item we have in the XML produced by the ondemand process
          var l_El = html_GetElement(l_ID);
          /*Now get the value of the item form the XML*/
          if(l_Opt_Xml.firstChild){
            var l_Value = l_Opt_Xml.firstChild.nodeValue;
          }else{
            /*There is no value*/
            var l_Value = '';
          if(l_El){
            /*There is an element with the same id as the item we are processing*/
            if(l_El.tagName == 'INPUT'){
              /*The element is an input item just set the value*/
              l_El.value = l_Value;
            }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
              /*If it is a span elment and has the class grabber
              **Then set the innerHTML of the parent to the value
              **and the id of the parent to the id
              l_El.parentNode.innerHTML = l_Value;
              l_El.parentNode.id = l_ID;
            }else{
              /*Else set the value as innerHTML*/
              l_El.innerHTML = l_Value;
      get = null;
    Now where it went wrong in your initial post
    The XML that was returned by your XML process would be something like
    <body>
      <desc>this xml genericly sets multiple items</desc>
      <item id="f02_1">CSS Mastery</item>
      <item id="f03_1">22</item>
      <item id="f04_1">Andy Budd</item>
      <item id="f05_1">1</item>
    </body>
    When you don't use apex_item to create your tabular form a item in the table will look like
    <input id="f02_0001" type="text" value="CSS Mastery" maxlength="2000" size="16" name="f05" autocomplete="off">
    Notice the id's f02_1 and f02_0001 don't match.
    So to make it work the XML would have to look like
    <body>
      <desc>this xml genericly sets multiple items</desc>
      <item id="f02_0001">CSS Mastery</item>
      <item id="f03_0001">22</item>
      <item id="f04_0001">Andy Budd</item>
      <item id="f05_0001">1</item>
    </body>
    To do that simply use lpad in the ondemand process like
    HTP.prn ('<item id="f02_' || lpad(:t_rownum,4,'0') || '">' || v_subject || '</item>');
    HTP.prn ('<item id="f03_' || lpad(:t_rownum,4,'0') || '">' || v_price || '</item>');
    HTP.prn ('<item id="f04_' || lpad(:t_rownum,4,'0') || '">' || v_author || '</item>');
    HTP.prn ('<item id="f05_' || lpad(:t_rownum,4,'0') || '">' || v_qty || '</item>');
    Keep in mind that the above is based on your original post and #ROWNUM# not being lpadded with zero's.
    Nicolette

  • How to use p_mainsearch parameter in basic search for a report with bind variable?

    Hello,
    I'd like to extend the basic-search in content-area elements to extra records in my own tables.
    So I'd like to use the p_mainsearch-urlparameter (which holds the searchtext of a basic search) into a bind variable of my own report. My report will be on an extra tab on the search-page.
    Especially I don't know how to transfer the value of p_mainsearch into the bind variable of the report.
    Has anyone done that so far?
    Example?
    Thank you,
    Joerg

    I found out the following way:
    1.)Report
    1.1)SQL-Query:
    select * from <owner>.<tablename> where UPPER(column) like '%'||UPPER(NVL(:searchtext,'abczyx123098'))||'%'
    (Note: bind variable is :searchtext).
    1.2)in "before displaying page"-section in "additional plsql" add the following:
    if length(get_value('p_mainsearch')) >= 3 then
    portal30.wwv_name_value.replace_value(
    l_arg_names, l_arg_values, p_reference_path||'.searchtext,
    portal30.wwv_standard_util.string_to_table2(get_value('p_mainsearch')));
    end if;
    1.3) publish as portlet
    2.) Integrate the report-portlet into a new tab on search page. Run basic search.
    Change to the tab with the portlet.
    For me it is solved.
    Joerg.

  • How to use DirectCast for multiple selected rows?

    Hi<o:p></o:p>
    Me.SecondBindingSource.DataSource = DirectCast(parentForm.FirstBindingSource.Current, DataRowView) works perfect for single items but how do I do it if I've selected multiple rows on datagridOne and want to pass only the selected rows to datagridTwo using DirectCast? 
    Me.SecondBindingSource.DataSource = DirectCast(main.FirstBindingSource.Current, DataRowCollection) does not work??<o:p></o:p>

    You have to put the rows into a datatable.  It is usually best if your original source is a datatable.  The filter the original datatable.  The selected rows of the datagrid are the same row numbers in the source datatable.
    jdweng

  • How to use IWEB for multiple websites?

    Okay.
    I have two websites. One on a 3rd party, one on .MAC.
    Computer 1 = .MAC website
    Computer 2= 3rd party website
    I want to use computer 2 to edit my .MAC website and moved the DOMAIN file but haven't open it in iWEB on the second computer as I need to know how to open and not destroy the 3rd party website.
    How is this done?
    Thanks.

    You can rename the domain file to something descriptive of the site and open them manually. But I find it much safer to use iWebSites for managing multiple sites, over 25. I use iWebSites to manage multiple sites.. It lets me create multiple sites and multiple domain files.
    If you have multiple sites in one domain file here's the workflow I used to split them into individual site files with iWebSites. Be sure to make a backup copy of your original Domain.sites files before starting the splitting process.
    This lets me edit several sites and only republish the one I want.

  • How to use "Mail Merge for Word" to include only Account fields?

    We're attempting to use the Mail Merge for Word template to create a document containing several fields from the Account object. We do not need any fields from the Contact object, and there are many contacts linked to each account.
    When choosing "Get On Demand Data > Accounts", removing all the [Contacts] fields, selecting the necessary [Accounts] fields, then clicking "OK", a "List Download in Progress" window appears, followed by one that says "Microsoft Word - Subscript out of range". None of the [Accounts] fields are available in the downloaded data.
    Can anyone tell me how to include the appropriate Account fields without any Contact fields (which pulls a separate Merge record for every Contact linked with the selected Account)?
    Thanks.

    Thanks for trying to help with this.
    So far, we've been unable to pull even a SINGLE account record. So the problem is not related to data volume limitations. The tool seems to require that Contacts are selected, but for this application we only want a single merge document per Account.
    If anyone else has had success using the Mail Merge for Word tool to pull only Account data, please give us your guidance. Thanks.

  • How to use a standard library binary search if I'm not searching for a key?

    Hi all,
    I'm looking for the tidiest way to code something with maximum use of the standard libraries. I have a sorted set of ints that represent quality levels (let's call the set qualSet ). I want to find the maximum quality level (choosing only from those within qualSet ) for a limited budget. I have a method isAffordable(int) that returns boolean. So one way to find the highest affordable quality is to start at the lowest quality level, iterate through qualSet (it is sorted), and wait until the first time that isAffordable returns false. eg.
    int i=-1;
    for (int qual : qualSet) {
         if !(isAffordable(qual))
              return i;
         i++;
    }However isAffordable is a slightly complicated fn, so I'd like to use a binary search to make the process more efficient. I don't want to write the code for a binary search as that is something that should be reused, ideally from the standard libraries. So my question is what's the best way of reusing standard library code in this situation so as to not write my own binary search?
    I have a solution, but I don't find it very elegant. Here are the important classes and objects.
    //simple wrapper for an int representing quality level
    class QualityElement implements Comparable<QualityElement>
    //element to use to search for highest quality
    class HiQualFinderEl extends QualityElement {
         HiQualFinderEl(ComponentList cl) {...}
    //class that contains fair amount of data and isAffordable method
    class ComponentList {
         boolean isAffordable(int qual) {...}
    //sorted set of QualityElements
    TreeSet<QualityElement> qualSet When you create an instance of HiQualFinderEl, you pass it a reference to a ComponentList (because it has the isAffordable() method). The HiQualFinderEl.compareTo() function returns 1 or -1 depending on whether the QualityElement being compared to is affordable or not. This approach means that the binary search returns an appropriate insertion point within the list (it will never act as if it found the key).
    I don't like this because semantically the HiQualFinderEl is not really an element of the list, it's certainly not a QualityElement (but it inherits from it), and it just feels ugly! Any clever suggestions? Btw, I'm new to Java, old to C++.
    If this is unclear pls ask,
    Andy

    Thanks Peter for the reply
    Peter__Lawrey wrote:
    you are not looking for a standard binary searchI'm not using a binary search in the very common I'm searching for a particular key sense, which is the Collections.binarySearch sense. But binary searches are used in other situations as well. In this case I'm finding a local maximum of a function, I could also be solving f(x)=0... is there a nice generic way to handle other uses of binary search that anyone knows of?
    I would just copy the code from Collections.binarySearch and modify itI have this thing about reusing; just can't bring myself to do that :)
    It would be quicker and more efficient than trying to shoe horn a solution which expects a trinary result.Not sure I understand the last bit. Are you referring to my bastardised compareTo method with only two results? If so, I know, it is ugly! I don't see how it could be less efficient though???
    Thanks,
    Andy

  • How to use saveas webarchive in word using OLE2

    Hello,
    I am using the webutil word demo (without webutil) on the client. This demo is working fine.
    Now I like to save the file not as a word document, but as a WebArchive or html file. How can I pass the fileformat argument to the saveas invoke call. Or is there a other way to do this using ole2.
    Below the demo code.
    Thanks in advance,
    Fred.
    DECLARE
    app OLE2.OBJ_TYPE;
    docs OLE2.OBJ_TYPE;
    doc OLE2.OBJ_TYPE;
    selection OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    BEGIN
    -- create a new document
    app := OLE2.CREATE_OBJ('Word.Application');
    OLE2.SET_PROPERTY (app,'Visible',1);
    docs := OLE2.GET_OBJ_PROPERTY(app, 'Documents');
    doc := OLE2.INVOKE_OBJ(docs, 'add');
    selection := OLE2.GET_OBJ_PROPERTY(app, 'Selection');
    -- insert data into new document from long item
    OLE2.SET_PROPERTY(selection, 'Text', 'this is a test message');
    -- save document as example.tmp
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'c:\example.doc');
    OLE2.INVOKE(doc, 'SaveAs', args);
    OLE2.DESTROY_ARGLIST (args);
    -- close example.tmp
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 0);
    OLE2.INVOKE(doc, 'Close', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.RELEASE_OBJ(selection);
    OLE2.RELEASE_OBJ(doc);
    OLE2.RELEASE_OBJ (docs);
    Using OLE Commands
    OLE2.INVOKE(app,'Quit');
    END;

    Hi Fred,
    Word's SaveAs() method takes file format as it's second argument. The following code snippet shows how to save as HTML:
      args := OLE2.CREATE_ARGLIST;
      OLE2.ADD_ARG(args, 'c:\example.html');
      OLE2.ADD_ARG(args, 8);
      OLE2.INVOKE(doc, 'SaveAs', args);Eric Adamson
    Lansing, Michigan

Maybe you are looking for

  • HT1529 I accidentally reset my iPad, how do I get my movies back?

    I purchased a Mac pro today and when I went to sync my iPad I rest my iPad accidentally and now don't know how to get my movies back?

  • Consolidation of Financials

    Hi All, I have a very basic question on consolidation of financials. Co. B is incorporated in India and follows April - March fiscal period. It has a 100% subsidiary Co. B incorporated in a country that follows July-June fiscal year. In SAP, as I und

  • 17" iMac G5 no longer available

    There are no more 17" iMac G5's in the applestores online. but can still be found at Amazon

  • ATRRIBUTES IS NOT DIPLAY AT REPORITNG

    HI ONE AND ALL, I HAVE CREATE THE REPORT WITH MASTER DATA ATTRIBUTES.I DRAG THE CHARACTERISTICS TO COLUMN PANEL. AND INCLUDE THE ATTRIBUTES AT CHARACTERISTICS.WHEN RUN TIME DISPLAY IS NOT ASSIGNED.WHERE I WANT TO ASSIGN THE DATA THANKS,

  • Dependencies for speed of new generation gc

    I have two applications, doing very similar thing (they are both routing data from one source to another). They have almost the same number of thing to process per second, they are both done with a lot of shared code. Unfortunately, I can observe big