Syntax to trim a word

wats the syntax to trim a value whhich contains text

Hi Use Condense as follows....
CONDENSE
Syntax
CONDENSE text [NO-GAPS].
Effect
Condenses the character string in text by removing leading and closing blanks and replaces multiple consecutive blanks with one space character.
Additions
NO-GAPS
Removes all blanks from the character string.
Regards
Karthik D

Similar Messages

  • 3.0EA1: syntax colors for reserved words and a shortcut for compile

    Hello,
    only two notes/questions:
    1. If syntax coloring is enabled, do you get your information about the words from V$RESERVED_WORDS? Is it possible for you to enhance these reserverd words (for example from a separate file) to take care of the following datatypes not defined in V$RESERVED_WORDS (especially the pl/sql-types)?:
    any types: anydata, anydataset, anytype
    xml types: uritype
    spatial types: sdo_geometry, sdo_georaster, ...
    media types: ordaudio, ordimage, ...
    pl/sql types: pls_integer, binary_integer, simple_integer, boolean
    2. Is it possible to get a shortcut for compiling? There are so many shortcuts defined, but when you write code you have to take the mouse and klick on the toolbar to compile/compile for debug (or do i miss the entry in the preferences?).
    Thank you
    Markus

    I forwarded this on the the correct developers they should reply here shortly.
    Syme

  • Error While creating a rule for trimming spaces

    Hi All,
    Please can you tell me the correct syntax for trimming the Spaces from the beginning of the word.
    I tried like this but it is giving error as below:
    BEGIN RETURN
    ltrim($SPACES_TRIM, '');
    END
    ERROR:  The return statement is expected to return a conditional value: found type<VARCHAR>. (COR-10622)
    Please do help me its urgent.
    Thanks & Regards,
    DJ

    Hi Deepak,
    when you create validation rules they always have to return TRUE or FALSE conditions. (A record can pass or fail your expression.
    So your expression above returns a VARCHAR string, as you can read in the User guide, you are replacing leading nothing '' at the beginning of your string $SPACES_TRIM.
    You need to understand basic concept for validation rule expressions and use of functions.
    There are lots of great product tutorials here on the SCN, that describe scope, features and functionalities of Information Steward, so you got a understanding of what you can do with IS.
    NIels

  • When I am on facebook I continually get a syntax error message which keeps coming back. I have checked my settings and enabled java script but doesnt help.

    I can access my facebook account with no trouble, but once facebook is loaded I repeatedly get an error message; syntax error. The words 'Java Script application' are in the bar across the top of the message. It comes up many times and completely disrupts what I am doing. I am wondering if ot has something to do with the adverts in the side bar of each page that I open in facebook. If I open FB from Google Chrome I don't get that problem, or in Explorer, but I would rather use Firefox. Help would be apprecitaed, please. Thanks.

    hello, first of all please [https://www.mozilla.org/firefox/update/ update firefox to the latest version]. the errors you're getting are likely coming from the socialfixer addon that you've installed - there's also an updated version of the extension available which fixes these kind of issues: http://socialfixer.com/blog/category/releasenotes/

  • FDM Mapping SPLIT/TRIM/JOIN fields

    Hi All
    I am using FDM to Transform a flat file to a new data file. I am a newbie in FDM.
    Can anybody tell me the syntax for trimming/splitting the source field in to the target file in FDM mapping.
    For Example:
    In my source, the feild 'Product' has string "uranium FGIM (10010)
    But on the target file, I need only the product code '10010' How do i trim this feild to get the desired output file.
    Kindly let me know the syntax of the mapping.
    Thank you,
    JK

    You can either do this as part of the mapping process or you can use an import script to parse out the desired value during the import.
    If you do it in the mapping simply use your original full product string as the source and set the trimmed value as the target i.e. using explicit maps
    In the import script use logic similar to your example to parse out the portion of the original product string you wish to pass as the source value. However you must ensure this logic is generic and will work consistently over all product strings.
    From your criteria I imagine the mapping approach would be the simplest and easiest to manage solution

  • Working with word from form5

    when we creating word docoment from forms
    using ole2, we can use two syntaxes,
    1) create_object(app,'WORD.APPLICATION');
    2) create_object(app,'WORD.BASIC');
    I HAVE two Questions
    1) what is the difference between both
    2) how we can maximaize the word docoment using "WORD.BASIC"
    null

    Moshe,
    Try this code:
    ii_count=oleword.ActiveDocument.Bookmarks.Count
    for ii_bookmarks =1 to ii_count
    ls_bookmark=oleword.ActiveDocument.bookmarks[ii_bookmarks].name
    next
    Thanks,
    Beverly Duquette

  • Please help explain strange behaviour of progressive relaxation..

    Hello
    I am building theo Oracle text querry and I stumbled on a behaviour which I cannot explain...
    here is the topo:
    I have created a synonym thusly:
    ctx_thes.create_relation('GR_THESAURUS','LEBOURGNEUF','SYN','BOURGNEUF');
    when I issue this select:
    SELECT      SCORE(1) NIVEAU_RECHERCHE, NOM,NO_MATRC,NO_NOM_REGST
    FROM DUMMY
    WHERE CONTAINS(nom, 'SYN(LEBOURGNEUF, GR_THESAURUS)', 1) > 0 ;
    I get the expected result set which containsentries with either 'LEBOURGNEUF' or 'BOURGNEUF'. So far so good.
    Now, when I combine search criterias using progressive relaxation, thus:
    SELECT SCORE(1) NIVEAU_RECHERCHE, DUMMY.NO_MATRC,DUMMY.NO_NOM_REGST,DUMMY.NOM
    FROM DUMMY
    WHERE CONTAINS(nom, '<query>
    <textquery lang="FRENCH" grammar="CONTEXT">LEBOURGNEUF golf
    <progression>
    <seq><rewrite>transform((TOKENS, "{", "}", "AND"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", "OR"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    </progression>
    </textquery>
    <score datatype="INTEGER" algorithm="DEFAULT"/>
    </query>', 1) > 0;
    I do NOT get any results matching synonym 'BOURGNEUF'.. only those with 'LEBOURGNEUF' are returned...
    further, if I intentionaly make a syntax error in the line
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    say like this:
    <seq><rewrite>transform((TOKENS, "xSYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    no error is returned and I get the same result set...
    so this leads me to conclude that only the first two lines of the query are parsed/executed...
    does anyone here have any ideas what is going one here?
    in the preceding quire I neeed to add
                                                      <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "AND"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "SYN(", ",GR_THESAURUS)", "OR"))</rewrite></seq>
    and possibly
    <seq><rewrite>transform((TOKENS, "NT(", ",2,GR_THESAURUS)", "OR"))</rewrite></seq>
    can this be done???
    why is there no errors when I execute the query (in sqldeveloper) ???
    any hints will be greatly appreciated!
    Cheers
    Edited by: user8848610 on 2009-10-29 07:46

    now it works... although the simpler and cleaner solution of using transform would have been perfect, this function does a somewhat adequate job... I put it here so maybe it will help others ;)
         FUNCTION BuildSearchPredicate (texte IN NOM_ASSJT.NOM%TYPE) RETURN VARCHAR2 IS
         sSQL VARCHAR2(5000);
         sSeq1 VARCHAR2(1000);
         sSeq2 VARCHAR2(1000);
         sSeq3 VARCHAR2(1000);
         iFirst NUMBER(1);
         iPosition NUMBER;
         iToken NUMBER;
         CURSOR curWords(line_text IN VARCHAR2)      IS      
                   select regexp_substr(line_text, '[^ ]+', 1, level) word
                   from dual
                   connect by regexp_substr(line_text, '[^ ]+', 1, level) is not null;
         BEGIN
         sSQL := sSQL || '<query><textquery lang="FRENCH" grammar="CONTEXT"><progression> ';
         sSeq1 := '';
         iFirst := 1;
         iToken := 0;
         FOR r_curWord IN curWords(texte)
         LOOP
         iToken := iToken + 1;
         IF iFirst = 0 THEN
                   sSeq1 := sSeq1 || ' AND {' || trim(r_curWord.word) || '}';
                   sSeq2 := sSeq2 || ' OR {' || trim(r_curWord.word) || '}';
                   sSeq3 := sSeq3 || ' OR SYN(' || trim(r_curWord.word) || ',GR_THESAURUS)';
              ELSE
                   sSeq1 := '{' || trim(r_curWord.word) || '}';
                   sSeq2 := '{' || trim(r_curWord.word) || '}';
                   sSeq3 := 'SYN(' || trim(r_curWord.word) || ',GR_THESAURUS)';
                   iFirst := 0;
              END IF;
         END LOOP;
         sSQL := sSQL || '<seq>' || sSeq1 || '</seq>';
         iPosition := instr(sSeq1, ' AND ');
         IF instr(sSeq1, ' AND ',iPosition + 1) > 0 THEN -- we must have at least 2 AND operator for this to make sense
              WHILE iPosition > 0
              LOOP
    IF instr(substr(sSeq1, iPosition + 5), ' AND ') > 0 THEN
    sSQL := sSQL || '<seq>' || substr(sSeq1, iPosition + 5) || '</seq>';
    END IF;
                   iPosition := instr(sSeq1, ' AND ', iPosition + 1);
              END LOOP;
         END IF;
         IF iToken > 1 THEN -- no use in having OR if there is only one word
              sSQL := sSQL || '<seq>' || sSeq2 || '</seq>';
         END IF;
         sSQL := sSQL || '<seq>' || sSeq3 || '</seq>';
         RETURN sSql;
         END BuildSearchPredicate;     
    END GR_RECH;
    this will combine search words using AND and OR and SYN like so:
    SELECT GR_RECH.BuildSearchPredicate('LEBOURGNEUF GOLF') FROM DUAL;
    will result in :
    <query><textquery lang="FRENCH" grammar="CONTEXT"><progression> <seq>{LEBOURGNEUF} AND {GOLF}</seq><seq>{LEBOURGNEUF} OR {GOLF}</seq><seq>SYN(LEBOURGNEUF,GR_THESAURUS) OR SYN(GOLF,GR_THESAURUS)</seq>
    thanks for you help!
    cheers
    gth

  • Session Time Out For UNLOGGED IN USER During Search -pls help SIR!

    Hi,
    The problem lies in searchresultscontroller.java/searchcontroller.java file under search/web/handler of an application that supports educational note sharing.
    The problem is that -
    When I search with query strings in different fields(as you will find in the above mentioned java files)..the keywords in resourcedto and get some files as search results.
    Then I click on one of the file from within the search result and visit the file.
    Here if I m logged in as an user, and the session time out is set to 1 minute in the web.xml file of the web folder not the admin folder then when I hit the BACK TO SEARCH button it easily goes back to the previous search result page along with the queries string that I had input previously.
    The problem is that when I m NOT LOGGED in as an user, and I've performed a search with queries and other dropdowns in the search panel, I get the search result page, I visit the file by clicking on one of them but when I hit the BACK TO SEARCH button I don't see the previous search result page from where I had navigated to view the file.
    Please suggest on what changes shall I make in the code so that even if I m not logged in as an user, I get back to the search result page on hitting the BACK TO SEARCH button from the file view page.Sir I m herein pasting the code of the searchresultscontroller.java file, but please feel free to ask for anyother file whose code you might want to see.SEARCHRESULTSCONTROLLER.JAVA FILE CONTENT-
    package com.mgh.sps.search.web.handler;
    import java.util.Map;
    import java.util.regex.Pattern;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.log4j.Logger;
    import org.springframework.validation.BindException;
    import org.springframework.validation.Errors;
    import org.springframework.web.servlet.ModelAndView;
    import org.springframework.web.servlet.mvc.SimpleFormController;
    import com.mgh.sps.search.business.facade.Search;
    import com.mgh.sps.common.dto.ResourceDTO;
    import com.mgh.sps.common.util.SessionAttributeKey;
    import com.mgh.sps.common.util.SessionManager;
    import com.mgh.sps.fileusage.web.constants.FileUsageWebConstants;
    public class SearchResultsController extends SimpleFormController {
    * SearchResults Controller
    * @author Muralikrishna.s
    * @Codedondate DD-MM-YY=26-07-07
    * @Usecase/s associated =UC504
    private static final Logger logger = Logger
    .getLogger(SearchResultsController.class.getName());
    private final static String REG_EXP = "^[A-Za-z0-9]*$";
    private final static Pattern EMAIL_PATTERN_REG = Pattern.compile(REG_EXP);
    * Spring framework method used to hold reference data
    * @param request
    * HttpServletRequest
    * @param command
    * Object
    * @param arg2
    * Errors
    * @return Map
    * @throws Exception
    @Override
    protected Map referenceData(HttpServletRequest request, Object command,
    Errors errors) throws Exception {
    logger.debug("SearchResultsController.referenceData() method entered:"
    + request + "," + command + "," + errors);
    SessionManager.setSessionAttribute(SessionAttributeKey.tabIndex,
    FileUsageWebConstants.TAB_SEARCH, request);
    Search search = (Search) super.getWebApplicationContext().getBean(
    "searchfacade");
    ResourceDTO resourceDto = (ResourceDTO) command;
    String[] allValues = new String[7];
    if (null != (String[]) SessionManager.getSessionAttribute(
    SessionAttributeKey.allValues, request)) {
    allValues = (String[]) SessionManager.getSessionAttribute(
    SessionAttributeKey.allValues, request);
    resourceDto.setKeywords(allValues[0]);
    resourceDto.setCountry(allValues[1]);
    resourceDto.setUniversityName(allValues[2]);
    resourceDto.setSubjectArea(allValues[3]);
    resourceDto.setQualification(allValues[4]);
    resourceDto.setYearLevel(allValues[5]);
    resourceDto.setSpecificType(allValues[6]);
    logger.debug("%%%%%%%%%%%%%%%%%qualification%%%%%%%%%%%%%%%"
    + resourceDto.getQualification());
    String flag = (String) request.getParameter("id");
    resourceDto.setFlag(flag);
    logger.debug("SearchResultsController.referenceData() method exited:");
    return search.retrieveReferenceData(resourceDto);
    * Spring framework method used to hold OnSubmit
    * @param request
    * HttpServletRequest
    * @param response
    * HttpServletResponse
    * @param command
    * Object
    * @param arg3
    * BindException
    * @return ModelAndView
    * @throws Exception
    @Override
    protected ModelAndView onSubmit(HttpServletRequest request,
    HttpServletResponse response, Object command, BindException errors)
    throws Exception {
    SessionManager.cleanup(request);
    logger.debug("SearchResultsController.onSubmit() method entered:"
    + request + "," + command + "," + response + "," + errors);
    Search search = (Search) super.getWebApplicationContext().getBean(
    "searchfacade");
    Map dynamic = (Map) getServletContext().getAttribute("config");
    ResourceDTO resourceDto = (ResourceDTO) command;
    SessionManager.removeSessionAttribute(SessionAttributeKey.allValues,
    request);
    //changed by sreelatha on sep21
    //resourceDto.setKeywords(request.getParameter("keywords"));
    //String key = request.getParameter("keywords");
    //logger.debug("&&&&&&&&&&&&& key &&&&&&&&&&&&" + key);
    String keywords = (request.getParameter("keywords"));
    if(null!=keywords) {
    keywords = keywords.trim();
    resourceDto.setKeywords(keywords);
    // changes end
    resourceDto.setUniversityName(request.getParameter("universityName"));
    resourceDto.setSubjectArea(request.getParameter("subjectArea"));
    resourceDto.setCountry(request.getParameter("country"));
    resourceDto.setQualification(request.getParameter("qualification"));
    resourceDto.setYearLevel(request.getParameter("yearLevel"));
    resourceDto.setSpecificType(request.getParameter("specificType"));
    String[] allValues = new String[7];
    //changed by sreelatha on sep21
    //allValues[0] = request.getParameter("keywords");
    allValues[0] = resourceDto.getKeywords();
    //changes end
    allValues[1] = request.getParameter("country");
    allValues[2] = request.getParameter("universityName");
    allValues[3] = request.getParameter("subjectArea");
    allValues[4] = request.getParameter("qualification");
    allValues[5] = request.getParameter("yearLevel");
    allValues[6] = request.getParameter("specificType");
    SessionManager.setSessionAttribute(SessionAttributeKey.allValues,
    allValues, request);
    if(null!=keywords) {
    keywords = keywords.trim();
    String words="";
    for(int i=0;i<keywords.length();i++) {
    String key=String.valueOf(keywords.charAt(i));
    if(key.contains("*")) {
    key = key.replace("*"," ");
    } else if(key.contains("?")) {
    key = key.replace("?"," ");
    } else if(key.contains("[")) {
    key = key.replace("["," ");
    } else if(key.contains("{")) {
    key = key.replace("{"," ");
    } else if(key.contains("(")) {
    key = key.replace("("," ");
    } else if(key.contains(")")) {
    key = key.replace(")"," ");
    } else if(key.contains("+")) {
    key = key.replace("+"," ");
    } else if(key.contains("
    key = key.replace("
    } else if(key.contains(" ")) {
    key = key.replace(" "," ");
    } else if(key.contains("_")) {
    key = key.replace("","");
    } else if(!EMAIL_PATTERN_REG.matcher(key).matches()) {
    key = key.replaceAll(key," ");
    words = words + key;
    keywords = words;
    resourceDto.setKeywords(keywords);
    SessionManager.setSessionAttribute(SessionAttributeKey.test, search.setInputValues(resourceDto, dynamic), request);
    String name = (String) SessionManager.getSessionAttribute(SessionAttributeKey.tempName, request);
    String flag1 = request.getParameter("id");
    String status="";
    if (flag1 !=null && flag1.equals("loggedInUser"))
    if(name==null)
    return new ModelAndView();
    if (flag1 !=null && flag1.equals("loggedInUser")){
    status = "redirect:SearchResults.htm?id=loggedInUser";
    }else if(flag1 !=null && flag1.equals("nonLoggedInUser"))
    status = "redirect:SearchResultsnlu.htm?id=nonLoggedInUser";
    super.setSuccessView(status);
    ModelAndView mav = new ModelAndView(super.getSuccessView());
    logger.debug("SearchResultsController.onSubmit() method exited:");
    return mav;
    }

    Cross-posted in many forums. Don't answer this one.

  • Session Time Out For UNLOGGED USER During Search -pls help

    Hi,
    The problem lies in searchresultscontroller.java/searchcontroller.java file under search/web/handler of an application that supports educational note sharing.
    The problem is that -
    When I search with query strings in different fields(as you will find in the above mentioned java files)..the keywords in resourcedto and get some files as search results.
    Then I click on one of the file from within the search result and visit the file.
    Here if I m logged in as an user, and the session time out is set to 1 minute in the web.xml file of the web folder not the admin folder then when I hit the BACK TO SEARCH button it easily goes back to the previous search result page along with the queries string that I had input previously.
    The problem is that when I m NOT LOGGED in as an user, and I've performed a search with queries and other dropdowns in the search panel, I get the search result page, I visit the file by clicking on one of them but when I hit the BACK TO SEARCH button I don't see the previous search result page from where I had navigated to view the file.
    Please suggest on what changes shall I make in the code so that even if I m not logged in as an user, I get back to the search result page on hitting the BACK TO SEARCH button from the file view page.Sir I m herein pasting the code of the searchresultscontroller.java file, but please feel free to ask for anyother file whose code you might want to see.
    SEARCHRESULTSCONTROLLER.JAVA FILE CONTENT-
    package com.mgh.sps.search.web.handler;
    import java.util.Map;
    import java.util.regex.Pattern;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.log4j.Logger;
    import org.springframework.validation.BindException;
    import org.springframework.validation.Errors;
    import org.springframework.web.servlet.ModelAndView;
    import org.springframework.web.servlet.mvc.SimpleFormController;
    import com.mgh.sps.search.business.facade.Search;
    import com.mgh.sps.common.dto.ResourceDTO;
    import com.mgh.sps.common.util.SessionAttributeKey;
    import com.mgh.sps.common.util.SessionManager;
    import com.mgh.sps.fileusage.web.constants.FileUsageWebConstants;
    public class SearchResultsController extends SimpleFormController {
         * SearchResults Controller
         * @author Muralikrishna.s
         * @Codedondate DD-MM-YY=26-07-07
         * @Usecase/s associated =UC504
         private static final Logger logger = Logger
                   .getLogger(SearchResultsController.class.getName());
         private final static String REG_EXP = "^[A-Za-z0-9]*$";
         private final static Pattern EMAIL_PATTERN_REG = Pattern.compile(REG_EXP);
         * Spring framework method used to hold reference data
         * @param request
         * HttpServletRequest
         * @param command
         * Object
         * @param arg2
         * Errors
         * @return Map
         * @throws Exception
         @Override
         protected Map referenceData(HttpServletRequest request, Object command,
                   Errors errors) throws Exception {
              logger.debug("SearchResultsController.referenceData() method entered:"
                        + request + "," + command + "," + errors);
              SessionManager.setSessionAttribute(SessionAttributeKey.tabIndex,
                        FileUsageWebConstants.TAB_SEARCH, request);
              Search search = (Search) super.getWebApplicationContext().getBean(
                        "searchfacade");
              ResourceDTO resourceDto = (ResourceDTO) command;
              String[] allValues = new String[7];
              if (null != (String[]) SessionManager.getSessionAttribute(
                        SessionAttributeKey.allValues, request)) {
                   allValues = (String[]) SessionManager.getSessionAttribute(
                             SessionAttributeKey.allValues, request);
                   resourceDto.setKeywords(allValues[0]);
                   resourceDto.setCountry(allValues[1]);
                   resourceDto.setUniversityName(allValues[2]);
                   resourceDto.setSubjectArea(allValues[3]);
                   resourceDto.setQualification(allValues[4]);
                   resourceDto.setYearLevel(allValues[5]);
                   resourceDto.setSpecificType(allValues[6]);
              logger.debug("%%%%%%%%%%%%%%%%%qualification%%%%%%%%%%%%%%%"
                        + resourceDto.getQualification());
              String flag = (String) request.getParameter("id");
              resourceDto.setFlag(flag);
              logger.debug("SearchResultsController.referenceData() method exited:");
              return search.retrieveReferenceData(resourceDto);
         * Spring framework method used to hold OnSubmit
         * @param request
         * HttpServletRequest
         * @param response
         * HttpServletResponse
         * @param command
         * Object
         * @param arg3
         * BindException
         * @return ModelAndView
         * @throws Exception
         @Override
         protected ModelAndView onSubmit(HttpServletRequest request,
                   HttpServletResponse response, Object command, BindException errors)
                   throws Exception {
              SessionManager.cleanup(request);
              logger.debug("SearchResultsController.onSubmit() method entered:"
                        + request + "," + command + "," + response + "," + errors);
              Search search = (Search) super.getWebApplicationContext().getBean(
                        "searchfacade");
              Map dynamic = (Map) getServletContext().getAttribute("config");
              ResourceDTO resourceDto = (ResourceDTO) command;
              SessionManager.removeSessionAttribute(SessionAttributeKey.allValues,
                        request);
              //changed by sreelatha on sep21
              //resourceDto.setKeywords(request.getParameter("keywords"));
              //String key = request.getParameter("keywords");
              //logger.debug("&&&&&&&&&&&&& key &&&&&&&&&&&&" + key);
              String keywords = (request.getParameter("keywords"));
              if(null!=keywords) {
                   keywords = keywords.trim();
              resourceDto.setKeywords(keywords);
    //          changes end
              resourceDto.setUniversityName(request.getParameter("universityName"));
              resourceDto.setSubjectArea(request.getParameter("subjectArea"));
              resourceDto.setCountry(request.getParameter("country"));
              resourceDto.setQualification(request.getParameter("qualification"));
              resourceDto.setYearLevel(request.getParameter("yearLevel"));
              resourceDto.setSpecificType(request.getParameter("specificType"));
              String[] allValues = new String[7];
              //changed by sreelatha on sep21
              //allValues[0] = request.getParameter("keywords");
              allValues[0] = resourceDto.getKeywords();
              //changes end
              allValues[1] = request.getParameter("country");
              allValues[2] = request.getParameter("universityName");
              allValues[3] = request.getParameter("subjectArea");
              allValues[4] = request.getParameter("qualification");
              allValues[5] = request.getParameter("yearLevel");
              allValues[6] = request.getParameter("specificType");
              SessionManager.setSessionAttribute(SessionAttributeKey.allValues,
                        allValues, request);
                   if(null!=keywords) {
                   keywords = keywords.trim();
                   String words="";
                   for(int i=0;i<keywords.length();i++) {               
                        String key=String.valueOf(keywords.charAt(i));
                        if(key.contains("*")) {
                                  key = key.replace("*"," ");
                             } else if(key.contains("?")) {
                                  key = key.replace("?"," ");
                             } else if(key.contains("[")) {
                                  key = key.replace("["," ");
                             } else if(key.contains("{")) {
                                  key = key.replace("{"," ");
                             } else if(key.contains("(")) {
                                  key = key.replace("("," ");
                             } else if(key.contains(")")) {
                                  key = key.replace(")"," ");
                             } else if(key.contains("+")) {
                                  key = key.replace("+"," ");
                             } else if(key.contains("\\")) {
                                  key = key.replace("\\"," ");
                             } else if(key.contains(" ")) {
                                  key = key.replace(" "," ");
                             } else if(key.contains("_")) {
                                  key = key.replace("_","_");
                             } else if(!EMAIL_PATTERN_REG.matcher(key).matches()) {
                                  key = key.replaceAll(key," ");
                        words = words + key;
                   keywords = words;
                   resourceDto.setKeywords(keywords);
              SessionManager.setSessionAttribute(SessionAttributeKey.test, search.setInputValues(resourceDto, dynamic), request);
              String name = (String) SessionManager.getSessionAttribute(SessionAttributeKey.tempName, request);
              String flag1 = request.getParameter("id");
              String status="";
              if (flag1 !=null && flag1.equals("loggedInUser"))
              if(name==null)
                        return new ModelAndView();
              if (flag1 !=null && flag1.equals("loggedInUser")){
                   status = "redirect:SearchResults.htm?id=loggedInUser";
              }else if(flag1 !=null && flag1.equals("nonLoggedInUser"))
                   status = "redirect:SearchResultsnlu.htm?id=nonLoggedInUser";     
              super.setSuccessView(status);
              ModelAndView mav = new ModelAndView(super.getSuccessView());
              logger.debug("SearchResultsController.onSubmit() method exited:");
              return mav;
    }

    Cross-posted in many forums. Don't answer this one.

  • Deleting block from internal table with AT / ENDAT

    Hi.
    I have the following code:
    sort itab by pred_doc.
    loop at itab into wa_cust.
    At end of pred_doc.
    sum.
    write :/ wa_cust-pred_doc, wa_cust-amount.
    if wa_cust-amount = 0.
    Delete entire block of this pred_doc
    endif.
    endat.
    endloop.
    Within that "IF" statement, I want to delete the entire block (all entries with that pred_doc).  How do I do this?  I'm not sure of the syntax.  In other words, I just need to do subtotals of the internal table by pred_doc on amount.  If the subtotal equals zero, the records for that pred_doc need to be removed from the internal table. 
    Thanks,
    Clay

    Hi,
    I agree with Rob. Use two internal tables for this purpose.
    data: itab1 like itab. New internal table which will hold the required entries
    sort itab by pred_doc.
    loop at itab into wa_cust.
    At end of pred_doc.
    sum.
    write :/ wa_cust-pred_doc, wa_cust-amount.
    if wa_cust-amount ne 0. " If the workarea has the subtotal entry with amount not equal to zero, then transfer it to a new internal table
    append wa_cust to itab1
    endif.
    endat.
    endloop.
    Now itab1 will contain your required entries. But please note that this will be the 'summed up' entries and not the the individual entries before summing up.
    Hope this helps!
    Cheers,
    Mahesh

  • Specify handler for a logger in properties file

    Hello All,
    Is there a way of specifying a specific handler for a specific logger within the logging.properties file? I have not been able to find any documentation on the logging.properties file settings. I am looking for something like this:
    com.eric.program.handlers = java.util.logging.ConsoleHandler
    com.frank.handlers = java.util.logging.FileHandler
    I would rather keep all my settings within this properties file instead of coding it. If you know where I can find some documentation, please let me know. I am using J2SE 1.4.1.
    Thanks.

    Well, after failing to assign a handler to a specific logger, I checked the LogManager source code and, alas, it only supports assigning handlers to the root logger.
    What a bummer ... I think this is a real flaw in the LogManager design, especially since log4j supports assigning appenders to specific logger.
    The (more or less) good news is that LogManager is designed for subclassing (by j2ee container apps, but hey) ... so you can try to add this functionality to your own LogManager and use that through the system property java.util.logging.manager.
    import java.io.*;
    import java.security.*;
    import java.util.*;
    import java.util.logging.*;
    * All properties whose names end with ".handlers" are assumed to define a
    * whitespace separated list of class names for handler classes to load and
    * register as handlers on the logger (whose name corresponds to the property
    * prefix). Each class name must be for a Handler class which has a default
    * constructor.
    public class CustomLogManager extends LogManager
        public CustomLogManager()
            super();
         * Overwritten to also add handlers
        public synchronized boolean addLogger(Logger logger)
            final boolean res = super.addLogger(logger);
            final String property = logger.getName() + ".handlers";
            if ( null != getProperty(property) )
                setHandlers(logger, property);
            return res;
        // Taken from java/util/logging/LogManager.java#initializeGlobalHandlers()
        private void setHandlers(final Logger logger, final String property)
            // We need to raise privilege here.  All our decisions will
            // be made based on the logging configuration, which can
            // only be modified by trusted code.
            AccessController.doPrivileged(new PrivilegedAction() {
                public Object run() {
                    // Add new global handlers.
                    String names[] = parseClassNames(property);
                    for (int i = 0; i < names.length; i++) {
                        String word = names;
    try {
    Class clz = ClassLoader.getSystemClassLoader().loadClass(word);
    Handler h = (Handler) clz.newInstance();
    try {
    // Check if there is a property defining the
    // handler's level.
    String levs = getProperty(word + ".level");
    if (levs != null) {
    h.setLevel(Level.parse(levs));
    } catch (Exception ex) {
    System.err.println("Can't set level for " + word);
    // Probably a bad level. Drop through.
    logger.addHandler(h);
    } catch (Exception ex) {
    System.err.println("Can't load log handler \"" + word + "\"");
    System.err.println("" + ex);
    ex.printStackTrace();
    return null;
    // Taken from java/util/logging/LogManager.java
    // get a list of whitespace separated classnames from a property.
    private String[] parseClassNames(String propertyName) {
    String hands = getProperty(propertyName);
    if (hands == null) {
    return new String[0];
    hands = hands.trim();
    int ix = 0;
    Vector result = new Vector();
    while (ix < hands.length()) {
    int end = ix;
    while (end < hands.length()) {
    if (Character.isWhitespace(hands.charAt(end))) {
    break;
    if (hands.charAt(end) == ',') {
    break;
    end++;
    String word = hands.substring(ix, end);
    ix = end+1;
    word = word.trim();
    if (word.length() == 0) {
    continue;
    result.add(word);
    return (String[]) result.toArray(new String[result.size()]);
    On the other hand, it might be possible to write a reusable config class which does that kind of initialization, too.

  • Ethernet problems installing Solaris 10 on Ultra 5

    I am trying to install on a Sun Sparc Ultra 5 which I have inherited. The machine booted up OK with Solaris 7 with the old user's set up, but I do not have his ids or passwords.
    When I try to install Solaris 10, early in the boot it comes up with "attempting to configure interface hme0..."
    the a wait for a while then "Skipped interface hme0"
    The network is OK and so is the cable - I checked them by swapping the leads with my lap top which could access the network fine.
    I then went through and selected the language (English), selected 'networked', 'dhcp' then 'IPv6' then it comes up with "just a moment" then a long wait before "Could not contact a dhcp server on network interface hme0"
    The dhcp server on the University network was fine.
    I would be very grateful for any ideas or suggestions.
    Many thanks,
    Chris.

    Christian,
    The integrated NIC may or may not be working.
    I'm going to presume you have a Sun keyboard, a Sun mouse and a monitor connected.
    I'm also going to presume, unless you tell us otherwise, that you have never worked with Sun systems, before this Ultra-5.
    Boot the system.
    Just as you see a signal successfully activate the monitor, hold the STOP key and press the letter "A".
    This stop-a sequence will halt the boot process and leave you at OpenBoot. Your screen prompt will the the word <b>OK</b>
    There are many tests that you can perform at OBP, without invoking any OS. For today's tasks, you can prepare the chassis for a network circuit test.
    Do ...
    <b> OK set-defaults</b> <enter>
    <b>OK setenv auto-boot? false</b> <enter> (note the question mark character)
    <b>OK reset-all</b> <enter>
    Those three items will clear the OBP of any confusing or customized settings, then it will prepare the chassis to always stop automatically at the OK prompt, then it will write your choices to the PROM and reboot the system.
    You can reset the <i>auto-boot?</i> back to true when you are finished.
    After the reboot it should automatically stop at OK.
    If it does not do so, then you had a typo in your commands.
    Type <b>sifting watch</b> to be presented with all the command syntax that includes the word "watch". Find the network test that checks for connectivity.
    Do ...
    <b>OK watch-net</b> <enter>
    If the Ethernet port has link to a valid network, you will see dots scroll along. An occasional 'X' is a lost packet.
    You can download the 211+ page PDF file for the OBP 3.x command reference from Sun's documentation site, Docs.Sun.Com.
    http://docs.sun.com/app/docs/coll/1140.2?q=openboot+command+ reference
    This is all described in that PDF.

  • Issues updating/setting multi value lookup columns via powershell

    Hi All,
         I have an issue updating multi values in a lookup field via powershell
    I can update a single value  lookup field as below but can't get to update if its multi value.
    As stated below when I hardcode it. It works.
    No idea what 'm missing. Any help will be appreciated.
    #Hardcoded works below as you can see i'm setting 3 values
    $array = @($realval.Split(';'))
    for ($i = 0; $i -lt $array.Count - 1; $i += 2)
    $word = $array[$i].Trim('#')
    $number = $array[$i+1].Trim('#')
    "$number $word"
    $lookupvalue1 = GetLookUpValues -val $number
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue = New-Object Microsoft.SharePoint.SPFieldLookupValue
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue2 = New-Object Microsoft.SharePoint.SPFieldLookupValue
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue3 = New-Object Microsoft.SharePoint.SPFieldLookupValue
    $lookupvalue.LookupId = 1
    $lookupvalue2.LookupId = 2
    $lookupvalue3.LookupId = 6
    $itemValues.Add($lookupvalue)
    $itemValues.Add($lookupvalue2)
    $itemValues.Add($lookupvalue3)
    #$itemValues.Add($lookupvalue)
    $CMRSItems["Event Type"] = $itemValues;
    Write-Host "items:" $itemValues
    $CMRSItems.Update()
    # This works when its updating only one value but when it needs to update multivalue it only updates the last one
    #so for example with the lookupvalue above only 6 gets updated below
    $array = @($realval.Split(';'))
    for ($i = 0; $i -lt $array.Count - 1; $i += 2)
    $word = $array[$i].Trim('#')
    $number = $array[$i+1].Trim('#')
    #$number
    "$number $word"
    #send param to GetLoolValues func to return records as SPFieldLookupValue
    $lookupvalue1 = GetLookUpValues -val $number
    #I can view the lookupvalue returned successfully
    #Write-Host $lookupvalue1
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    #This LookupId returns 3 values like on the hardcoded one above like so :1,2,6
    $lookupvalue.LookupId = $number
    $itemValues.Add($lookupvalue)
    $CMRSItems["Event Type"] = $itemValues;
    #I can view the items returned successfully
    Write-Host "items:" $itemValues
    $CMRSItems.Update()

    The problem I can see with your code is that the below line of code, you are instantiating inside the for loop. This should have been outside the for loop as by keeping it inside the loop you are overriding the value.
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    Please have a look at the below solution and modify your code as per your requirement. What I am trying to achieve in the below code is that I have a listA in which one of the field is being used as a multi-lookup in my listB.
    $lookupCollection = $something.split(";")
    $LookupMasterList=$web.Lists["ListA"]
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $lookupValueCollection = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    #Get the Lookup Item from Parent List
    foreach($item in $lookupCollection){
    IF([string]::IsNullOrEmpty($item.trim())) {
    continue;
    $LookupItem = $LookupMasterList.Items | Where-Object { $_.Item("FieldInternalName") -eq $item.trim()}
    if($LookupItem -ne $null)
    $myLookup = New-Object Microsoft.Sharepoint.SPFieldLookupValue($LookupItem.ID,$item.trim())
    $lookupValueCollection.Add($myLookup);
    #Set the Lookup field value
    if([string]::IsNullOrEmpty($lookupValueCollection)){
    continue;
    else{
    $newItem["Lookupfieldinternalname"] = $lookupValueCollection
    The above logic has no hard coding and it fetches the lookup information directly from the master list and generates a collection based on that. You can modify the above code as per your requirement.
    Geetanjali Arora | My blogs |

  • Program design flaw in After Effects - Position

    I am having a heck of a time getting my credits to scroll up properly. A major problem is the program automatically adds a keyframe point every time one moves things. My credits start and stop at bizarre places, and at more places than there appears to be key frames,or they go in the wrong direction and then change direction on their own accord. And the process of placing or modifying the start and finish positions of the text is not at all intuitive. I cannot even figure out whether the first keypoint is supposed to be the start, or finish point.Yes, I've watched the videos, and read the help, but I would be grateful for some simple instruction how I can get a long credit to scroll.
    Also, there seems to be no master command to disengage or delete all command information for say position. I have been using the revert function, but one should be able to cancel everything at once if desired.

    I've seen your desperate posts from the past few days, and I gotta tell you: I can feel your pain, but you really are trying to jump into the deep end of the pool, and your lack of basic AE knowledge is like wearing lead weights when you jump in.  It doesn't help that AE is definitely NOT an application you can use intuitively, nor does it help that AE's online help is more of a reference tool than it is a learning tool... Adobe really has to work on that.
    AE has its own way of thinking.  Its own arcane lexicon.  Its own way of solving a problem.  It's really tough for a beginner to grasp that.  While many applications have a quick-start, get-your-feet-wet set of instructions, AE doesn't.  It really demands that you walk before you run, that you learn the basics before you launch off into the fun stuff.  You can't define a trick you want to learn and expect to find a step-by-step how-to.
    So how do you learn the basics?  Forget about AE's online help: as mentioned earlier, it's a reference work, not a textbook.  Here's an example: you can look up "French Language" in the encyclopedia and find a wealth of information about its history, a brief description of syntax, the origin of words, etc. but you won't learn French out of an encyclopedia.  You take a French class, invest in Rosetta Stone, get a French language textbook... a variety of things.  When starting to learn French, you don't make your first project a written critique of the works of Jean-Paul Sartre.  The same applies to learning AE.  It really is a lot like learning a foreign language.
    Here are some other learning options... but they all require learning the basics first: it's a fact of life in AE-Land.
    Todd's Getting Started link is a good beginning point, but it's no good if you're impatient.  You've got to go through it, and not cherry-pick what YOU think is important.  You'll probably be wrong.  There are also certain things that are lacking because it's all free, and the topics can be hit-and-miss.
    You say there's nothing like a book.  Fortunately, two highly-respected AE practitioners, Chris and Trish Meyer, have a set of books available for various AE versions.  They've been with After Effects since Version 1.  With the possible exception of CS 5.5, you'll find a fine "Learn AE" book by the Meyers, and it's just a google away.  The Meyers' books almost always come with footage and project files so you can play along at home.  I swear by these books for identifying the Basic Concepts And Things You Need To Know.  Again, patience is the watchword.
    There are quite a few books out besides the Meyer's works, and I've found them on the shelf at Barnes and Noble.  You can check 'em out yourself.  You might even find one called After Effects For Dummies, and you shouldn't take offense: EVERYBODY'S a dummy when they first begin learning AE.
    Total Training has AE training DVDs, and they're also highly-regarded.  I used them back when I was first learning AE (and I continue to learn AE to this day).  They too come complete with footage and project files.
    Todd and Angie Taylor, also highly-ranked among the Who's Who in the AE community, have training available on DVD:
    http://www.peachpit.com/store/product.aspx?isbn=0321734866
    Many of the lessons Todd links to in his Getting Started section come from this, but you get footage and files with the paid version.  I have this one myself, and I use it.
    Lynda.com also offers AE training, but I've never used it.
    That's a pretty good list of popular ways to learn After Effects, but each one stresses that learning the basics is essential.  Many have tried to learn AE the way you're currently doing it, and they've either failed, given up on AE (a real shame) or accepted that they need to learn it the recommended way.
    While you might not like what I just wrote, that's the situation: you learn AE a certain way, which may not be the way you want.  That's just the truth of it.

  • HOW TO REPLACE  THIS

    Hi
    Form
    Can somebody Tell me where am i doing Wrong
    if(WordPlus.startsWith("+~")) {
    WordPlus = WordPlus .replaceAll( "+~" , "+" );
    At run time the Execption is produced
    java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 0
    thx in advance

    Hi
    Form
    I Used the StringBuffer Replace ment Factor something like this
    as u advised but something turns up wrong in the 3rd and 4th if Condition
    The code is as below
    public string getReplace( String Word){
    String WordPlus = "",WordMinus = "";
    if(Word.startsWith("+~"){
    StringBuffer splus = new StringBuffer(Word);
    WordPlus = (splus.delete(0,2)+"")+trim();
    if(Word.startsWith("-~"){
    StringBuffer sminus = new StringBuffer(Word);
    WordMinus = (sminus .delete(0,2)+"")+trim();
    if(Word.startsWith("+"){
    if(Word.startsWith("-"){
    Word = "+" + WordPlus + "-" + WordMinus ;
    return Word;
    It the I/p is "+~Roses~"
    O/p is "+Roses~"
    but if I/p is "+Roses~
    O/p does not Reply any thing.
    Please Help me
    thx in advace

Maybe you are looking for

  • ITunes 11.1.3 issues - freezing during audio playback.

    Like many other folks on here, I'm having some playback issues with iTunes 11.1.3. Macbook (couple years old) 2.4 mhz 2 core- 4 gigs ram We use this computer primarily for music playback for dance classes and performances. Have run dozens of shows ov

  • New to running Vista on a Mac. Advice please

    I am about to purchase a MacBook with a 320GB hard drive a 4GB of Ram. I would like to have the ability to occasionally run Windows Vista. Should I partition the hard drive right way or can this be done later? I was thinking perhaps 250GB for the Mac

  • Issue viewing multiple embedded videos in single pdf

    Hello, I am having trouble viewing pdfs with more that three videos embedded.  For some reason only the first three videos play correctly.  All successive videos play a copy of one of the first 3 videos. If I change the order in which I view the vide

  • Does anybody have a WLST script for step-by-step cluster restart?

    Does anybody have a WLST script for step-by-step "smart" cluster restart?

  • Dynamic date in Archiver query

    Hello, I'm trying to set up a scheduled job in Archiver to remove old revisions higher than 20 and older than 2 months. I can get the results I need if I hard-code the date, but I'm looking for a way to put (current date - 2 months) into the Archiver